|
|
|
@ -150,6 +150,8 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
|
|
|
|
|
tmp.innerHTML = reply['headlines']['content'];
|
|
|
|
|
dojo.parser.parse(tmp);
|
|
|
|
|
|
|
|
|
|
var new_rows = [];
|
|
|
|
|
|
|
|
|
|
while (tmp.hasChildNodes()) {
|
|
|
|
|
var row = tmp.removeChild(tmp.firstChild);
|
|
|
|
|
|
|
|
|
@ -157,6 +159,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
|
|
|
|
|
dijit.byId("headlines-frame").domNode.appendChild(row);
|
|
|
|
|
|
|
|
|
|
loaded_article_ids.push(row.id);
|
|
|
|
|
new_rows.push(row);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -171,7 +174,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) {
|
|
|
|
|
markHeadline(ids[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
initHeadlinesMenu();
|
|
|
|
|
initHeadlinesMenu(new_rows);
|
|
|
|
|
|
|
|
|
|
if (_infscroll_disable) {
|
|
|
|
|
hsp.innerHTML = "<a href='#' onclick='openNextUnreadFeed()'>" +
|
|
|
|
@ -1978,8 +1981,10 @@ function headlinesMenuCommon(menu) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function initHeadlinesMenu() {
|
|
|
|
|
function initHeadlinesMenu(append_rows) {
|
|
|
|
|
try {
|
|
|
|
|
if (!append_rows) {
|
|
|
|
|
|
|
|
|
|
if (dijit.byId("headlinesMenu"))
|
|
|
|
|
dijit.byId("headlinesMenu").destroyRecursive();
|
|
|
|
|
|
|
|
|
@ -1991,7 +1996,7 @@ function initHeadlinesMenu() {
|
|
|
|
|
nodes = $$("#headlines-frame span[id*=RTITLE]");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nodes.each(function(node) {
|
|
|
|
|
nodes.each(function (node) {
|
|
|
|
|
ids.push(node.id);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -2018,8 +2023,20 @@ function initHeadlinesMenu() {
|
|
|
|
|
|
|
|
|
|
menu.startup();
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
var menu = dijit.byId("headlinesMenu");
|
|
|
|
|
|
|
|
|
|
append_rows.each(function (row) {
|
|
|
|
|
if (!row.hasClassName("cdmFeedTitle")) {
|
|
|
|
|
menu.bindDomNode(row);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* vgroup feed title menu */
|
|
|
|
|
|
|
|
|
|
if (!append_rows) {
|
|
|
|
|
|
|
|
|
|
var nodes = $$("#headlines-frame > div[class='cdmFeedTitle']");
|
|
|
|
|
var ids = [];
|
|
|
|
|
|
|
|
|
@ -2051,39 +2068,52 @@ function initHeadlinesMenu() {
|
|
|
|
|
|
|
|
|
|
menu.addChild(new dijit.MenuItem({
|
|
|
|
|
label: __("Select articles in group"),
|
|
|
|
|
onClick: function(event) {
|
|
|
|
|
onClick: function (event) {
|
|
|
|
|
selectArticles("all",
|
|
|
|
|
"#headlines-frame > div[id*=RROW]"+
|
|
|
|
|
"[data-orig-feed-id='"+menu.callerRowId+"']");
|
|
|
|
|
"#headlines-frame > div[id*=RROW]" +
|
|
|
|
|
"[data-orig-feed-id='" + menu.callerRowId + "']");
|
|
|
|
|
|
|
|
|
|
}}));
|
|
|
|
|
}
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
menu.addChild(new dijit.MenuItem({
|
|
|
|
|
label: __("Mark group as read"),
|
|
|
|
|
onClick: function(event) {
|
|
|
|
|
onClick: function (event) {
|
|
|
|
|
selectArticles("none");
|
|
|
|
|
selectArticles("all",
|
|
|
|
|
"#headlines-frame > div[id*=RROW]"+
|
|
|
|
|
"[data-orig-feed-id='"+menu.callerRowId+"']");
|
|
|
|
|
"#headlines-frame > div[id*=RROW]" +
|
|
|
|
|
"[data-orig-feed-id='" + menu.callerRowId + "']");
|
|
|
|
|
|
|
|
|
|
catchupSelection();
|
|
|
|
|
}}));
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
menu.addChild(new dijit.MenuItem({
|
|
|
|
|
label: __("Mark feed as read"),
|
|
|
|
|
onClick: function(event) {
|
|
|
|
|
onClick: function (event) {
|
|
|
|
|
catchupFeedInGroup(menu.callerRowId);
|
|
|
|
|
}}));
|
|
|
|
|
}
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
menu.addChild(new dijit.MenuItem({
|
|
|
|
|
label: __("Edit feed"),
|
|
|
|
|
onClick: function(event) {
|
|
|
|
|
onClick: function (event) {
|
|
|
|
|
editFeed(menu.callerRowId);
|
|
|
|
|
}}));
|
|
|
|
|
}
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
menu.startup();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
var menu = dijit.byId("headlinesFeedTitleMenu");
|
|
|
|
|
|
|
|
|
|
console.log(append_rows);
|
|
|
|
|
|
|
|
|
|
append_rows.each(function (row) {
|
|
|
|
|
if (row.hasClassName("cdmFeedTitle")) {
|
|
|
|
|
menu.bindDomNode(row);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|