diff options
author | Andrew Dolgov <[email protected]> | 2021-02-12 10:35:13 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-12 10:35:13 +0300 |
commit | bf6d0f28173ca38968e5a23b86758d1dce133e1d (patch) | |
tree | 3daef1f2edb3a320a56eac6a48d3dc08c885b010 /js/PrefHelpers.js | |
parent | 72e38bfe1faa57ec15068c5ac0e53a0d7a4dc8cf (diff) |
various dialog-related fixes; stop referring to many dialogs by name; move filter test initial dialog to client side
Diffstat (limited to 'js/PrefHelpers.js')
-rw-r--r-- | js/PrefHelpers.js | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js index 966e8151e..dd8fef5c6 100644 --- a/js/PrefHelpers.js +++ b/js/PrefHelpers.js @@ -118,22 +118,6 @@ const Helpers = { alert(__("No profiles selected.")); } }, - activateProfile: function () { - const sel_rows = this.getSelectedProfiles(); - - if (sel_rows.length == 1) { - if (confirm(__("Activate selected profile?"))) { - Notify.progress("Loading, please wait..."); - - xhrPost("backend.php", {op: "rpc", method: "setprofile", id: sel_rows.toString()}, () => { - window.location.reload(); - }); - } - - } else { - alert(__("Please choose a profile to activate.")); - } - }, addProfile: function () { if (this.validate()) { Notify.progress("Creating profile...", true); @@ -148,8 +132,19 @@ const Helpers = { } }, execute: function () { - if (this.validate()) { - // + const sel_rows = this.getSelectedProfiles(); + + if (sel_rows.length == 1) { + if (confirm(__("Activate selected profile?"))) { + Notify.progress("Loading, please wait..."); + + xhrPost("backend.php", {op: "rpc", method: "setprofile", id: sel_rows.toString()}, () => { + window.location.reload(); + }); + } + + } else { + alert(__("Please choose a profile to activate.")); } }, href: query |