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
|
/*
* jason - Javascript based skin for xxv
* Copyright(c) 2008-2012, anbr
*
* http://projects.vdr-developer.org/projects/xxv
*
*/
Ext.xxv.storeChannels = function() {
return new Ext.data.Store({
autoLoad: true,
reader: new Ext.xxv.jsonReader({
fields: [
{name: 'id', type: 'string'},
{name: 'cid', type: 'string'},
{name: 'name', type: 'string'},
{name: 'group', type: 'string'},
{name: 'position', type: 'int'},
{name: 'grpname', type: 'string'}
]
}),
proxy : new Ext.data.HttpProxy({
url: XXV.help.cmdAJAX('cl',{compact:1})
,method: 'GET'
})
// sortInfo:{field:'position', direction:'ASC'}
});
};
/******************************************************************************/
Ext.xxv.ChannelsCombo = function(config){
Ext.apply(this, config);
if(!this.id){
this.id = Ext.id();
}
this.renderer = this.renderer.createDelegate(this);
};
Ext.xxv.ChannelsCombo.prototype ={
init : function(grid){
},
renderer: function(value, p, record) {
for(var i = 0, len = this.store.data.length; i < len; i++){
var rec = this.store.getAt(i);
if(rec.data.position == value) {
return rec.data.name;
}
}
return record.data.channel;
}
};
|