X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=security%2Fruntime%2Forg.argeo.security.ria%2Fsrc%2Fargeo-ria-lib%2Fsecurity%2Fclass%2Forg%2Fargeo%2Fsecurity%2Fria%2FRolesApplet.js;h=66d9fe9f36560d4226186364070af0cd4f0d2f44;hb=3112a8b93396eb3fb95fc8b1038a5dfb224d5006;hp=676aaa3d9bbf46b55020b2dfffe0c3cae0b0eb40;hpb=f7c73e12f9534b0b796686e207dd4b43193977fa;p=lgpl%2Fargeo-commons.git diff --git a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js index 676aaa3d9..66d9fe9f3 100644 --- a/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js +++ b/security/runtime/org.argeo.security.ria/src/argeo-ria-lib/security/class/org/argeo/security/ria/RolesApplet.js @@ -28,31 +28,61 @@ qx.Class.define("org.argeo.security.ria.RolesApplet", */ commands : { init : { + "reload" : { + label : "Reload Data", + icon : "org.argeo.security.ria/view-refresh.png", + shortcut : "Control+h", + enabled : true, + menu : "Roles", + toolbar : "roles", + callback : function(e){ + this.loadRolesList(); + }, + command : null + }, "new_role" : { label : "Create Role", icon : "org.argeo.security.ria/list-add.png", - shortcut : "Control+n", + shortcut : null, enabled : true, menu : "Roles", toolbar : null, callback : function(e){ // Prompt for new name + var modal = new org.argeo.ria.components.Modal(); + modal.makePromptForm("Please enter a role name", function(roleName){ + var service = org.argeo.security.ria.SecurityAPI.getCreateRoleService(roleName); + service.addListener("completed", function(response){ + this.loadRolesList(); + }, this); + service.send(); + }, this); + modal.attachAndShow(); }, command : null }, "delete_role" : { label : "Delete Role", icon : "org.argeo.security.ria/list-remove.png", - shortcut : "Control+s", + shortcut : null, enabled : true, menu : "Roles", toolbar : null, callback : function(e){ // Call service to delete - var crtUsers = this.getViewSelection().getNodes(); - for(var i=0;i