From bc75441afc9b6fcffa9b13e54995475d8775f823 Mon Sep 17 00:00:00 2001 From: huqi Date: Fri, 3 Dec 2021 15:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BE=BF=E7=AD=BEf5=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E4=B8=8D=E4=BF=9D=E5=AD=98=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- o2web/source/o2_core/o2/xDesktop/Default.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/o2web/source/o2_core/o2/xDesktop/Default.js b/o2web/source/o2_core/o2/xDesktop/Default.js index ccb633f279..aa91e6e074 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(); -- GitLab