1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 22:15:56 +00:00

prefs: more of the same, really

This commit is contained in:
Andrew Dolgov
2018-12-02 16:29:00 +03:00
parent b9869dbc01
commit 3a6dae9203
5 changed files with 38 additions and 38 deletions

View File

@@ -86,11 +86,21 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
return rv;
},
reload: function() {
const user_search = $("filter_search");
let search = "";
if (user_search) { search = user_search.value; }
xhrPost("backend.php", { op: "pref-filters", search: search }, (transport) => {
dijit.byId('filterConfigTab').attr('content', transport.responseText);
notify("");
});
},
resetFilterOrder: function() {
notify_progress("Loading, please wait...");
xhrPost("backend.php", {op: "pref-filters", method: "filtersortreset"}, () => {
updateFilterList();
this.reload();
});
},
joinSelectedFilters: function() {
@@ -105,7 +115,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
notify_progress("Joining filters...");
xhrPost("backend.php", {op: "pref-filters", method: "join", ids: rows.toString()}, () => {
updateFilterList();
this.reload();
});
}
},
@@ -187,7 +197,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
const query = {op: "pref-filters", method: "remove", ids: this.attr('value').id};
xhrPost("backend.php", query, () => {
updateFilterList();
dijit.byId("filterTree").reload();
});
}
},
@@ -214,7 +224,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
xhrPost("backend.php", dojo.formToObject("filter_edit_form"), () => {
dialog.hide();
updateFilterList();
dijit.byId("filterTree").reload();
});
}
},
@@ -236,7 +246,7 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
};
xhrPost("backend.php", query, () => {
updateFilterList();
this.reload();
});
}
} else {