From: Andrew Dolgov Date: Thu, 18 Oct 2007 05:06:20 +0000 (+0100) Subject: add manual purge prototype X-Git-Tag: 1.2.16~4 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e88a65f45eadb94dc0352d2363d71cca6929e20d;p=tt-rss.git add manual purge prototype --- diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index b8671c4e..6abf5d43 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -982,14 +982,14 @@ print ""; - print "

"; + print "

"; print ""; + print ""; + /* print " "; - if (get_pref($link, 'ENABLE_FEED_CATS')) { +// if (get_pref($link, 'ENABLE_FEED_CATS')) { /* print " No feeds defined.

"; diff --git a/prefs.js b/prefs.js index 3d95f01c..ab85bcad 100644 --- a/prefs.js +++ b/prefs.js @@ -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(); }