From: Marcin Haba Date: Sun, 13 Dec 2015 20:51:04 +0000 (+0100) Subject: baculum: Do not refresh window lists if toolbar is open or elements are checked X-Git-Tag: Release-7.4.0~131 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a8782f4dc89014ecb5f00a22167adf95c8526f84;p=bacula%2Fbacula baculum: Do not refresh window lists if toolbar is open or elements are checked --- diff --git a/gui/baculum/protected/JavaScript/slide-window.js b/gui/baculum/protected/JavaScript/slide-window.js index d0d329c02d..cbb7c63c8f 100644 --- a/gui/baculum/protected/JavaScript/slide-window.js +++ b/gui/baculum/protected/JavaScript/slide-window.js @@ -405,11 +405,10 @@ var SlideWindowClass = Class.create({ return $(this.windowId + this.elements.toolbarSuffix).visible(); }, setActions: function() { - var table = $(this.window).down('table'); - var checkboxes = table.select('input[name="actions_checkbox"]'); + var checkboxes = this.getCheckboxes(); checkboxes.each(function(el) { el.observe('change', function() { - var is_checked = this.is_any_checked(checkboxes); + var is_checked = this.isAnyChecked(checkboxes); if(is_checked === true && !this.areActionsOpen()) { this.showActions(); } else if (is_checked === false && this.areActionsOpen()) { @@ -418,7 +417,7 @@ var SlideWindowClass = Class.create({ }.bind(this)); }.bind(this)); }, - is_any_checked: function(checkboxes) { + isAnyChecked: function(checkboxes) { var is_checked = false; checkboxes.each(function(ch) { if(ch.checked == true) { @@ -429,10 +428,19 @@ var SlideWindowClass = Class.create({ return is_checked; }, + getCheckboxes: function() { + var checkboxes = $(this.gridEl).select('input[name="actions_checkbox"]'); + return checkboxes; + }, + + areCheckboxesChecked: function() { + var checkboxes = this.getCheckboxes(); + return this.isAnyChecked(checkboxes); + }, + markAllChecked: function(check) { this.checked = []; - var table = $(this.window).down('table'); - var checkboxes = table.select('input[name="actions_checkbox"]'); + var checkboxes = this.getCheckboxes(); var containerId; if(checkboxes.length > 0) { checkboxes.each(function(ch, index) { diff --git a/gui/baculum/protected/Portlets/ClientConfiguration.tpl b/gui/baculum/protected/Portlets/ClientConfiguration.tpl index 9e480b55fe..fd13e84479 100644 --- a/gui/baculum/protected/Portlets/ClientConfiguration.tpl +++ b/gui/baculum/protected/Portlets/ClientConfiguration.tpl @@ -35,6 +35,13 @@ diff --git a/gui/baculum/protected/Portlets/JobRunConfiguration.tpl b/gui/baculum/protected/Portlets/JobRunConfiguration.tpl index 1fecd5e396..01c86e3e41 100644 --- a/gui/baculum/protected/Portlets/JobRunConfiguration.tpl +++ b/gui/baculum/protected/Portlets/JobRunConfiguration.tpl @@ -121,6 +121,13 @@