/
List.js
executable file
·59 lines (52 loc) · 1.6 KB
/
List.js
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Ext.define('AD.view.country.List' ,{
extend: 'Ext.grid.Panel',
alias : 'widget.countrylist',
constructor: function(config){
config= config|| {};
config.store= config.store || 'Country',
config.frame = config.frame==undefined? false:config.frame;
config.selType = config.selType || 'rowmodel';
config.height = config.height|| 350;
config.width = config.width || 600;
config.margin=config.margin|| '2 2 2 2';
config.viewConfig = config.viewConfig || {
stripeRows: true
};
if (arguments.length==0 )
this.callParent([config]);
else
this.callParent(arguments);
},
initComponent: function() {
this.columns = [{
text : 'Country Name',
flex : 1,
sortable : true,
dataIndex: 'Name'
},{
text : 'Continent',
width : 200,
sortable : true,
dataIndex: 'Continent'
}];
this.dockedItems= [{
xtype: 'toolbar',
items: [{
//id: 'countryNewButton',
text:'New Country',
tooltip:'add new Country',
iconCls:'add',
disabled:true,
action: 'new'
},'-',{
//id: 'countryDeleteButton',
text:'Delete',
tooltip:'delete country',
iconCls:'remove',
disabled:true,
action: 'delete'
}]
}]
this.callParent(arguments);
}
});