1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-14 07:55:56 +00:00

various dialog-related fixes; stop referring to many dialogs by name; move filter test initial dialog to client side

This commit is contained in:
Andrew Dolgov
2021-02-12 10:35:13 +03:00
parent 72e38bfe1f
commit bf6d0f2817
8 changed files with 51 additions and 82 deletions

View File

@@ -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