diff --git a/o2web/source/o2_core/o2/xDesktop/Default.js b/o2web/source/o2_core/o2/xDesktop/Default.js index ccb633f279ac6e4d9eec80169f9193f6476111dd..aa91e6e0747136b11a51b463e35790af90ab4abe 100644 --- a/o2web/source/o2_core/o2/xDesktop/Default.js +++ b/o2web/source/o2_core/o2/xDesktop/Default.js @@ -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();