Update Look n Feel Users and Roles
This commit is contained in:
@@ -653,8 +653,8 @@ class RBAC
|
|||||||
* @param string $ROL_UID
|
* @param string $ROL_UID
|
||||||
* @return $this->rolesObj->getRoleUsers
|
* @return $this->rolesObj->getRoleUsers
|
||||||
*/
|
*/
|
||||||
function getRoleUsers($ROL_UID){
|
function getRoleUsers($ROL_UID,$filter=''){
|
||||||
return $this->rolesObj->getRoleUsers($ROL_UID);
|
return $this->rolesObj->getRoleUsers($ROL_UID,$filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -693,8 +693,8 @@ class RBAC
|
|||||||
* @param string $ROL_UID
|
* @param string $ROL_UID
|
||||||
* @return $this->rolesObj->getAllUsers
|
* @return $this->rolesObj->getAllUsers
|
||||||
*/
|
*/
|
||||||
function getAllUsers($ROL_UID){
|
function getAllUsers($ROL_UID, $filter=''){
|
||||||
return $this->rolesObj->getAllUsers($ROL_UID);
|
return $this->rolesObj->getAllUsers($ROL_UID,$filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -719,8 +719,8 @@ class RBAC
|
|||||||
* @param string $ROL_UID
|
* @param string $ROL_UID
|
||||||
* @return $this->rolesObj->getRolePermissions
|
* @return $this->rolesObj->getRolePermissions
|
||||||
*/
|
*/
|
||||||
function getRolePermissions($ROL_UID){
|
function getRolePermissions($ROL_UID, $filter=''){
|
||||||
return $this->rolesObj->getRolePermissions($ROL_UID);
|
return $this->rolesObj->getRolePermissions($ROL_UID,$filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -733,8 +733,8 @@ class RBAC
|
|||||||
* @param string $PER_SYSTEM
|
* @param string $PER_SYSTEM
|
||||||
* @return $this->rolesObj->getAllPermissions
|
* @return $this->rolesObj->getAllPermissions
|
||||||
*/
|
*/
|
||||||
function getAllPermissions($ROL_UID,$PER_SYSTEM=""){
|
function getAllPermissions($ROL_UID,$PER_SYSTEM="",$filter=''){
|
||||||
return $this->rolesObj->getAllPermissions($ROL_UID,$PER_SYSTEM);
|
return $this->rolesObj->getAllPermissions($ROL_UID,$PER_SYSTEM,$filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ class Roles extends BaseRoles {
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRoleUsers($ROL_UID) {
|
function getRoleUsers($ROL_UID, $filter='') {
|
||||||
try {
|
try {
|
||||||
$criteria = new Criteria();
|
$criteria = new Criteria();
|
||||||
$criteria->addSelectColumn(RolesPeer::ROL_UID);
|
$criteria->addSelectColumn(RolesPeer::ROL_UID);
|
||||||
@@ -335,6 +335,14 @@ class Roles extends BaseRoles {
|
|||||||
$criteria->addJoin(RolesPeer::ROL_UID, UsersRolesPeer::ROL_UID);
|
$criteria->addJoin(RolesPeer::ROL_UID, UsersRolesPeer::ROL_UID);
|
||||||
$criteria->addJoin(UsersRolesPeer::USR_UID, RbacUsersPeer::USR_UID);
|
$criteria->addJoin(UsersRolesPeer::USR_UID, RbacUsersPeer::USR_UID);
|
||||||
|
|
||||||
|
if ($filter != ''){
|
||||||
|
$criteria->add(
|
||||||
|
$criteria->getNewCriterion(RbacUsersPeer::USR_USERNAME,'%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||||
|
$criteria->getNewCriterion(RbacUsersPeer::USR_FIRSTNAME,'%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||||
|
$criteria->getNewCriterion(RbacUsersPeer::USR_LASTNAME,'%'.$filter.'%',Criteria::LIKE)))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$oDataset = RolesPeer::doSelectRS($criteria);
|
$oDataset = RolesPeer::doSelectRS($criteria);
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
return $oDataset;
|
return $oDataset;
|
||||||
@@ -344,7 +352,7 @@ class Roles extends BaseRoles {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAllUsers($ROL_UID) {
|
function getAllUsers($ROL_UID, $filter='') {
|
||||||
try {
|
try {
|
||||||
$c = new Criteria();
|
$c = new Criteria();
|
||||||
$c->addSelectColumn(RbacUsersPeer::USR_UID);
|
$c->addSelectColumn(RbacUsersPeer::USR_UID);
|
||||||
@@ -371,6 +379,14 @@ class Roles extends BaseRoles {
|
|||||||
$criteria->add(RbacUsersPeer::USR_STATUS, 1, Criteria::EQUAL);
|
$criteria->add(RbacUsersPeer::USR_STATUS, 1, Criteria::EQUAL);
|
||||||
$criteria->add(RbacUsersPeer::USR_UID, $a, Criteria::NOT_IN);
|
$criteria->add(RbacUsersPeer::USR_UID, $a, Criteria::NOT_IN);
|
||||||
|
|
||||||
|
if ($filter != ''){
|
||||||
|
$criteria->add(
|
||||||
|
$criteria->getNewCriterion(RbacUsersPeer::USR_USERNAME,'%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||||
|
$criteria->getNewCriterion(RbacUsersPeer::USR_FIRSTNAME,'%'.$filter.'%',Criteria::LIKE)->addOr(
|
||||||
|
$criteria->getNewCriterion(RbacUsersPeer::USR_LASTNAME,'%'.$filter.'%',Criteria::LIKE)))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$oDataset = RbacUsersPeer::doSelectRS($criteria);
|
$oDataset = RbacUsersPeer::doSelectRS($criteria);
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
return $oDataset;
|
return $oDataset;
|
||||||
@@ -436,7 +452,7 @@ class Roles extends BaseRoles {
|
|||||||
UsersRolesPeer::doDelete($crit);
|
UsersRolesPeer::doDelete($crit);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRolePermissions($ROL_UID) {
|
function getRolePermissions($ROL_UID, $filter='') {
|
||||||
try {
|
try {
|
||||||
$criteria = new Criteria();
|
$criteria = new Criteria();
|
||||||
$criteria->addSelectColumn(RolesPeer::ROL_UID);
|
$criteria->addSelectColumn(RolesPeer::ROL_UID);
|
||||||
@@ -456,6 +472,10 @@ class Roles extends BaseRoles {
|
|||||||
$criteria->addJoin(RolesPeer::ROL_UID, RolesPermissionsPeer::ROL_UID);
|
$criteria->addJoin(RolesPeer::ROL_UID, RolesPermissionsPeer::ROL_UID);
|
||||||
$criteria->addJoin(RolesPermissionsPeer::PER_UID, PermissionsPeer::PER_UID);
|
$criteria->addJoin(RolesPermissionsPeer::PER_UID, PermissionsPeer::PER_UID);
|
||||||
|
|
||||||
|
if ($filter != ''){
|
||||||
|
$criteria->add(PermissionsPeer::PER_CODE, '%'.$filter.'%',Criteria::LIKE);
|
||||||
|
}
|
||||||
|
|
||||||
$oDataset = RolesPeer::doSelectRS($criteria);
|
$oDataset = RolesPeer::doSelectRS($criteria);
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
return $oDataset;
|
return $oDataset;
|
||||||
@@ -465,7 +485,7 @@ class Roles extends BaseRoles {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAllPermissions($ROL_UID, $PER_SYSTEM = "") {
|
function getAllPermissions($ROL_UID, $PER_SYSTEM = "", $filter='') {
|
||||||
try {
|
try {
|
||||||
$c = new Criteria();
|
$c = new Criteria();
|
||||||
$c->addSelectColumn(PermissionsPeer::PER_UID);
|
$c->addSelectColumn(PermissionsPeer::PER_UID);
|
||||||
@@ -497,6 +517,10 @@ class Roles extends BaseRoles {
|
|||||||
}
|
}
|
||||||
$criteria->addJoin(PermissionsPeer::PER_SYSTEM, SystemsPeer::SYS_UID);
|
$criteria->addJoin(PermissionsPeer::PER_SYSTEM, SystemsPeer::SYS_UID);
|
||||||
|
|
||||||
|
if ($filter != ''){
|
||||||
|
$criteria->add(PermissionsPeer::PER_CODE, '%'.$filter.'%',Criteria::LIKE);
|
||||||
|
}
|
||||||
|
|
||||||
$oDataset = PermissionsPeer::doSelectRS($criteria);
|
$oDataset = PermissionsPeer::doSelectRS($criteria);
|
||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
return $oDataset;
|
return $oDataset;
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ class Groups
|
|||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getAvailableGroupsCriteria($sUserUid){
|
function getAvailableGroupsCriteria($sUserUid, $filter=''){
|
||||||
try{
|
try{
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->addSelectColumn(GroupUserPeer::GRP_UID);
|
$oCriteria->addSelectColumn(GroupUserPeer::GRP_UID);
|
||||||
@@ -199,6 +199,11 @@ class Groups
|
|||||||
$oCriteria->add(GroupwfPeer::GRP_STATUS, 'ACTIVE');
|
$oCriteria->add(GroupwfPeer::GRP_STATUS, 'ACTIVE');
|
||||||
$oCriteria->add(ContentPeer::CON_CATEGORY,'GRP_TITLE');
|
$oCriteria->add(ContentPeer::CON_CATEGORY,'GRP_TITLE');
|
||||||
$oCriteria->add(ContentPeer::CON_LANG,SYS_LANG);
|
$oCriteria->add(ContentPeer::CON_LANG,SYS_LANG);
|
||||||
|
|
||||||
|
if ($filter !=''){
|
||||||
|
$oCriteria->add(ContentPeer::CON_VALUE,'%'.$filter.'%',Criteria::LIKE);
|
||||||
|
}
|
||||||
|
|
||||||
return $oCriteria;
|
return $oCriteria;
|
||||||
}
|
}
|
||||||
catch(exception $e){
|
catch(exception $e){
|
||||||
@@ -213,7 +218,7 @@ class Groups
|
|||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function getAssignedGroupsCriteria($sUserUid){
|
function getAssignedGroupsCriteria($sUserUid, $filter=''){
|
||||||
try{
|
try{
|
||||||
$oCriteria = new Criteria('workflow');
|
$oCriteria = new Criteria('workflow');
|
||||||
$oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
|
$oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
|
||||||
@@ -225,6 +230,11 @@ class Groups
|
|||||||
$oCriteria->add(GroupwfPeer::GRP_STATUS, 'ACTIVE');
|
$oCriteria->add(GroupwfPeer::GRP_STATUS, 'ACTIVE');
|
||||||
$oCriteria->add(ContentPeer::CON_CATEGORY,'GRP_TITLE');
|
$oCriteria->add(ContentPeer::CON_CATEGORY,'GRP_TITLE');
|
||||||
$oCriteria->add(ContentPeer::CON_LANG,SYS_LANG);
|
$oCriteria->add(ContentPeer::CON_LANG,SYS_LANG);
|
||||||
|
|
||||||
|
if ($filter !=''){
|
||||||
|
$oCriteria->add(ContentPeer::CON_VALUE,'%'.$filter.'%',Criteria::LIKE);
|
||||||
|
}
|
||||||
|
|
||||||
return $oCriteria;
|
return $oCriteria;
|
||||||
}
|
}
|
||||||
catch(exception $e){
|
catch(exception $e){
|
||||||
|
|||||||
@@ -28,8 +28,10 @@ $TYPE_DATA = $_GET["type"];
|
|||||||
|
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
|
|
||||||
if ($TYPE_DATA=='list') $oDataset = $RBAC->getRolePermissions($ROL_UID);
|
$filter = (isset($_REQUEST['textFilter']))? $_REQUEST['textFilter'] : '';
|
||||||
if ($TYPE_DATA=='show') $oDataset = $RBAC->getAllPermissions($ROL_UID,$RBAC->sSystem);
|
|
||||||
|
if ($TYPE_DATA=='list') $oDataset = $RBAC->getRolePermissions($ROL_UID,$filter);
|
||||||
|
if ($TYPE_DATA=='show') $oDataset = $RBAC->getAllPermissions($ROL_UID,$RBAC->sSystem,$filter);
|
||||||
|
|
||||||
$rows = Array();
|
$rows = Array();
|
||||||
while($oDataset->next()){
|
while($oDataset->next()){
|
||||||
|
|||||||
@@ -28,8 +28,10 @@ $TYPE_DATA = $_GET["type"];
|
|||||||
|
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
|
|
||||||
if ($TYPE_DATA=='list') $oDataset = $RBAC->getRoleUsers($ROL_UID);
|
$filter = (isset($_REQUEST['textFilter']))? $_REQUEST['textFilter'] : '';
|
||||||
if ($TYPE_DATA=='show') $oDataset = $RBAC->getAllUsers($ROL_UID);
|
|
||||||
|
if ($TYPE_DATA=='list') $oDataset = $RBAC->getRoleUsers($ROL_UID, $filter);
|
||||||
|
if ($TYPE_DATA=='show') $oDataset = $RBAC->getAllUsers($ROL_UID, $filter);
|
||||||
|
|
||||||
$rows = Array();
|
$rows = Array();
|
||||||
while($oDataset->next()){
|
while($oDataset->next()){
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ $labels = G::getTranslations(Array('ID_PRO_CREATE_DATE','ID_CODE','ID_NAME','ID_
|
|||||||
'ID_ACTIVE','ID_INACTIVE','ID_ROLES_MSG','ID_ROLES_CAN_NOT_DELETE','ID_ROLES_SUCCESS_NEW','ID_ROLES_SUCCESS_UPDATE',
|
'ID_ACTIVE','ID_INACTIVE','ID_ROLES_MSG','ID_ROLES_CAN_NOT_DELETE','ID_ROLES_SUCCESS_NEW','ID_ROLES_SUCCESS_UPDATE',
|
||||||
'ID_ROLES_SUCCESS_DELETE','ID_REMOVE_ROLE','ID_ASSIGN','ID_REMOVE','ID_BACK','ID_PROCESSING',
|
'ID_ROLES_SUCCESS_DELETE','ID_REMOVE_ROLE','ID_ASSIGN','ID_REMOVE','ID_BACK','ID_PROCESSING',
|
||||||
'ID_REMOVE_ALL_PERMISSIONS','ID_ASSIGN_ALL_PERMISSIONS','ID_ASSIGN_ALL_USERS','ID_REMOVE_ALL_USERS',
|
'ID_REMOVE_ALL_PERMISSIONS','ID_ASSIGN_ALL_PERMISSIONS','ID_ASSIGN_ALL_USERS','ID_REMOVE_ALL_USERS',
|
||||||
'ID_USER_NAME','ID_PERMISSION_CODE','ID_AVAILABLE_PERMISSIONS','ID_ASSIGNED_PERMISSIONS',
|
'ID_USER_NAME','ID_PERMISSION_CODE','ID_AVAILABLE_PERMISSIONS','ID_ASSIGNED_PERMISSIONS','ID_ENTER_SEARCH_TERM',
|
||||||
'ID_FIRST_NAME','ID_LAST_NAME','ID_AVAILABLE_USERS','ID_ASSIGNED_USERS','ID_MSG_CONFIRM_ASSIGN_ALL_USERS','ID_MSG_AJAX_FAILURE'));
|
'ID_FIRST_NAME','ID_LAST_NAME','ID_AVAILABLE_USERS','ID_ASSIGNED_USERS','ID_MSG_CONFIRM_ASSIGN_ALL_USERS','ID_MSG_AJAX_FAILURE'));
|
||||||
|
|
||||||
$roles = Array();
|
$roles = Array();
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ $oHeadPublisher->addContent('users/usersGroups'); //adding a html file .html.
|
|||||||
$labels = G::getTranslations(Array('ID_USERS','ID_ASSIGN','ID_ASSIGN_ALL_GROUPS','ID_REMOVE','ID_REMOVE_ALL_GROUPS',
|
$labels = G::getTranslations(Array('ID_USERS','ID_ASSIGN','ID_ASSIGN_ALL_GROUPS','ID_REMOVE','ID_REMOVE_ALL_GROUPS',
|
||||||
'ID_BACK','ID_GROUP_NAME','ID_AVAILABLE_GROUPS','ID_ASSIGNED_GROUPS','ID_GROUPS','ID_USERS',
|
'ID_BACK','ID_GROUP_NAME','ID_AVAILABLE_GROUPS','ID_ASSIGNED_GROUPS','ID_GROUPS','ID_USERS',
|
||||||
'ID_MSG_AJAX_FAILURE','ID_PROCESSING','ID_AUTHENTICATION','ID_CLOSE','ID_SAVE','ID_AUTHENTICATION_SOURCE',
|
'ID_MSG_AJAX_FAILURE','ID_PROCESSING','ID_AUTHENTICATION','ID_CLOSE','ID_SAVE','ID_AUTHENTICATION_SOURCE',
|
||||||
'ID_AUTHENTICATION_DN','ID_AUTHENTICATION_FORM_TITLE','ID_SELECT_AUTH_SOURCE','ID_SAVE_CHANGES','ID_DISCARD_CHANGES'));
|
'ID_AUTHENTICATION_DN','ID_AUTHENTICATION_FORM_TITLE','ID_SELECT_AUTH_SOURCE','ID_SAVE_CHANGES','ID_DISCARD_CHANGES',
|
||||||
|
'ID_ENTER_SEARCH_TERM'));
|
||||||
|
|
||||||
require_once 'classes/model/Users.php';
|
require_once 'classes/model/Users.php';
|
||||||
|
|
||||||
|
|||||||
@@ -200,9 +200,9 @@ try {
|
|||||||
break;
|
break;
|
||||||
case 'availableGroups':
|
case 'availableGroups':
|
||||||
G::LoadClass('groups');
|
G::LoadClass('groups');
|
||||||
|
$filter = (isset($_POST['textFilter']))? $_POST['textFilter'] : '';
|
||||||
$groups = new Groups();
|
$groups = new Groups();
|
||||||
$criteria = $groups->getAvailableGroupsCriteria($_REQUEST['uUID']);
|
$criteria = $groups->getAvailableGroupsCriteria($_REQUEST['uUID'],$filter);
|
||||||
$objects = GroupwfPeer::doSelectRS($criteria);
|
$objects = GroupwfPeer::doSelectRS($criteria);
|
||||||
$objects->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
$objects->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||||
$arr = Array();
|
$arr = Array();
|
||||||
@@ -213,9 +213,9 @@ try {
|
|||||||
break;
|
break;
|
||||||
case 'assignedGroups':
|
case 'assignedGroups':
|
||||||
G::LoadClass('groups');
|
G::LoadClass('groups');
|
||||||
|
$filter = (isset($_POST['textFilter']))? $_POST['textFilter'] : '';
|
||||||
$groups = new Groups();
|
$groups = new Groups();
|
||||||
$criteria = $groups->getAssignedGroupsCriteria($_REQUEST['uUID']);
|
$criteria = $groups->getAssignedGroupsCriteria($_REQUEST['uUID'],$filter);
|
||||||
$objects = GroupwfPeer::doSelectRS($criteria);
|
$objects = GroupwfPeer::doSelectRS($criteria);
|
||||||
$objects->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
$objects->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||||
$arr = Array();
|
$arr = Array();
|
||||||
|
|||||||
@@ -63,12 +63,12 @@ Ext.onReady(function(){
|
|||||||
sw_func_permissions = false;
|
sw_func_permissions = false;
|
||||||
sw_func_users = false;
|
sw_func_users = false;
|
||||||
|
|
||||||
assignButton = new Ext.Action({
|
// assignButton = new Ext.Action({
|
||||||
text: TRANSLATIONS.ID_ASSIGN,
|
// text: TRANSLATIONS.ID_ASSIGN,
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
// iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||||
handler: AssignPermissionAction,
|
// handler: AssignPermissionAction,
|
||||||
disabled: true
|
// disabled: true
|
||||||
});
|
// });
|
||||||
|
|
||||||
assignAllButton = new Ext.Action({
|
assignAllButton = new Ext.Action({
|
||||||
text: TRANSLATIONS.ID_ASSIGN_ALL_PERMISSIONS,
|
text: TRANSLATIONS.ID_ASSIGN_ALL_PERMISSIONS,
|
||||||
@@ -76,12 +76,12 @@ Ext.onReady(function(){
|
|||||||
handler: AssignAllPermissionsAction
|
handler: AssignAllPermissionsAction
|
||||||
});
|
});
|
||||||
|
|
||||||
removeButton = new Ext.Action({
|
// removeButton = new Ext.Action({
|
||||||
text: TRANSLATIONS.ID_REMOVE,
|
// text: TRANSLATIONS.ID_REMOVE,
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_delete',
|
// iconCls: 'button_menu_ext ss_sprite ss_delete',
|
||||||
handler: RemovePermissionAction,
|
// handler: RemovePermissionAction,
|
||||||
disabled: true
|
// disabled: true
|
||||||
});
|
// });
|
||||||
|
|
||||||
removeAllButton = new Ext.Action({
|
removeAllButton = new Ext.Action({
|
||||||
text: TRANSLATIONS.ID_REMOVE_ALL_PERMISSIONS,
|
text: TRANSLATIONS.ID_REMOVE_ALL_PERMISSIONS,
|
||||||
@@ -90,12 +90,12 @@ Ext.onReady(function(){
|
|||||||
disabled: (ROLES.ROL_UID==pm_admin) ? true : false
|
disabled: (ROLES.ROL_UID==pm_admin) ? true : false
|
||||||
});
|
});
|
||||||
|
|
||||||
assignUButton = new Ext.Action({
|
// assignUButton = new Ext.Action({
|
||||||
text: TRANSLATIONS.ID_ASSIGN,
|
// text: TRANSLATIONS.ID_ASSIGN,
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
// iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||||
handler: AssignUserAction,
|
// handler: AssignUserAction,
|
||||||
disabled: true
|
// disabled: true
|
||||||
});
|
// });
|
||||||
|
|
||||||
assignUAllButton = new Ext.Action({
|
assignUAllButton = new Ext.Action({
|
||||||
text: TRANSLATIONS.ID_ASSIGN_ALL_USERS,
|
text: TRANSLATIONS.ID_ASSIGN_ALL_USERS,
|
||||||
@@ -103,12 +103,12 @@ Ext.onReady(function(){
|
|||||||
handler: AssignAllUsersAction
|
handler: AssignAllUsersAction
|
||||||
});
|
});
|
||||||
|
|
||||||
removeUButton = new Ext.Action({
|
// removeUButton = new Ext.Action({
|
||||||
text: TRANSLATIONS.ID_REMOVE,
|
// text: TRANSLATIONS.ID_REMOVE,
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_delete',
|
// iconCls: 'button_menu_ext ss_sprite ss_delete',
|
||||||
handler: RemoveUserAction,
|
// handler: RemoveUserAction,
|
||||||
disabled: true
|
// disabled: true
|
||||||
});
|
// });
|
||||||
|
|
||||||
removeUAllButton = new Ext.Action({
|
removeUAllButton = new Ext.Action({
|
||||||
text: TRANSLATIONS.ID_REMOVE_ALL_USERS,
|
text: TRANSLATIONS.ID_REMOVE_ALL_USERS,
|
||||||
@@ -168,8 +168,8 @@ Ext.onReady(function(){
|
|||||||
listeners:{
|
listeners:{
|
||||||
selectionchange: function(sm){
|
selectionchange: function(sm){
|
||||||
switch(sm.getCount()){
|
switch(sm.getCount()){
|
||||||
case 0: assignButton.disable(); break;
|
case 0: Ext.getCmp('assignButton').disable(); break;
|
||||||
default: assignButton.enable(); break;
|
default: Ext.getCmp('assignButton').enable(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -180,13 +180,55 @@ Ext.onReady(function(){
|
|||||||
listeners:{
|
listeners:{
|
||||||
selectionchange: function(sm){
|
selectionchange: function(sm){
|
||||||
switch(sm.getCount()){
|
switch(sm.getCount()){
|
||||||
case 0: removeButton.disable(); break;
|
case 0: Ext.getCmp('removeButton').disable(); break;
|
||||||
default: (ROLES.ROL_UID==pm_admin) ? removeButton.disable() : removeButton.enable(); break;
|
default: (ROLES.ROL_UID==pm_admin)? Ext.getCmp('removeButton').disable() : Ext.getCmp('removeButton').enable(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
searchTextA = new Ext.form.TextField ({
|
||||||
|
id: 'searchTextA',
|
||||||
|
ctCls:'pm_search_text_field',
|
||||||
|
allowBlank: true,
|
||||||
|
width: 110,
|
||||||
|
emptyText: TRANSLATIONS.ID_ENTER_SEARCH_TERM,
|
||||||
|
listeners: {
|
||||||
|
specialkey: function(f,e){
|
||||||
|
if (e.getKey() == e.ENTER) {
|
||||||
|
DoSearchA();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
clearTextButtonA = new Ext.Action({
|
||||||
|
text: 'X',
|
||||||
|
ctCls:'pm_search_x_button',
|
||||||
|
handler: GridByDefaultA
|
||||||
|
});
|
||||||
|
|
||||||
|
searchTextP = new Ext.form.TextField ({
|
||||||
|
id: 'searchTextP',
|
||||||
|
ctCls:'pm_search_text_field',
|
||||||
|
allowBlank: true,
|
||||||
|
width: 110,
|
||||||
|
emptyText: TRANSLATIONS.ID_ENTER_SEARCH_TERM,
|
||||||
|
listeners: {
|
||||||
|
specialkey: function(f,e){
|
||||||
|
if (e.getKey() == e.ENTER) {
|
||||||
|
DoSearchP();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
clearTextButtonP = new Ext.Action({
|
||||||
|
text: 'X',
|
||||||
|
ctCls:'pm_search_x_button',
|
||||||
|
handler: GridByDefaultP
|
||||||
|
});
|
||||||
|
|
||||||
availableGrid = new Ext.grid.GridPanel({
|
availableGrid = new Ext.grid.GridPanel({
|
||||||
layout : 'fit',
|
layout : 'fit',
|
||||||
region : 'center',
|
region : 'center',
|
||||||
@@ -208,7 +250,7 @@ Ext.onReady(function(){
|
|||||||
frame : false,
|
frame : false,
|
||||||
columnLines : false,
|
columnLines : false,
|
||||||
viewConfig : {forceFit:true},
|
viewConfig : {forceFit:true},
|
||||||
tbar: [TRANSLATIONS.ID_AVAILABLE_PERMISSIONS,{xtype: 'tbfill'},'-',assignButton],
|
tbar: [TRANSLATIONS.ID_AVAILABLE_PERMISSIONS,{xtype: 'tbfill'},'-',searchTextA,clearTextButtonA],
|
||||||
bbar: [{xtype: 'tbfill'}, assignAllButton],
|
bbar: [{xtype: 'tbfill'}, assignAllButton],
|
||||||
listeners: {rowdblclick: AssignPermissionAction}
|
listeners: {rowdblclick: AssignPermissionAction}
|
||||||
});
|
});
|
||||||
@@ -233,11 +275,26 @@ Ext.onReady(function(){
|
|||||||
frame : false,
|
frame : false,
|
||||||
columnLines : false,
|
columnLines : false,
|
||||||
viewConfig : {forceFit:true},
|
viewConfig : {forceFit:true},
|
||||||
tbar: [TRANSLATIONS.ID_ASSIGNED_PERMISSIONS,{xtype: 'tbfill'},'-',removeButton],
|
tbar: [TRANSLATIONS.ID_ASSIGNED_PERMISSIONS,{xtype: 'tbfill'},'-',searchTextP,clearTextButtonP],
|
||||||
bbar: [{xtype: 'tbfill'},removeAllButton],
|
bbar: [{xtype: 'tbfill'},removeAllButton],
|
||||||
listeners: {rowdblclick: RemovePermissionAction}
|
listeners: {rowdblclick: RemovePermissionAction}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
buttonsPanel = new Ext.Panel({
|
||||||
|
width : 40,
|
||||||
|
layout : {
|
||||||
|
type:'vbox',
|
||||||
|
padding:'0',
|
||||||
|
pack:'center',
|
||||||
|
align:'center'
|
||||||
|
},
|
||||||
|
defaults:{margins:'0 0 35 0'},
|
||||||
|
items:[
|
||||||
|
{xtype:'button',text: '>>', handler: AssignPermissionAction, id: 'assignButton', disabled: true},
|
||||||
|
{xtype:'button',text: '<<', handler: RemovePermissionAction, id: 'removeButton', disabled: true}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
RefreshPermissions();
|
RefreshPermissions();
|
||||||
|
|
||||||
//PERMISSIONS DRAG AND DROP PANEL
|
//PERMISSIONS DRAG AND DROP PANEL
|
||||||
@@ -247,7 +304,7 @@ Ext.onReady(function(){
|
|||||||
layout : 'hbox',
|
layout : 'hbox',
|
||||||
defaults : { flex : 1 }, //auto stretch
|
defaults : { flex : 1 }, //auto stretch
|
||||||
layoutConfig : { align : 'stretch' },
|
layoutConfig : { align : 'stretch' },
|
||||||
items : [availableGrid,{xtype: '', width: 10},assignedGrid],
|
items : [availableGrid,buttonsPanel,assignedGrid],
|
||||||
viewConfig : {forceFit:true}
|
viewConfig : {forceFit:true}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -300,8 +357,8 @@ Ext.onReady(function(){
|
|||||||
listeners:{
|
listeners:{
|
||||||
selectionchange: function(sm){
|
selectionchange: function(sm){
|
||||||
switch(sm.getCount()){
|
switch(sm.getCount()){
|
||||||
case 0: assignUButton.disable(); break;
|
case 0: Ext.getCmp('assignUButton').disable(); break;
|
||||||
default: assignUButton.enable(); break;
|
default: Ext.getCmp('assignUButton').enable(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -312,12 +369,54 @@ Ext.onReady(function(){
|
|||||||
listeners:{
|
listeners:{
|
||||||
selectionchange: function(sm){
|
selectionchange: function(sm){
|
||||||
switch(sm.getCount()){
|
switch(sm.getCount()){
|
||||||
case 0: removeUButton.disable(); break;
|
case 0: Ext.getCmp('removeUButton').disable(); break;
|
||||||
default: removeUButton.enable(); break;
|
default: Ext.getCmp('removeUButton').enable(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
searchTextU = new Ext.form.TextField ({
|
||||||
|
id: 'searchTextU',
|
||||||
|
ctCls:'pm_search_text_field',
|
||||||
|
allowBlank: true,
|
||||||
|
width: 110,
|
||||||
|
emptyText: TRANSLATIONS.ID_ENTER_SEARCH_TERM,
|
||||||
|
listeners: {
|
||||||
|
specialkey: function(f,e){
|
||||||
|
if (e.getKey() == e.ENTER) {
|
||||||
|
DoSearchU();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
clearTextButtonU = new Ext.Action({
|
||||||
|
text: 'X',
|
||||||
|
ctCls:'pm_search_x_button',
|
||||||
|
handler: GridByDefaultU
|
||||||
|
});
|
||||||
|
|
||||||
|
searchTextX = new Ext.form.TextField ({
|
||||||
|
id: 'searchTextX',
|
||||||
|
ctCls:'pm_search_text_field',
|
||||||
|
allowBlank: true,
|
||||||
|
width: 110,
|
||||||
|
emptyText: TRANSLATIONS.ID_ENTER_SEARCH_TERM,
|
||||||
|
listeners: {
|
||||||
|
specialkey: function(f,e){
|
||||||
|
if (e.getKey() == e.ENTER) {
|
||||||
|
DoSearchX();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
clearTextButtonX = new Ext.Action({
|
||||||
|
text: 'X',
|
||||||
|
ctCls:'pm_search_x_button',
|
||||||
|
handler: GridByDefaultX
|
||||||
|
});
|
||||||
|
|
||||||
availableUGrid = new Ext.grid.GridPanel({
|
availableUGrid = new Ext.grid.GridPanel({
|
||||||
layout : 'fit',
|
layout : 'fit',
|
||||||
@@ -340,7 +439,7 @@ Ext.onReady(function(){
|
|||||||
frame : false,
|
frame : false,
|
||||||
columnLines : false,
|
columnLines : false,
|
||||||
viewConfig : {forceFit:true},
|
viewConfig : {forceFit:true},
|
||||||
tbar: [TRANSLATIONS.ID_AVAILABLE_USERS,{xtype: 'tbfill'},'-',assignUButton],
|
tbar: [TRANSLATIONS.ID_AVAILABLE_USERS,{xtype: 'tbfill'},'-',searchTextU, clearTextButtonU],
|
||||||
bbar: [{xtype: 'tbfill'}, assignUAllButton],
|
bbar: [{xtype: 'tbfill'}, assignUAllButton],
|
||||||
listeners: {rowdblclick: AssignUserAction}
|
listeners: {rowdblclick: AssignUserAction}
|
||||||
});
|
});
|
||||||
@@ -365,11 +464,26 @@ Ext.onReady(function(){
|
|||||||
frame : false,
|
frame : false,
|
||||||
columnLines : false,
|
columnLines : false,
|
||||||
viewConfig : {forceFit:true},
|
viewConfig : {forceFit:true},
|
||||||
tbar: [TRANSLATIONS.ID_ASSIGNED_USERS,{xtype: 'tbfill'},'-',removeUButton],
|
tbar: [TRANSLATIONS.ID_ASSIGNED_USERS,{xtype: 'tbfill'},'-',searchTextX, clearTextButtonX],
|
||||||
bbar: [{xtype: 'tbfill'},removeUAllButton],
|
bbar: [{xtype: 'tbfill'},removeUAllButton],
|
||||||
listeners: {rowdblclick: RemoveUserAction}
|
listeners: {rowdblclick: RemoveUserAction}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
buttonsUPanel = new Ext.Panel({
|
||||||
|
width : 40,
|
||||||
|
layout : {
|
||||||
|
type:'vbox',
|
||||||
|
padding:'0',
|
||||||
|
pack:'center',
|
||||||
|
align:'center'
|
||||||
|
},
|
||||||
|
defaults:{margins:'0 0 35 0'},
|
||||||
|
items:[
|
||||||
|
{xtype:'button',text: '>>', handler: AssignUserAction, id: 'assignUButton', disabled: true},
|
||||||
|
{xtype:'button',text: '<<', handler: RemoveUserAction, id: 'removeUButton', disabled: true}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
RefreshUsers();
|
RefreshUsers();
|
||||||
|
|
||||||
//PERMISSIONS DRAG AND DROP PANEL
|
//PERMISSIONS DRAG AND DROP PANEL
|
||||||
@@ -379,7 +493,7 @@ Ext.onReady(function(){
|
|||||||
layout : 'hbox',
|
layout : 'hbox',
|
||||||
defaults : { flex : 1 }, //auto stretch
|
defaults : { flex : 1 }, //auto stretch
|
||||||
layoutConfig : { align : 'stretch' },
|
layoutConfig : { align : 'stretch' },
|
||||||
items : [availableUGrid,{xtype: '', width: 10},assignedUGrid],
|
items : [availableUGrid,buttonsUPanel,assignedUGrid],
|
||||||
viewConfig : {forceFit:true}
|
viewConfig : {forceFit:true}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -495,14 +609,14 @@ DDLoadUsers = function(){
|
|||||||
|
|
||||||
//REFRESH PERMISSION GRIDS
|
//REFRESH PERMISSION GRIDS
|
||||||
RefreshPermissions = function(){
|
RefreshPermissions = function(){
|
||||||
availableGrid.store.load();
|
DoSearchA();
|
||||||
assignedGrid.store.load();
|
DoSearchP();
|
||||||
}
|
}
|
||||||
|
|
||||||
//REFRESH USERS GRIDS
|
//REFRESH USERS GRIDS
|
||||||
RefreshUsers = function(){
|
RefreshUsers = function(){
|
||||||
availableUGrid.store.load();
|
DoSearchX();
|
||||||
assignedUGrid.store.load();
|
DoSearchU();
|
||||||
}
|
}
|
||||||
|
|
||||||
//FAILURE AJAX FUNCTION
|
//FAILURE AJAX FUNCTION
|
||||||
@@ -682,6 +796,46 @@ RemoveAllUsersAction = function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Function DoSearch Available
|
||||||
|
DoSearchA = function(){
|
||||||
|
availableGrid.store.load({params: {textFilter: searchTextA.getValue()}});
|
||||||
|
}
|
||||||
|
|
||||||
|
//Function DoSearch Assigned
|
||||||
|
DoSearchP = function(){
|
||||||
|
assignedGrid.store.load({params: {textFilter: searchTextP.getValue()}});
|
||||||
|
}
|
||||||
|
|
||||||
|
//Load Grid By Default Available Members
|
||||||
|
GridByDefaultA = function(){
|
||||||
|
searchTextA.reset();
|
||||||
|
availableGrid.store.load();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Load Grid By Default Assigned Members
|
||||||
|
GridByDefaultP = function(){
|
||||||
|
searchTextP.reset();
|
||||||
|
assignedGrid.store.load();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Function DoSearch Available
|
||||||
|
DoSearchU = function(){
|
||||||
|
availableUGrid.store.load({params: {textFilter: searchTextU.getValue()}});
|
||||||
|
}
|
||||||
|
|
||||||
|
//Function DoSearch Assigned
|
||||||
|
DoSearchX = function(){
|
||||||
|
assignedUGrid.store.load({params: {textFilter: searchTextX.getValue()}});
|
||||||
|
}
|
||||||
|
|
||||||
|
//Load Grid By Default Available Members
|
||||||
|
GridByDefaultU = function(){
|
||||||
|
searchTextU.reset();
|
||||||
|
availableUGrid.store.load();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Load Grid By Default Assigned Members
|
||||||
|
GridByDefaultX = function(){
|
||||||
|
searchTextX.reset();
|
||||||
|
assignedUGrid.store.load();
|
||||||
|
}
|
||||||
|
|||||||
@@ -55,26 +55,12 @@ Ext.onReady(function(){
|
|||||||
//sw_func_reassign = false;
|
//sw_func_reassign = false;
|
||||||
sw_func_auth = false;
|
sw_func_auth = false;
|
||||||
|
|
||||||
assignButton = new Ext.Action({
|
|
||||||
text: TRANSLATIONS.ID_ASSIGN,
|
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
|
||||||
handler: AssignGroupsAction,
|
|
||||||
disabled: true
|
|
||||||
});
|
|
||||||
|
|
||||||
assignAllButton = new Ext.Action({
|
assignAllButton = new Ext.Action({
|
||||||
text: TRANSLATIONS.ID_ASSIGN_ALL_GROUPS,
|
text: TRANSLATIONS.ID_ASSIGN_ALL_GROUPS,
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_add',
|
iconCls: 'button_menu_ext ss_sprite ss_add',
|
||||||
handler: AssignAllGroupsAction
|
handler: AssignAllGroupsAction
|
||||||
});
|
});
|
||||||
|
|
||||||
removeButton = new Ext.Action({
|
|
||||||
text: TRANSLATIONS.ID_REMOVE,
|
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_delete',
|
|
||||||
handler: RemoveGroupsAction,
|
|
||||||
disabled: true
|
|
||||||
});
|
|
||||||
|
|
||||||
removeAllButton = new Ext.Action({
|
removeAllButton = new Ext.Action({
|
||||||
text: TRANSLATIONS.ID_REMOVE_ALL_GROUPS,
|
text: TRANSLATIONS.ID_REMOVE_ALL_GROUPS,
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_delete',
|
iconCls: 'button_menu_ext ss_sprite ss_delete',
|
||||||
@@ -145,8 +131,8 @@ Ext.onReady(function(){
|
|||||||
listeners:{
|
listeners:{
|
||||||
selectionchange: function(sm){
|
selectionchange: function(sm){
|
||||||
switch(sm.getCount()){
|
switch(sm.getCount()){
|
||||||
case 0: assignButton.disable(); break;
|
case 0: Ext.getCmp('assignButton').disable(); break;
|
||||||
default: assignButton.enable(); break;
|
default: Ext.getCmp('assignButton').enable(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -157,13 +143,55 @@ Ext.onReady(function(){
|
|||||||
listeners:{
|
listeners:{
|
||||||
selectionchange: function(sm){
|
selectionchange: function(sm){
|
||||||
switch(sm.getCount()){
|
switch(sm.getCount()){
|
||||||
case 0: removeButton.disable(); break;
|
case 0: Ext.getCmp('removeButton').disable(); break;
|
||||||
default: removeButton.enable(); break;
|
default: Ext.getCmp('removeButton').enable(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
searchTextA = new Ext.form.TextField ({
|
||||||
|
id: 'searchTextA',
|
||||||
|
ctCls:'pm_search_text_field',
|
||||||
|
allowBlank: true,
|
||||||
|
width: 110,
|
||||||
|
emptyText: TRANSLATIONS.ID_ENTER_SEARCH_TERM,
|
||||||
|
listeners: {
|
||||||
|
specialkey: function(f,e){
|
||||||
|
if (e.getKey() == e.ENTER) {
|
||||||
|
DoSearchA();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
clearTextButtonA = new Ext.Action({
|
||||||
|
text: 'X',
|
||||||
|
ctCls:'pm_search_x_button',
|
||||||
|
handler: GridByDefaultA
|
||||||
|
});
|
||||||
|
|
||||||
|
searchTextP = new Ext.form.TextField ({
|
||||||
|
id: 'searchTextP',
|
||||||
|
ctCls:'pm_search_text_field',
|
||||||
|
allowBlank: true,
|
||||||
|
width: 110,
|
||||||
|
emptyText: TRANSLATIONS.ID_ENTER_SEARCH_TERM,
|
||||||
|
listeners: {
|
||||||
|
specialkey: function(f,e){
|
||||||
|
if (e.getKey() == e.ENTER) {
|
||||||
|
DoSearchP();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
clearTextButtonP = new Ext.Action({
|
||||||
|
text: 'X',
|
||||||
|
ctCls:'pm_search_x_button',
|
||||||
|
handler: GridByDefaultP
|
||||||
|
});
|
||||||
|
|
||||||
availableGrid = new Ext.grid.GridPanel({
|
availableGrid = new Ext.grid.GridPanel({
|
||||||
layout : 'fit',
|
layout : 'fit',
|
||||||
region : 'center',
|
region : 'center',
|
||||||
@@ -185,7 +213,7 @@ Ext.onReady(function(){
|
|||||||
frame : false,
|
frame : false,
|
||||||
columnLines : false,
|
columnLines : false,
|
||||||
viewConfig : {forceFit:true},
|
viewConfig : {forceFit:true},
|
||||||
tbar: [TRANSLATIONS.ID_AVAILABLE_GROUPS,{xtype: 'tbfill'},'-',assignButton],
|
tbar: [TRANSLATIONS.ID_AVAILABLE_GROUPS,{xtype: 'tbfill'},'-',searchTextA,clearTextButtonA],
|
||||||
bbar: [{xtype: 'tbfill'}, assignAllButton],
|
bbar: [{xtype: 'tbfill'}, assignAllButton],
|
||||||
listeners: {rowdblclick: AssignGroupsAction}
|
listeners: {rowdblclick: AssignGroupsAction}
|
||||||
});
|
});
|
||||||
@@ -210,11 +238,26 @@ Ext.onReady(function(){
|
|||||||
frame : false,
|
frame : false,
|
||||||
columnLines : false,
|
columnLines : false,
|
||||||
viewConfig : {forceFit:true},
|
viewConfig : {forceFit:true},
|
||||||
tbar: [TRANSLATIONS.ID_ASSIGNED_GROUPS,{xtype: 'tbfill'},'-',removeButton],
|
tbar: [TRANSLATIONS.ID_ASSIGNED_GROUPS,{xtype: 'tbfill'},'-',searchTextP,clearTextButtonP],
|
||||||
bbar: [{xtype: 'tbfill'},removeAllButton],
|
bbar: [{xtype: 'tbfill'},removeAllButton],
|
||||||
listeners: {rowdblclick: RemoveGroupsAction}
|
listeners: {rowdblclick: RemoveGroupsAction}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
buttonsPanel = new Ext.Panel({
|
||||||
|
width : 40,
|
||||||
|
layout : {
|
||||||
|
type:'vbox',
|
||||||
|
padding:'0',
|
||||||
|
pack:'center',
|
||||||
|
align:'center'
|
||||||
|
},
|
||||||
|
defaults:{margins:'0 0 35 0'},
|
||||||
|
items:[
|
||||||
|
{xtype:'button',text: '>>', handler: AssignGroupsAction, id: 'assignButton', disabled: true},
|
||||||
|
{xtype:'button',text: '<<', handler: RemoveGroupsAction, id: 'removeButton', disabled: true}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
RefreshGroups();
|
RefreshGroups();
|
||||||
|
|
||||||
//GROUPS DRAG AND DROP PANEL
|
//GROUPS DRAG AND DROP PANEL
|
||||||
@@ -224,7 +267,7 @@ Ext.onReady(function(){
|
|||||||
layout : 'hbox',
|
layout : 'hbox',
|
||||||
defaults : { flex : 1 }, //auto stretch
|
defaults : { flex : 1 }, //auto stretch
|
||||||
layoutConfig : { align : 'stretch' },
|
layoutConfig : { align : 'stretch' },
|
||||||
items : [availableGrid,{xtype: '', width: 10},assignedGrid],
|
items : [availableGrid,buttonsPanel,assignedGrid],
|
||||||
viewConfig : {forceFit:true}
|
viewConfig : {forceFit:true}
|
||||||
|
|
||||||
});
|
});
|
||||||
@@ -435,8 +478,8 @@ ReportChanges = function(){
|
|||||||
|
|
||||||
//REFRESH GROUPS GRIDS
|
//REFRESH GROUPS GRIDS
|
||||||
RefreshGroups = function(){
|
RefreshGroups = function(){
|
||||||
availableGrid.store.load();
|
DoSearchA();
|
||||||
assignedGrid.store.load();
|
DoSearchP();
|
||||||
}
|
}
|
||||||
|
|
||||||
//SAVE AUTHENTICATION CHANGES
|
//SAVE AUTHENTICATION CHANGES
|
||||||
@@ -540,4 +583,26 @@ RemoveAllGroupsAction = function(){
|
|||||||
}
|
}
|
||||||
DeleteGroupsUser(arrAux,RefreshGroups,FailureProcess);
|
DeleteGroupsUser(arrAux,RefreshGroups,FailureProcess);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Function DoSearch Available
|
||||||
|
DoSearchA = function(){
|
||||||
|
availableGrid.store.load({params: {textFilter: searchTextA.getValue()}});
|
||||||
|
}
|
||||||
|
|
||||||
|
//Function DoSearch Assigned
|
||||||
|
DoSearchP = function(){
|
||||||
|
assignedGrid.store.load({params: {textFilter: searchTextP.getValue()}});
|
||||||
|
}
|
||||||
|
|
||||||
|
//Load Grid By Default Available Members
|
||||||
|
GridByDefaultA = function(){
|
||||||
|
searchTextA.reset();
|
||||||
|
availableGrid.store.load();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Load Grid By Default Assigned Members
|
||||||
|
GridByDefaultP = function(){
|
||||||
|
searchTextP.reset();
|
||||||
|
assignedGrid.store.load();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user