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

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

    Send postMessage after renaming the document
    
    Signed-off-by: merttumer <mert.tu...@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
                }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to