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=429460b3700d2258910ad6b3ed3f57bed0da3de7;hb=06f80b7b50619d1c997e2660eddb32a584cfc8a8;hp=6cd0b43995d850f8105841880830d933e8001704;hpb=887773721e5ce1aabbd45b8fc1278ffcf6bb25f8;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 6cd0b4399..429460b37 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