summaryrefslogtreecommitdiff
path: root/js/Headlines.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/Headlines.js')
-rwxr-xr-xjs/Headlines.js52
1 files changed, 48 insertions, 4 deletions
diff --git a/js/Headlines.js b/js/Headlines.js
index d01993838..f9ec21c18 100755
--- a/js/Headlines.js
+++ b/js/Headlines.js
@@ -490,6 +490,7 @@ const Headlines = {
id="RROW-${hl.id}"
data-article-id="${hl.id}"
data-orig-feed-id="${hl.feed_id}"
+ data-orig-feed-title="${App.escapeHtml(hl.feed_title)}"
data-is-packed="1"
data-content="${App.escapeHtml(hl.content)}"
data-rendered-enclosures="${App.escapeHtml(Article.renderEnclosures(hl.enclosures))}"
@@ -514,7 +515,7 @@ const Headlines = {
${hl.cdm_excerpt ? hl.cdm_excerpt : ""}
</span>
- <div class="feed">
+ <div class="feed vfeedMenuAttach" data-feed-id="${hl.feed_id}">
<a href="#" style="background-color: ${hl.feed_bg_color}"
onclick="Feeds.open({feed:${hl.feed_id}})">${hl.feed_title}</a>
</div>
@@ -566,6 +567,7 @@ const Headlines = {
row = `<div class="hl ${row_class} ${Article.getScoreClass(hl.score)}"
id="RROW-${hl.id}"
data-orig-feed-id="${hl.feed_id}"
+ data-orig-feed-title="${App.escapeHtml(hl.feed_title)}"
data-article-id="${hl.id}"
data-score="${hl.score}"
data-article-title="${App.escapeHtml(hl.title)}"
@@ -584,9 +586,9 @@ const Headlines = {
${Article.renderLabels(hl.id, hl.labels)}
</span>
</div>
- <span class="feed">
- <a style="background : ${hl.feed_bg_color}" href="#" onclick="Feeds.open({feed:${hl.feed_id}})">${hl.feed_title}</a>
- </span>
+ <span class="feed vfeedMenuAttach" data-feed-id="${hl.feed_id}">
+ <a style="background : ${hl.feed_bg_color}" href="#" onclick="Feeds.open({feed:${hl.feed_id}})">${hl.feed_title}</a>
+ </span>
<div title="${hl.imported}">
<span class="updated">${hl.updated}</span>
</div>
@@ -1501,6 +1503,48 @@ const Headlines = {
menu.startup();
}
+ /* vfeed menu */
+
+ if (!dijit.byId("vfeedMenu")) {
+
+ const menu = new dijit.Menu({
+ id: "vfeedMenu",
+ targetNodeIds: ["headlines-frame"],
+ selector: ".vfeedMenuAttach"
+ });
+
+ menu.addChild(new dijit.MenuItem({
+ label: __("Mark as read"),
+ onClick: function() {
+ Feeds.catchupFeed(this.getParent().currentTarget.getAttribute("data-feed-id"));
+ }}));
+
+ menu.addChild(new dijit.MenuItem({
+ label: __("Edit feed"),
+ onClick: function() {
+ CommonDialogs.editFeed(this.getParent().currentTarget.getAttribute("data-feed-id"), false);
+ }}));
+
+ menu.addChild(new dijit.MenuItem({
+ label: __("Open site"),
+ onClick: function() {
+ App.postOpenWindow("backend.php", {op: "feeds", method: "opensite",
+ feed_id: this.getParent().currentTarget.getAttribute("data-feed-id"), csrf_token: __csrf_token});
+ }}));
+
+ menu.addChild(new dijit.MenuSeparator());
+
+ menu.addChild(new dijit.MenuItem({
+ label: __("Debug feed"),
+ onClick: function() {
+ /* global __csrf_token */
+ App.postOpenWindow("backend.php", {op: "feeds", method: "updatedebugger",
+ feed_id: this.getParent().currentTarget.getAttribute("data-feed-id"), csrf_token: __csrf_token});
+ }}));
+
+ menu.startup();
+ }
+
/* vgroup feed title menu */
if (!dijit.byId("headlinesFeedTitleMenu")) {