summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-01-28 08:50:20 -0400
committerHenry Castro <hcastro@collabora.com>2020-01-28 14:09:53 +0100
commit62fe18a04439b12a8ca09e1ae624eb62cfb403e0 (patch)
treee69f266ab90b788bc2f01f8b902aee9c956f6dcb
parentMobileWizard: add monochrome version of insert local image (diff)
downloadonline-62fe18a04439b12a8ca09e1ae624eb62cfb403e0.tar.gz
online-62fe18a04439b12a8ca09e1ae624eb62cfb403e0.zip
loleaflet: mobile: restore 'Insert sheet' toolbar item
Change-Id: Ib51341c517954519b0dea2263ac9bf16b052b3f8 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87615 Reviewed-by: Henry Castro <hcastro@collabora.com> Tested-by: Henry Castro <hcastro@collabora.com>
-rw-r--r--loleaflet/css/spreadsheet-mobile.css2
-rw-r--r--loleaflet/src/layer/tile/CalcTileLayer.js20
2 files changed, 20 insertions, 2 deletions
diff --git a/loleaflet/css/spreadsheet-mobile.css b/loleaflet/css/spreadsheet-mobile.css
index 7f026ab3a5..37f685d9ea 100644
--- a/loleaflet/css/spreadsheet-mobile.css
+++ b/loleaflet/css/spreadsheet-mobile.css
@@ -54,7 +54,7 @@
}
.spreadsheet-tabs-container {
- left: 0px;
+ left: 24px;
overflow-x: scroll;
scrollbar-width: none; /*css draft (firefox only)*/
-ms-scrollbar: none; /*ie*/
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index 021a6b2dbf..288a7322ee 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -171,7 +171,25 @@ L.CalcTileLayer = L.TileLayer.extend({
e.isCancelled = true;
});
- L.DomUtil.remove(L.DomUtil.get('spreadsheet-toolbar'));
+ toolbar = $('#spreadsheet-toolbar');
+ toolbar.w2toolbar({
+ name: 'spreadsheet-toolbar',
+ tooltip: 'bottom',
+ hidden: true,
+ items: [{type: 'button', id: 'insertsheet', img: 'insertsheet', hint: _('Insert sheet')}],
+ onClick: function (e) {
+ window.onClick(e, e.target);
+ window.hideTooltip(this, e.target);
+ }
+ });
+ toolbar.bind('touchstart', function(e) {
+ w2ui['spreadsheet-toolbar'].touchStarted = true;
+ var touchEvent = e.originalEvent;
+ if (touchEvent && touchEvent.touches.length > 1) {
+ L.DomEvent.preventDefault(e);
+ }
+ });
+ toolbar.show();
toolbar = $('#toolbar-down');
toolbar.w2toolbar({