From: Andrew Dolgov Date: Mon, 10 Sep 2012 18:51:53 +0000 (+0400) Subject: FeedTree: allow context menu for virtual feeds X-Git-Tag: 1.6.0~51 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=10afc7c63b9c18d457f3ff0b126423911201297f;p=tt-rss.git FeedTree: allow context menu for virtual feeds --- diff --git a/js/FeedTree.js b/js/FeedTree.js index 14bbad91..de1329bb 100644 --- a/js/FeedTree.js +++ b/js/FeedTree.js @@ -128,7 +128,7 @@ dojo.declare("fox.FeedTree", dijit.Tree, { tnode._paramNode = param; } - if (id.match("FEED:") && bare_id > 0) { + if (id.match("FEED:")) { var menu = new dijit.Menu(); menu.row_id = bare_id; @@ -138,17 +138,19 @@ dojo.declare("fox.FeedTree", dijit.Tree, { catchupFeed(this.getParent().row_id); }})); - menu.addChild(new dijit.MenuItem({ - label: __("Edit feed"), - onClick: function() { - editFeed(this.getParent().row_id, false); - }})); - - menu.addChild(new dijit.MenuItem({ - label: __("Update feed"), - onClick: function() { - scheduleFeedUpdate(this.getParent().row_id, false); - }})); + if (bare_id > 0) { + menu.addChild(new dijit.MenuItem({ + label: __("Edit feed"), + onClick: function() { + editFeed(this.getParent().row_id, false); + }})); + + menu.addChild(new dijit.MenuItem({ + label: __("Update feed"), + onClick: function() { + scheduleFeedUpdate(this.getParent().row_id, false); + }})); + } menu.bindDomNode(tnode.domNode); tnode._menu = menu;