loleaflet/html/loleaflet.html.m4|2 +
loleaflet/src/control/Control.JSDialogBuilder.js| 36 ++--
loleaflet/src/control/Control.NotebookbarBuilder.js |2 -
loleaflet/src/core/LOUtil.js| 19 ++
loleaflet/src/layer/FormFieldButtonLayer.js |2 -
loleaflet/src/layer/marker/Annotation.js|2 -
loleaflet/src/layer/tile/TileLayer.js |2 -
loleaflet/src/map/Map.js|2 -
8 files changed, 44 insertions(+), 23 deletions(-)
New commits:
commit 8bfa1318b246d7c9df2b1d22d2e8094205a53acd
Author: Michael Meeks
AuthorDate: Mon Jun 8 13:28:55 2020 +0100
Commit: Andras Timar
CommitDate: Mon Jun 8 22:12:39 2020 +0200
Proxy: centralize URL building and use absolute URL for images.
Fixes missing images on mobile.
Change-Id: If5f858cec5fc81ea50c4679162b36eb000f6d872
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95803
Tested-by: Jenkins
Reviewed-by: Michael Meeks
(cherry picked from commit 33ae2bec0fddd3f21ef2278ada0b8ac62252d87d)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95821
Tested-by: Jenkins CollaboraOffice
Reviewed-by: Andras Timar
diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4
index 547c603c5..d3c3e21de 100644
--- a/loleaflet/html/loleaflet.html.m4
+++ b/loleaflet/html/loleaflet.html.m4
@@ -231,6 +231,7 @@ m4_ifelse(MOBILEAPP,[true],
m4_ifelse(MOBILEAPP,[true],
[window.host = '';
window.serviceRoot = '';
+ window.versionPath = '%VERSION%';
window.accessToken = '';
window.accessTokenTTL = '';
window.accessHeader = '';
@@ -246,6 +247,7 @@ m4_ifelse(MOBILEAPP,[true],
window.tileSize = 256;],
[window.host = '%HOST%';
window.serviceRoot = '%SERVICE_ROOT%';
+ window.versionPath = '%VERSION%';
window.accessToken = '%ACCESS_TOKEN%';
window.accessTokenTTL = '%ACCESS_TOKEN_TTL%';
window.accessHeader = '%ACCESS_HEADER%';
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 5498d04dd..71bf67726 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -53,7 +53,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
var commandName = data.id ?
data.id.substring('.uno:'.length) : data.id;
if (commandName && commandName.length &&
L.LOUtil.existsIconForCommand(commandName, builder.map.getDocType())) {
var image = L.DomUtil.create('img',
'spinfieldimage', div);
- var icon = builder._createIconPath(data.id);
+ var icon = builder._createIconURL(data.id);
image.src = icon;
icon.alt = '';
}
@@ -396,7 +396,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
}
},
- _explorableEntry: function(parentContainer, data, content, builder,
valueNode, iconPath, updateCallback) {
+ _explorableEntry: function(parentContainer, data, content, builder,
valueNode, iconURL, updateCallback) {
var sectionTitle = L.DomUtil.create('div', 'ui-header level-' +
builder._currentDepth + ' ' + builder.options.cssClass + ' ui-widget',
parentContainer);
$(sectionTitle).css('justify-content', 'space-between');
if (data && data.id)
@@ -409,10 +409,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
var titleClass = '';
console.debug('sectionTitle.id' + sectionTitle.id);
if (sectionTitle.id === 'paperformat' || sectionTitle.id ===
'orientation' || sectionTitle.id === 'masterslide' || sectionTitle.id ===
'SdTableDesignPanel')
- iconPath = 'images/lc_'+ sectionTitle.id.toLowerCase()
+'.svg';
- if (iconPath) {
+ iconURL = L.LOUtil.getImageURL('lc_'+
sectionTitle.id.toLowerCase() +'.svg');
+ if (iconURL) {
var icon = L.DomUtil.create('img', 'menu-entry-icon',
leftDiv);
- icon.src = iconPath;
+ icon.src = iconURL;
icon.alt = '';
titleClass = 'menu-entry-with-icon';
}
@@ -567,9 +567,9 @@ L.Control.JSDialogBuilder = L.Control.extend({
if (commandName && commandName.length &&
L.LOUtil.existsIconForCommand(commandName, builder.map.getDocType())) {
var iconName =
builder._generateMenuIconName(commandName);
var iconSpan = L.DomUtil.create('span',
'menu-entry-icon ' + iconName, sectionTitle);
- var iconPath = 'images/lc_' + iconName + '.svg';
+