summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/PrefFilterTree.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/PrefFilterTree.js b/js/PrefFilterTree.js
index 4ccddfa75..10c4d7de3 100644
--- a/js/PrefFilterTree.js
+++ b/js/PrefFilterTree.js
@@ -167,6 +167,28 @@ define(["dojo/_base/declare", "dojo/dom-construct", "lib/CheckBoxTree"], functio
return false;
},
+ copySelectedFilters: function() {
+ const sel_rows = this.getSelectedFilters();
+
+ if (sel_rows.length > 0) {
+ if (confirm(__("Copy selected filters?"))) {
+ Notify.progress("Copying selected filters...");
+
+ const query = {
+ op: "Pref_Filters", method: "copy",
+ ids: sel_rows.toString()
+ };
+
+ xhr.post("backend.php", query, () => {
+ this.reload();
+ });
+ }
+ } else {
+ alert(__("No filters selected."));
+ }
+
+ return false;
+ },
});
});