]> git.wh0rd.org Git - tt-rss.git/commitdiff
FeedTree: allow context menu for virtual feeds
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 10 Sep 2012 18:51:53 +0000 (22:51 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 10 Sep 2012 18:51:53 +0000 (22:51 +0400)
js/FeedTree.js

index 14bbad91d80060b8f962435a6d1f08b1bc20800f..de1329bbe8e2f17e490075e413b95d2ba2414ec5 100644 (file)
@@ -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;