diff options
author | Andrew Dolgov <[email protected]> | 2007-10-18 06:06:20 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-10-18 06:06:20 +0100 |
commit | e88a65f45eadb94dc0352d2363d71cca6929e20d (patch) | |
tree | b295d1f3a6d32bb60b45b162b24b78b592b01265 /prefs.js | |
parent | c4a36709cdd6e27ea414d98c00a6f8607dda83a3 (diff) |
add manual purge prototype
Diffstat (limited to 'prefs.js')
-rw-r--r-- | prefs.js | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -700,6 +700,42 @@ function clearSelectedFeeds() { return false; } +function purgeSelectedFeeds() { + + if (!xmlhttp_ready(xmlhttp)) { + printLockingError(); + return + } + + var sel_rows = getSelectedFeeds(); + + if (sel_rows.length > 0) { + + var pr = prompt(__("How many days of articles to keep (0 - use default)?"), "0"); + + if (pr != undefined) { + notify_progress("Purging selected feed..."); + + var query = "backend.php?op=rpc&subop=purge&ids="+ + param_escape(sel_rows.toString()) + "&days=" + pr; + + debug(query); + + new Ajax.Request(query, { + onComplete: function(transport) { + notify(''); + } }); + } + + } else { + + alert(__("No feeds are selected.")); + + } + + return false; +} + function removeSelectedFeedCats() { if (!xmlhttp_ready(xmlhttp)) { @@ -1840,6 +1876,10 @@ function feedActionGo(op) { purgeSelectedFeeds(); } + if (op == "facEditCats") { + editFeedCats(); + } + if (op == "facUnsubscribe") { removeSelectedFeeds(); } |