X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fsource%2Fclass%2Forg%2Fargeo%2Fria%2Fevent%2FCommand.js;fp=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fsource%2Fclass%2Forg%2Fargeo%2Fria%2Fevent%2FCommand.js;h=83641c416a987c123263a93a791a464bd8a82669;hb=9120f32a4cb34b9b46bbfbf02ba34e64d2da2312;hp=b42fd4338505471e389c4bf2f0b370d00e10a740;hpb=9e0cbbcdfac3231ad77450c0d66b02db1b36f44e;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/event/Command.js b/org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/event/Command.js index b42fd4338..83641c416 100644 --- a/org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/event/Command.js +++ b/org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/event/Command.js @@ -49,6 +49,7 @@ this.setId(id); this.setLabel(label); this.setIcon(icon); + this.menuClones = []; }, members : @@ -62,14 +63,13 @@ this.getLabel(), this.getIcon(), this, - this.getMenu() + this.getMenuClone() ); this.addTooltip(button); if(this.getMenu()){ this.addListener("changeMenu", function(event){ button.setMenu(this.getMenuClone()); - }, this); - this.menuClones = []; + }, this); } return button; }, @@ -111,6 +111,7 @@ getMenuClone : function(){ var menuClone = new qx.ui.menu.Menu(); var submenus = this.getMenu(); + if(!submenus) return; for(var i=0;i