]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.webapp/src/main/webapp/source/class/org/argeo/ria/event/CommandsManager.js
Refactoring
[gpl/argeo-slc.git] / org.argeo.slc.webapp / src / main / webapp / source / class / org / argeo / ria / event / CommandsManager.js
index bf6f6a3f713d25572dd1868e16ba66f89c0aaeb7..0f6f1182a9817b3df28e04edc9b632222be533f6 100644 (file)
@@ -35,6 +35,7 @@ qx.Class.define("org.argeo.ria.event.CommandsManager",
                                callback        : function(e){},\r
                                command         : null\r
                        },\r
+                       /*\r
                        "quit" : {\r
                                label           : "Quit", \r
                                icon            : "resource/slc/system-shutdown.png",\r
@@ -45,6 +46,7 @@ qx.Class.define("org.argeo.ria.event.CommandsManager",
                                callback        : function(e){}, \r
                                command         : null\r
                        },\r
+                       */\r
                        "log" : {\r
                                label           : "Show Console", \r
                                icon            : "resource/slc/help-contents.png",\r
@@ -116,6 +118,9 @@ qx.Class.define("org.argeo.ria.event.CommandsManager",
                                        }\r
                                }\r
                                command.setEnabled(definition.enabled);\r
+                               if(definition.toggle){\r
+                                       command.setToggle(true);\r
+                               }\r
                                command.addListener("execute", definition.callback, (definition.callbackContext?definition.callbackContext:this));\r
                                if(definition.init){\r
                                        var binded = qx.lang.Function.bind(definition.init, command);\r
@@ -306,6 +311,7 @@ qx.Class.define("org.argeo.ria.event.CommandsManager",
                menu.add(icon);\r
                menu.add(text);\r
                menu.add(both);\r
+               mgr.setSelected(both);\r
                toolbar.setContextMenu(menu);           \r
                mgr.addListener("changeValue", function(e){\r
                        this.setShow(e.getData());\r