WEBUI JS: enum lists are sorted using case-insensitive type now
This commit is contained in:
parent
3cde304b1b
commit
3a37aa0304
2 changed files with 9 additions and 15 deletions
|
@ -31,26 +31,13 @@ insertChannelClearOption = function( scope, records, options ){
|
|||
scope.insert(0,new placeholder({key: '-1', val: '(Clear filter)'}));
|
||||
};
|
||||
|
||||
tvheadend.channels = new Ext.data.JsonStore({
|
||||
tvheadend.channels = tvheadend.idnode_get_enum({
|
||||
url: 'api/channel/list',
|
||||
root: 'entries',
|
||||
fields: ['key', 'val'],
|
||||
id: 'key',
|
||||
autoLoad: true,
|
||||
sortInfo: {
|
||||
field: 'val',
|
||||
direction: 'ASC'
|
||||
},
|
||||
listeners: {
|
||||
'load': insertChannelClearOption
|
||||
}
|
||||
});
|
||||
|
||||
tvheadend.comet.on('channels', function(m) {
|
||||
if (m.reload != null)
|
||||
tvheadend.channels.reload();
|
||||
});
|
||||
|
||||
tvheadend.channel_tab = function(panel, index)
|
||||
{
|
||||
function decode_dot_number(number) {
|
||||
|
|
|
@ -21,7 +21,14 @@ tvheadend.idnode_get_enum = function(conf)
|
|||
root: conf.root || 'entries',
|
||||
url: conf.url,
|
||||
baseParams: conf.params || {},
|
||||
fields: conf.fields || ['key', 'val'],
|
||||
fields: conf.fields ||
|
||||
[
|
||||
'key',
|
||||
{
|
||||
name: 'val',
|
||||
sortType: Ext.data.SortTypes.asUCString
|
||||
}
|
||||
],
|
||||
id: conf.id || 'key',
|
||||
autoLoad: true,
|
||||
listeners: conf.listeners || {},
|
||||
|
|
Loading…
Add table
Reference in a new issue