dijit.byId("headlines-toolbar").attr('content',
reply['headlines']['toolbar']);
+ var hsp = $("headlines-spacer");
+ if (!hsp) hsp = document.createElement("DIV");
+
+ hsp.id = "headlines-spacer";
+
+ if (!_infscroll_disable)
+ hsp.innerHTML = "<img src='images/indicator_tiny.gif'> " +
+ __("Loading, please wait...");
+
+ dijit.byId('headlines-frame').domNode.appendChild(hsp);
+
initHeadlinesMenu();
} else {
$("headlines-tmp").innerHTML = reply['headlines']['content'];
+ var hsp = $("headlines-spacer");
+
+ if (hsp)
+ c.domNode.removeChild(hsp);
+
$$("#headlines-tmp > div").each(function(row) {
c.domNode.appendChild(row);
});
+ if (!hsp) hsp = document.createElement("DIV");
+
+ hsp.id = "headlines-spacer";
+
+ if (!_infscroll_disable)
+ hsp.innerHTML = "<img src='images/indicator_tiny.gif'> " +
+ __("Loading, please wait...");
+
+ c.domNode.appendChild(hsp);
+
console.log("restore selected ids: " + ids);
for (var i = 0; i < ids.length; i++) {
} else {
console.log("no new headlines received");
+
+ var hsp = $("headlines-spacer");
+
+ if (hsp) hsp.innerHTML = "";
}
}
function headlines_scroll_handler(e) {
try {
+ var hsp = $("headlines-spacer");
+
+ if (!_infscroll_disable) {
+ if (hsp && (e.scrollTop + e.offsetHeight > hsp.offsetTop) ||
+ e.scrollTop + e.offsetHeight > e.scrollHeight - 100) {
- if (e.scrollTop + e.offsetHeight > e.scrollHeight - 100) {
- if (!_infscroll_disable) {
viewNextFeedPage();
}
+ } else {
+ if (hsp) hsp.innerHTML = "";
}
-
if (getInitParam("cdm_auto_catchup") == 1) {
var ids = [];