1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
Ext.define('CcAgentsTreePanel',{
extend: 'Ext.tree.Panel',
constructor: function(config){
Ext.define('Agent', {
extend: 'Ext.data.Model',
fields: ['firstame']
});
this.store = Ext.create('Ext.data.TreeStore', {
autoLoad: true,
model: 'Agent',
proxy: {
type: 'ajax',
url: 'person/index',
reader: {
type: 'json'
}
},
root: {
expanded: true,
},
});
config = Ext.apply({
store: this.store,
rootVisible: false,
title: 'Agents',
iconCls: 'item-agents',
}, config);
this.callParent([config]);
},
}); |
Partager