From 469f8343d77cc4382ad733e50cdf7fb01ff6f371 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 22 Oct 2014 09:59:51 +0200 Subject: [PATCH] WEBUI JS: Add channel icon reset --- src/webui/static/app/chconf.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/webui/static/app/chconf.js b/src/webui/static/app/chconf.js index 83952525..1fd5dee2 100644 --- a/src/webui/static/app/chconf.js +++ b/src/webui/static/app/chconf.js @@ -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,