1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

add manual purge prototype

This commit is contained in:
Andrew Dolgov
2007-10-18 06:06:20 +01:00
parent c4a36709cd
commit e88a65f45e
2 changed files with 47 additions and 5 deletions
+40
View File
@@ -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();
}