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=353bedc2849e81e9b8685c03933b320f532e6480;hpb=b9f0dc6d3192adcbd4e9de8053b087e36759820e;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 353bedc28..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,10 +28,22 @@ 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, @@ -52,7 +64,7 @@ qx.Class.define("org.argeo.security.ria.RolesApplet", "delete_role" : { label : "Delete Role", icon : "org.argeo.security.ria/list-remove.png", - shortcut : "Control+s", + shortcut : null, enabled : true, menu : "Roles", toolbar : null, @@ -232,7 +244,13 @@ qx.Class.define("org.argeo.security.ria.RolesApplet", viewSel.removeListener("changeSelection", this.monitorChooserSelectionChanges, this); } selectionModel.addListener("changeSelection", this.selectionToFilter, this); + if(selectionModel.getSelectedCount()){ + var orig = selectionModel.getSelectedRanges()[0].minIndex; + } selectionModel.setSelectionMode(qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION_TOGGLE); + if(orig){ + selectionModel.addSelectionInterval(orig, orig); + } this.selectionToFilter(); }else if(guiMode == "edit"){ if(!this.usersAppletReference) return; @@ -253,7 +271,13 @@ qx.Class.define("org.argeo.security.ria.RolesApplet", } this.table.setEnabled(true); selectionModel.removeListener("changeSelection", this.selectionToFilter, this); + if(selectionModel.getSelectedCount()){ + var orig = selectionModel.getSelectedRanges()[0].minIndex; + } selectionModel.setSelectionMode(qx.ui.table.selection.Model.SINGLE_SELECTION); + if(orig){ + selectionModel.addSelectionInterval(orig, orig); + } } },