From a0dbc45acd96c82b55927ce6b0dd8253811c9e17 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 7 Sep 2015 12:49:49 +0300 Subject: add edit feed to feed header context menu in grouped mode --- js/viewfeed.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'js/viewfeed.js') diff --git a/js/viewfeed.js b/js/viewfeed.js index c079586a2..79f4e9966 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -2185,6 +2185,12 @@ function initHeadlinesMenu() { catchupFeedInGroup(menu.callerRowId); }})); + menu.addChild(new dijit.MenuItem({ + label: __("Edit feed"), + onClick: function(event) { + editFeed(menu.callerRowId); + }})); + menu.startup(); } -- cgit v1.2.3-54-g00ecf From a71e571b976d768a12a8ba2ed2e943def9afd58d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 7 Oct 2015 18:14:21 +0300 Subject: headlines_callback2: force prevent duplicate row ids --- js/viewfeed.js | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) mode change 100644 => 100755 js/viewfeed.js (limited to 'js/viewfeed.js') diff --git a/js/viewfeed.js b/js/viewfeed.js old mode 100644 new mode 100755 index 79f4e9966..3b647e080 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -92,13 +92,29 @@ function headlines_callback2(transport, offset, background, infscroll_req) { reply['headlines']['toolbar'], {parseContent: true}); - dojo.html.set($("headlines-frame"), + /*dojo.html.set($("headlines-frame"), reply['headlines']['content'], {parseContent: true}); $$("#headlines-frame div[id*='RROW']").each(function(row) { loaded_article_ids.push(row.id); - }); + });*/ + + $("headlines-frame").innerHTML = ''; + + var tmp = new Element("div"); + tmp.innerHTML = reply['headlines']['content']; + dojo.parser.parse(tmp); + + while (tmp.hasChildNodes()) { + var row = tmp.removeChild(tmp.firstChild); + + if (loaded_article_ids.indexOf(row.id) == -1 || row.hasClassName("cdmFeedTitle")) { + dijit.byId("headlines-frame").domNode.appendChild(row); + + loaded_article_ids.push(row.id); + } + } var hsp = $("headlines-spacer"); if (!hsp) hsp = new Element("DIV", {"id": "headlines-spacer"}); @@ -138,8 +154,7 @@ function headlines_callback2(transport, offset, background, infscroll_req) { if (loaded_article_ids.indexOf(row.id) == -1 || row.hasClassName("cdmFeedTitle")) { dijit.byId("headlines-frame").domNode.appendChild(row); - //Element.hide(row); - //new Effect.Appear(row, {duration:0.5}); + loaded_article_ids.push(row.id); } } -- cgit v1.2.3-54-g00ecf