diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-11-29 23:35:27 -0500 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2017-11-30 07:00:20 +0100 |
commit | 49b2c7fcf53031769f13f65499bd4deee5b354aa (patch) | |
tree | 5d531b6a7345ef1b1d322a0b23dfaf7a9cfae756 | |
parent | loleaflet: fix background color of the top level menu items (diff) | |
download | online-49b2c7fcf53031769f13f65499bd4deee5b354aa.tar.gz online-49b2c7fcf53031769f13f65499bd4deee5b354aa.zip |
Revert "ensure initialize map components before the document is loaded"
This patch broke password-protected documents.
This is because password-protected documents are loaded twice.
The first time the loading fails because of password-protection
and the document is loaded again when the user provides a password
from the UI.
This reverts commit bfdbc68afef8fd21b2293113ddd2b6e766a9a0de.
Change-Id: I1d5567d3a858df76a610e026267f58c77d24fd34
Reviewed-on: https://gerrit.libreoffice.org/45546
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
-rw-r--r-- | loleaflet/main.js | 1 | ||||
-rw-r--r-- | loleaflet/src/core/Socket.js | 4 | ||||
-rw-r--r-- | loleaflet/src/map/Map.js | 4 |
3 files changed, 0 insertions, 9 deletions
diff --git a/loleaflet/main.js b/loleaflet/main.js index 041f338d2e..48200cd954 100644 --- a/loleaflet/main.js +++ b/loleaflet/main.js @@ -128,7 +128,6 @@ map.addControl(L.control.columnHeader()); map.addControl(L.control.rowHeader()); map.addControl(L.control.contextMenu()); map.addControl(L.control.menubar()); -map.loadDocument(); window.addEventListener('beforeunload', function () { if (global.map && global.map._socket) { diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js index f8f0eba1e0..4da91c602a 100644 --- a/loleaflet/src/core/Socket.js +++ b/loleaflet/src/core/Socket.js @@ -19,10 +19,6 @@ L.Socket = L.Class.extend({ console.debug('socket.initialize:'); this._map = map; this._msgQueue = []; - }, - - connect: function() { - var map = this._map; try { if (map.options.permission) { map.options.docParams['permission'] = map.options.permission; diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js index 787d0f8ac4..4787089cb7 100644 --- a/loleaflet/src/map/Map.js +++ b/loleaflet/src/map/Map.js @@ -165,10 +165,6 @@ L.Map = L.Evented.extend({ }, this); }, - loadDocument: function() { - this._socket.connect(); - }, - // public methods that modify map state getViewId: function (username) { |