PM-3739: 18719: Urgent help required with ProcessMaker on IE 11

This commit is contained in:
marcelo.cuiza
2015-11-24 17:30:20 -04:00
parent de8c0755c7
commit 80bd4a085c
4 changed files with 56 additions and 20 deletions

View File

@@ -178,6 +178,12 @@ if (count($arrayTabItem) > 0) {
$headPublisher->assign("FORMATS", $conf->getFormats());
$headPublisher->assign("urlProxy", $urlProxy);
$headPublisher->assign('credentials', $clientToken );
$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 );
$headPublisher->addExtJsScript("app/main", true);
$headPublisher->addExtJsScript("cases/casesListConsolidated", false); //Adding a JavaScript file .js

View File

@@ -187,7 +187,12 @@ try {
$loc = $aNextStep['PAGE'];
}
//Triggers After
if (isset( $_SESSION['TRIGGER_DEBUG']['ISSET'] )) {
$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 (isset( $_SESSION['TRIGGER_DEBUG']['ISSET'] ) && $ieVersion != 11) {
if ($_SESSION['TRIGGER_DEBUG']['ISSET'] == 1) {
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
$oTemplatePower->prepare();
@@ -205,10 +210,7 @@ try {
}
//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 {

View File

@@ -177,7 +177,12 @@ if (isset( $_GET['breakpoint'] )) {
/**
* Here we throw the debug view
*/
if (isset( $_GET['breakpoint'] )) {
$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 (isset( $_GET['breakpoint'] ) && $ieVersion != 11) {
$G_PUBLISH->AddContent( 'view', 'cases/showDebugFrameLoader' );
$G_PUBLISH->AddContent( 'view', 'cases/showDebugFrameBreaker' );
@@ -1124,7 +1129,7 @@ if (!isset($_SESSION["PM_RUN_OUTSIDE_MAIN_APP"])) {
G::RenderPage( 'publish', 'blank' );
if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
if ($_SESSION['TRIGGER_DEBUG']['ISSET'] && $ieVersion != 11) {
G::evalJScript( '
if (typeof showdebug != \'undefined\') {
showdebug();

View File

@@ -229,6 +229,7 @@ var htmlMessage;
//var rowLabels = [];
var smodel;
var newCaseNewTab;
function openCase(){
var rowModel = consolidatedGrid.getSelectionModel().getSelected();
@@ -236,15 +237,16 @@ 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 'consolidated':
@@ -255,15 +257,24 @@ function openCase(){
break;
}
params += '&action=' + 'todo';
redirect(requestFile + '?' + params);
if(ieVersion == 11) {
if(newCaseNewTab) {
newCaseNewTab.close();
}
newCaseNewTab = window.open(requestFile + '?' + params);
} else {
redirect(requestFile + '?' + params);
}
} else {
msgBox(_("ID_INFORMATION"), _("ID_SELECT_ONE_AT_LEAST"));
}
}
function jumpToCase(appNumber){
Ext.MessageBox.show({ msg: _('ID_PROCESSING'), wait:true,waitConfig: {interval:200} });
if(ieVersion != 11) {
Ext.MessageBox.show({ msg: _('ID_PROCESSING'), wait:true,waitConfig: {interval:200} });
}
Ext.Ajax.request({
url: 'cases_Ajax',
success: function(response) {
@@ -272,7 +283,14 @@ function jumpToCase(appNumber){
params = 'APP_NUMBER=' + appNumber;
params += '&action=jump';
requestFile = '../cases/open';
redirect(requestFile + '?' + params);
if(ieVersion == 11) {
if(newCaseNewTab) {
newCaseNewTab.close();
}
newCaseNewTab = window.open(requestFile + '?' + params);
} else {
redirect(requestFile + '?' + params);
}
} else {
Ext.MessageBox.hide();
var message = new Array();
@@ -1342,3 +1360,8 @@ function linkRenderer(value)
return "<a href=\"" + value + "\" onclick=\"window.open('" + value + "', '_blank'); return false;\">" + value + "</a>";
}
Ext.EventManager.on(window, 'beforeunload', function () {
if(newCaseNewTab) {
newCaseNewTab.close();
}
});