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:
Victor Saisa Lopez
2012-08-10 17:53:17 -04:00
parent 9b1867a410
commit b3214a618f
4 changed files with 112 additions and 106 deletions

View File

@@ -33,7 +33,7 @@ function LookForChildren($parent, $level,$aDepUsers){
$rows = Array();
foreach($allDepartments as $department){
unset($depto);
$depto['DEP_TITLE'] = $department['DEP_TITLE'];
$depto['DEP_TITLE'] = str_replace(array("<", ">"), array("&lt;", "&gt;"), $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']);

View File

@@ -126,7 +126,7 @@ switch ($_POST['action'])
$arrData = array();
foreach ($result as $results) {
$totalRows ++;
$results['CON_VALUE'] = $results['GRP_TITLE'];
$results['CON_VALUE'] = str_replace(array("<", ">"), array("&lt;", "&gt;"), $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;

View File

@@ -384,9 +384,12 @@ SaveEditDepartment = function(){
//Edit Department Action
EditDepartmentAction = function(){
var dep_node = Ext.getCmp('treePanel').getSelectionModel().getSelectedNode();
var strName = stringReplace("&lt;", "<", dep_node.attributes.DEP_TITLE);
strName = stringReplace("&gt;", ">", 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);

View File

@@ -431,9 +431,12 @@ SaveNewGroup = function(){
//Open Edit Group Form
EditGroupWindow = function(){
rowSelected = infoGrid.getSelectionModel().getSelected();
var rowSelected = infoGrid.getSelectionModel().getSelected();
var strName = stringReplace("&lt;", "<", rowSelected.data.CON_VALUE);
strName = stringReplace("&gt;", ">", 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,