PM-3739: 18719: Urgent help required with ProcessMaker on IE 11
. cambio de lugar de la validacion para cerrar el tab validacion try catch control IE11 del boton Cancel en casos sin asignar
This commit is contained in:
@@ -223,6 +223,11 @@ $oHeadPublisher->addExtJsScript( 'app/main', true );
|
||||
$oHeadPublisher->addExtJsScript( 'cases/casesList', false ); //adding a javascript file .js
|
||||
$oHeadPublisher->addContent( 'cases/casesListExtJs' ); //adding a html file .html.
|
||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||
$ieVersion = null;
|
||||
if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)){
|
||||
$ieVersion = intval($arrayMatch[1]);
|
||||
}
|
||||
$oHeadPublisher->assign( 'ieVersion', $ieVersion );
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
|
||||
function getUserArray ($action, $userUid)
|
||||
|
||||
@@ -17,6 +17,11 @@ switch ($page) {
|
||||
G::LoadClass( 'configuration' );
|
||||
$c = new Configurations();
|
||||
$oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
|
||||
$ieVersion = null;
|
||||
if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)){
|
||||
$ieVersion = intval($arrayMatch[1]);
|
||||
}
|
||||
$oHeadPublisher->assign( 'ieVersion', $ieVersion );
|
||||
break;
|
||||
case "documents":
|
||||
|
||||
|
||||
@@ -96,10 +96,16 @@ $oHeadPublisher->addScriptCode( '
|
||||
leimnud.Package.Load("cases_Step",{Type:"file",Absolute:true,Path:"/jscore/cases/core/cases_Step.js"});
|
||||
leimnud.Package.Load("processmap",{Type:"file",Absolute:true,Path:"/jscore/processmap/core/processmap.js"});
|
||||
leimnud.exec(leimnud.fix.memoryLeak);
|
||||
' );
|
||||
' );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile( '/jscore/cases/core/cases_Step.js' );
|
||||
|
||||
$ieVersion = '';
|
||||
if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)){
|
||||
$ieVersion = intval($arrayMatch[1]);
|
||||
}
|
||||
$Fields['IE_VERSION'] = $ieVersion;
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_CatchSelfService.xml', '', $Fields, 'cases_CatchExecute' );
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
|
||||
@@ -203,6 +203,24 @@ try {
|
||||
unset( $_SESSION['TRIGGER_DEBUG'] );
|
||||
}
|
||||
}
|
||||
|
||||
//close tab only if IE11
|
||||
$ieVersion = null;
|
||||
if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)){
|
||||
$ieVersion = intval($arrayMatch[1]);
|
||||
}
|
||||
if($ieVersion == 11 && !isset($_SESSION['__OUTLOOK_CONNECTOR__'])) {
|
||||
$script = "<script type='text/javascript'>
|
||||
try {
|
||||
if(top.opener) {
|
||||
top.opener.location.reload();
|
||||
top.close();
|
||||
}
|
||||
} catch(e) {
|
||||
}
|
||||
</script>";
|
||||
die($script);
|
||||
}
|
||||
|
||||
G::header( "location: $loc" );
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -275,6 +275,7 @@ class SkinEngine
|
||||
//Get the IE version
|
||||
if(preg_match("/^.*\(.*MSIE (\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch) || preg_match("/^.*\(.*rv.(\d+)\..+\).*$/", $_SERVER["HTTP_USER_AGENT"], $arrayMatch)){
|
||||
$ie = intval($arrayMatch[1]);
|
||||
$ieVersion = $ie;
|
||||
}
|
||||
|
||||
$swTrident = (preg_match("/^.*Trident.*$/", $_SERVER["HTTP_USER_AGENT"]))? 1 : 0; //Trident only in IE8+
|
||||
@@ -293,6 +294,12 @@ class SkinEngine
|
||||
|
||||
$doctype = null;
|
||||
$meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=$ie\" />";
|
||||
|
||||
if (SYS_COLLECTION == 'cases') {
|
||||
if($ieVersion == 11) {
|
||||
$meta = "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ var grid;
|
||||
var textJump;
|
||||
var ids = '';
|
||||
var winReassignInCasesList;
|
||||
var casesNewTab;
|
||||
|
||||
function formatAMPM(date, initVal, calendarDate) {
|
||||
|
||||
@@ -84,13 +85,14 @@ function openCase(){
|
||||
var appUid = rowModel.data.APP_UID;
|
||||
var delIndex = rowModel.data.DEL_INDEX;
|
||||
var caseTitle = (rowModel.data.APP_TITLE) ? rowModel.data.APP_TITLE : rowModel.data.APP_UID;
|
||||
|
||||
Ext.Msg.show({
|
||||
msg: _('ID_OPEN_CASE') + ' ' + caseTitle,
|
||||
width:300,
|
||||
wait:true,
|
||||
waitConfig: {interval:200}
|
||||
});
|
||||
if(ieVersion != 11) {
|
||||
Ext.Msg.show({
|
||||
msg: _('ID_OPEN_CASE') + ' ' + caseTitle,
|
||||
width:300,
|
||||
wait:true,
|
||||
waitConfig: {interval:200}
|
||||
});
|
||||
}
|
||||
params = '';
|
||||
switch(action){
|
||||
case 'to_revise':
|
||||
@@ -128,7 +130,14 @@ function openCase(){
|
||||
// Nothing to do
|
||||
}
|
||||
params += '&action=' + action;
|
||||
redirect(requestFile + '?' + params);
|
||||
if(ieVersion == 11) {
|
||||
if(casesNewTab) {
|
||||
casesNewTab.close();
|
||||
}
|
||||
casesNewTab = window.open(requestFile + '?' + params);
|
||||
} else {
|
||||
redirect(requestFile + '?' + params);
|
||||
}
|
||||
|
||||
} else
|
||||
msgBox(_('ID_INFORMATION'), _('ID_SELECT_ONE_AT_LEAST'));
|
||||
@@ -2473,3 +2482,8 @@ function msgBox(title, msg, type){
|
||||
});
|
||||
}
|
||||
|
||||
Ext.EventManager.on(window, 'beforeunload', function () {
|
||||
if(casesNewTab) {
|
||||
casesNewTab.close();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//Ext.BLANK_IMAGE_URL = 'resources/s.gif';
|
||||
var startCaseFilter;
|
||||
var newCaseNewTab;
|
||||
|
||||
Ext.chart.Chart.CHART_URL = '/images/charts.swf';
|
||||
Ext.FlashComponent.EXPRESS_INSTALL_URL = '/images/expressinstall.swf';
|
||||
@@ -444,12 +445,14 @@ Ext.onReady(function() {
|
||||
|
||||
function openCaseA(n){
|
||||
if (n.attributes.optionType == "startProcess") {
|
||||
Ext.Msg.show({
|
||||
title : '',
|
||||
msg : TRANSLATIONS.ID_STARTING_NEW_CASE + '<br><br><b>' + n.attributes.text + '</b>',
|
||||
wait:true,
|
||||
waitConfig: {interval:500}
|
||||
});
|
||||
if(ieVersion != 11) {
|
||||
Ext.Msg.show({
|
||||
title : '',
|
||||
msg : TRANSLATIONS.ID_STARTING_NEW_CASE + '<br><br><b>' + n.attributes.text + '</b>',
|
||||
wait:true,
|
||||
waitConfig: {interval:500}
|
||||
});
|
||||
}
|
||||
Ext.Ajax.request({
|
||||
url : 'casesStartPage_Ajax.php',
|
||||
params : {
|
||||
@@ -462,7 +465,14 @@ function openCaseA(n){
|
||||
try {
|
||||
var res = Ext.util.JSON.decode(response.responseText);
|
||||
if (res.openCase) {
|
||||
if(ieVersion == 11) {
|
||||
if(newCaseNewTab) {
|
||||
newCaseNewTab.close();
|
||||
}
|
||||
newCaseNewTab = window.open(res.openCase.PAGE);
|
||||
} else {
|
||||
window.location = res.openCase.PAGE;
|
||||
}
|
||||
}else if (res.lostSession) {
|
||||
Ext.Msg.show({
|
||||
title : TRANSLATIONS.ID_ERROR_CREATING_NEW_CASE, // 'Error creating a new Case',
|
||||
@@ -574,4 +584,10 @@ Ext.ux.MaskTree = Ext.extend(Ext.tree.TreePanel, {
|
||||
}
|
||||
}); // end of extend
|
||||
|
||||
Ext.reg('masktree', Ext.ux.MaskTree);
|
||||
Ext.reg('masktree', Ext.ux.MaskTree);
|
||||
|
||||
Ext.EventManager.on(window, 'beforeunload', function () {
|
||||
if(newCaseNewTab) {
|
||||
newCaseNewTab.close();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,76 +1,72 @@
|
||||
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" target="" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit="return validateForm('{$form_objectRequiredFields}');"> <div class="borderForm" style="width:{$form_width}; padding-left:0; padding-right:0; border-width:{$form_border};">
|
||||
<div class="boxTop"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
<div class="content" style="height:{$form_height};" >
|
||||
<table width="99%">
|
||||
<form id="{$form_id}" name="{$form_name}" action="{$form_action}" class="{$form_className}" method="post" encType="multipart/form-data" style="margin:0px;" onsubmit="return validateForm('{$form_objectRequiredFields}');"> <div class="borderForm" style="width:{$form_width}; padding-left:0; padding-right:0; border-width:{$form_border};">
|
||||
<div class="boxTop"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
||||
<div class="content" style="height:{$form_height};" >
|
||||
<table width="99%">
|
||||
<tr>
|
||||
<td valign='top'>
|
||||
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="" />
|
||||
<input type="hidden" name="DynaformRequiredFields" id="DynaformRequiredFields" value="{$form_objectRequiredFields}" />
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<input type="hidden" class="notValidateThisFields" name="__notValidateThisFields__" id="__notValidateThisFields__" value="{$form_objectRequiredFields}" />
|
||||
<input type="hidden" name="DynaformRequiredFields" id="DynaformRequiredFields" value="{$form_objectRequiredFields}" />
|
||||
<input type="hidden" name="__DynaformName__" id="__DynaformName__" value="{$form_name}" />
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr style="display: none">
|
||||
<td colspan="2">{$form.IE_VERSION}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormTitle' colspan="2" align="">{$form.TITLE1}</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$PRO_TITLE}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.PRO_TITLE} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.PRO_TITLE}</td>
|
||||
</tr>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.PRO_TITLE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$STATUS}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.STATUS} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.STATUS}</td>
|
||||
</tr>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.STATUS}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$TITLE}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.TITLE} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.TITLE}</td>
|
||||
</tr>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.TITLE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$APP_NUMBER}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.APP_NUMBER} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.APP_NUMBER}</td>
|
||||
</tr>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.APP_NUMBER}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$APP_UID}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.APP_UID} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.APP_UID}</td>
|
||||
</tr>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.APP_UID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$TAS_TITLE}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.TAS_TITLE} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.TAS_TITLE}</td>
|
||||
</tr>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.TAS_TITLE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$DEL_DELEGATE_DATE}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.DEL_DELEGATE_DATE} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.DEL_DELEGATE_DATE}</td>
|
||||
</tr>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.DEL_DELEGATE_DATE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$DEL_TASK_DUE_DATE}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.DEL_TASK_DUE_DATE} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.DEL_TASK_DUE_DATE}</td>
|
||||
</tr>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.DEL_TASK_DUE_DATE}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$PREVIOUS_TASK}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.PREVIOUS_TASK} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.PREVIOUS_TASK}</td>
|
||||
</tr>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.PREVIOUS_TASK}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormLabel' width="{$form_labelWidth}">{$PREVIOUS_USER}</td>
|
||||
<!-- <td class='FormFieldContent' width="{$form_width}" >{$form.PREVIOUS_USER} </td> //-->
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.PREVIOUS_USER}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormButton' colspan="2" align="">{$form.BTN_CATCH} {$form.BTN_CANCEL}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<td class='FormFieldContent' width='{$form_fieldContentWidth}' >{$form.PREVIOUS_USER}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='FormButton' colspan="2" align="">{$form.BTN_CATCH} {$form.BTN_CANCEL}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="boxBottom"><div class="a"></div><div class="b"></div><div class="c"></div></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="boxBottom"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
{$form.JS}
|
||||
</script>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dynaForm enabletemplate="1" name="cases_Resume" type="xmlform" width="500px" labelWidth="100px">
|
||||
<IE_VERSION type="hidden" />
|
||||
<TITLE1 type="title">
|
||||
<en><![CDATA[Claim Case]]></en>
|
||||
</TITLE1>
|
||||
@@ -39,4 +40,20 @@
|
||||
<BTN_CANCEL type="button" onclick="javascript:history.back()">
|
||||
<en><![CDATA[Cancel]]></en>
|
||||
</BTN_CANCEL>
|
||||
<JS type="javascript"> <![CDATA[
|
||||
var dynaformOnload = function() {
|
||||
if(getField("IE_VERSION").value == 11) {
|
||||
getField("BTN_CANCEL").setAttribute("onclick","");
|
||||
getField("BTN_CANCEL").onclick = function(){;
|
||||
try {
|
||||
if(top.opener) {
|
||||
top.opener.location.reload();
|
||||
top.close();
|
||||
}
|
||||
} catch(e) {
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
]]></JS>
|
||||
</dynaForm>
|
||||
|
||||
Reference in New Issue
Block a user