Sha256: fe6a5075bb93fe199af09c4ce4cb5c4a983ce2f9eafd34e4a6d7e172a7957b7a

Contents?: true

Size: 1.69 KB

Versions: 26

Compression:

Stored size: 1.69 KB

Contents

Ext.define("Compass.ErpApp.Organizer.DefaultMenuTreeStore",{
    extend:"Ext.data.TreeStore",
    alias:'widget.defaultmenutreestore',

    constructor: function(config){
        var fields = [{
            name:'text'
        },{
            name:'leaf'
        },{
            name:'iconCls'
        },{
            name:'applicationCardId'
        }];
    
        if(config['additionalFields']){
            fields = fields.concat(config['additionalFields']);
        }

        config = Ext.apply({
            autoLoad:true,
            proxy: {
                type: 'ajax',
                url: config['url']
            },
            root: {
                text: config['rootText'],
                expanded: true,
                iconCls:config['rootIconCls']
            },
            fields:fields
        }, config);

        this.callParent([config]);
    }
});


Ext.define("Compass.ErpApp.Organizer.DefaultMenuTreePanel",{
    extend:"Ext.tree.Panel",
    alias:'widget.defaultmenutree',
    treePanel: null,
    
    constructor: function(config) {
        var setActiveCenterItemFn = function(view, record, item, index, e){
            if (record.data.applicationCardId) {
                Compass.ErpApp.Organizer.Layout.setActiveCenterItem(record.data.applicationCardId);
            }
        };

        if(!config['listeners'])
            config['listeners'] = {}; 
        config.listeners['itemclick'] = setActiveCenterItemFn;

        config = Ext.apply({
            animate:true,
            autoScroll:false,
            frame:false,
            containerScroll:true,
            height:300,
            border:false
        }, config);
        
        this.callParent([config]);
    }
});



Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
erp_app-4.0.0 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.16 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.15 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.14 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.13 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.12 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.11 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.10 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.9 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.8 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.7 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.6 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.5 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.4 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.3 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.2 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.0.16 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.0.15 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.1 public/javascripts/erp_app/organizer/default_menu_tree_panel.js
erp_app-3.1.0 public/javascripts/erp_app/organizer/default_menu_tree_panel.js