getLoadedArticleIds: consider visible rows only

catchupFeedInGroup: hide articles when catching up, with caveats
master
Andrew Dolgov 9 years ago
parent 6be118fda1
commit 2d052e42b5

@ -465,7 +465,7 @@ class Feeds extends Handler_Protected {
$vf_catchup_link = "<a class='catchup' onclick='catchupFeedInGroup($feed_id);' href='#'>".__('mark feed as read')."</a>";
$reply['content'] .= "<div id='FTITLE-$feed_id' class='cdmFeedTitle'>".
$reply['content'] .= "<div data-feed-id='$feed_id' id='FTITLE-$feed_id' class='cdmFeedTitle'>".
"<div style='float : right'>$feed_icon_img</div>".
"<a class='title' href=\"#\" onclick=\"viewfeed({feed:$feed_id})\">".
$line["feed_title"]."</a>
@ -478,7 +478,7 @@ class Feeds extends Handler_Protected {
$mouseover_attrs = "onmouseover='postMouseIn(event, $id)'
onmouseout='postMouseOut($id)'";
$reply['content'] .= "<div class='hl $class' orig-feed-id='$feed_id' id='RROW-$id' $mouseover_attrs>";
$reply['content'] .= "<div class='hl $class' orig-feed-id='$feed_id' data-article-id='$id' id='RROW-$id' $mouseover_attrs>";
$reply['content'] .= "<div class='hlLeft'>";
@ -570,7 +570,7 @@ class Feeds extends Handler_Protected {
//$feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\" alt=\"\">";
}
$reply['content'] .= "<div id='FTITLE-$feed_id' class='cdmFeedTitle'>".
$reply['content'] .= "<div data-feed-id='$feed_id' id='FTITLE-$feed_id' class='cdmFeedTitle'>".
"<div style=\"float : right\">$feed_icon_img</div>".
"<a href=\"#\" class='title' onclick=\"viewfeed({feed:$feed_id})\">".
$line["feed_title"]."</a> $vf_catchup_link</div>";
@ -584,7 +584,7 @@ class Feeds extends Handler_Protected {
$expanded_class = $expand_cdm ? "expanded" : "expandable";
$reply['content'] .= "<div class=\"cdm $hlc_suffix $expanded_class $class\"
id=\"RROW-$id\" orig-feed-id='$feed_id' $mouseover_attrs>";
id=\"RROW-$id\" data-article-id='$id' orig-feed-id='$feed_id' $mouseover_attrs>";
$reply['content'] .= "<div class=\"cdmHeader\">";
$reply['content'] .= "<div style=\"vertical-align : middle\">";

@ -453,8 +453,26 @@ function catchupFeedInGroup(id) {
rows.each(function (row) {
row.removeClassName("Unread");
if (row.getAttribute("data-article-id") != getActiveArticleId()) {
new Effect.Fade(row, {duration: 0.5});
}
});
var feedTitles = $$("#headlines-frame > div[class='cdmFeedTitle']");
for (var i = 0; i < feedTitles.length; i++) {
if (feedTitles[i].getAttribute("data-feed-id") == id) {
if (i < feedTitles.length - 1) {
new Effect.Fade(feedTitles[i], {duration: 0.5});
}
break;
}
}
updateFloatingTitle(true);
}

@ -928,8 +928,10 @@ function getLoadedArticleIds() {
var children = $$("#headlines-frame > div[id*=RROW-]");
children.each(function(child) {
if (Element.visible(child)) {
rv.push(child.id.replace("RROW-", ""));
});
}
});
return rv;

Loading…
Cancel
Save