From dcdeeac3050ea0c14153343dde22d0c74fdd870d Mon Sep 17 00:00:00 2001 From: lch Date: Mon, 14 Jun 2021 04:52:48 +0000 Subject: [PATCH] =?UTF-8?q?=EC=B0=BD=EB=8B=AB=EA=B8=B0=EC=8B=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EB=B0=8F=20ajax=20=EB=8F=99?= =?UTF-8?q?=EA=B8=B0=ED=98=B8=EC=B6=9C=20=EB=93=B1=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FO/Views/CDMS/Contents.cshtml | 23 ++++++++--------------- FO/js/site.js | 4 ++-- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/FO/Views/CDMS/Contents.cshtml b/FO/Views/CDMS/Contents.cshtml index 8ed0f10..b4aba38 100644 --- a/FO/Views/CDMS/Contents.cshtml +++ b/FO/Views/CDMS/Contents.cshtml @@ -123,7 +123,7 @@ } function closestudy() { if (!_passunload && @Model.istaste != 1 && !_islogout) { - golog(false, true, false, false); + golog(false, true, false, true); _passunload = true; } self.close(); @@ -359,12 +359,12 @@ resizeme(); //} } - function golog(ispaging, isunload, isinning, async) { + function golog(ispaging, isunload, isinning, sync) { ispaging = ispaging || false; isunload = isunload || false; isinning = isinning || false; - async = async || true; + sync = sync || false; _tsec++; if (!ispaging && !isunload && !isinning) { _sec++; @@ -387,7 +387,7 @@ _psecond = getint($("#video1")[0].currentTime); } } 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) { //clearInterval(_timerlog); _mtimesec = 1; @@ -540,17 +540,10 @@ window.onbeforeunload = function () { if (!_passunload && @Model.istaste != 1 && !_islogout) { clearInterval(_timerlog); - //if (_isie) { - // var retmsg = golog(false, true); - // event.returnValue = retmsg; - // return retmsg; - //} - //else { - //if (opener && (opener._cdmsisopenning || 0) == 0) { - opener.location.href = opener.location.href.replace(/#/gi, ''); - //} - golog(false, true, false, false); - //} + golog(false, true, false, true); + } + if (opener) { + opener.location.href = opener.location.href.replace(/#/gi, ''); } } var _ispre = false; diff --git a/FO/js/site.js b/FO/js/site.js index 66a9192..7a628b7 100644 --- a/FO/js/site.js +++ b/FO/js/site.js @@ -602,11 +602,11 @@ function cap(url, formid, callback, getpost, autoMsg, noBG, jsislayer2) { 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; _noerror = noerror || false; _hideBG = hideBG || false; - _async = async || true; + _async = !(sync || false); if (!isCaping) { isAutoMsg = autoMsg || false; _bging = noBG || false;