注销后不再保存笔记
This commit is contained in:
@ -95,6 +95,7 @@ editorMode.prototype.normalMode = function() {
|
|||||||
$("#note").css("left", UserInfo.NoteListWidth);
|
$("#note").css("left", UserInfo.NoteListWidth);
|
||||||
|
|
||||||
this.isWritingMode = false;
|
this.isWritingMode = false;
|
||||||
|
this.resizeEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
editorMode.prototype.writtingMode = function() {
|
editorMode.prototype.writtingMode = function() {
|
||||||
@ -307,7 +308,7 @@ var Resize = {
|
|||||||
clearInterval(self.resizeMDInterval);
|
clearInterval(self.resizeMDInterval);
|
||||||
|
|
||||||
self.resizeMDInterval = setTimeout(function () {
|
self.resizeMDInterval = setTimeout(function () {
|
||||||
MD.aceEditor && MD.aceEditor.resize();
|
MD.resize && MD.resize();
|
||||||
}, 50);
|
}, 50);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -574,6 +575,9 @@ function initEditor() {
|
|||||||
|
|
||||||
// 刷新时保存 参考autosave插件
|
// 刷新时保存 参考autosave插件
|
||||||
window.onbeforeunload = function(e) {
|
window.onbeforeunload = function(e) {
|
||||||
|
if (LEA.isLogout) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Note.curChangedSaveIt(true);
|
Note.curChangedSaveIt(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ function _ajaxCallback(ret, successFunc, failureFunc) {
|
|||||||
// 是否是NOTELOGIN
|
// 是否是NOTELOGIN
|
||||||
if(ret && typeof ret == "object") {
|
if(ret && typeof ret == "object") {
|
||||||
if(ret.Msg == "NOTLOGIN") {
|
if(ret.Msg == "NOTLOGIN") {
|
||||||
alert("你还没有登录, 请先登录!");
|
alert(getMsg("Please sign in firstly!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -861,6 +861,9 @@ function setCookie(c_name, value, expiredays) {
|
|||||||
document.cookie = c_name+ "=" + escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()) + 'path=/note';
|
document.cookie = c_name+ "=" + escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toGMTString()) + 'path=/note';
|
||||||
}
|
}
|
||||||
function logout() {
|
function logout() {
|
||||||
|
Note.curChangedSaveIt(true);
|
||||||
|
LEA.isLogout = true;
|
||||||
|
|
||||||
setCookie("LEANOTE_SESSION", '', -1);
|
setCookie("LEANOTE_SESSION", '', -1);
|
||||||
location.href = UrlPrefix + "/logout?id=1";
|
location.href = UrlPrefix + "/logout?id=1";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user