From a90ec4cce7ca3838d8b414389d7d7232227a23d0 Mon Sep 17 00:00:00 2001 From: ngosang Date: Fri, 15 May 2015 21:54:15 +0200 Subject: [PATCH] Web UI: Fix resumeAll and pauseAll. Closes #3016 --- src/webui/www/public/scripts/mocha-init.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/webui/www/public/scripts/mocha-init.js b/src/webui/www/public/scripts/mocha-init.js index fae874419..5232dc98e 100644 --- a/src/webui/www/public/scripts/mocha-init.js +++ b/src/webui/www/public/scripts/mocha-init.js @@ -305,10 +305,21 @@ initializeWindows = function() { } }).send(); }); + updateMainData(); } }; - ['pauseAll', 'resumeAll', 'pause', 'resume', 'recheck'].each(function(item) { + ['pauseAll', 'resumeAll'].each(function(item) { + addClickEvent(item, function(e) { + new Event(e).stop(); + new Request({ + url: 'command/' + item + }).send(); + updateMainData(); + }); + }); + + ['pause', 'resume', 'recheck'].each(function(item) { addClickEvent(item, function(e) { new Event(e).stop(); var h = myTable.selectedIds(); @@ -325,13 +336,6 @@ initializeWindows = function() { updateMainData(); } }); - - addClickEvent(item + 'All', function(e) { - new Event(e).stop(); - new Request({ - url: 'command/' + item + 'all' - }).send(); - }); }); ['decreasePrio', 'increasePrio', 'topPrio', 'bottomPrio'].each(function(item) { @@ -396,4 +400,4 @@ initializeWindows = function() { new Event(e).stop(); }); }); -} \ No newline at end of file +}