X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-src%2Fclass%2Forg%2Fargeo%2Fria%2Fevent%2FCommand.js;h=9ad87c5b9a926e5d8505c7c69a17b74b5b659eef;hb=81d7470df58e4d921fea676145b6fd7a477f7248;hp=36c18fc37e139453ea17e1c75c0ecb05b636d1e1;hpb=c6b00aeb38c5111dbc0532d52586a92d7e127540;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/event/Command.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/event/Command.js index 36c18fc37..9ad87c5b9 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/event/Command.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/event/Command.js @@ -54,6 +54,7 @@ this.setLabel(label); this.setIcon(icon); this.menuClones = []; + this.callbacks = {}; }, members : @@ -115,7 +116,19 @@ this.addTooltip(button); return button; }, - + + registerCallback : function(callback, focusablePartId){ + this.callbacks[focusablePartId] = callback; + }, + getCallbacks : function(){ + return this.callbacks; + }, + removeCallback : function(focusablePartId){ + if(this.callbacks[focusablePartId]){ + delete this.callbacks[focusablePartId]; + } + }, + /** * Special tricks using UserData to enable/disable listeners to avoid loops... * @param button {qx.ui.core.Widget} toolbar Checkbox or menu Checkbox button.