[Libreoffice-commits] online.git: loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon May 27 13:42:48 UTC 2019


 loleaflet/src/core/Socket.js |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit e386427639106e6dbe34b70b0ac61aa037bf60bc
Author:     merttumer <mert.tumer at collabora.com>
AuthorDate: Mon May 27 15:05:46 2019 +0300
Commit:     merttumer <mert.tumer at collabora.com>
CommitDate: Mon May 27 16:42:01 2019 +0300

    Send postMessage after renaming the document
    
    Signed-off-by: merttumer <mert.tumer at collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index fa7a78d48..a5a0e27e9 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -663,6 +663,18 @@ L.Socket = L.Class.extend({
 				this._map.options.wopiSrc = encodeURIComponent(docUrl);
 				this._map.loadDocument();
 				this._map.sendInitUNOCommands();
+
+				if (textMsg.startsWith('renamefile:')) {
+					this._map.fire('postMessage', {
+						msgId: 'File_Rename',
+						args: {
+							Values: {
+								NewName: command.filename
+							}
+						}
+					});
+				}
+
 			}
 			// var name = command.name; - ignored, we get the new name via the wopi's BaseFileName
 		}


More information about the Libreoffice-commits mailing list