getRelativeFeedId iterates over hidden categories correctly

This commit is contained in:
Andrew Dolgov 2007-05-14 04:19:20 +01:00
parent 5158ced917
commit 4e38b6c335
1 changed files with 9 additions and 3 deletions

View File

@ -1158,7 +1158,7 @@ function getRelativeFeedId(list, id, direction, unread_only) {
if (getInitParam("hide_read_feeds") == 1) { if (getInitParam("hide_read_feeds") == 1) {
if (child.className != "feed") { if (child.className != "feed") {
alert(child.className); // alert(child.className);
return child.id.replace('FEEDR-', ''); return child.id.replace('FEEDR-', '');
} }
} else { } else {
@ -1207,10 +1207,13 @@ function getRelativeFeedId(list, id, direction, unread_only) {
if (e) { if (e) {
if (!unread_only || (unread_only && e.className != "feed" && if (!unread_only || (unread_only && e.className != "feed" &&
e.className.match("feed"))) { e.className.match("feed"))) {
if (e.parentNode.parentNode && e.parentNode.parentNode.className
!= "invisible") {
return e.id.replace("FEEDR-", ""); return e.id.replace("FEEDR-", "");
} }
} }
} }
}
} else if (direction == "prev") { } else if (direction == "prev") {
@ -1244,6 +1247,8 @@ function getRelativeFeedId(list, id, direction, unread_only) {
if (e) { if (e) {
if (!unread_only || (unread_only && e.className != "feed" && if (!unread_only || (unread_only && e.className != "feed" &&
e.className.match("feed"))) { e.className.match("feed"))) {
if (e.parentNode.parentNode && e.parentNode.parentNode.className
!= "invisible") {
return e.id.replace("FEEDR-", ""); return e.id.replace("FEEDR-", "");
} }
} }
@ -1251,6 +1256,7 @@ function getRelativeFeedId(list, id, direction, unread_only) {
} }
} }
} }
}
function showBlockElement(id, h_id) { function showBlockElement(id, h_id) {
var elem = document.getElementById(id); var elem = document.getElementById(id);