창닫기시 이벤트 및 ajax 동기호출 등 수정

This commit is contained in:
lch 2021-06-14 04:52:48 +00:00
parent 340b99f3a3
commit dcdeeac305
2 changed files with 10 additions and 17 deletions

View File

@ -123,7 +123,7 @@
} }
function closestudy() { function closestudy() {
if (!_passunload && @Model.istaste != 1 && !_islogout) { if (!_passunload && @Model.istaste != 1 && !_islogout) {
golog(false, true, false, false); golog(false, true, false, true);
_passunload = true; _passunload = true;
} }
self.close(); self.close();
@ -359,12 +359,12 @@
resizeme(); resizeme();
//} //}
} }
function golog(ispaging, isunload, isinning, async) { function golog(ispaging, isunload, isinning, sync) {
ispaging = ispaging || false; ispaging = ispaging || false;
isunload = isunload || false; isunload = isunload || false;
isinning = isinning || false; isinning = isinning || false;
async = async || true; sync = sync || false;
_tsec++; _tsec++;
if (!ispaging && !isunload && !isinning) { if (!ispaging && !isunload && !isinning) {
_sec++; _sec++;
@ -387,7 +387,7 @@
_psecond = getint($("#video1")[0].currentTime); _psecond = getint($("#video1")[0].currentTime);
} }
} catch (e) { } } catch (e) { }
capp("/focommon/studylog", { logno: _logno, lectno: @Model.lip.lectno, cmino: @Model.lip.cmino, cpno: _cpno, studysec: _sec, ispc: ismobile() ? 0 : 1, nextcpno: ispaging ? _nextcpno : 0, getiframe: @(Model.CMInning.ismenu == 1 && Model.CMInning.ctype == 2 ? 1 : 0), issample: @Model.istaste, psec: _psecond }, "cbstudylog" + (ispaging ? "page" : "") + (isunload ? "unload" : "") + (isinning ? "inning" : ""), null, null, true, null, true, async); capp("/focommon/studylog", { logno: _logno, lectno: @Model.lip.lectno, cmino: @Model.lip.cmino, cpno: _cpno, studysec: _sec, ispc: ismobile() ? 0 : 1, nextcpno: ispaging ? _nextcpno : 0, getiframe: @(Model.CMInning.ismenu == 1 && Model.CMInning.ctype == 2 ? 1 : 0), issample: @Model.istaste, psec: _psecond }, "cbstudylog" + (ispaging ? "page" : "") + (isunload ? "unload" : "") + (isinning ? "inning" : ""), null, null, true, null, true, null, sync);
} else if (_mtime > 0 && !_okmid && _tsec >= _mtime && _mtimesec < 1) { } else if (_mtime > 0 && !_okmid && _tsec >= _mtime && _mtimesec < 1) {
//clearInterval(_timerlog); //clearInterval(_timerlog);
_mtimesec = 1; _mtimesec = 1;
@ -540,17 +540,10 @@
window.onbeforeunload = function () { window.onbeforeunload = function () {
if (!_passunload && @Model.istaste != 1 && !_islogout) { if (!_passunload && @Model.istaste != 1 && !_islogout) {
clearInterval(_timerlog); clearInterval(_timerlog);
//if (_isie) { golog(false, true, false, true);
// var retmsg = golog(false, true); }
// event.returnValue = retmsg; if (opener) {
// return retmsg; opener.location.href = opener.location.href.replace(/#/gi, '');
//}
//else {
//if (opener && (opener._cdmsisopenning || 0) == 0) {
opener.location.href = opener.location.href.replace(/#/gi, '');
//}
golog(false, true, false, false);
//}
} }
} }
var _ispre = false; var _ispre = false;

View File

@ -602,11 +602,11 @@ function cap(url, formid, callback, getpost, autoMsg, noBG, jsislayer2) {
console.log("다른 작업을 처리중입니다. 잠시후 다시 작업해주세요."); console.log("다른 작업을 처리중입니다. 잠시후 다시 작업해주세요.");
} }
} }
function capp(url, p, callback, getpost, autoMsg, noBG, jsislayer2, hideBG, noerror, async) { function capp(url, p, callback, getpost, autoMsg, noBG, jsislayer2, hideBG, noerror, sync) {
_jsislayer2 = jsislayer2 || false; _jsislayer2 = jsislayer2 || false;
_noerror = noerror || false; _noerror = noerror || false;
_hideBG = hideBG || false; _hideBG = hideBG || false;
_async = async || true; _async = !(sync || false);
if (!isCaping) { if (!isCaping) {
isAutoMsg = autoMsg || false; isAutoMsg = autoMsg || false;
_bging = noBG || false; _bging = noBG || false;