From b8e9338efae6186c8f44a978d232ce87d0f0a425 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Mon, 9 Feb 2015 17:25:36 -0400 Subject: [PATCH 01/21] PM-1501 16756: Error en mensaje al eliminar una fila de la grilla IE 10 Causa. Solo ocurre en IE, debido a que no ajusta el texto a las dimensiones dadas o establecidas (Width and Height). Nota.- Este error es replicable en 3 situaciones. 1. En efecto al eliminar una fila de la grilla. 2. Al eliminar un DYNAFORM desde el DESIGNER 3. Al eliminar un STEP desde un TASK Solucion. Con sintaxis JavaScript, se identifica en que navegador se encuentra el USUARIO, de ser IE se manda como atributos el alto y ancho ya predefinidos. Con esto es posible ver totalmente los mensajes sin ningun problema y visualizados en su totalidad. --- gulliver/js/common/core/common.js | 31 +++++-- gulliver/js/grid/core/grid.js | 90 +++++++++++++------ .../xmlform/dynaforms/dynaforms_Options.xml | 1 - .../engine/xmlform/steps/steps_Options.xml | 20 +++-- 4 files changed, 100 insertions(+), 42 deletions(-) diff --git a/gulliver/js/common/core/common.js b/gulliver/js/common/core/common.js index feb495c99..f1324b955 100755 --- a/gulliver/js/common/core/common.js +++ b/gulliver/js/common/core/common.js @@ -1915,15 +1915,28 @@ function msgBox(msg, type, callbackAccept, callbackCancel){ switch(type){ case 'alert': - new leimnud.module.app.alert().make({ - label: msg, - width: 350, - action:function(){ - if( acceptEv ){ - setTimeout(acceptEv, 1); - } - }.extend(this) - }); + if (navigator.appName == 'Microsoft Internet Explorer') { + new leimnud.module.app.alert().make({ + label: msg, + width: 450, + height: 120, + action:function(){ + if( acceptEv ){ + setTimeout(acceptEv, 1); + } + }.extend(this) + }); + }else{ + new leimnud.module.app.alert().make({ + label: msg, + width: 350, + action:function(){ + if( acceptEv ){ + setTimeout(acceptEv, 1); + } + }.extend(this) + }); + } break; case 'info': new leimnud.module.app.info().make({ diff --git a/gulliver/js/grid/core/grid.js b/gulliver/js/grid/core/grid.js index e7b2fe4fd..3967714db 100755 --- a/gulliver/js/grid/core/grid.js +++ b/gulliver/js/grid/core/grid.js @@ -742,36 +742,74 @@ var G_Grid = function(oForm, sGridName){ this.deleteGridRow = function (sRow, bWithoutConfirm) { - if (typeof(bWithoutConfirm) == "undefined") { - bWithoutConfirm = false; - } - if (this.oGrid.rows.length == 2) { - new leimnud.module.app.alert().make({ - label: G_STRINGS.ID_MSG_NODELETE_GRID_ITEM - }); - return false; - } - if (bWithoutConfirm) { - if (this.oGrid.rows.length == 3) { - this.clearRowWC(this, sRow); - } else { - this.deleteRowWC(this, sRow); + if (navigator.appName == 'Microsoft Internet Explorer') { + if (typeof(bWithoutConfirm) == "undefined") { + bWithoutConfirm = false; } - } else { - if (this.oGrid.rows.length == 3) { - new leimnud.module.app.confirm().make({ - label: _('ID_MSG_CLEAR_GRID_FIRST_ITEM'), - action: function () { - this.clearRowWC(this, sRow); - }.extend(this) + if (this.oGrid.rows.length == 2) { + new leimnud.module.app.alert().make({ + label: G_STRINGS.ID_MSG_NODELETE_GRID_ITEM, + width:400, height:120 }); + return false; + } + if (bWithoutConfirm) { + if (this.oGrid.rows.length == 3) { + this.clearRowWC(this, sRow); + } else { + this.deleteRowWC(this, sRow); + } } else { - new leimnud.module.app.confirm().make({ - label: G_STRINGS.ID_MSG_DELETE_GRID_ITEM, - action: function () { - this.deleteRowWC(this, sRow); - }.extend(this) + if (this.oGrid.rows.length == 3) { + new leimnud.module.app.confirm().make({ + label: _('ID_MSG_CLEAR_GRID_FIRST_ITEM'), + width:400, height:120, + action: function () { + this.clearRowWC(this, sRow); + }.extend(this) + }); + } else { + new leimnud.module.app.confirm().make({ + label: G_STRINGS.ID_MSG_DELETE_GRID_ITEM, + width:400, height:120, + action: function () { + this.deleteRowWC(this, sRow); + }.extend(this) + }); + } + } + }else{ + if (typeof(bWithoutConfirm) == "undefined") { + bWithoutConfirm = false; + } + if (this.oGrid.rows.length == 2) { + new leimnud.module.app.alert().make({ + label: G_STRINGS.ID_MSG_NODELETE_GRID_ITEM }); + return false; + } + if (bWithoutConfirm) { + if (this.oGrid.rows.length == 3) { + this.clearRowWC(this, sRow); + } else { + this.deleteRowWC(this, sRow); + } + } else { + if (this.oGrid.rows.length == 3) { + new leimnud.module.app.confirm().make({ + label: _('ID_MSG_CLEAR_GRID_FIRST_ITEM'), + action: function () { + this.clearRowWC(this, sRow); + }.extend(this) + }); + } else { + new leimnud.module.app.confirm().make({ + label: G_STRINGS.ID_MSG_DELETE_GRID_ITEM, + action: function () { + this.deleteRowWC(this, sRow); + }.extend(this) + }); + } } } }; diff --git a/workflow/engine/xmlform/dynaforms/dynaforms_Options.xml b/workflow/engine/xmlform/dynaforms/dynaforms_Options.xml index d128962ad..aa1bc25aa 100755 --- a/workflow/engine/xmlform/dynaforms/dynaforms_Options.xml +++ b/workflow/engine/xmlform/dynaforms/dynaforms_Options.xml @@ -130,7 +130,6 @@ } function dynaformDelete ( uid,proUid ){ - isokDependent = ajax_function('@G::encryptlink(@#dynaformsDelete)','getDynaformAssign','DYN_UID='+uid+'&PRO_UID='+proUid,'POST'); if(isokDependent){ msgBox(G_STRINGS.ID_DYNAFORM_ASSIGN,"alert"); diff --git a/workflow/engine/xmlform/steps/steps_Options.xml b/workflow/engine/xmlform/steps/steps_Options.xml index bad297ea6..969847168 100755 --- a/workflow/engine/xmlform/steps/steps_Options.xml +++ b/workflow/engine/xmlform/steps/steps_Options.xml @@ -43,12 +43,20 @@ } function stepDelete( uid, stepPos ){ - PROCESSMAP_STEP_EDIT = true; - new leimnud.module.app.confirm().make({label:'@#CONFIRM',action:function(){ - ajax_function('@G::encryptlink(@#URL_STEP_DELETE)','','STEP_UID='+uid+'&TASK=@#TASK&STEP_POSITION='+stepPos,'POST'); - @#PAGED_TABLE_ID.refresh(); - }.extend(this) - }); + PROCESSMAP_STEP_EDIT = true; + if (navigator.appName == 'Microsoft Internet Explorer') { + new leimnud.module.app.confirm().make({label:'@#CONFIRM',width:450, height:110, action:function(){ + ajax_function('@G::encryptlink(@#URL_STEP_DELETE)','','STEP_UID='+uid+'&TASK=@#TASK&STEP_POSITION='+stepPos,'POST'); + @#PAGED_TABLE_ID.refresh(); + }.extend(this) + }); + }else{ + new leimnud.module.app.confirm().make({label:'@#CONFIRM',action:function(){ + ajax_function('@G::encryptlink(@#URL_STEP_DELETE)','','STEP_UID='+uid+'&TASK=@#TASK&STEP_POSITION='+stepPos,'POST'); + @#PAGED_TABLE_ID.refresh(); + }.extend(this) + }); + } } function externalStepEdit(stpUid, urlExternalStepEdit ){ From 84d90ca20db218e0240b8621496410c1ea9720d7 Mon Sep 17 00:00:00 2001 From: "marcelo.cuiza" Date: Tue, 10 Feb 2015 12:13:32 -0400 Subject: [PATCH 02/21] PM-1506 Casos duplicados ante cierto evento con el Assign Task dentro de las opciones de steps Se agrego una validacion, si el caso ya fue derivado, evita una segunda derivacion y redirecciona al inbox previo mensaje de informacion --- .../engine/classes/model/AppDelegation.php | 24 +++++++++++++++++++ workflow/engine/methods/cases/cases_Step.php | 6 +++++ 2 files changed, 30 insertions(+) diff --git a/workflow/engine/classes/model/AppDelegation.php b/workflow/engine/classes/model/AppDelegation.php index c28d594a6..39c644eef 100755 --- a/workflow/engine/classes/model/AppDelegation.php +++ b/workflow/engine/classes/model/AppDelegation.php @@ -576,5 +576,29 @@ class AppDelegation extends BaseAppDelegation $data = $oRuleSet->getRow(); return $data['TAS_UID']; } + + /** + * Verify if the current case is already routed. + * + * @param string $AppUid the uid of the application + * @return array $Fields the fields + */ + + public function alreadyRouted ($AppUid, $sDelIndex) + { + $c = new Criteria("workflow"); + $c->clearSelectColumns(); + $c->addSelectColumn(AppDelegationPeer::APP_UID); + $c->add(AppDelegationPeer::APP_UID, $AppUid); + $c->add(AppDelegationPeer::DEL_INDEX, $sDelIndex); + $c->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNOTNULL ); + $result = AppDelegationPeer::doSelectRS($c); + $result->setFetchmode(ResultSet::FETCHMODE_ASSOC); + if($result->next()) { + return true; + } else { + return false; + } +} } diff --git a/workflow/engine/methods/cases/cases_Step.php b/workflow/engine/methods/cases/cases_Step.php index 0ff76c553..6af3a11ff 100755 --- a/workflow/engine/methods/cases/cases_Step.php +++ b/workflow/engine/methods/cases/cases_Step.php @@ -1,4 +1,10 @@ alreadyRouted($_SESSION['APPLICATION'],$_SESSION['INDEX']) ) { + G::header('location: ../cases/casesListExtJs'); +} + if (!isset($_SESSION['USER_LOGGED'])) { G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' ); die( '