BUG 9560 "List of Departments correct except for items with..." SOLVED
- There problems with the names of departments and groups that have the characters "<" and ">" - Solved the problem with the characters "<" and ">" in departments and groups (in the list and modification)
This commit is contained in:
@@ -24,16 +24,16 @@
|
||||
*/
|
||||
|
||||
|
||||
function LookForChildren($parent, $level,$aDepUsers){
|
||||
function LookForChildren($parent, $level,$aDepUsers){
|
||||
G::LoadClass('configuration');
|
||||
$conf = new Configurations();
|
||||
$conf = new Configurations();
|
||||
$oDept = new Department();
|
||||
$allDepartments = $oDept->getDepartments ( $parent );
|
||||
$level++;
|
||||
$rows = Array();
|
||||
foreach($allDepartments as $department){
|
||||
unset($depto);
|
||||
$depto['DEP_TITLE'] = $department['DEP_TITLE'];
|
||||
$depto['DEP_TITLE'] = str_replace(array("<", ">"), array("<", ">"), $department['DEP_TITLE']);
|
||||
$depto['DEP_STATUS'] = $department['DEP_STATUS'];
|
||||
if ($department['DEP_MANAGER_USERNAME']!=''){
|
||||
$depto['DEP_MANAGER_NAME'] = $conf->usersNameFormat($department['DEP_MANAGER_USERNAME'], $department['DEP_MANAGER_FIRSTNAME'], $department['DEP_MANAGER_LASTNAME']);
|
||||
@@ -47,7 +47,7 @@ function LookForChildren($parent, $level,$aDepUsers){
|
||||
if ($department['HAS_CHILDREN'] > 0){
|
||||
$depto['children'] = LookForChildren($department['DEP_UID'], $level, $aDepUsers);
|
||||
$depto['iconCls'] = 'ss_sprite ss_chart_organisation';
|
||||
$depto['expanded'] = true;
|
||||
$depto['expanded'] = true;
|
||||
}else{
|
||||
$depto['leaf'] = true;
|
||||
if ($level==1){
|
||||
@@ -55,10 +55,10 @@ function LookForChildren($parent, $level,$aDepUsers){
|
||||
}else{
|
||||
$depto['iconCls'] = 'ss_sprite ss_plugin';
|
||||
}
|
||||
}
|
||||
|
||||
$rows[] = $depto;
|
||||
}
|
||||
}
|
||||
|
||||
$rows[] = $depto;
|
||||
}
|
||||
return $rows;
|
||||
}
|
||||
|
||||
@@ -79,26 +79,26 @@ switch ($_POST['action'])
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'departments/departments_Edit', '', $aFields , '');
|
||||
|
||||
$criteria = $oDept->getUsersFromDepartment( $_POST['sDptoUID'], $aFields ['DEP_MANAGER'] );
|
||||
|
||||
|
||||
$G_PUBLISH->AddContent('propeltable', 'departments/paged-table2', 'departments/departments_UsersList', $criteria, $aFields );
|
||||
//$G_PUBLISH->AddContent('propeltable', 'paged-table', 'departments/departments_UsersList', $criteria, $aFields);
|
||||
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("groupname='{$aFields["DEPO_TITLE"]}';");
|
||||
$oHeadPublisher->addScriptCode("depUid='{$aFields["DEP_UID"]}';");
|
||||
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
|
||||
case 'assignAllUsers':
|
||||
$aUsers = explode(',', $_POST['aUsers']);
|
||||
$oDept = new Department();
|
||||
$oDept = new Department();
|
||||
$depUid = $_POST['DEP_UID'];
|
||||
$cant = $oDept->cantUsersInDepartment( $depUid);
|
||||
|
||||
if ( $cant == 0 ) $manager = true;
|
||||
|
||||
for( $i=0; $i<count($aUsers); $i++) {
|
||||
for( $i=0; $i<count($aUsers); $i++) {
|
||||
$oDept->addUserToDepartment( $depUid, $aUsers[$i], $manager, false );
|
||||
$manager = false;
|
||||
}
|
||||
@@ -110,7 +110,7 @@ switch ($_POST['action'])
|
||||
$oDept = new Department();
|
||||
$oDept->removeUserFromDepartment($_POST['DEP_UID'], $_POST['USR_UID']);
|
||||
break;
|
||||
|
||||
|
||||
case 'verifyDptoname':
|
||||
$_POST['sOriginalGroupname'] = get_ajax_value('sOriginalGroupname');
|
||||
$_POST['sGroupname'] = get_ajax_value('sGroupname');
|
||||
@@ -136,20 +136,20 @@ switch ($_POST['action'])
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
case 'showUnAssignedUsers':
|
||||
$_POST['UID'] = get_ajax_value('UID');
|
||||
require_once ( 'classes/class.xmlfield_InputPM.php' );
|
||||
|
||||
|
||||
if (($RBAC_Response=$RBAC->userCanAccess("PM_USERS"))!=1) return $RBAC_Response;
|
||||
G::LoadClass ( 'departments');
|
||||
$oDept = new Department();
|
||||
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent('propeltable', 'departments/paged-table3', 'departments/departments_AddUnAssignedUsers', $oDept->getAvailableUsersCriteria(''));
|
||||
G::RenderPage('publish', 'raw');
|
||||
|
||||
|
||||
break;
|
||||
case 'departmentList':
|
||||
global $RBAC;
|
||||
@@ -160,9 +160,9 @@ switch ($_POST['action'])
|
||||
case 'checkDepartmentName':
|
||||
$parent = $_REQUEST['parent'];
|
||||
$dep_name = $_REQUEST['name'];
|
||||
|
||||
|
||||
$oCriteria = new Criteria('workflow');
|
||||
|
||||
|
||||
$oCriteria->clearSelectColumns();
|
||||
$oCriteria->addSelectColumn( ContentPeer::CON_CATEGORY );
|
||||
$oCriteria->addSelectColumn( ContentPeer::CON_VALUE );
|
||||
@@ -170,26 +170,26 @@ switch ($_POST['action'])
|
||||
$oCriteria->add(ContentPeer::CON_CATEGORY, 'DEPO_TITLE');
|
||||
$oCriteria->addJoin(ContentPeer::CON_ID, DepartmentPeer::DEP_UID, Criteria::LEFT_JOIN);
|
||||
$oCriteria->add(ContentPeer::CON_VALUE, $dep_name);
|
||||
$oCriteria->add(ContentPeer::CON_LANG, SYS_LANG );
|
||||
$oCriteria->add(ContentPeer::CON_LANG, SYS_LANG );
|
||||
$oCriteria->add(DepartmentPeer::DEP_PARENT,$parent);
|
||||
|
||||
|
||||
$oDataset = DepartmentPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
|
||||
|
||||
echo (!$aRow) ? 'true' : 'false';
|
||||
break;
|
||||
case 'checkEditDepartmentName':
|
||||
$parent = $_REQUEST['parent'];
|
||||
$dep_name = $_REQUEST['name'];
|
||||
$dep_uid = $_REQUEST['uid'];
|
||||
|
||||
|
||||
$oDepartment = new Department();
|
||||
$checkVal = $oDepartment->checkDepartmentName($dep_name, $parent, $dep_uid );
|
||||
echo ( !$checkVal ) ? 'true' : 'false';
|
||||
break;
|
||||
|
||||
|
||||
case 'saveDepartment':
|
||||
$parent = $_REQUEST['parent'];
|
||||
$dep_name = $_REQUEST['name'];
|
||||
@@ -210,25 +210,25 @@ switch ($_POST['action'])
|
||||
$oCriteria->addSelectColumn(UsersPeer::USR_REPORTS_TO);
|
||||
$oCriteria->add(UsersPeer::USR_STATUS, 'CLOSED', Criteria::NOT_EQUAL);
|
||||
$oCriteria->add(UsersPeer::DEP_UID, $sDepUid);
|
||||
|
||||
|
||||
$oDataset = DepartmentPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
|
||||
$rows = Array();
|
||||
unset($first);
|
||||
$first['USR_UID'] = '';
|
||||
$first['USR_VALUE'] = G::LoadTranslation('ID_NO_MANAGER_SELECTED');
|
||||
$rows[] = $first;
|
||||
|
||||
|
||||
$conf = new Configurations();
|
||||
|
||||
|
||||
while ($oDataset->next()){
|
||||
$aRow = $oDataset->getRow();
|
||||
$user['USR_UID'] = $aRow['USR_UID'];
|
||||
$user['USR_VALUE'] = $conf->usersNameFormat($aRow['USR_USERNAME'], $aRow['USR_FIRSTNAME'], $aRow['USR_LASTNAME']);
|
||||
$rows[] = $user;
|
||||
}
|
||||
|
||||
|
||||
echo '{users: '.G::json_encode($rows).'}';
|
||||
break;
|
||||
case 'updateDepartment':
|
||||
@@ -255,9 +255,9 @@ switch ($_POST['action'])
|
||||
if (isset($aDEPTS[$_POST['dep_uid']])){
|
||||
echo '{success: false, users: '.$aDEPTS[$_POST['dep_uid']].'}';
|
||||
}else{
|
||||
echo '{success: true}';
|
||||
echo '{success: true}';
|
||||
}
|
||||
break;
|
||||
break;
|
||||
case 'deleteDepartment':
|
||||
$DEP_UID = $_POST['DEP_UID'];
|
||||
$oDept = new Department();
|
||||
@@ -330,7 +330,7 @@ switch ($_POST['action'])
|
||||
$dep = new Department();
|
||||
$dep->Load($DEP_UID);
|
||||
$dep_manager = $dep->getDepManager();
|
||||
$manager = ($dep_manager=='')? true : false;
|
||||
$manager = ($dep_manager=='')? true : false;
|
||||
foreach ($aUsers as $USR_UID){
|
||||
$dep->addUserToDepartment($DEP_UID, $USR_UID, $manager, false);
|
||||
$manager = false;
|
||||
|
||||
@@ -37,10 +37,10 @@ switch ($_POST['action'])
|
||||
$G_PUBLISH = new Publisher();
|
||||
//$G_PUBLISH->AddContent('xmlform', 'xmlform', 'groups/groups_UsersListTitle', '', array('GRP_NAME' => $aFields['GRP_TITLE']));
|
||||
$G_PUBLISH->AddContent('propeltable', 'groups/paged-table2', 'groups/groups_UsersList', $oGroups->getUsersGroupCriteria($_POST['sGroupUID']), array('GRP_UID' => $_POST['sGroupUID'], 'GRP_NAME' => $aFields['GRP_TITLE']));
|
||||
|
||||
|
||||
$oHeadPublisher =& headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptCode("groupname=\"{$aFields["GRP_TITLE"]}\";");
|
||||
|
||||
|
||||
G::RenderPage('publish', 'raw');
|
||||
break;
|
||||
|
||||
@@ -54,7 +54,7 @@ switch ($_POST['action'])
|
||||
G::LoadClass('groups');
|
||||
$oGroup = new Groups();
|
||||
$aUsers=explode(',', $_POST['aUsers']);
|
||||
|
||||
|
||||
for($i=0; $i<count($aUsers); $i++)
|
||||
{
|
||||
$oGroup->addUserToGroup($_POST['GRP_UID'], $aUsers[$i]);
|
||||
@@ -104,34 +104,34 @@ switch ($_POST['action'])
|
||||
$env = $co->getConfiguration('ENVIRONMENT_SETTINGS', '');
|
||||
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
|
||||
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
|
||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
||||
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
|
||||
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
|
||||
|
||||
global $RBAC;
|
||||
|
||||
global $RBAC;
|
||||
if ($limit == $start) $limit = $limit +$limit ;
|
||||
$tasks = new TaskUser();
|
||||
$aTask = $tasks->getCountAllTaksByGroups();
|
||||
|
||||
|
||||
$members = new GroupUser();
|
||||
$aMembers = $members->getCountAllUsersByGroup();
|
||||
|
||||
require_once PATH_CONTROLLERS . 'adminProxy.php';
|
||||
$uxList = adminProxy::getUxTypesList();
|
||||
|
||||
$groups = new Groupwf();
|
||||
|
||||
$groups = new Groupwf();
|
||||
$data = $groups->getAllGroup($start,$limit,$filter);
|
||||
$result = $data['rows'];
|
||||
|
||||
$totalRows = 0;
|
||||
$arrData = array();
|
||||
$arrData = array();
|
||||
foreach ($result as $results) {
|
||||
$totalRows ++;
|
||||
$results['CON_VALUE'] = $results['GRP_TITLE'];
|
||||
$results['CON_VALUE'] = str_replace(array("<", ">"), array("<", ">"), $results['GRP_TITLE']);
|
||||
$results['GRP_TASKS'] = isset($aTask[$results['GRP_UID']]) ? $aTask[$results['GRP_UID']] : 0;
|
||||
$results['GRP_USERS'] = isset($aMembers[$results['GRP_UID']]) ? $aMembers[$results['GRP_UID']] : 0;
|
||||
$arrData[] = $results;
|
||||
$results['GRP_USERS'] = isset($aMembers[$results['GRP_UID']]) ? $aMembers[$results['GRP_UID']] : 0;
|
||||
$arrData[] = $results;
|
||||
}
|
||||
|
||||
|
||||
$result = new StdClass();
|
||||
$result->success = true;
|
||||
$result->groups = $arrData;
|
||||
@@ -150,7 +150,7 @@ switch ($_POST['action'])
|
||||
$aRow = $oDataset->getRow();
|
||||
$response = ($aRow) ? 'true' : 'false';
|
||||
echo $response;
|
||||
break;
|
||||
break;
|
||||
case 'saveNewGroup':
|
||||
G::LoadClass('groups');
|
||||
$newGroup['GRP_UID'] = '';
|
||||
@@ -324,7 +324,7 @@ switch ($_POST['action'])
|
||||
G::LoadClass('groups');
|
||||
$oGroup = new Groups();
|
||||
foreach ($uUIDs as $USR_UID){
|
||||
$oGroup->addUserToGroup($GRP_UID, $USR_UID);
|
||||
$oGroup->addUserToGroup($GRP_UID, $USR_UID);
|
||||
}
|
||||
break;
|
||||
case 'deleteUsersToGroupsMultiple':
|
||||
@@ -333,7 +333,7 @@ switch ($_POST['action'])
|
||||
G::LoadClass('groups');
|
||||
$oGroup = new Groups();
|
||||
foreach ($uUIDs as $USR_UID){
|
||||
$oGroup->removeUserOfGroup($GRP_UID, $USR_UID);
|
||||
$oGroup->removeUserOfGroup($GRP_UID, $USR_UID);
|
||||
}
|
||||
break;
|
||||
case 'updatePageSize':
|
||||
|
||||
@@ -40,7 +40,7 @@ waitLoading.show = function() {
|
||||
};
|
||||
waitLoading.hide = function() {
|
||||
Ext.getBody().unmask();
|
||||
};
|
||||
};
|
||||
|
||||
var treePanel;
|
||||
var rootNode;
|
||||
@@ -97,7 +97,7 @@ Ext.onReady(function() {
|
||||
deleteButton.disable();
|
||||
}else{
|
||||
if (node.attributes.leaf){
|
||||
deleteButton.enable();
|
||||
deleteButton.enable();
|
||||
}else{
|
||||
deleteButton.disable();
|
||||
}
|
||||
@@ -126,7 +126,7 @@ Ext.onReady(function() {
|
||||
|
||||
newForm = new Ext.FormPanel({
|
||||
url: 'departments_Ajax?request=saveNewDepartment',
|
||||
frame: true,
|
||||
frame: true,
|
||||
items:[
|
||||
{xtype: 'textfield', name: 'parent', hidden: true},
|
||||
{xtype: 'textfield', fieldLabel: _('ID_DEPARTMENT_NAME'), name: 'dep_name', width: 230, allowBlank: false}
|
||||
@@ -141,36 +141,36 @@ Ext.onReady(function() {
|
||||
|
||||
editForm = new Ext.FormPanel({
|
||||
url: 'departments_Ajax?request=saveEditDepartment',
|
||||
frame: true,
|
||||
frame: true,
|
||||
items:[
|
||||
{xtype: 'textfield', name: 'dep_uid', hidden: true},
|
||||
{xtype: 'textfield', name: 'dep_parent', hidden: true},
|
||||
{xtype: 'textfield', fieldLabel: _('ID_DEPARTMENT_NAME'), name: 'dep_name', width: 230, allowBlank: false},
|
||||
{
|
||||
xtype: 'combo',
|
||||
fieldLabel: _('ID_STATUS'),
|
||||
xtype: 'combo',
|
||||
fieldLabel: _('ID_STATUS'),
|
||||
hiddenName: 'status',
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
store: comboStatusStore,
|
||||
displayField: 'value',
|
||||
mode: 'local',
|
||||
store: comboStatusStore,
|
||||
displayField: 'value',
|
||||
valueField:'id',
|
||||
allowBlank: false,
|
||||
allowBlank: false,
|
||||
triggerAction: 'all',
|
||||
emptyText: _('ID_SELECT_STATUS'),
|
||||
selectOnFocus:true
|
||||
}
|
||||
,
|
||||
{
|
||||
xtype: 'combo',
|
||||
fieldLabel: 'Manager',
|
||||
xtype: 'combo',
|
||||
fieldLabel: 'Manager',
|
||||
hiddenName: 'manager',
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
store: comboDepManager,
|
||||
displayField: 'USR_VALUE',
|
||||
mode: 'local',
|
||||
store: comboDepManager,
|
||||
displayField: 'USR_VALUE',
|
||||
valueField:'USR_UID',
|
||||
allowBlank: true,
|
||||
allowBlank: true,
|
||||
triggerAction: 'all',
|
||||
emptyText: '',
|
||||
selectOnFocus:true
|
||||
@@ -289,15 +289,15 @@ CloseWindow = function(){
|
||||
Ext.getCmp('w').hide();
|
||||
};
|
||||
SaveNewDepartment = function(){
|
||||
waitLoading.show();
|
||||
waitLoading.show();
|
||||
var dep_node = Ext.getCmp('treePanel').getSelectionModel().getSelectedNode();
|
||||
if (dep_node) dep_node.unselect();
|
||||
var dep_name = newForm.getForm().findField('dep_name').getValue();
|
||||
dep_name = dep_name.trim();
|
||||
dep_name = dep_name.trim();
|
||||
if (dep_name==''){
|
||||
waitLoading.hide();
|
||||
waitLoading.hide();
|
||||
return;
|
||||
}
|
||||
}
|
||||
var dep_parent = newForm.getForm().findField('parent').getValue();
|
||||
Ext.Ajax.request({
|
||||
url: 'departments_Ajax',
|
||||
@@ -319,7 +319,7 @@ SaveNewDepartment = function(){
|
||||
newForm.getForm().findField('dep_name').reset();
|
||||
CloseWindow();
|
||||
PMExt.notify(_('ID_DEPARTMENTS'), _('ID_DEPARTMENT_SUCCESS_NEW'));
|
||||
},
|
||||
},
|
||||
failure: function(r,o){
|
||||
waitLoading.hide();
|
||||
DoNothing();
|
||||
@@ -327,7 +327,7 @@ SaveNewDepartment = function(){
|
||||
});
|
||||
}else{
|
||||
waitLoading.hide();
|
||||
PMExt.error(_('ID_DEPARTMENTS'), _('ID_DEPARTMENT_EXISTS'));
|
||||
PMExt.error(_('ID_DEPARTMENTS'), _('ID_DEPARTMENT_EXISTS'));
|
||||
}
|
||||
},
|
||||
failure: function(resp, opt){
|
||||
@@ -366,13 +366,13 @@ SaveEditDepartment = function(){
|
||||
newForm.getForm().findField('dep_name').reset();
|
||||
CloseWindow();
|
||||
PMExt.notify(_('ID_DEPARTMENTS'), _('ID_DEPARTMENT_SUCCESS_UPDATE'));
|
||||
},
|
||||
},
|
||||
failure: function(r,o){
|
||||
DoNothing();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
PMExt.error(_('ID_DEPARTMENTS'), _('ID_DEPARTMENT_EXISTS'));
|
||||
PMExt.error(_('ID_DEPARTMENTS'), _('ID_DEPARTMENT_EXISTS'));
|
||||
}
|
||||
},
|
||||
failure: function(resp, opt){
|
||||
@@ -384,9 +384,12 @@ SaveEditDepartment = function(){
|
||||
//Edit Department Action
|
||||
EditDepartmentAction = function(){
|
||||
var dep_node = Ext.getCmp('treePanel').getSelectionModel().getSelectedNode();
|
||||
var strName = stringReplace("<", "<", dep_node.attributes.DEP_TITLE);
|
||||
strName = stringReplace(">", ">", strName);
|
||||
|
||||
editForm.getForm().findField('dep_uid').setValue(dep_node.attributes.DEP_UID);
|
||||
editForm.getForm().findField('dep_parent').setValue(dep_node.attributes.DEP_PARENT);
|
||||
editForm.getForm().findField('dep_name').setValue(dep_node.attributes.DEP_TITLE);
|
||||
editForm.getForm().findField('dep_name').setValue(strName);
|
||||
editForm.getForm().findField('status').setValue(dep_node.attributes.DEP_STATUS);
|
||||
editForm.getForm().findField('manager').getStore().addListener('load',function(s,r,o){
|
||||
editForm.getForm().findField('manager').setValue(dep_node.attributes.DEP_MANAGER);
|
||||
@@ -417,9 +420,9 @@ DeleteDepartmentAction = function(){
|
||||
success: function(r,o){
|
||||
viewport.getEl().unmask();
|
||||
var response = Ext.util.JSON.decode(r.responseText);
|
||||
if (response.success){
|
||||
if (response.success){
|
||||
|
||||
Ext.Msg.confirm(_('ID_DEPARTMENTS'), _('ID_CONFIRM_DELETE_DEPARTMENT'),
|
||||
Ext.Msg.confirm(_('ID_DEPARTMENTS'), _('ID_CONFIRM_DELETE_DEPARTMENT'),
|
||||
function(btn, text){
|
||||
if (btn=='yes'){
|
||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||
@@ -427,7 +430,7 @@ DeleteDepartmentAction = function(){
|
||||
url: 'departments_Ajax',
|
||||
params: {action: 'deleteDepartment', DEP_UID: DEP_UID},
|
||||
success: function(r,o){
|
||||
viewport.getEl().unmask();
|
||||
viewport.getEl().unmask();
|
||||
treePanel.getRootNode().reload();
|
||||
newSubButton.disable();
|
||||
editButton.disable();
|
||||
@@ -436,9 +439,9 @@ DeleteDepartmentAction = function(){
|
||||
PMExt.notify(_('ID_DEPARTMENTS'), _('ID_DEPARTMENT_SUCCESS_DELETE'));
|
||||
},
|
||||
failure: function(r,o){
|
||||
viewport.getEl().unmask();
|
||||
viewport.getEl().unmask();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
//Keyboard Events
|
||||
new Ext.KeyMap(document,
|
||||
new Ext.KeyMap(document,
|
||||
[
|
||||
{
|
||||
key: Ext.EventObject.F5,
|
||||
@@ -76,7 +76,7 @@ Ext.onReady(function(){
|
||||
text: _('ID_EDIT'),
|
||||
iconCls: 'button_menu_ext ss_sprite ss_pencil',
|
||||
handler: EditGroupWindow,
|
||||
disabled: true
|
||||
disabled: true
|
||||
});
|
||||
|
||||
deleteButton = new Ext.Action({
|
||||
@@ -155,22 +155,22 @@ Ext.onReady(function(){
|
||||
items:[
|
||||
{xtype: 'textfield', fieldLabel: _('ID_GROUP_NAME'), name: 'name', width: 200, allowBlank: false},
|
||||
{
|
||||
xtype: 'combo',
|
||||
xtype: 'combo',
|
||||
id : 'status',
|
||||
name : 'status',
|
||||
fieldLabel: _('ID_STATUS'),
|
||||
fieldLabel: _('ID_STATUS'),
|
||||
hiddenName: 'status',
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
store: comboStatusStore,
|
||||
listeners : {
|
||||
beforerender: function(status){
|
||||
status.setValue('ACTIVE');
|
||||
}
|
||||
mode: 'local',
|
||||
store: comboStatusStore,
|
||||
listeners : {
|
||||
beforerender: function(status){
|
||||
status.setValue('ACTIVE');
|
||||
}
|
||||
},
|
||||
displayField: 'value',
|
||||
displayField: 'value',
|
||||
valueField:'value',
|
||||
allowBlank: false,
|
||||
allowBlank: false,
|
||||
triggerAction: 'all',
|
||||
emptyText: _('ID_SELECT_STATUS'),
|
||||
selectOnFocus:true
|
||||
@@ -189,18 +189,18 @@ Ext.onReady(function(){
|
||||
{xtype: 'textfield', name: 'grp_uid', hidden: true},
|
||||
{xtype: 'textfield', fieldLabel: _('ID_GROUP_NAME'), name: 'name', width: 200, allowBlank: false},
|
||||
{
|
||||
xtype: 'combo',
|
||||
fieldLabel: _('ID_STATUS'),
|
||||
xtype: 'combo',
|
||||
fieldLabel: _('ID_STATUS'),
|
||||
hiddenName: 'status',
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
store: comboStatusStore,
|
||||
displayField: 'value',
|
||||
mode: 'local',
|
||||
store: comboStatusStore,
|
||||
displayField: 'value',
|
||||
valueField:'value',
|
||||
allowBlank: false,
|
||||
allowBlank: false,
|
||||
triggerAction: 'all',
|
||||
emptyText: _('ID_SELECT_STATUS'),
|
||||
selectOnFocus:true
|
||||
selectOnFocus:true
|
||||
}
|
||||
],
|
||||
buttons: [
|
||||
@@ -208,7 +208,7 @@ Ext.onReady(function(){
|
||||
{text: _('ID_CANCEL'), handler: CloseWindow}
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
store = new Ext.data.GroupingStore( {
|
||||
proxy : new Ext.data.HttpProxy({
|
||||
url: 'groups_Ajax?action=groupsList'
|
||||
@@ -314,7 +314,7 @@ Ext.onReady(function(){
|
||||
})
|
||||
});
|
||||
|
||||
infoGrid.on('rowcontextmenu',
|
||||
infoGrid.on('rowcontextmenu',
|
||||
function (grid, rowIndex, evt) {
|
||||
var sm = grid.getSelectionModel();
|
||||
sm.selectRow(rowIndex, sm.isSelected(rowIndex));
|
||||
@@ -369,7 +369,7 @@ GridByDefault = function(){
|
||||
|
||||
//Do Search Function
|
||||
DoSearch = function(){
|
||||
infoGrid.store.load({params: {textFilter: searchText.getValue()}});
|
||||
infoGrid.store.load({params: {textFilter: searchText.getValue()}});
|
||||
};
|
||||
|
||||
//Close Popup Window
|
||||
@@ -431,9 +431,12 @@ SaveNewGroup = function(){
|
||||
|
||||
//Open Edit Group Form
|
||||
EditGroupWindow = function(){
|
||||
rowSelected = infoGrid.getSelectionModel().getSelected();
|
||||
var rowSelected = infoGrid.getSelectionModel().getSelected();
|
||||
var strName = stringReplace("<", "<", rowSelected.data.CON_VALUE);
|
||||
strName = stringReplace(">", ">", strName);
|
||||
|
||||
editForm.getForm().findField('grp_uid').setValue(rowSelected.data.GRP_UID);
|
||||
editForm.getForm().findField('name').setValue(rowSelected.data.CON_VALUE);
|
||||
editForm.getForm().findField('name').setValue(strName);
|
||||
editForm.getForm().findField('status').setValue(rowSelected.data.GRP_STATUS);
|
||||
w = new Ext.Window({
|
||||
autoHeight: true,
|
||||
@@ -456,7 +459,7 @@ SaveEditGroupAction = function(){
|
||||
if (rowSelected.data.CON_VALUE.toUpperCase() == group.toUpperCase()){
|
||||
SaveEditGroup();
|
||||
}else{
|
||||
CheckGroupName(group, SaveEditGroup, DuplicateGroupName);
|
||||
CheckGroupName(group, SaveEditGroup, DuplicateGroupName);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user