Sha256: 693e4f3a9c230ecdfdab367e6c2741ce88b3e549d297a6ccccc6354197d5b763

Contents?: true

Size: 1.44 KB

Versions: 6

Compression:

Stored size: 1.44 KB

Contents

Ext.define('FastUI.view.VWindow', {
    extend:'Ext.TabPanel',
    requires:['FastUI.Env'],
    alias:'widget.vwindow',
    valueObject: {},
    activeTab: 0,
    closable: true,
    tabPosition : "left",
    border:true,
    initComponent:function(){
        this.winCtx = FastUI.Env.getCtx();
        this.title = this.getValue('title');
        this.subs = [];
        this.callParent();
    },
    getValue:function(key){
        return this.valueObject[key];
    },
    getTabValues:function(){
        return this.valueObject.tabs;
    },
    listeners:{
        afterrender: function(vwindow, opts) {

        },
        beforerender:function (vwindow, opts) {
            this.loadTabs(vwindow, opts);
        }
    },
    loadTabs:function (vwindow, opts) {
        //vwindow.getSubTabs(0,'');
        Ext.each(vwindow.getTabValues(), function (mtab) {
            var vTab = Ext.create('FastUI.view.VTab', {
                valueObject: mtab,
                winId:vwindow.id,
                winCtx: vwindow.winCtx
            });
            vwindow.add(vTab);
        });
        vwindow.setActiveTab(0);
    },
    getSubTabs:function(pid,level){
        Ext.each(this.getTabValues(),function(tab){
            if(tab.included_tab == pid){
                tab.level =  level;
                this.subs.push(tab);
                this.getSubTabs(tab.id,level + ' ');
            }
        },this);
    }
});

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fastui-0.1.8 app/assets/javascripts/fastui/app/view/VWindow.js
fastui-0.1.7 app/assets/javascripts/fastui/app/view/VWindow.js
fastui-0.1.6 app/assets/javascripts/fastui/app/view/VWindow.js
fastui-0.1.4 app/assets/javascripts/fastui/app/view/VWindow.js
fastui-0.1.3 app/assets/javascripts/fastui/app/view/VWindow.js
fastui-0.1.2 app/assets/javascripts/fastui/app/view/VWindow.js