]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
webui: remove old comet for channel tags, code cleanups
authorJaroslav Kysela <perex@perex.cz>
Thu, 4 Jan 2018 15:08:38 +0000 (16:08 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 4 Jan 2018 15:11:09 +0000 (16:11 +0100)
src/webui/static/app/chconf.js

index 6bf13fff04bd45dc01eed42655ea649aeabc0799..253f338e3cd25703c54631f6c3326a9897b12222 100644 (file)
@@ -1,37 +1,22 @@
-/**
- * Channel tags
- */
-insertChannelTagsClearOption = function( scope, records, options ){
-    var placeholder = Ext.data.Record.create(['key', 'val']);
-    scope.insert(0,new placeholder({key: '-1', val: _('(Clear filter)')}));
-};
-
 tvheadend.channelTags = tvheadend.idnode_get_enum({
     url: 'api/channeltag/list',
     event: 'channeltag',
     listeners: {
-        'load': insertChannelTagsClearOption
+        'load': function(scope, records, options) {
+            var placeholder = Ext.data.Record.create(['key', 'val']);
+            scope.insert(0,new placeholder({key: '-1', val: _('(Clear filter)')}));
+        }
     }
 });
 
-tvheadend.comet.on('channeltags', function(m) {
-    if (m.reload != null)
-        tvheadend.channelTags.reload();
-});
-
-/**
- * Channels
- */
-insertChannelClearOption = function( scope, records, options ){
-    var placeholder = Ext.data.Record.create(['key', 'val']);
-    scope.insert(0,new placeholder({key: '-1', val: _('(Clear filter)')}));
-};
-
 tvheadend.channels = tvheadend.idnode_get_enum({
     url: 'api/channel/list',
     event: 'channel',
     listeners: {
-        'load': insertChannelClearOption
+        'load': function(scope, records, options) {
+            var placeholder = Ext.data.Record.create(['key', 'val']);
+            scope.insert(0,new placeholder({key: '-1', val: _('(Clear filter)')}));
+        }
     }
 });