]> git.wh0rd.org - tt-rss.git/blobdiff - prefs.js
_debug: mention current PID
[tt-rss.git] / prefs.js
index 3d95f01c3f840bf1884d2e3618e3e61cb8712729..56de40ad3dee02512107264fc632f378f46c2b33 100644 (file)
--- 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)) {
@@ -820,17 +856,6 @@ function feedCatEditSave() {
        return false;
 }
 
-
-
-function displayHelpInfobox(topic_id) {
-
-       var url = "backend.php?op=help&tid=" + param_escape(topic_id);
-
-       var w = window.open(url, "ttrss_help", 
-               "status=0,toolbar=0,location=0,width=400,height=450,menubar=0");
-
-}
-
 function labelEditCancel() {
 
        if (!xmlhttp_ready(xmlhttp)) {
@@ -1840,6 +1865,10 @@ function feedActionGo(op) {
                        purgeSelectedFeeds();
                }
 
+               if (op == "facEditCats") {
+                       editFeedCats();
+               }
+
                if (op == "facUnsubscribe") {
                        removeSelectedFeeds();
                }