30
| <![CDATA[<script type="text/javascript">
function formOnLoadAction() {
if (window.dialogArguments && window.dialogArguments.parentWindow) {
var openerWindow = window.dialogArguments.parentWindow;
if (!openerWindow.children) openerWindow.children = new Array();
try { openerWindow.children.push(window); } catch (e) {console.error(e);}
}
if (top.opener) {
if (top.opener.children) {
if (top.opener.children.indexOf(window) == -1) top.opener.children.push(window);
} else {
if (!top.opener.parent.children) top.opener.parent.children = new Array();
if (top.opener.parent.children.indexOf(window) == -1) top.opener.parent.children.push(window);
}
} else if (mainform.isPopup && !mainform.isPrincipal && !mainform.isLoginForm) {
if (!top.$mainform().children) top.$mainform().children = new Array();
if (top.$mainform().children.indexOf(window) == -1) top.$mainform().children.push(window);
}
}
var isformcontainer = true;
var mainframe = null;
if (opener != null) {
try {
mainframe = opener.mainframe;
} catch (e) {
}
}
try {
if (opener && opener.closewindow)
opener.close();
} catch (e) {console.error(e);}
var sys = 'PRO';
var isDotNET = false;
var isTomcat7 = false;
var isPopup = false;
var formId = $mainform().URLEncode('7175');
var codigo = 'null';
var codFormComp = 'null';
var lastFormZindex = 1000;
var unloaded = false;
var e_access = true;
var filter = '';
var onClose = Boolean('');
var jsonProperties = JSON.parse('{}');
var SESSION_ID = '46D58A21C356A59BBFF4E3D80CBF2C32';
function formOnUnLoadAction() {
unloaded = !unloaded ? (mainSystemFrame.changeMode ? mainSystemFrame.changeMode : false) : unloaded;
if (!unloaded) {
unloaded = true;
try {
if (mainform.isPrincipal) closeFormHierarchy(formId);
if (closeFormAndChildren) closeFormAndChildren();
if (mainform.formOnUnLoadAction) {
mainform.disableCloseChildren = true;
mainform.formOnUnLoadAction();
}
} catch(e) {console.error(e);}
try {
if (mainform.onunload) {
let road = "";
if(mainSystemFrame.reloadSystem || mainSystemFrame.changeMode) road = 'sys=PRO¶m=closeForm&formID='+ formId;
else road = 'sys=PRO¶m=closeForm&onunload=' + mainform.isPrincipal + '&formID='+ formId;
if (filter) road += '&filter=' + filter;
road = mainform.WEBRUN_CSRFTOKEN ? (road += "&WEBRUN-CSRFTOKEN=" + mainform.WEBRUN_CSRFTOKEN + "&invalidate=true") : road;
if (!mainform.isPrincipal && !mainform.isLoginForm) {
if (mainform.isPopup && window.opener) window.opener.postForm('form.do', false, true, road);
else mainform.parent.parent.postForm('form.do', false, true, road);
} else {
postForm('form.do', false, false, road);
}
mainform.onunload();
}
} catch(e) {}
if (onClose) {
try {
if (mainform.webrunBroadcast && Object.keys(jsonProperties).length > 0)
mainform.webrunBroadcast.postMessage(jsonProperties);
} catch (e) {console.error(e);}
}
try { removeChild(mainform); } catch (e) {console.error(e);}
if (opener) {
try { opener.removeChild(window); } catch (e) {console.error(e);}
try { opener.removeChild(mainform); } catch (e) {console.error(e);}
}
if (parent) {
try { parent.removeChild(window); } catch (e) {console.error(e);}
try { parent.removeChild(mainform); } catch (e) {console.error(e);}
}
window.mainframe = null;
if (httpPool) {
httpPool.free();
httpPool = null;
}
}
}
addKeyEvent();
function changeTitle(t) {
if (parent && parent.changeTitle && parent != window) parent.changeTitle(t);
else document.title = t;
}
function remainSession() {
try { httpPool.processAsyncGet('remainSession.do?sys=PRO&datetime=' + new Date().getMilliseconds()); } catch(e) { }
setTimeout(remainSession, 15000000);
}
setTimeout(remainSession, 15000000);
function removeLoadingSpinner() {
document.getElementById("loading").style.display = 'none';
}
</script>]]>
|