loleaflet/src/control/Control.JSDialogBuilder.js | 3 ++- loleaflet/src/control/Control.MobileWizard.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-)
New commits: commit 98e2a9f98ba88b5ed0192c693730139c58b51900 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Thu Dec 19 11:20:26 2019 +0000 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu Dec 19 13:25:50 2019 +0100 sidebars: if we don't have a sidebar id - use -1 instead. A matching patch looks up the view's sidebar-window for large dialog identifiers in core. Change-Id: Ib7ee3f09af739dbe857a795725316040046a171f Reviewed-on: https://gerrit.libreoffice.org/85513 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js index 9d91807cd..916157c99 100644 --- a/loleaflet/src/control/Control.JSDialogBuilder.js +++ b/loleaflet/src/control/Control.JSDialogBuilder.js @@ -104,7 +104,8 @@ L.Control.JSDialogBuilder = L.Control.extend({ builder.map.sendUnoCommand(data); } else if (object) { data = typeof data === 'string' ? data.replace('"', '\\"') : data; - var message = 'dialogevent ' + window.sidebarId + ' {\"id\":\"' + object.id + '\", \"cmd\": \"' + eventType + '\", \"data\":\"' + data + '\"}'; + var message = 'dialogevent ' + (window.sidebarId !== undefined ? window.sidebarId : -1) + + ' {\"id\":\"' + object.id + '\", \"cmd\": \"' + eventType + '\", \"data\":\"' + data + '\"}'; builder.map._socket.sendMessage(message); } }, diff --git a/loleaflet/src/control/Control.MobileWizard.js b/loleaflet/src/control/Control.MobileWizard.js index 035d14f36..712677c4a 100644 --- a/loleaflet/src/control/Control.MobileWizard.js +++ b/loleaflet/src/control/Control.MobileWizard.js @@ -226,7 +226,9 @@ L.Control.MobileWizard = L.Control.extend({ _refreshSidebar: function() { var map = this.map; setTimeout(function () { - var message = 'dialogevent ' + window.sidebarId + ' {\"id\":\"-1\"}'; + var message = 'dialogevent ' + + (window.sidebarId !== undefined ? window.sidebarId : -1) + + ' {\"id\":\"-1\"}'; map._socket.sendMessage(message); }, 400); }, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits