beforeunload 이벤트 발생시 ajax 오류로 학습종료버튼 클릭 또는 beforeunload 이벤트 발생시
ajax : async: false 동기로 호출 하게 변경 관련함수 async 옵션추가 function golog(false, true, false, false); function capp(url, p, callback, getpost, autoMsg, noBG, jsislayer2, hideBG, noerror, async)
This commit is contained in:
parent
df8be46927
commit
3b83ffd094
|
|
@ -121,6 +121,13 @@
|
|||
$("#video1").css("max-height", window.innerHeight - 120);
|
||||
}
|
||||
}
|
||||
function closestudy() {
|
||||
if (!_passunload && _istaste != 1 && !_islogout) {
|
||||
golog(false, true, false, false);
|
||||
_passunload = true;
|
||||
}
|
||||
self.close();
|
||||
}
|
||||
$(window).load(function () {
|
||||
if (@Model.status == 0) {
|
||||
_passunload = true;
|
||||
|
|
@ -352,11 +359,12 @@
|
|||
resizeme();
|
||||
//}
|
||||
}
|
||||
function golog(ispaging, isunload, isinning) {
|
||||
function golog(ispaging, isunload, isinning, async) {
|
||||
|
||||
ispaging = ispaging || false;
|
||||
isunload = isunload || false;
|
||||
isinning = isinning || false;
|
||||
async = async || true;
|
||||
_tsec++;
|
||||
if (!ispaging && !isunload && !isinning) {
|
||||
_sec++;
|
||||
|
|
@ -379,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);
|
||||
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));
|
||||
} else if (_mtime > 0 && !_okmid && _tsec >= _mtime && _mtimesec < 1) {
|
||||
//clearInterval(_timerlog);
|
||||
_mtimesec = 1;
|
||||
|
|
@ -541,7 +549,7 @@
|
|||
//if (opener && (opener._cdmsisopenning || 0) == 0) {
|
||||
opener.location.href = opener.location.href.replace(/#/gi, '');
|
||||
//}
|
||||
golog(false, true);
|
||||
golog(false, true, false, false);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,6 +130,13 @@
|
|||
$("#video1").css("max-height", window.innerHeight - 120);
|
||||
}
|
||||
}
|
||||
function closestudy() {
|
||||
if (!_passunload && _istaste != 1 && !_islogout) {
|
||||
golog(false, true);
|
||||
_passunload = true;
|
||||
}
|
||||
self.close();
|
||||
}
|
||||
$(window).load(function () {
|
||||
if (@Model.status == 0) {
|
||||
_passunload = true;
|
||||
|
|
|
|||
|
|
@ -21,8 +21,5 @@
|
|||
self.close();
|
||||
}
|
||||
});
|
||||
function closestudy() {
|
||||
self.close();
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
|
@ -602,10 +602,11 @@ function cap(url, formid, callback, getpost, autoMsg, noBG, jsislayer2) {
|
|||
console.log("다른 작업을 처리중입니다. 잠시후 다시 작업해주세요.");
|
||||
}
|
||||
}
|
||||
function capp(url, p, callback, getpost, autoMsg, noBG, jsislayer2,hideBG, noerror) {
|
||||
function capp(url, p, callback, getpost, autoMsg, noBG, jsislayer2, hideBG, noerror, async) {
|
||||
_jsislayer2 = jsislayer2 || false;
|
||||
_noerror = noerror || false;
|
||||
_hideBG = hideBG || false;
|
||||
_async = async || true;
|
||||
if (!isCaping) {
|
||||
isAutoMsg = autoMsg || false;
|
||||
_bging = noBG || false;
|
||||
|
|
@ -624,6 +625,7 @@ function capp(url, p, callback, getpost, autoMsg, noBG, jsislayer2,hideBG, noerr
|
|||
type: getpost || "post",
|
||||
url: url,
|
||||
data: p,
|
||||
async: _async,
|
||||
success: function (r) {
|
||||
isCaping = false;
|
||||
capResult = r;
|
||||
|
|
|
|||
Loading…
Reference in New Issue