summaryrefslogtreecommitdiff
path: root/js/PrefFilterTree.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-12-02 16:29:00 +0300
committerAndrew Dolgov <[email protected]>2018-12-02 16:29:00 +0300
commit3a6dae92034791c199f9ddb4c60b8298b22c1d47 (patch)
tree2f25f3d336437ca42e7020067dbf7fccc588894d /js/PrefFilterTree.js
parentb9869dbc01f505e87def7463e032914cab49f26c (diff)
prefs: more of the same, really
Diffstat (limited to 'js/PrefFilterTree.js')
-rw-r--r--js/PrefFilterTree.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/js/PrefFilterTree.js b/js/PrefFilterTree.js
index 9940372dd..37a99be89 100644
--- a/js/PrefFilterTree.js
+++ b/js/PrefFilterTree.js
@@ -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 {