From 8dd11f8e026939416574675625c2b75387c02740 Mon Sep 17 00:00:00 2001 From: Andrey Prygunkov Date: Sat, 5 Aug 2017 22:58:20 +0200 Subject: [PATCH] #421: 45b57273744b14c3bc9ec5a3cbc360c14b325bdb: fixed messages filter buttons disappeared --- webui/config.js | 14 ++++++++------ webui/index.js | 2 +- webui/messages.js | 12 ++++++------ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/webui/config.js b/webui/config.js index 5d859a44a..df79ba224 100644 --- a/webui/config.js +++ b/webui/config.js @@ -54,12 +54,14 @@ var Options = (new function($) this.update = function() { - // RPC-function "config" returns CURRENT configurations settings loaded in NZBGet - RPC.call('config', [], function(_options) { - _this.options = _options; - initCategories(); - _this.restricted = _this.option('ControlPort') === '***'; - }); + // RPC-function "config" returns CURRENT configuration settings loaded in NZBGet + RPC.call('config', [], function(_options) + { + _this.options = _options; + initCategories(); + _this.restricted = _this.option('ControlPort') === '***'; + RPC.next(); + }); // loading config templates and build list of post-processing parameters _this.postParamConfig = []; diff --git a/webui/index.js b/webui/index.js index d56dd0cbd..ceaf04dc8 100644 --- a/webui/index.js +++ b/webui/index.js @@ -774,7 +774,7 @@ var Refresher = (new function($) if (firstLoad) { - loadQueue++; + loadQueue += 2; // options and configtemplates Options.update(); } } diff --git a/webui/messages.js b/webui/messages.js index f3cf6a8fa..f89f0402d 100644 --- a/webui/messages.js +++ b/webui/messages.js @@ -99,12 +99,6 @@ var Messages = (new function($) function loaded(newMessages) { - if (maxMessages === null) - { - maxMessages = parseInt(Options.option('LogBufferSize')); - initFilterButtons(); - } - merge(newMessages); RPC.next(); } @@ -129,6 +123,12 @@ var Messages = (new function($) this.redraw = function() { + if (maxMessages === null) + { + maxMessages = parseInt(Options.option('LogBufferSize')); + initFilterButtons(); + } + var data = []; for (var i=0; i < messages.length; i++)