提交 bc75441a 编写于 作者: NoSubject's avatar NoSubject

修复便签f5刷新不保存的问题

上级 22f7b371
......@@ -303,6 +303,13 @@ o2.xDesktop.Default = new Class({
window.onbeforeunload = function(e){
if (!this.isLogout){
if (this.apps["Note"]){
if (this.apps["Note"].notes){
this.apps["Note"].notes.each(function(note){
note.save();
});
}
}
if (!this.notRecordStatus) this.recordDesktopStatus();
this.closeWebSocket();
//if (this.socket && this.socket.webSocket) this.socket.close();
......@@ -573,6 +580,13 @@ o2.xDesktop.Default = new Class({
},
logout: function(){
this.isLogout = true;
if (this.apps["Note"]){
if (this.apps["Note"].notes){
this.apps["Note"].notes.each(function(note){
note.save();
});
}
}
if (!this.notRecordStatus){
this.recordDesktopStatus(function(){
(layout.authentication || new o2.xDesktop.Authentication()).logout();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册