Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   PHP, PERL, MySQL, JavaScript (https://forum.antichat.xyz/forumdisplay.php?f=37)
-   -   [JS] Вопрос по работе с комплектом Ext 2.0 (https://forum.antichat.xyz/showthread.php?t=50559)

GHostly_FOX 05.10.2007 16:29

[JS] Вопрос по работе с комплектом Ext 2.0
 
Необходимо добавить items в объект new Ext.TabPanel.
Как это сделать?

Используется комплект Ext 2.0 (link:_http://extjs.com/download)
Код:

Ext.onReady(function(){

        Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
       
      var viewport = new Ext.Viewport({
            layout:'border',
            items:[
                new Ext.BoxComponent({
                    region:'north',
                    el: 'north',
                    height:32
                }),{
                    region:'south',
                    contentEl: 'south',
                    split:true,
                    height: 100,
                    minSize: 100,
                    maxSize: 200,
                    collapsible: true,
                    title:'South',
                    margins:'0 0 0 0'
                }, {
                    region:'east',
                    title: 'East Side',
                    collapsible: true,
                    split:true,
                    width: 225,
                    minSize: 175,
                    maxSize: 400,
                    layout:'fit',
                    margins:'0 5 0 0',
                    items:
                        new Ext.TabPanel({
                            border:false,
                            activeTab:1,
                            tabPosition:'bottom',
                            items:[{
                                html:'<p>A TabPanel component can be a region.</p>',
                                title: 'A Tab',
                                autoScroll:true
                            },
                            new Ext.grid.PropertyGrid({
                                title: 'Property Grid',
                                closable: true,
                                source: {
                                    "(name)": "Properties Grid",
                                    "grouping": false,
                                    "autoFitColumns": true,
                                    "productionQuality": false,
                                    "created": new Date(Date.parse('10/15/2006')),
                                    "tested": false,
                                    "version": .01,
                                    "borderWidth": 1
                                }
                            })]
                        })
                },{
                    region:'west',
                    id:'west-panel',
                    title:'Меню',
                    split:true,
                    width: 200,
                    minSize: 175,
                    maxSize: 400,
                    collapsible: true,
                    margins:'0 0 0 5',
                    layout:'accordion',
                    layoutConfig:{
                        animate:true
                    },
                    items: [{
                        contentEl: 'west',
                        title:'Публикации',
                        border:false,
                        iconCls:'pub'
                    },{
                        title:'Настройки скрипта',
                        html:'<p>Some settings in here.</p>',
                        border:false,
                        iconCls:'settings'
                    },{
                        title:'Управление пользователями',
                        html:'<p>Some settings in here.</p>',
                        border:false,
                        iconCls:'user'
                    },{
                        title:'Управление шаблонами',
                        html:'<p>Some settings in here.</p>',
                        border:false,
                        iconCls:'template'
                    },{
                        title:'Утилиты',
                        html:'<p>Some settings in here.</p>',
                        border:false,
                        iconCls:'plugin'
                    },{
                        title:'Другие разделы',
                        html:'<p>Some settings in here.</p>',
                        border:false,
                        iconCls:'settings'
                    }]
                },
                new Ext.TabPanel({
                    region:'center',
                    deferredRender:false,
                    activeTab:0,
                    items:[{
                        contentEl:'center1',
                        title: 'Close Me',
                        closable:true,
                        autoScroll:true
                    },{
                        contentEl:'center2',
                        title: 'Center Panel',
                        autoScroll:true
                    }]
                })
            ]
        });
    });



Время: 20:12