]> git.wh0rd.org Git - tt-rss.git/commitdiff
getRelativeFeedId iterates over hidden categories correctly
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 14 May 2007 03:19:20 +0000 (04:19 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 14 May 2007 03:19:20 +0000 (04:19 +0100)
functions.js

index cbc82a6a9069b43a6188ee5df67cf048d21a47de..876837a8ea56c89d9455a8b8a7084ac925f21f69 100644 (file)
@@ -1158,7 +1158,7 @@ function getRelativeFeedId(list, id, direction, unread_only) {
                                
                                        if (getInitParam("hide_read_feeds") == 1) {
                                                if (child.className != "feed") {
-                                                       alert(child.className);
+//                                                     alert(child.className);
                                                        return child.id.replace('FEEDR-', '');                                          
                                                }                                                       
                                        } else {
@@ -1207,7 +1207,10 @@ function getRelativeFeedId(list, id, direction, unread_only) {
                                if (e) {
                                        if (!unread_only || (unread_only && e.className != "feed" &&
                                                        e.className.match("feed")))     {
-                                               return e.id.replace("FEEDR-", "");
+                                               if (e.parentNode.parentNode && e.parentNode.parentNode.className 
+                                                       != "invisible") {
+                                                       return e.id.replace("FEEDR-", "");
+                                               }
                                        }
                                }
                        }
@@ -1244,7 +1247,10 @@ function getRelativeFeedId(list, id, direction, unread_only) {
                                if (e) {
                                        if (!unread_only || (unread_only && e.className != "feed" && 
                                                        e.className.match("feed")))     {
-                                               return e.id.replace("FEEDR-", "");
+                                               if (e.parentNode.parentNode && e.parentNode.parentNode.className 
+                                                       != "invisible") {
+                                                       return e.id.replace("FEEDR-", "");
+                                               }
                                        }
                                }
                        }