[Libreoffice-commits] online.git: Branch 'distro/collabora/milestone-7' - loleaflet/src

Jan Holesovsky kendy at collabora.com
Mon Jan 18 01:37:06 PST 2016


 loleaflet/src/map/handler/Map.FileInserter.js |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a88d5484ecd29abfbb370de8ebc81f202352fefd
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Jan 18 10:35:46 2016 +0100

    loleaflet: Fix insertfile after the L.Socket -> this._map.socket change.

diff --git a/loleaflet/src/map/handler/Map.FileInserter.js b/loleaflet/src/map/handler/Map.FileInserter.js
index 0dd6aee..4484e45 100644
--- a/loleaflet/src/map/handler/Map.FileInserter.js
+++ b/loleaflet/src/map/handler/Map.FileInserter.js
@@ -48,9 +48,10 @@ L.Map.FileInserter = L.Handler.extend({
 	_sendFile: function (name, file) {
 		var url = this._url;
 		var xmlHttp = new XMLHttpRequest();
+		var socket = this._map._socket;
 		xmlHttp.onreadystatechange = function () {
 			if (xmlHttp.readyState === 4 && xmlHttp.status === 200) {
-				this._map._socket.sendMessage('insertfile name=' + name + ' type=graphic');
+				socket.sendMessage('insertfile name=' + name + ' type=graphic');
 			}
 		};
 		xmlHttp.open('POST', url, true);


More information about the Libreoffice-commits mailing list