From: Jaroslav Kysela Date: Mon, 25 Jan 2016 08:52:38 +0000 (+0100) Subject: WEBUI: reload on UI language change or quicktips change, fixes #3377 X-Git-Tag: v4.2.1~1127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e913fd2c17321a94f14d26d984765feb08895c7;p=thirdparty%2Ftvheadend.git WEBUI: reload on UI language change or quicktips change, fixes #3377 --- diff --git a/src/webui/static/app/config.js b/src/webui/static/app/config.js index 83623bfff..cad57de5e 100644 --- a/src/webui/static/app/config.js +++ b/src/webui/static/app/config.js @@ -32,18 +32,25 @@ tvheadend.baseconf = function(panel, index) { comet: 'config', labelWidth: 250, tbar: [wizardButton], - postsave: function(data) { + postsave: function(data, abuttons, form) { + var reload = 0; var l = data['uilevel']; if (l >= 0) { var tr = {0:'basic',1:'advanced',2:'expert'}; l = (l in tr) ? tr[l] : 'basic'; - if (l !== tvheadend.uilevel) { - window.location.reload(); - return; - } + if (l !== tvheadend.uilevel) + reload = 1; } var n = data['uilevel_nochange'] ? true : false; if (n !== tvheadend.uilevel_nochange) + reload = 1; + var n = data['ui_quicktips'] ? true : false; + if (tvheadend.quicktips !== n) + reload = 1; + var f = form.findField('language_ui'); + if (f.initialConfig.value !== data['language_ui']) + reload = 1; + if (reload) window.location.reload(); }, help: function() { diff --git a/src/webui/static/app/idnode.js b/src/webui/static/app/idnode.js index deaadbd87..04b719a01 100644 --- a/src/webui/static/app/idnode.js +++ b/src/webui/static/app/idnode.js @@ -2730,7 +2730,7 @@ tvheadend.idnode_simple = function(panel, conf) }, success: function() { if (conf.postsave) - conf.postsave(node, abuttons); + conf.postsave(node, abuttons, current.getForm()); form_load(true); } }); diff --git a/src/webui/static/app/tvheadend.js b/src/webui/static/app/tvheadend.js index 992cc8f5e..d11bcdb54 100644 --- a/src/webui/static/app/tvheadend.js +++ b/src/webui/static/app/tvheadend.js @@ -442,7 +442,7 @@ function accessUpdate(o) { if (o.uilevel) tvheadend.uilevel = o.uilevel; - tvheadend.quicktips = o.quicktips; + tvheadend.quicktips = o.quicktips ? true : false; if (o.uilevel_nochange) tvheadend.uilevel_nochange = true;