* The only associated command is the "Close" command.
*/
/* *************************************************
-#asset(resource/org.argeo.ria.sample/window-close.png)
+#asset(org/argeo/ria/sample/window-close.png)
****************************************************/
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",
+ icon : "org/argeo/security/ria/list-add.png",
shortcut : null,
enabled : true,
menu : "Roles",
},
"delete_role" : {
label : "Delete Role",
- icon : "org.argeo.security.ria/list-remove.png",
+ icon : "org/argeo/security/ria/list-remove.png",
shortcut : null,
enabled : true,
menu : "Roles",
},
"edit_role" : {
label : "Edit Role",
- icon : "org.argeo.security.ria/document-properties.png",
+ icon : "org/argeo/security/ria/document-properties.png",
shortcut : "Control+r",
enabled : true,
menu : "Roles",
this.rolesUsersStub = {"ROLE_ADMIN":["gandalf"],"ROLE_USER":["demo","frodo","gandalf"]};
- this.toggleButton = new qx.ui.form.ToggleButton("Filter", "org.argeo.security.ria/go-next.png");
+ this.toggleButton = new qx.ui.form.ToggleButton("Filter", "org/argeo/security/ria/go-next.png");
this.toggleButton.set({
show:"icon",
margin:2,
});
// TOGGLE THE GUI MODES
- this.toggleButton.addListener("changeChecked", function(event){
+ this.toggleButton.addListener("changeValue", function(event){
this.setGuiMode(event.getData()?"filter":"clear");
}, this);
- this.saveButton = new qx.ui.form.Button("Save", "org.argeo.security.ria/document-save.png");
+ this.saveButton = new qx.ui.form.Button("Save", "org/argeo/security/ria/document-save.png");
this.saveButton.set({
show:"icon",
margin:2,
visibility : "excluded"
});
- this.cancelButton = new qx.ui.form.Button("Cancel", "org.argeo.security.ria/window-close.png");
+ this.cancelButton = new qx.ui.form.Button("Cancel", "org/argeo/security/ria/window-close.png");
this.cancelButton.set({
show:"icon",
margin:2,
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;
}
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);
+ }
}
},