summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-05-20 12:39:22 +0100
committerAndrew Dolgov <[email protected]>2006-05-20 12:39:22 +0100
commit79f3553b8b82e9b62b82456bdcdf74a4abe162fe (patch)
treee89a1617133f03eb474507b41d6f3cb450338628 /functions.js
parent14f69488dafab0fc44666038eb370d59b54d1e9c (diff)
create filter dialog uses prototype
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js30
1 files changed, 7 insertions, 23 deletions
diff --git a/functions.js b/functions.js
index ee26d0a92..627eb287a 100644
--- a/functions.js
+++ b/functions.js
@@ -992,13 +992,15 @@ function displayDlg(id, param) {
function infobox_submit_callback() {
if (xmlhttp.readyState == 4) {
- notify(xmlhttp.responseText);
closeInfoBox();
// called from prefs, reload tab
if (active_tab) {
selectTab(active_tab, false);
}
+
+ notify(xmlhttp.responseText);
+
}
}
@@ -1024,29 +1026,11 @@ function qaddFilter() {
return
}
- var regexp = document.getElementById("fadd_regexp");
- var match = document.getElementById("fadd_match");
- var feed = document.getElementById("fadd_feed");
- var action = document.getElementById("fadd_action");
-
- if (regexp.value.length == 0) {
- alert("Missing filter expression.");
- } else {
- notify("Adding filter...");
+ var query = Form.serialize("filter_add_form");
- var v_match = match[match.selectedIndex].text;
- var feed_id = feed[feed.selectedIndex].id;
- var action_id = action[action.selectedIndex].id;
-
- xmlhttp.open("GET", "backend.php?op=pref-filters&quiet=1&subop=add&regexp=" +
- param_escape(regexp.value) + "&match=" + v_match +
- "&fid=" + param_escape(feed_id) + "&aid=" + param_escape(action_id), true);
-
- xmlhttp.onreadystatechange=infobox_submit_callback;
- xmlhttp.send(null);
-
- regexp.value = "";
- }
+ xmlhttp.open("GET", "backend.php?" + query, true);
+ xmlhttp.onreadystatechange=infobox_submit_callback;
+ xmlhttp.send(null);
}