вторник, 9 октября 2012 г.

ExtJS Каркас

// Вкладки и каркас

var tabpanel = Ext.create('Ext.tab.Panel', {
    items: [
        {
            title: 'Отчеты',
            layout: 'border',
            items: [
                {
                    xtype: 'panel',
                    region: 'north',
                    border: false,
                    items: [toolbar]
                },
                {
                    xtype: 'panel',
                    region: 'center',
                    layout: 'border',
                    width: '50%',
                    border: false,
                    items: [
                        {
                            xtype: 'panel',
                            region: 'center',
                            layout: 'fit',
                            items: [user_table]
                        },
                        {
                            xtype: 'panel',
                            region: 'south',
                            bodyStyle: 'background-color: #dfe8f5;',
                            split: true,
                            items: [user_data_form]
                        }
                    ]
                },
                {
                    xtype: 'panel',
                    region: 'east',
                    layout: 'border',
                    width: '50%',
                    border: false,
                    split: true,
                    items: [
                        {
                            xtype: 'panel',
                            region: 'center',
                            layout: 'fit',
                            items: [comments_table]
                        },
                        {
                            xtype: 'panel',
                            region: 'south',
                            bodyStyle: 'background-color: #dfe8f5;',
                            split: true,
                            items: [comment_data_form]
                        }
                    ]
                }
            ]
        },
        {
            title: 'Демонстрационная вкладка',
            html: 'Просто демонстрационный текст.'
        }
    ]
});

Ext.onReady(function(){
                   
    Ext.QuickTips.init();

    Ext.create('Ext.Viewport', {
        layout:'fit',
        items: [tabpanel]
    });

});

Комментариев нет:

Отправить комментарий