Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI JS: enum lists are sorted using case-insensitive type now
  • Loading branch information
perexg committed Oct 1, 2014
1 parent 3cde304 commit 3a37aa0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
15 changes: 1 addition & 14 deletions src/webui/static/app/chconf.js
Expand Up @@ -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) {
Expand Down
9 changes: 8 additions & 1 deletion src/webui/static/app/idnode.js
Expand Up @@ -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 || {},
Expand Down

0 comments on commit 3a37aa0

Please sign in to comment.