PM-838 Usuario mantiene el rol asignado despues de... SOLVED
- El problema principal es que el usuario ya no tiene un rol y para processmaker es necesario tener un rol asignado. - se quitaron los botonoes para quitar los roles, ahora solo se pueden cambiar de roles.
This commit is contained in:
@@ -460,15 +460,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
smodelU = new Ext.grid.RowSelectionModel({
|
smodelU = new Ext.grid.RowSelectionModel({
|
||||||
selectSingle: false,
|
selectSingle: false
|
||||||
listeners:{
|
|
||||||
selectionchange: function(sm){
|
|
||||||
switch(sm.getCount()){
|
|
||||||
case 0: Ext.getCmp('removeUButton').disable(); break;
|
|
||||||
default: Ext.getCmp('removeUButton').enable(); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
searchTextU = new Ext.form.TextField ({
|
searchTextU = new Ext.form.TextField ({
|
||||||
@@ -542,30 +534,27 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
assignedUGrid = new Ext.grid.GridPanel({
|
assignedUGrid = new Ext.grid.GridPanel({
|
||||||
layout : 'fit',
|
layout : 'fit',
|
||||||
title : _('ID_ASSIGNED_USERS'),
|
title : _('ID_ASSIGNED_USERS'),
|
||||||
ddGroup : 'availableUGridDDGroup',
|
ddGroup : 'availableUGridDDGroup',
|
||||||
store : storeU,
|
store : storeU,
|
||||||
cm : cmodelU,
|
cm : cmodelU,
|
||||||
sm : smodelU,
|
sm : smodelU,
|
||||||
enableDragDrop : true,
|
enableDragDrop : false,
|
||||||
stripeRows : true,
|
stripeRows : true,
|
||||||
autoExpandColumn: 'USR_USERNAME',
|
autoExpandColumn: 'USR_USERNAME',
|
||||||
iconCls : 'icon-grid',
|
iconCls : 'icon-grid',
|
||||||
id : 'assignedUGrid',
|
id : 'assignedUGrid',
|
||||||
height : 100,
|
height : 100,
|
||||||
autoWidth : true,
|
autoWidth : true,
|
||||||
stateful : true,
|
stateful : true,
|
||||||
stateId : 'gridUserPermissionAssigned2',
|
stateId : 'gridUserPermissionAssigned2',
|
||||||
enableColumnResize : true,
|
enableColumnResize : true,
|
||||||
enableHdMenu : true,
|
enableHdMenu : true,
|
||||||
frame : false,
|
frame : false,
|
||||||
columnLines : false,
|
columnLines : false,
|
||||||
viewConfig : {forceFit:true},
|
viewConfig : {forceFit:true},
|
||||||
tbar: [editPermissionsUButton,{xtype: 'tbfill'},'-',searchTextX, clearTextButtonX],
|
tbar : [editPermissionsUButton,{xtype: 'tbfill'},'-',searchTextX, clearTextButtonX]
|
||||||
//bbar: [{xtype: 'tbfill'},removeUAllButton],
|
|
||||||
listeners: {rowdblclick: function(){
|
|
||||||
(availableUGrid.hidden)? DoNothing() : RemoveUserAction();}}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
buttonsUPanel = new Ext.Panel({
|
buttonsUPanel = new Ext.Panel({
|
||||||
@@ -579,9 +568,7 @@ Ext.onReady(function(){
|
|||||||
defaults:{margins:'0 0 35 0'},
|
defaults:{margins:'0 0 35 0'},
|
||||||
items:[
|
items:[
|
||||||
{xtype:'button',text: '>', handler: AssignUserAction, id: 'assignUButton', disabled: true},
|
{xtype:'button',text: '>', handler: AssignUserAction, id: 'assignUButton', disabled: true},
|
||||||
{xtype:'button',text: '<', handler: RemoveUserAction, id: 'removeUButton', disabled: true},
|
|
||||||
{xtype:'button',text: '>>', handler: AssignAllUsersAction, id: 'assignUButtonAll', disabled: false},
|
{xtype:'button',text: '>>', handler: AssignAllUsersAction, id: 'assignUButtonAll', disabled: false},
|
||||||
{xtype:'button',text: '<<', handler: RemoveAllUsersAction, id: 'removeUButtonAll', disabled: false}
|
|
||||||
],
|
],
|
||||||
hidden: true
|
hidden: true
|
||||||
});
|
});
|
||||||
@@ -891,16 +878,6 @@ AssignUserAction = function(){
|
|||||||
SaveUsersRole(arrAux,RefreshUsers,FailureProcess);
|
SaveUsersRole(arrAux,RefreshUsers,FailureProcess);
|
||||||
};
|
};
|
||||||
|
|
||||||
//RemoveUButton Functionality
|
|
||||||
RemoveUserAction = function(){
|
|
||||||
rowsSelected = assignedUGrid.getSelectionModel().getSelections();
|
|
||||||
var arrAux = new Array();
|
|
||||||
for(var a=0; a < rowsSelected.length; a++){
|
|
||||||
arrAux[a] = rowsSelected[a].get('USR_UID');
|
|
||||||
}
|
|
||||||
DeleteUsersRole(arrAux,RefreshUsers,FailureProcess);
|
|
||||||
};
|
|
||||||
|
|
||||||
//AssignUALLButton Functionality
|
//AssignUALLButton Functionality
|
||||||
AssignAllUsersAction = function(){
|
AssignAllUsersAction = function(){
|
||||||
var allRows = availableUGrid.getStore();
|
var allRows = availableUGrid.getStore();
|
||||||
@@ -920,19 +897,6 @@ AssignAllUsersAction = function(){
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//RevomeALLButton Functionality
|
|
||||||
RemoveAllUsersAction = function(){
|
|
||||||
var allRows = assignedUGrid.getStore();
|
|
||||||
var arrAux = new Array();
|
|
||||||
if (allRows.getCount()>0){
|
|
||||||
for (var r=0; r < allRows.getCount(); r++){
|
|
||||||
row = allRows.getAt(r);
|
|
||||||
arrAux[r] = row.data['USR_UID'];
|
|
||||||
}
|
|
||||||
DeleteUsersRole(arrAux,RefreshUsers,FailureProcess);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//update the content table, using php layer & update the Extjs table
|
//update the content table, using php layer & update the Extjs table
|
||||||
updatePermissionContent = function() {
|
updatePermissionContent = function() {
|
||||||
rowSelected = assignedGrid.getSelectionModel().getSelections();
|
rowSelected = assignedGrid.getSelectionModel().getSelections();
|
||||||
|
|||||||
Reference in New Issue
Block a user