Book Image

Ext JS Application Development Blueprints

Book Image

Ext JS Application Development Blueprints

Overview of this book

Table of Contents (18 chapters)
Ext JS Application Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The account window


The account view is a window that contains several subcomponents (such as login, register, and past orders). Let's take a look at the lengthy, but straightforward code for it:

// app/view/account/Account.js
Ext.define('Alcohology.view.account.Account', {
    extend: 'Ext.Window',
    xtype: 'account',
    layout: 'fit',
    controller: 'account',
    modal: true,
    resizable: false,
    header: false,
    onEsc: Ext.emptyFn,
    width: 800,
    autoHeight: true,
    frame: true,
    items: [
        {
            xtype: 'container',
            layout: 'column',
            items: [
                { xtype: 'login', title: 'Login', columnWidth: 0.5 },
                { xtype: 'register', title: 'Register', columnWidth: 0.5 }
            ],
            bind: { hidden: '{currentUser}' }
        },
        {
            xtype: 'container',
            layout: 'column',
            items: [
                { xtype: 'register', title: 'Register', columnWidth: 0.5 },
     ...