]> git.wh0rd.org - tt-rss.git/blobdiff - tt-rss.js
various category/feed id clash fixes
[tt-rss.git] / tt-rss.js
index 0a17c14c3f94937ae9e6eb114e0a3e5083f5c2b3..9ac5220fea88ecca931b6d4d2e4b298101b21083 100644 (file)
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -12,6 +12,7 @@ var firsttime_update = true;
 var last_refetch = 0;
 var cookie_lifetime = 0;
 var active_feed_id = 0;
+var active_feed_is_cat = false;
 
 var xmlhttp = Ajax.getTransport();
 
@@ -190,7 +191,7 @@ function scheduleFeedUpdate(force) {
                xmlhttp.send(null);
        } else {
                debug("xmlhttp busy");
-               printLockingError();
+               //printLockingError();
        }   
 }
 
@@ -238,20 +239,20 @@ function catchupAllFeeds() {
 
 }
 
-function viewCurrentFeed(skip, subop) {
+function viewCurrentFeed(subop) {
 
        if (getActiveFeedId()) {
-               viewfeed(getActiveFeedId(), skip, subop);
+               viewfeed(getActiveFeedId(), subop);
        } else {
                disableContainerChildren("headlinesToolbar", false, document);
-               viewfeed(-1, skip, subop); // FIXME
+               viewfeed(-1, subop); // FIXME
        }
        return false; // block unneeded form submits
 }
 
-function viewfeed(feed, skip, subop) {
+function viewfeed(feed, subop) {
        var f = window.frames["feeds-frame"];
-       f.viewfeed(feed, skip, subop);
+       f.viewfeed(feed, subop);
 }
 
 function timeout() {
@@ -269,7 +270,7 @@ function resetSearch() {
 
        if (searchbox.value != "" && getActiveFeedId()) {       
                searchbox.value = "";
-               viewfeed(getActiveFeedId(), 0, "");
+               viewfeed(getActiveFeedId(), "");
        }
 }
 
@@ -433,7 +434,7 @@ function quickMenuGo(opid) {
                }
        
                if (opid == "qmcSearch") {
-                       displayDlg("search", getActiveFeedId());
+                       displayDlg("search", getActiveFeedId() + ":" + activeFeedIsCat());
                        return;
                }
        
@@ -558,9 +559,16 @@ function parse_runtime_info(elem) {
 
 function catchupCurrentFeed() {
 
-       var fn = getFeedName(getActiveFeedId());
+       var fn = getFeedName(getActiveFeedId(), active_feed_is_cat);
        
-       if (confirm("Mark all articles in " + fn + " as read?")) {
+       var str = "Mark all articles in " + fn + " as read?";
+
+/*     if (active_feed_is_cat) {
+               str = "Mark all articles in this category as read?";
+       } */
+
+       if (confirm(str)) {
                return viewCurrentFeed(0, 'MarkAllRead')
        }
 }
+