[Libreoffice-commits] online.git: loleaflet/dist loleaflet/src
Pranav Kant
pranavk at collabora.co.uk
Mon Oct 16 17:50:28 UTC 2017
loleaflet/dist/toolbar/toolbar.js | 1 +
loleaflet/src/control/Control.Menubar.js | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit cf3076a2600d0379446d87d3c8b8f05c4332a926
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Tue Oct 3 22:01:53 2017 +0530
[API CHANGE]: loleaflet: postmessage: s/rev-history/UI_FileVersions/
And keep the compatibility with older clients by adding 'Deprecated'
flag to the messages in PostMessage API. The clients must ignore such
messages marked with deprecated flag and should wait for the standard
non-deprecated post message.
Change-Id: Id203c44db5986303c574e66602d8f98b4c04ba50
Reviewed-on: https://gerrit.libreoffice.org/43093
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-by: pranavk <pranavk at collabora.co.uk>
Tested-by: pranavk <pranavk at collabora.co.uk>
diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 2dc57cf0..07d30512 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -1817,6 +1817,7 @@ $(document).ready(function() {
$('#closebuttonwrapper').hide();
} else {
$('#closebutton').click(function(e) {
+ map.fire('postMessage', {msgId: 'close', args: {EverModified: map._everModified, Deprecated: true}});
map.fire('postMessage', {msgId: 'UI_Close', args: {EverModified: map._everModified}});
map.remove();
});
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 056e3332..7a37cce5 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -707,8 +707,10 @@ L.Control.Menubar = L.Control.extend({
} else if (id === 'rev-history') {
// if we are being loaded inside an iframe, ask
// our host to show revision history mode
- map.fire('postMessage', {msgId: 'rev-history'});
+ map.fire('postMessage', {msgId: 'rev-history', args: {Deprecated: true}});
+ map.fire('postMessage', {msgId: 'UI_FileVersions'});
} else if (id === 'closedocument') {
+ map.fire('postMessage', {msgId: 'close', args: {EverModified: map._everModified, Deprecated: true}});
map.fire('postMessage', {msgId: 'UI_Close', args: {EverModified: map._everModified}});
map.remove();
}
More information about the Libreoffice-commits
mailing list