X-Git-Url: https://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=7b124b92811847fcbbf770f816ed861acfce39e2;hb=baa11e2f5b077334f51f183d352e9477cc0124ff;hp=3533221af41a90ee4aed32c0b57b47721005acb8;hpb=b9d6c8b6386de221d1a316f8e2c1ffec4b7bffce;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 3533221af..7b124b928 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 @@ -31,28 +31,46 @@ qx.Class.define("org.argeo.security.ria.RolesApplet", "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