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

Jan Holesovsky kendy at collabora.com
Thu Feb 4 19:41:44 UTC 2016


 loleaflet/src/map/Map.js |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 41378e9945902bb90e954a13ef60023a7eaa7b38
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Feb 4 20:36:39 2016 +0100

    loleaflet: When the 'premission' is 'edit', request a session immediately.

diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index c2ec720..4ea1448 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -72,6 +72,11 @@ L.Map = L.Evented.extend({
 		this._addLayers(this.options.layers);
 		this._socket = L.socket(this);
 
+		// when editing, we need the LOK session right away
+		if (options.permission === 'edit') {
+			this._socket.sendMessage('requestloksession');
+		}
+
 		// Inhibit the context menu - the browser thinks that the document
 		// is just a bunch of images, hence the context menu is useless (tdf#94599)
 		this.on('contextmenu', function() {});


More information about the Libreoffice-commits mailing list