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=353bedc2849e81e9b8685c03933b320f532e6480;hb=b9f0dc6d3192adcbd4e9de8053b087e36759820e;hp=f2f488d31a3220a38d4a93f35a773b2a2e992522;hpb=829163c2a8aa042407a6fd2ee45d10cea69e933f;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 f2f488d31..353bedc28 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 @@ -34,9 +34,18 @@ qx.Class.define("org.argeo.security.ria.RolesApplet", shortcut : "Control+n", enabled : true, menu : "Roles", - toolbar : "role", + 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 }, @@ -46,16 +55,25 @@ qx.Class.define("org.argeo.security.ria.RolesApplet", shortcut : "Control+s", enabled : true, menu : "Roles", - toolbar : "role", + toolbar : null, callback : function(e){ // Call service to delete - var crtUsers = this.getViewSelection().getNodes(); - for(var i=0;i