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;h=b42fd4338505471e389c4bf2f0b370d00e10a740;hb=d4677ad7a9cecbebb500e917be497a5a53970584;hp=0026170ade614afde3cd200de47ce08ff78dd2a9;hpb=66a8dc805e2edf46a9d73452d5d9af1d4656eea4;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 0026170ad..b42fd4338 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 @@ -48,7 +48,7 @@ this.base(arguments, shortcut); this.setId(id); this.setLabel(label); - this.setIcon(icon); + this.setIcon(icon); }, members : @@ -67,8 +67,9 @@ this.addTooltip(button); if(this.getMenu()){ this.addListener("changeMenu", function(event){ - this.setMenu(event.getData()); - }, button); + button.setMenu(this.getMenuClone()); + }, this); + this.menuClones = []; } return button; }, @@ -108,19 +109,27 @@ * @return {qx.ui.menu.Menu} */ getMenuClone : function(){ - if(!this.menuClone){ - this.menuClone = new qx.ui.menu.Menu(); - this.menuClone.setMinWidth(110); + var menuClone = new qx.ui.menu.Menu(); + var submenus = this.getMenu(); + for(var i=0;i