From b835a528148783a5436b88baba33d1210562ef93 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 17 Feb 2017 09:01:45 +0300 Subject: [PATCH] rework the way headlines menus identify calling row --- classes/feeds.php | 4 ++- js/viewfeed.js | 68 +++++++++++------------------------------------ 2 files changed, 18 insertions(+), 54 deletions(-) diff --git a/classes/feeds.php b/classes/feeds.php index 500c50a7..5c7e8a18 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -611,9 +611,11 @@ class Feeds extends Handler_Protected { } } + // data-article-id included for context menu $reply['content'] .= " + data-article-id=\"$id\" + class=\"titleWrap hlMenuAttach $hlc_suffix\"> div[id*=RROW]" + - "[data-orig-feed-id='" + menu.callerRowId + "']"); + "[data-orig-feed-id='" + this.getParent().currentTarget.getAttribute("data-feed-id") + "']"); } })); @@ -2048,7 +2010,7 @@ function initHeadlinesMenu() { selectArticles("none"); selectArticles("all", "#headlines-frame > div[id*=RROW]" + - "[data-orig-feed-id='" + menu.callerRowId + "']"); + "[data-orig-feed-id='" + this.getParent().currentTarget.getAttribute("data-feed-id") + "']"); catchupSelection(); } @@ -2057,14 +2019,14 @@ function initHeadlinesMenu() { menu.addChild(new dijit.MenuItem({ label: __("Mark feed as read"), onClick: function (event) { - catchupFeedInGroup(menu.callerRowId); + catchupFeedInGroup(this.getParent().currentTarget.getAttribute("data-feed-id")); } })); menu.addChild(new dijit.MenuItem({ label: __("Edit feed"), onClick: function (event) { - editFeed(menu.callerRowId); + editFeed(this.getParent().currentTarget.getAttribute("data-feed-id")); } }));