]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
WEBUI JS: Add channel icon reset
authorJaroslav Kysela <perex@perex.cz>
Wed, 22 Oct 2014 07:59:51 +0000 (09:59 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 22 Oct 2014 08:06:23 +0000 (10:06 +0200)
src/webui/static/app/chconf.js

index 83952525dea286879350e6b824f503939e0d385a..1fd5dee2706471130f6c8332f19cf6e4987a5ab2 100644 (file)
@@ -130,6 +130,12 @@ tvheadend.channel_tab = function(panel, index)
         sel[1].set('number', tmp);
     }
 
+    function reset_icons(ctx, e, store, sm) {
+        Ext.each(sm.getSelections(), function(channel) {
+           channel.set('icon', '');
+        });
+    }
+
     var mapButton = {
         name: 'map',
         builder: function() {
@@ -195,6 +201,19 @@ tvheadend.channel_tab = function(panel, index)
         callback: swap_numbers
     };
 
+    var iconResetButton = {
+        name: 'iconreset',
+        builder: function() {
+            return new Ext.Toolbar.Button({
+                tooltip: 'Reset (clear) the selected icon URLs',
+                iconCls: 'cancel',
+                text: 'Reset Icon',
+                disabled: false
+            });
+        },
+        callback: reset_icons
+    };
+
     tvheadend.idnode_grid(panel, {
         url: 'api/channel',
         comet: 'channel',
@@ -210,7 +229,7 @@ tvheadend.channel_tab = function(panel, index)
             create: {}
         },
         del: true,
-        tbar: [mapButton, lowNoButton, noUpButton, noDownButton, noSwapButton],
+        tbar: [mapButton, lowNoButton, noUpButton, noDownButton, noSwapButton, iconResetButton],
         lcol: [
             {
                 width: 50,