HOR-435 It's necesary to close the session, if we close processmaker and open again HOME and DESIGNER are blocked
fix in frames implementation of the template html and css fix in file css remove file add link fix in status code fix in remove confirm fix in edege
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
PM.Sessions.register();
|
||||
|
||||
localStorage.setItem('ID_BLOCKER_MSG', PM.Sessions.getCookie('PM-Warning'));
|
||||
PM.Sessions.setLabel('ID_BLOCKER_MSG', PM.Sessions.getCookie('PM-Warning'));
|
||||
@@ -2,40 +2,41 @@ PM.Sessions = (function () {
|
||||
var Sessions = function () {
|
||||
if (window.location.pathname.indexOf("login") === -1 &&
|
||||
window.location.pathname.indexOf("sysLogin") === -1 &&
|
||||
this.getCookie('PM-TabPrimary') != 101010010) {
|
||||
this.getCookie('PM-TabPrimary') !== '101010010') {
|
||||
this.isClose = (this.getLabel('mainWindowClose') === "true");
|
||||
if (this.isClose && parent.parent.parent.window.name === "") {
|
||||
this.register();
|
||||
}
|
||||
this.checkTab();
|
||||
}
|
||||
};
|
||||
|
||||
Sessions.prototype.register = function () {
|
||||
this.setLabel('mainWindowClose', false);
|
||||
window.name = this.getCookie('PM-TabPrimary');
|
||||
};
|
||||
|
||||
Sessions.prototype.checkTab = function () {
|
||||
var ieVersion,
|
||||
msg;
|
||||
if (parent.parent.parent.window.name !== this.getCookie('PM-TabPrimary') && parent.parent.parent.window.name.indexOf(this.getCookie('PM-TabPrimary')) === -1 ) {
|
||||
msg,
|
||||
win;
|
||||
if (window.name === this.getCookie('PM-TabPrimary')) {
|
||||
this.setLabel('mainWindowClose', false);
|
||||
}
|
||||
if (parent.parent.parent.window.name !== this.getCookie('PM-TabPrimary') &&
|
||||
parent.parent.parent.window.name.indexOf(this.getCookie('PM-TabPrimary')) === -1 ) {
|
||||
ieVersion = this.detectBrowser();
|
||||
msg = this.getLabel('ID_BLOCKER_MSG');
|
||||
|
||||
win = window.open('', '_self', '');
|
||||
if (ieVersion && ieVersion <= 11) {
|
||||
window.open('', '_self', '');
|
||||
window.document.execCommand('Stop');
|
||||
if (confirm(msg)) {
|
||||
window.close();
|
||||
}
|
||||
} else if (ieVersion && ieVersion <= 12) {
|
||||
window.open('', '_self', '');
|
||||
window.document.execCommand('Stop');
|
||||
if (confirm(msg)) {
|
||||
window.close();
|
||||
}
|
||||
win.document.execCommand('Stop');
|
||||
win.open("/errors/block.php","_self");
|
||||
} else if (ieVersion && ieVersion <= 13) {
|
||||
win.document.execCommand('Stop');
|
||||
win.open("/errors/block.php","_self");
|
||||
} else {
|
||||
window.open('', '_self', '');
|
||||
window.stop();
|
||||
if (confirm(msg)) {
|
||||
window.close();
|
||||
}
|
||||
win.stop();
|
||||
win.open("/errors/block.php","_self");
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -105,14 +106,28 @@ PM.Sessions = (function () {
|
||||
this.createCookie(name,"",-1);
|
||||
};
|
||||
|
||||
Sessions.prototype.setLabel = function(nameLabel) {
|
||||
localStorage.setItem(nameLabel, _(nameLabel));
|
||||
Sessions.prototype.setLabel = function(nameLabel, labelValue) {
|
||||
localStorage.setItem(nameLabel, labelValue);
|
||||
};
|
||||
|
||||
Sessions.prototype.getLabel = function(nameLabel) {
|
||||
return localStorage.getItem(nameLabel);
|
||||
};
|
||||
|
||||
Sessions.prototype.addEventHandler = function (elem, eventType, handler) {
|
||||
if (elem.addEventListener)
|
||||
elem.addEventListener(eventType, handler, false);
|
||||
else if (elem.attachEvent)
|
||||
elem.attachEvent('on' + eventType, handler);
|
||||
};
|
||||
|
||||
Sessions.prototype.isClose = false;
|
||||
|
||||
return new Sessions();
|
||||
})();
|
||||
|
||||
PM.Sessions.addEventHandler(window, "unload",function () {
|
||||
if (window.name === PM.Sessions.getCookie('PM-TabPrimary')){
|
||||
PM.Sessions.setLabel('mainWindowClose', true);
|
||||
}
|
||||
});
|
||||
@@ -29,5 +29,8 @@ $G_ID_MENU_SELECTED = 'DASHBOARD';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'view', 'dashboard/load' );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
|
||||
@@ -413,7 +413,7 @@ try {
|
||||
}
|
||||
|
||||
$configS = System::getSystemConfiguration('', '', SYS_SYS);
|
||||
$activeSession = array_key_exists('session_block', $configS) ? !(int)$configS['session_block']:true;
|
||||
$activeSession = isset($configS['session_block']) ? !(int)$configS['session_block']:true;
|
||||
if ($activeSession){
|
||||
setcookie("PM-TabPrimary", 101010010, time() + (24 * 60 * 60), '/');
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@ $flagForgotPassword = isset($oConf->aConfig['login_enableForgotPassword'])
|
||||
? $oConf->aConfig['login_enableForgotPassword']
|
||||
: 'off';
|
||||
|
||||
setcookie('PM-Warning', trim(G::LoadTranslation('ID_BLOCKER_MSG'),'*'), time() + (24 * 60 * 60), SYS_CURRENT_URI);
|
||||
setcookie('PM-Warning', trim(G::LoadTranslation('ID_BLOCKER_MSG'), '*'), time() + (24 * 60 * 60), SYS_URI);
|
||||
setcookie("PM-TabPrimary", uniqid(), time() + (24 * 60 * 60), '/');
|
||||
|
||||
$oHeadPublisher->addScriptCode("var flagForgotPassword = '$flagForgotPassword';");
|
||||
|
||||
@@ -42,5 +42,8 @@ else {
|
||||
}
|
||||
|
||||
$G_PUBLISH->AddContent( 'view', 'setup/main_Load' );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@ $G_ID_MENU_SELECTED = 'DASHBOARD+';
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$G_PUBLISH->AddContent( 'view', 'strategicDashboard/load' );
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
G::RenderPage( 'publish' );
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
$G_MAIN_MENU = 'processmaker';
|
||||
$G_ID_MENU_SELECTED = 'MY_ACCOUNT';
|
||||
$G_PUBLISH = new Publisher();
|
||||
$oHeadPublisher = & headPublisher::getSingleton();
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/PM.js');
|
||||
$oHeadPublisher->addScriptFile('/jscore/src/Sessions.js');
|
||||
|
||||
if (isset( $_GET['type'] )) {
|
||||
$G_PUBLISH->AddContent( 'view', 'users/usersReload' );
|
||||
|
||||
105
workflow/engine/skinEngine/neoclassic/block.php
Normal file
105
workflow/engine/skinEngine/neoclassic/block.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
if (function_exists("http_response_code")) {
|
||||
http_response_code(200);
|
||||
}
|
||||
|
||||
$http = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ? "https" : "http";
|
||||
$host = $_SERVER["SERVER_NAME"] . (($_SERVER["SERVER_PORT"] != "80") ? ":" . $_SERVER["SERVER_PORT"] : "");
|
||||
|
||||
$urlLogin = $http . "://" . $host . "/sys/en/neoclassic/login/login";
|
||||
$urlHome = $urlLogin;
|
||||
|
||||
if (isset($_GET["url"]) && $_GET["url"] != "") {
|
||||
|
||||
$url = urldecode($_GET["url"]);
|
||||
$url = explode("/", $url);
|
||||
|
||||
$sysSys = "";
|
||||
$sysLang = "";
|
||||
$sysSkin = "";
|
||||
|
||||
if (isset($url[1]) && preg_match("/^sys(.+)$/", $url[1], $match)) {
|
||||
$sysSys = $match[1];
|
||||
|
||||
// Check if sys path exists
|
||||
$checkDir = PATH_DATA . "sites/" . $sysSys;
|
||||
if (!is_dir($checkDir)) {
|
||||
$sysSys = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($url[2])) {
|
||||
$sysLang = $url[2];
|
||||
}
|
||||
|
||||
if (isset($url[3])) {
|
||||
$sysSkin = $url[3];
|
||||
|
||||
// Check if sys path exists
|
||||
$checkDir = PATH_SKIN_ENGINE . $sysSkin;
|
||||
if (!is_dir($checkDir)) {
|
||||
// Try this again
|
||||
$checkDir = PATH_CUSTOM_SKINS . $sysSkin;
|
||||
if (!is_dir($checkDir)) {
|
||||
$sysSkin = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($sysSys != "" && $sysLang != "" && $sysSkin != "") {
|
||||
$urlLogin = $http . "://" . $host . "/sys" . $sysSys . "/" . $sysLang . "/" . $sysSkin . "/login/login";
|
||||
$urlHome = $http . "://" . $host . "/sys" . $sysSys . "/" . $sysLang . "/" . $sysSkin . "/cases/main";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon"/>
|
||||
<link href="../lib/pmdynaform/libs/bootstrap-3.1.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="css2/block.css" type="text/css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body class="nav-md special-page" style="margin: 0px; overflow: auto;">
|
||||
<div class="container body ">
|
||||
|
||||
<div class="main_container">
|
||||
|
||||
<!-- page content -->
|
||||
<div class="col-md-12">
|
||||
<div class="col-middle">
|
||||
<div class="text-center">
|
||||
<p><img src="images/fa-hand-pointer-o.png"></p>
|
||||
</div>
|
||||
<div class="text-center text-error">
|
||||
<h1>Hi there, please check your tabs!</h1>
|
||||
<p><b>A browser instance of ProcessMaker is actually open.</b> You can start only one at the time.
|
||||
For more information:
|
||||
</p>
|
||||
<div class="mid_center">
|
||||
<a type="button" class="btn btn-success btn-lg" href="http://wiki.processmaker.com">Click here
|
||||
to see our Wiki</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /page content -->
|
||||
|
||||
<!-- footer content -->
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<p><img src="images/processmaker.logow.png"></p>
|
||||
<p class="muted credit">Supplied free of charge with no support, certification, warranty, maintenance nor indemnity by ProcessMaker and its Certified Partners<br>
|
||||
Copyright © 2003-2015 ProcessMaker, Inc. All rights reserved. </p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
92
workflow/engine/skinEngine/neoclassic/css2/block.css
Normal file
92
workflow/engine/skinEngine/neoclassic/css2/block.css
Normal file
@@ -0,0 +1,92 @@
|
||||
*, *:before, *:after {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Helvetica Neue", Roboto, Arial, "Droid Sans", sans-serif;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
line-height: 1.471;
|
||||
}
|
||||
|
||||
.special-page {
|
||||
color: #fff;
|
||||
background: #3397e2;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.col-md-55, .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
|
||||
position: relative;
|
||||
min-height: 1px;
|
||||
float: left;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.col-middle {
|
||||
margin-top: 5%;
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
img {
|
||||
vertical-align: middle;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.text-error {
|
||||
background: rgba(255,255,255,0.9);
|
||||
color: #000;
|
||||
padding: 25px 0;
|
||||
margin: 120px 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
line-height: 1.1;
|
||||
color: inherit;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
b, strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
.mid_center {
|
||||
width: 370px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
padding: 10px 20px;
|
||||
}
|
||||
.btn-success {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
border-radius: 2px;
|
||||
font-size: 1.4rem;
|
||||
cursor: pointer;
|
||||
background: #1fbc99;
|
||||
border: 1px solid #1ba385;
|
||||
}
|
||||
|
||||
.buttons, button, .btn {
|
||||
margin-right: 5px;
|
||||
}
|
||||
#push, #footer {
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Reference in New Issue
Block a user