var last_requested_article = false;
var catchup_id_batch = [];
+var catchup_go_next = false;
var catchup_timeout_id = false;
var cids_requested = [];
dijit.byId("headlines-frame").attr('content',
reply['headlines']['content']);
- dijit.byId("headlines-toolbar").attr('content',
- reply['headlines']['toolbar']);
+ //dijit.byId("headlines-toolbar").attr('content',
+ // reply['headlines']['toolbar']);
+
+ dojo.html.set($("headlines-toolbar"),
+ reply['headlines']['toolbar'],
+ {parseContent: true});
$$("#headlines-frame > div[id*=RROW]").each(function(row) {
if (loaded_article_ids.indexOf(row.id) != -1) {
else
request_counters(true);
- } else if (transport.responseText) {
+ } else {
console.error("Invalid object received: " + transport.responseText);
dijit.byId("headlines-frame").attr('content', "<div class='whiteBox'>" +
__('Could not update headlines (invalid object received - see error console for details)') +
"</div>");
- } else {
- //notify_error("Error communicating with server.");
- Element.show(dijit.byId("net-alert").domNode);
}
_infscroll_request_sent = 0;
// return;
// }
- } else if (transport.responseText) {
+ } else {
console.error("Invalid object received: " + transport.responseText);
render_article("<div class='whiteBox'>" +
__('Could not display article (invalid object received - see error console for details)') + "</div>");
- } else {
- Element.show(dijit.byId("net-alert").domNode);
}
var unread_in_buffer = $$("#headlines-frame > div[id*=RROW][class*=Unread]").length
function unpackVisibleHeadlines() {
try {
- if (!isCdmMode()) return;
+ if (!isCdmMode() || !getInitParam("cdm_expanded")) return;
$$("#headlines-frame > div[id*=RROW]").each(
function(child) {
var ts = new Date().getTime();
if (ts - _last_headlines_update < 100) return;
+ var atend = true;
+
$$("#headlines-frame > div[id*=RROW][class*=Unread]").each(
function(child) {
if (child.hasClassName("Unread") && $("headlines-frame").scrollTop >
catchup_id_batch.push(id);
//console.log("auto_catchup_batch: " + catchup_id_batch.toString());
+ } else {
+ atend = false;
}
});
+ if (atend) {
+ if (getInitParam("on_catchup_show_next_feed") == "1") {
+ catchup_go_next = true;
+ }
+ }
+
if (catchup_id_batch.length > 0) {
window.clearTimeout(catchup_timeout_id);
} });
}
+ if (catchup_go_next) {
+ catchup_go_next = false;
+ var is_cat = activeFeedIsCat();
+ var nuf = getNextUnreadFeed(getActiveFeedId(), is_cat);
+ if (nuf) viewfeed(nuf, '', is_cat);
+ }
} catch (e) {
exception_error("catchupBatchedArticles", e);
return !event.shiftKey;
}
- } else {
+ } else if (event.target.parents(".cdmHeader").length > 0) {
+
toggleSelected(id, true);
var elem = $("RROW-" + id);