HOR-3340
Fixes WE2
This commit is contained in:
@@ -23,6 +23,8 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
|
|||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="/lib/pmdynaform/libs/bootstrap-3.1.1/css/bootstrap.min.css">
|
<link rel="stylesheet" href="/lib/pmdynaform/libs/bootstrap-3.1.1/css/bootstrap.min.css">
|
||||||
<title><?php echo htmlentities($webEntryModel->getWeCustomTitle()); ?></title>
|
<title><?php echo htmlentities($webEntryModel->getWeCustomTitle()); ?></title>
|
||||||
|
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
||||||
|
<META HTTP-EQUIV="Expires" CONTENT="-1">
|
||||||
<?php
|
<?php
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
echo $oHeadPublisher->getExtJsStylesheets(SYS_SKIN);
|
echo $oHeadPublisher->getExtJsStylesheets(SYS_SKIN);
|
||||||
@@ -91,7 +93,7 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
|
|||||||
<span class="logout"><a href="javascript:void(1)" id="userInformation"></a></span>
|
<span class="logout"><a href="javascript:void(1)" id="userInformation"></a></span>
|
||||||
<span class="logout"><a href="javascript:logout(1)" id="logout"><?php echo G::LoadTranslation('ID_LOGOUT'); ?></a></span>
|
<span class="logout"><a href="javascript:logout(1)" id="logout"><?php echo G::LoadTranslation('ID_LOGOUT'); ?></a></span>
|
||||||
</div>
|
</div>
|
||||||
<iframe id="iframe" ></iframe>
|
<iframe id="iframe"></iframe>
|
||||||
<form id="messageBox" class="formDefault formWE" method="post" style="display: none;">
|
<form id="messageBox" class="formDefault formWE" method="post" style="display: none;">
|
||||||
<div class="borderForm" style="width:520px; padding-left:0; padding-right:0; border-width:1px;">
|
<div class="borderForm" style="width:520px; padding-left:0; padding-right:0; border-width:1px;">
|
||||||
<div class="boxTop"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
<div class="boxTop"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
||||||
@@ -119,6 +121,8 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
|
|||||||
<div class="boxBottom"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
<div class="boxBottom"><div class="a"> </div><div class="b"> </div><div class="c"> </div></div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<div id="mylog">
|
||||||
|
</div>
|
||||||
<script src="/lib/js/jquery-1.10.2.min.js"></script>
|
<script src="/lib/js/jquery-1.10.2.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var weData = {};
|
var weData = {};
|
||||||
@@ -162,10 +166,13 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
|
|||||||
return this.$element.errorMessage.textContent;
|
return this.$element.errorMessage.textContent;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function logout(reload) {
|
function logout(reload, callback) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '../login/login',
|
url: '../login/login',
|
||||||
success: function () {
|
success: function () {
|
||||||
|
if (typeof callback==='function') {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
if (reload) {
|
if (reload) {
|
||||||
resetLocalData();
|
resetLocalData();
|
||||||
location.reload();
|
location.reload();
|
||||||
@@ -238,7 +245,9 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
|
|||||||
iframe.style.opacity = 1;
|
iframe.style.opacity = 1;
|
||||||
onLoadIframe = function () {};
|
onLoadIframe = function () {};
|
||||||
}
|
}
|
||||||
iframe.src = url;
|
//This code is to prevent error at back history
|
||||||
|
//in Firefox
|
||||||
|
setTimeout(function(){iframe.src = url;}, 0);
|
||||||
window.fullfill = function () {
|
window.fullfill = function () {
|
||||||
resolve.apply(this, arguments);
|
resolve.apply(this, arguments);
|
||||||
};
|
};
|
||||||
@@ -352,6 +361,9 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
|
|||||||
data.TAS_UID = tasUid;
|
data.TAS_UID = tasUid;
|
||||||
localStorage.weData = JSON.stringify(data);
|
localStorage.weData = JSON.stringify(data);
|
||||||
resolve(data);
|
resolve(data);
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
reject();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -370,7 +382,7 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
|
|||||||
function (event, resolve, reject) {
|
function (event, resolve, reject) {
|
||||||
var contentDocument = getContentDocument(event.target);
|
var contentDocument = getContentDocument(event.target);
|
||||||
var stepTitle = contentDocument.getElementsByTagName("title");
|
var stepTitle = contentDocument.getElementsByTagName("title");
|
||||||
if (!stepTitle || stepTitle[0].textContent === 'Runtime Exception.') {
|
if (!stepTitle || !stepTitle.length || stepTitle[0].textContent === 'Runtime Exception.') {
|
||||||
if (contentDocument.location.search.match(/&POSITION=10000&/)) {
|
if (contentDocument.location.search.match(/&POSITION=10000&/)) {
|
||||||
//Catch error if webentry was deleted.
|
//Catch error if webentry was deleted.
|
||||||
reject();
|
reject();
|
||||||
@@ -398,14 +410,25 @@ $webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
|
|||||||
log("closeWebEntry");
|
log("closeWebEntry");
|
||||||
resetLocalData();
|
resetLocalData();
|
||||||
if (closeSession) {
|
if (closeSession) {
|
||||||
logout(false);
|
//This code is to prevent error at back history
|
||||||
}
|
//in Firefox
|
||||||
|
$("#iframe").hide();
|
||||||
|
$("#iframe").attr("src", "../login/login");
|
||||||
|
logout(false, function() {
|
||||||
resolve(callbackUrl);
|
resolve(callbackUrl);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
//This code is to prevent error at back history
|
||||||
|
//in Firefox
|
||||||
|
open("../webentry/logged", function() {
|
||||||
|
resolve(callbackUrl);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
var redirectCallback = function (callbackUrl) {
|
var redirectCallback = function (callbackUrl) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
log("redirect");
|
log("redirect: "+callbackUrl);
|
||||||
location.href = callbackUrl;
|
location.href = callbackUrl;
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -596,9 +596,7 @@ class WebEntry
|
|||||||
$arrayData = array_change_key_case($arrayData, CASE_UPPER);
|
$arrayData = array_change_key_case($arrayData, CASE_UPPER);
|
||||||
|
|
||||||
unset($arrayData["WE_UID"]);
|
unset($arrayData["WE_UID"]);
|
||||||
if (isset($arrayData['WE_LINK_GENERATION']) && $arrayData['WE_LINK_GENERATION']==='DEFAULT') {
|
|
||||||
unset($arrayData["WE_DATA"]);
|
unset($arrayData["WE_DATA"]);
|
||||||
}
|
|
||||||
|
|
||||||
//Verify data
|
//Verify data
|
||||||
$process->throwExceptionIfNotExistsProcess($processUid, $this->arrayFieldNameForException["processUid"]);
|
$process->throwExceptionIfNotExistsProcess($processUid, $this->arrayFieldNameForException["processUid"]);
|
||||||
|
|||||||
@@ -280,6 +280,7 @@ class WebEntryEvent
|
|||||||
$this->arrayFieldDefinition['WE_LINK_SKIN']['empty'] = false;
|
$this->arrayFieldDefinition['WE_LINK_SKIN']['empty'] = false;
|
||||||
$this->arrayFieldDefinition['WE_LINK_LANGUAGE']['empty'] = false;
|
$this->arrayFieldDefinition['WE_LINK_LANGUAGE']['empty'] = false;
|
||||||
$this->arrayFieldDefinition['WE_LINK_DOMAIN']['empty'] = false;
|
$this->arrayFieldDefinition['WE_LINK_DOMAIN']['empty'] = false;
|
||||||
|
}
|
||||||
$modelSkins = new \ProcessMaker\BusinessModel\Skins();
|
$modelSkins = new \ProcessMaker\BusinessModel\Skins();
|
||||||
$skins = [];
|
$skins = [];
|
||||||
foreach ($modelSkins->getSkins() as $mSkin) {
|
foreach ($modelSkins->getSkins() as $mSkin) {
|
||||||
@@ -292,7 +293,6 @@ class WebEntryEvent
|
|||||||
$languages[] = $mLang['LANG_ID'];
|
$languages[] = $mLang['LANG_ID'];
|
||||||
}
|
}
|
||||||
$this->arrayFieldDefinition['WE_LINK_LANGUAGE']['defaultValues'] = $languages;
|
$this->arrayFieldDefinition['WE_LINK_LANGUAGE']['defaultValues'] = $languages;
|
||||||
}
|
|
||||||
|
|
||||||
$process->throwExceptionIfDataNotMetFieldDefinition($arrayData, $this->arrayFieldDefinition, $this->arrayFieldNameForException, $flagInsert);
|
$process->throwExceptionIfDataNotMetFieldDefinition($arrayData, $this->arrayFieldDefinition, $this->arrayFieldNameForException, $flagInsert);
|
||||||
|
|
||||||
@@ -677,8 +677,8 @@ class WebEntryEvent
|
|||||||
if ($arrayWebEntryEventData["WEE_WE_UID"] != "") {
|
if ($arrayWebEntryEventData["WEE_WE_UID"] != "") {
|
||||||
$task = new \Tasks();
|
$task = new \Tasks();
|
||||||
|
|
||||||
//Task - Step
|
//Task - Step for WE_TYPE=SINGLE
|
||||||
if (isset($arrayData["DYN_UID"]) && $arrayData["DYN_UID"] != $arrayWebEntryEventData["DYN_UID"]) {
|
if (isset($arrayData["DYN_UID"]) && $arrayData["DYN_UID"] != $arrayWebEntryEventData["DYN_UID"] && $arrayData["WE_TYPE"]==='SINGLE') {
|
||||||
//Delete
|
//Delete
|
||||||
$step = new \Step();
|
$step = new \Step();
|
||||||
|
|
||||||
@@ -703,7 +703,7 @@ class WebEntryEvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Task - User
|
//Task - User
|
||||||
if (isset($arrayData["USR_UID"]) && $arrayData["USR_UID"] != $arrayWebEntryEventData["USR_UID"]) {
|
if (!empty($arrayData["USR_UID"]) && $arrayData["USR_UID"] != $arrayWebEntryEventData["USR_UID"]) {
|
||||||
//Unassign
|
//Unassign
|
||||||
$taskUser = new \TaskUser();
|
$taskUser = new \TaskUser();
|
||||||
|
|
||||||
@@ -1165,7 +1165,7 @@ class WebEntryEvent
|
|||||||
"/sys".SYS_SYS."/".
|
"/sys".SYS_SYS."/".
|
||||||
$weLinkLanguage."/".
|
$weLinkLanguage."/".
|
||||||
$weLinkSkin."/".$prj_uid;
|
$weLinkSkin."/".$prj_uid;
|
||||||
return $url."/".$weUid.'.php';
|
return $url."/".$weData;
|
||||||
} else {
|
} else {
|
||||||
$url = $http.$_SERVER["HTTP_HOST"]."/sys".SYS_SYS."/".SYS_LANG."/".SYS_SKIN."/".$prj_uid;
|
$url = $http.$_SERVER["HTTP_HOST"]."/sys".SYS_SYS."/".SYS_LANG."/".SYS_SKIN."/".$prj_uid;
|
||||||
return $url."/".$weData;
|
return $url."/".$weData;
|
||||||
|
|||||||
Reference in New Issue
Block a user