From 082e72d4e8043dbdfc198c73c22b152bb29b2b7b Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Tue, 3 Jun 2014 14:30:20 -0400 Subject: [PATCH 1/4] BUG 15012 "When creating a dynaform with the character..." SOLVED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - When creating a dynaform with the character "&", the field handlers not working. - Problema resuelto, el problema que se teníera lo siguiente cuando se utiliza el "&" en el tílo de un dynaform, cuando se enviaba los datos via GET, el "&" lo interpretaba como un separador de variables y esto ocasionaba la division de los datos que se enviaba. Se valida los datos enviados via GET codificáolos y al recibir estos datos se los decodifica --- .../engine/js/dynaformEditor/core/dynaformEditor.js | 10 +++++----- workflow/engine/methods/services/sessionPersists.php | 5 +++-- .../engine/xmlform/dynaforms/dynaforms_Properties.xml | 10 +++++----- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/workflow/engine/js/dynaformEditor/core/dynaformEditor.js b/workflow/engine/js/dynaformEditor/core/dynaformEditor.js index fa3b5287d..3555a2da9 100644 --- a/workflow/engine/js/dynaformEditor/core/dynaformEditor.js +++ b/workflow/engine/js/dynaformEditor/core/dynaformEditor.js @@ -13,7 +13,7 @@ var lastTypeSelected = ''; var sessionPersits = function() { var rpc = new leimnud.module.rpc.xmlhttp({ url: '../services/sessionPersists', - args: 'dynaformEditorParams=' + dynaformEditorParams + (lastActionPerformed != '' ? '&DYN_UID=' + __DYN_UID__ : ''), + args: "dynaformEditorParams=" + encodeURIComponent(dynaformEditorParams) + ((lastActionPerformed != "")? "&DYN_UID=" + __DYN_UID__ : ""), async: false }); rpc.make(); @@ -565,7 +565,7 @@ var dynaformEditor={ // lineNumbers: true, // lineWrapping: true }); //} - + } } else { showRowById('JS_TITLE'); @@ -774,7 +774,7 @@ var dynaformEditor={ } } this.currentJS=field.value; - + var res=this.ajax.get_javascripts(this.A,field.value); if(field.value == ''){ if( typeof(res.aOptions[0]) !== "undefined" && res.aOptions[0].value != '___pm_boot_strap___'){ @@ -831,9 +831,9 @@ var dynaformEditor={ } } var field=getField("JS_LIST","dynaforms_JSEditor"); - + var value=field.value; - + if (this.currentJS) { field.value=this.currentJS; diff --git a/workflow/engine/methods/services/sessionPersists.php b/workflow/engine/methods/services/sessionPersists.php index e43c711d1..d1d10f1c6 100755 --- a/workflow/engine/methods/services/sessionPersists.php +++ b/workflow/engine/methods/services/sessionPersists.php @@ -2,7 +2,8 @@ $response = new stdclass(); $response->status = isset($_SESSION['USER_LOGGED']); if (isset($_REQUEST['dynaformEditorParams'])) { - $_SESSION['Current_Dynafom']['Parameters'] = unserialize(stripslashes($_REQUEST['dynaformEditorParams'])); + $_SESSION['Current_Dynafom']['Parameters'] = unserialize(stripslashes(utf8_decode(rawurldecode($_REQUEST["dynaformEditorParams"])))); + if (isset($_REQUEST['DYN_UID'])) { $dynaform = new dynaform(); $dynaform->load($_REQUEST['DYN_UID']); @@ -34,7 +35,7 @@ if (isset($_REQUEST['dynaformEditorParams'])) { if (isset($_REQUEST['dynaformRestoreValues'])) { $aRetValues = unserialize(stripslashes(base64_decode($_REQUEST['dynaformRestoreValues']))); - + if (isset($aRetValues['APPLICATION'])) { $_SESSION['APPLICATION'] = $aRetValues['APPLICATION']; } diff --git a/workflow/engine/xmlform/dynaforms/dynaforms_Properties.xml b/workflow/engine/xmlform/dynaforms/dynaforms_Properties.xml index dc853e461..17750eb72 100755 --- a/workflow/engine/xmlform/dynaforms/dynaforms_Properties.xml +++ b/workflow/engine/xmlform/dynaforms/dynaforms_Properties.xml @@ -15,7 +15,7 @@ - + Dynaform @@ -53,7 +53,7 @@ - + Show print dynaform button @@ -165,7 +165,7 @@ function validateGridConversion(proUid,dynUid){ msgBox("Grid forms can not contain the following fields:
" + response,"alert"); return false; } - + }.extend(this); isTrue = oRPC.make(); @@ -193,7 +193,7 @@ function changeToolbar(type){ args : 'TOOLBAR=' + type + '&FILE=' + file + '&PRO_UID=' + proUid + '&DYN_UID=' + dynUid + '&DYN_TITLE=' + dynTitle }); oRPC.callback = function(oRPC) { - + getElementsByClassNameCrossBrowser("panel_headerBar___processmaker",document,"div")[0].innerHTML = oRPC.xmlhttp.responseText; document.getElementById("publisherContent[0]").style.display = "inline"; document.getElementById("publisherContent[0]").style.position = "absolute"; @@ -223,4 +223,4 @@ orderButtons(); }*/ ]]> - + From 17b0928f39a44e5227248511d8006b8a315f6ba9 Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Wed, 4 Jun 2014 13:54:08 -0400 Subject: [PATCH 2/4] BUG 15115 Section HOME / lists / button 'Summary', the window does not display field 'Finish Date' SOLVED --- workflow/engine/templates/app/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/engine/templates/app/main.js b/workflow/engine/templates/app/main.js index af560f7a9..b34534df9 100644 --- a/workflow/engine/templates/app/main.js +++ b/workflow/engine/templates/app/main.js @@ -476,7 +476,7 @@ var openSummaryWindow = function(appUid, delIndex, action) title: _('ID_SUMMARY'), layout: 'fit', width: 750, - height: 450, + height: 500, resizable: true, closable: true, modal: true, From cb3625b3bd4dc99976aa043be44586744f5a3561 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Date: Wed, 4 Jun 2014 15:37:54 -0400 Subject: [PATCH 3/4] =?UTF-8?q?BUG-15021=20We=20can=C2=B4t=20access=20to?= =?UTF-8?q?=20the=20Files=20that=20are=20inside=20a=20folder=20SOLVED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - It don't have the functionality - A validataion was added for directories --- workflow/engine/templates/cases/casesDocuments.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/workflow/engine/templates/cases/casesDocuments.js b/workflow/engine/templates/cases/casesDocuments.js index 72ea9ff29..604dd32d8 100755 --- a/workflow/engine/templates/cases/casesDocuments.js +++ b/workflow/engine/templates/cases/casesDocuments.js @@ -1383,6 +1383,12 @@ function handleRowClick(sm, rowIndex) {//alert(rowIndex); tb.items.get('tb_download').hide(); //tb.items.get('tb_download').disable(); } else if (selections.length == 1) { + if (selections[0].get('type') == "Directory") { + itemSelected = selections[0].get('id'); + chDir( selections[0].get('id')); + itemSelected = ""; + return true; + } //tb.items.get('tb_delete')[selections[0].get('is_deletable') ? 'enable': 'disable'](); tb.items.get('tb_delete')[permitodelete==1 ? 'enable': 'disable'](); tb.items.get('tb_rename')[selections[0].get('is_deletable') ? 'disable': 'disable'](); From 906dc99390384b8077c238f522f42bc5bca6eb83 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Thu, 5 Jun 2014 16:21:32 -0400 Subject: [PATCH 4/4] BUGs 15078, 15077, 15122, 15079, 15114 and 15107 SOLVED --- gulliver/system/class.xmlform.php | 45 ++++++++++++++++++------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/gulliver/system/class.xmlform.php b/gulliver/system/class.xmlform.php index 8be454dc4..ca6c9a9ca 100755 --- a/gulliver/system/class.xmlform.php +++ b/gulliver/system/class.xmlform.php @@ -1354,12 +1354,13 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek $value = $formVariableValue; } $name = "'" . $this->name . "'"; - $str = 'NSFieldType() . ' onblur="idSet(' . $name . ');" '; + $str = 'NSDependentFields( true ) . ' '; $str .= '/>'; $str .= 'name . ']" '; $str .= 'name="form[' . $this->name . ']" '; + $str .= $this->NSFieldType() . ' '; $str .= 'value="' . $this->htmlentities( $formVariableKeyValue, ENT_COMPAT, 'utf-8' ) . '" '; $str .= 'type="hidden" />'; @@ -1493,7 +1494,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek return $str; } } else { - $html = 'NSFieldType() .' >'; + $html = 'NSFieldType() . ' >'; $html .= $this->htmlentities($formVariableValue, ENT_COMPAT, 'utf-8'); $html .= ''; return $html; @@ -1557,7 +1558,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek $value = $formVariableValue; } $name = "'" . $this->name . "'"; - $str = 'NSGridType() . ' onblur="idSet(' . $name . ');" '; + $str = 'NSDependentFields( true ) . ' '; $str .= $this->NSRequiredValue() . ' '; $str .= $this->NSGridLabel() . ' '; @@ -1565,6 +1566,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek $str .= 'name . ']" '; $str .= 'name="form' . $rowId . '[' . $this->name . ']" '; + $str .= $this->NSGridType() . ' '; $str .= 'value="' . $this->htmlentities( $formVariableKeyValue, ENT_COMPAT, 'utf-8' ) . '" '; $str .= 'type="hidden" />'; @@ -1681,7 +1683,7 @@ class XmlForm_Field_Suggest extends XmlForm_Field_SimpleText //by neyek return $str; } } else { - $str = 'name . ']" name="form' . $rowId . '[' . $this->name . ']" ' . $this->NSGridType() . ' >'; + $str = 'NSGridType() . ' >'; $str .= $this->htmlentities( $formVariableValue, ENT_COMPAT, 'utf-8' ); $str .= ''; return $str; @@ -2681,11 +2683,13 @@ class XmlForm_Field_YesNo extends XmlForm_Field //EDIT MODE $readOnlyText = ($this->readonly == 1 || $this->readonly == '1') ? 'disabled' : ''; $html .= 'name . ']" '; $html .= 'name="form[' . $this->name . ']" '; + $html .= $this->NSFieldType() . ' '; $html .= 'type="hidden" value="' . (($value === '0') ? '0' : '1') . '" />'; } } else { @@ -2735,12 +2740,14 @@ class XmlForm_Field_YesNo extends XmlForm_Field //EDIT MODE $readOnlyText = ($this->readonly == 1 || $this->readonly == '1') ? 'disabled' : ''; $html .= 'name . '][' . $r . '][' . $this->name . ']" '; $html .= 'name="form[' . $owner->name . '][' . $r . '][' . $this->name . ']" '; + $html .= $this->NSGridType() . ' '; $html .= 'type="hidden" value="' . (($v === '0') ? '0' : '1') . '" />'; } } else { @@ -3177,13 +3185,12 @@ class XmlForm_Field_Checkbox extends XmlForm_Field } elseif ($this->mode === 'view') { $checked = (isset( $value ) && ($value == $this->value)) ? 'checked' : ''; if ($this->labelOnRight) { - $html = ''; - $html = "NSFieldType() . " type='checkbox' $checked $readOnly disabled /> + $html = " " . $this->label . ''; } else { - $html = "NSFieldType() . " type='checkbox' $checked $readOnly disabled />"; + $html = ""; } - $html .= ""; + $html .= "NSFieldType() . " value='{$value}' />"; return $html; } } @@ -3734,7 +3741,7 @@ class XmlForm_Field_Listbox extends XmlForm_Field return $html; } elseif ($this->mode === 'view') { $valuesFound = array('__NULL__'); - $html = ''; foreach ($this->option as $optionName => $option) { if (in_array( $optionName . "", $value )) { $valuesFound[] = $optionName . ""; @@ -3755,15 +3762,15 @@ class XmlForm_Field_Listbox extends XmlForm_Field } $html .= ''; foreach ($this->option as $optionName => $option) { - $html .= "name . "]\" name=\"form[" . $this->name . "][]\" value=\"" . ((in_array( $optionName . "", $value )) ? $optionName : "__NULL__") . "\">"; + $html .= "name . "][" . $optionName . "]\" name=\"form[" . $this->name . "][]\" " . $this->NSFieldType() . " value=\"" . ((in_array( $optionName . "", $value )) ? $optionName : "__NULL__") . "\">"; } foreach ($this->sqlOption as $optionName => $option) { - $html .= "name . "]\" name=\"form[" . $this->name . "][]\" value=\"" . ((in_array( $optionName . "", $value )) ? $optionName : "__NULL__") . "\">"; + $html .= "name . "][" . $optionName . "]\" name=\"form[" . $this->name . "][]\" " . $this->NSFieldType() . " value=\"" . ((in_array( $optionName . "", $value )) ? $optionName : "__NULL__") . "\">"; } if (count($valuesFound) - 1 < count($value)) { $valuesNotFound = array_diff($value, $valuesFound); foreach ($valuesNotFound as $option) { - $html .= "name . "]\" name=\"form[" . $this->name . "][]\" value=\"" . $option . "\">"; + $html .= "name . "][" . $option . "]\" name=\"form[" . $this->name . "][]\" " . $this->NSFieldType() . " value=\"" . $option . "\">"; } } return $html; @@ -4678,7 +4685,7 @@ class XmlForm_Field_Date extends XmlForm_Field_SimpleText $html = '' . '
' . ' ' . '' . '' . ' ' . '' . ''; } } else { - $html = "$value" . ''; + $html = "$value" . ''; } /** * * Commented because seems is not working well *