summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-08-06 09:08:26 +0100
committerAndrew Dolgov <[email protected]>2008-08-06 09:08:26 +0100
commita44db887de77a0d2284a375c8af6d765f8fc4eb9 (patch)
treec7409bfa49b37a8a48eb0b1b2e38820f879dd2f7 /prefs.js
parentecace165c18da3e55c7bba759f5bc89503b7da86 (diff)
filter edit dialog: add remove button
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/prefs.js b/prefs.js
index c405a4f19..a5fc6c544 100644
--- a/prefs.js
+++ b/prefs.js
@@ -2156,3 +2156,29 @@ function rescore_all_feeds() {
xmlhttp.send(null);
}
}
+
+function removeFilter(id, title) {
+
+ if (!xmlhttp_ready(xmlhttp)) {
+ printLockingError();
+ return
+ }
+
+ var msg = __("Remove filter %s?").replace("%s", title);
+
+ var ok = confirm(msg);
+
+ if (ok) {
+ closeInfoBox();
+
+ notify_progress("Removing filter...");
+
+ xmlhttp.open("GET", "backend.php?op=pref-filters&subop=remove&ids="+
+ param_escape(id), true);
+ xmlhttp.onreadystatechange=filterlist_callback;
+ xmlhttp.send(null);
+ }
+
+ return false;
+}
+