[JS] Вопрос по работе с комплектом Ext 2.0

Discussion in 'PHP' started by GHostly_FOX, 5 Oct 2007.

  1. GHostly_FOX

    GHostly_FOX Elder - Старейшина

    Joined:
    4 Jan 2007
    Messages:
    34
    Likes Received:
    15
    Reputations:
    0
    Необходимо добавить items в объект new Ext.TabPanel.
    Как это сделать?

    Используется комплект Ext 2.0 (link:_http://extjs.com/download)
    Code:
    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
                        }]
                    })
                 ]
            });
        });
     
    1 person likes this.