fix id handling in getRelativeFeedId; allow on-catchup-show-next wrapping (closes #108)

This commit is contained in:
Andrew Dolgov 2006-09-29 08:23:41 +01:00
parent 106689b065
commit d05514a49a
3 changed files with 20 additions and 11 deletions

View File

@ -62,6 +62,11 @@ function viewfeed(feed, subop, is_cat, subop_param) {
var next_unread_feed = getRelativeFeedId(feedlist,
getActiveFeedId(), "next", true);
if (!next_unread_feed) {
next_unread_feed = getRelativeFeedId(feedlist,
-1, "next", true);
}
var show_next_feed = getInitParam("on_catchup_show_next_feed") == "1";
if (next_unread_feed && show_next_feed && !activeFeedIsCat()) {

View File

@ -89,7 +89,9 @@ var notify_effect = false;
function hide_notify() {
if (notify_last_doc) {
var n = notify_last_doc.getElementById("notify");
if (browser_has_opacity()) {
n.style.display = "none";
/* if (browser_has_opacity()) {
if (notify_opacity >= 0) {
notify_opacity = notify_opacity - 0.1;
n.style.opacity = notify_opacity;
@ -100,7 +102,7 @@ function hide_notify() {
}
} else {
n.style.display = "none";
}
} */
}
}
@ -976,7 +978,7 @@ function getRelativeFeedId(list, id, direction, unread_only) {
var child = list.childNodes[i];
if (child.id && child.id == "feedCatHolder") {
if (child.lastChild) {
var cr = getRelativeFeedId(child.firstChild, id, direction);
var cr = getRelativeFeedId(child.firstChild, id, direction, unread_only);
if (cr) return cr;
}
} else if (child.id && child.id.match("FEEDR-")) {
@ -1010,7 +1012,7 @@ function getRelativeFeedId(list, id, direction, unread_only) {
}
} else {
var feed = list.ownerDocument.getElementById("FEEDR-" + getActiveFeedId());
var feed = list.ownerDocument.getElementById("FEEDR-" + id);
if (getInitParam("hide_read_feeds") == 1) {
unread_only = true;
@ -1047,6 +1049,7 @@ function getRelativeFeedId(list, id, direction, unread_only) {
if (e) {
if (!unread_only || (unread_only && e.className != "feed" &&
e.className != "label" && e.className != "virt" &&
e.className != "error")) {
return e.id.replace("FEEDR-", "");
}

View File

@ -140,7 +140,7 @@ div.postReply div.postIcon {
ul.feedList {
list-style-type : none;
margin : 5px;
padding : 0px 0px 0px 10px;
padding : 0px 0px 0px 5px;
font-size : small;
}
@ -161,7 +161,7 @@ ul.feedList li.feedCat a:hover {
ul.feedCatList {
list-style-type : none;
margin : 0px 0px 0px 20px;
margin : 0px 0px 0px 15px;
padding : 0px;
}
@ -343,9 +343,10 @@ td.notifyBox {
}
#dispSwitch {
padding : 5px 5px 5px 0px;
font-size : x-small;
text-align : right;
float : right;
margin : 5px 5px 0px 0px;
}
#dispSwitch a {
@ -1247,7 +1248,7 @@ div.whiteBox {
right : 5px;
height : 40px;
color : #4684ff;
font-size : x-small;
font-size : small;
}
#feeds-holder {