From 1403fd09e2340d244cee168425bc7d631cfe6fed Mon Sep 17 00:00:00 2001 From: Adam Sutton Date: Wed, 25 Sep 2013 09:40:40 +0100 Subject: [PATCH] webui: slightly horrible hack to get dialog to disappear on save --- src/webui/static/app/idnode.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index cbc5d4a8..1d950e81 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -400,6 +400,7 @@ tvheadend.idnode_editor = function(item, conf) node: Ext.encode(node) }, success : function(d) { + if (conf.win) conf.win.hide(); } }); } @@ -757,8 +758,10 @@ tvheadend.idnode_grid = function(panel, conf) success : function(d) { d = json_decode(d); - var p = tvheadend.idnode_editor(d[0], {}); - var w = new Ext.Window({ + var w = null; + var c = { win: w }; + var p = tvheadend.idnode_editor(d[0], c); + w = new Ext.Window({ title : 'Edit ' + conf.titleS, layout : 'fit', autoWidth : true, @@ -766,6 +769,7 @@ tvheadend.idnode_grid = function(panel, conf) plain : true, items : p }); + c.win = w; w.show(); } });