FeedTree: allow context menu for virtual feeds

This commit is contained in:
Andrew Dolgov 2012-09-10 22:51:53 +04:00
parent b2bbbd2324
commit 10afc7c63b
1 changed files with 13 additions and 11 deletions

View 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);
}}));
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.addChild(new dijit.MenuItem({
label: __("Update feed"),
onClick: function() {
scheduleFeedUpdate(this.getParent().row_id, false);
}}));
}
menu.bindDomNode(tnode.domNode);
tnode._menu = menu;