From e1598437db028ad49ede64ca02fd119c12b48934 Mon Sep 17 00:00:00 2001 From: jennylee Date: Tue, 13 Jan 2015 17:29:12 -0400 Subject: [PATCH 1/2] PM-1180 Menu contextual en Designer Tab no se muestra bien en IE El problema era el Document Mode, que para q el Diseniador de procesos funcione tenia q ser cambiado obligatoriamente y de forma manual por el usuario a Standards, cosa que hacia que varias cosas en PM se reenderen mal, entre estas: La letra crecia y ya no se visualizaban los labels completos, aparecian dobles scrolls en algunas ventanas y tambien desaparecia el footer de las tablas de los listados tanto en HOME, Designer y Admin. Por lo tanto se opto por abrir en otro tab el diseador cuando el proceso sea BPMN y el navegador sea IE, esto para que el meta que se seteo en Michelangelo se respete y no sea pisado por el meta de PM, ya que ambos son distintos. PM-> 'IE=8' y Michelangelo-> 'IE=edge' --- workflow/engine/templates/processes/main.js | 45 ++++++++++++++++++--- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/workflow/engine/templates/processes/main.js b/workflow/engine/templates/processes/main.js index 3200297a2..88f97c7f5 100755 --- a/workflow/engine/templates/processes/main.js +++ b/workflow/engine/templates/processes/main.js @@ -572,7 +572,14 @@ function saveProcess() if (projectType == 'classicProject') { location.href = 'processes_Map?PRO_UID='+resp.result.PRO_UID; } else { - location.href = '../designer?prj_uid='+resp.result.PRO_UID; + if ( navigator.userAgent.indexOf('MSIE') !=-1 ) { + window.open( + "../designer?prj_uid="+resp.result.PRO_UID, + '_blank' + ); + } else { + location.href = '../designer?prj_uid='+resp.result.PRO_UID; + } } }, failure: function(obj, resp) { @@ -622,7 +629,14 @@ editProcess = function(typeParam) url = 'processes_Map?PRO_UID=' + pro_uid; } - location.href = url; + if ( (navigator.userAgent.indexOf('MSIE') !=-1) && (type == "bpmn") ) { + window.open( + url, + '_blank' + ); + } else { + location.href = url; + } } editNewProcess = function(){ @@ -927,7 +941,14 @@ importProcessExistGroup = function() var sNewProUid = resp_.sNewProUid; if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") { - window.location.href = "../designer?prj_uid=" + sNewProUid; + if ( navigator.userAgent.indexOf('MSIE') !=-1 ) { + window.open( + "../designer?prj_uid=" + sNewProUid, + '_blank' + ); + } else { + window.location.href = "../designer?prj_uid=" + sNewProUid; + } } else { window.location.href = "processes_Map?PRO_UID=" + sNewProUid; } @@ -1062,7 +1083,14 @@ importProcessExistProcess = function() if (resp_.ExistGroupsInDatabase == 0) { if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") { - window.location.href = "../designer?prj_uid=" + sNewProUid; + if ( navigator.userAgent.indexOf('MSIE') !=-1 ) { + window.open( + "../designer?prj_uid=" + sNewProUid, + '_blank' + ); + } else { + window.location.href = "../designer?prj_uid=" + sNewProUid; + } } else { window.location.href = "processes_Map?PRO_UID=" + sNewProUid; } @@ -1189,7 +1217,14 @@ importProcess = function() var sNewProUid = resp_.sNewProUid; if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") { - window.location.href = "../designer?prj_uid=" + sNewProUid; + if ( navigator.userAgent.indexOf('MSIE') !=-1 ) { + window.open( + "../designer?prj_uid=" + sNewProUid, + '_blank' + ); + } else { + window.location.href = "../designer?prj_uid=" + sNewProUid; + } } else { window.location.href = "processes_Map?PRO_UID=" + sNewProUid; } From 7722b805ebceafd8a892996c1b8c863ccc695ae1 Mon Sep 17 00:00:00 2001 From: jennylee Date: Wed, 14 Jan 2015 14:41:17 -0400 Subject: [PATCH 2/2] PM-1180 Menu contextual en Designer Tab no se muestra bien en IE Agregando algunas validaciones para controlar si un proceso ya esta abierto o no. --- workflow/engine/templates/processes/main.js | 66 ++++++++++++++------- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/workflow/engine/templates/processes/main.js b/workflow/engine/templates/processes/main.js index 88f97c7f5..1ec40dd19 100755 --- a/workflow/engine/templates/processes/main.js +++ b/workflow/engine/templates/processes/main.js @@ -5,6 +5,8 @@ var processesGrid; var store; var comboCategory; +var winDesigner; + /** * Global variables and variable initialization for import process. @@ -573,10 +575,14 @@ function saveProcess() location.href = 'processes_Map?PRO_UID='+resp.result.PRO_UID; } else { if ( navigator.userAgent.indexOf('MSIE') !=-1 ) { - window.open( - "../designer?prj_uid="+resp.result.PRO_UID, - '_blank' - ); + if ( typeof(winDesigner) == "undefined" || winDesigner.closed ){ + winDesigner = window.open( + "../designer?prj_uid="+resp.result.PRO_UID, + '_blank' + ); + } else { + PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED')); + } } else { location.href = '../designer?prj_uid='+resp.result.PRO_UID; } @@ -630,10 +636,14 @@ editProcess = function(typeParam) } if ( (navigator.userAgent.indexOf('MSIE') !=-1) && (type == "bpmn") ) { - window.open( - url, - '_blank' - ); + if (typeof(winDesigner) == "undefined" || winDesigner.closed){ + winDesigner = window.open( + url, + '_blank' + ); + } else { + PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED')); + } } else { location.href = url; } @@ -942,10 +952,14 @@ importProcessExistGroup = function() if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") { if ( navigator.userAgent.indexOf('MSIE') !=-1 ) { - window.open( - "../designer?prj_uid=" + sNewProUid, - '_blank' - ); + if (typeof(winDesigner) == "undefined" || winDesigner.closed){ + winDesigner = window.open( + "../designer?prj_uid=" + sNewProUid, + '_blank' + ); + } else { + PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED')); + } } else { window.location.href = "../designer?prj_uid=" + sNewProUid; } @@ -1084,10 +1098,14 @@ importProcessExistProcess = function() if (resp_.ExistGroupsInDatabase == 0) { if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") { if ( navigator.userAgent.indexOf('MSIE') !=-1 ) { - window.open( - "../designer?prj_uid=" + sNewProUid, - '_blank' - ); + if (typeof(winDesigner) == "undefined" || winDesigner.closed){ + winDesigner = window.open( + "../designer?prj_uid=" + sNewProUid, + '_blank' + ); + } else { + PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED')); + } } else { window.location.href = "../designer?prj_uid=" + sNewProUid; } @@ -1218,13 +1236,17 @@ importProcess = function() if (typeof(resp_.project_type) != "undefined" && resp_.project_type == "bpmn") { if ( navigator.userAgent.indexOf('MSIE') !=-1 ) { - window.open( - "../designer?prj_uid=" + sNewProUid, - '_blank' - ); - } else { + if (typeof(winDesigner) == "undefined" || winDesigner.closed){ + winDesigner = window.open( + "../designer?prj_uid=" + sNewProUid, + '_blank' + ); + } else { + PMExt.error( _('ID_FAILED'), _('PROCESS_ALREADY_OPENED')); + } + } else { window.location.href = "../designer?prj_uid=" + sNewProUid; - } + } } else { window.location.href = "processes_Map?PRO_UID=" + sNewProUid; }