From: Jaroslav Kysela Date: Tue, 13 Oct 2015 06:47:00 +0000 (+0200) Subject: WEBUI: always reload grid (table) on delete request X-Git-Tag: v4.2.1~1930 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3e19554126314be2abbd49eb7998f52c2fe5e39c;p=thirdparty%2Ftvheadend.git WEBUI: always reload grid (table) on delete request --- diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index 777eb3f03..c6d301b91 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -1137,12 +1137,17 @@ tvheadend.idnode_grid = function(panel, conf) var idnode = null; var update = function(o) { - if ('delete' in o) + if ((o.create || 'delete' in o) && auto.getValue()) { + store.reload(); + return; + } + if ('delete' in o) { Ext.each(o['delete'], function (d) { var r = store.getById(d); if (r) store.remove(r); }); + } if (o.change) { var ids = []; Ext.each(o.change, function(id) { @@ -1168,8 +1173,6 @@ tvheadend.idnode_grid = function(panel, conf) }); } } - if (o.create && auto.getValue()) - store.reload(); }; var update2 = function(o) {