[Libreoffice-commits] online.git: loleaflet/css loleaflet/src
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Mon Nov 4 21:26:08 UTC 2019
loleaflet/css/loleaflet.css | 24 ++++++++++++++++++------
loleaflet/src/control/Control.Toolbar.js | 22 ----------------------
loleaflet/src/layer/tile/CalcTileLayer.js | 1 +
loleaflet/src/layer/tile/ImpressTileLayer.js | 2 --
loleaflet/src/map/Map.js | 3 ---
5 files changed, 19 insertions(+), 33 deletions(-)
New commits:
commit d8833d39d3422233e97f84828bb03a544dc922fa
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Fri Nov 1 19:42:55 2019 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Mon Nov 4 22:25:50 2019 +0100
loleaflet: mobile: avoid hardcoding CSS bottom property
Use the CSS class selector to modify the bottom properties for
each tile layer document, so adjusting values for portrait or landscape
orientation not be so complicated.
Change-Id: I900ef5c4ec3f770fd802a23238fdd9e6eb838772
Reviewed-on: https://gerrit.libreoffice.org/81928
Reviewed-by: Henry Castro <hcastro at collabora.com>
Tested-by: Henry Castro <hcastro at collabora.com>
diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index f53b3c618..a60a97690 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -221,34 +221,46 @@ body {
left: 0px !important;
}
- #document-container.tablet {
+ #document-container.readonly {
top: 41px;
+ bottom: 0px;
}
- #document-container.readonly {
- top: 41px;
+ #document-container.readonly.parts-preview-document {
+ bottom: 65px;
+ }
+
+ #document-container.readonly.spreadsheet-document {
+ top: 61px !important;
+ bottom: 35px;
}
#document-container.parts-preview-document {
left: 0px !important;
bottom: 95px;
}
+
#document-container.spreadsheet-document {
top: 97px !important;
+ bottom: 68px;
}
- #document-container.spreadsheet-document.readonly {
- top: 61px !important;
- }
+
#document-container {
top: 41px;
right: 0px !important;
+ bottom: 35px;
}
+
#spreadsheet-row-column-frame {
top: 77px !important;
+ bottom: 68px;
}
+
#spreadsheet-row-column-frame.readonly {
top: 41px !important;
+ bottom: 35px !important;
}
+
#toolbar-hamburger {
width: 36px;
}
diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index bac3bab0a..ba4e777aa 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -2138,19 +2138,8 @@ function onUpdatePermission(e) {
}
$('#search-input').prop('disabled', false);
- // FIXME avoid hardcoding this stuff if possible
if (_inMobileMode()) {
$('#toolbar-down').show();
- switch (map._docLayer._docType) {
- case 'text':
- $(map.options.documentContainer).css('bottom', '35px');
- break;
- case 'spreadsheet':
- $(map.options.documentContainer).css('bottom', '68px');
- $('#spreadsheet-row-column-frame').css('bottom', '68px');
- $('#spreadsheet-toolbar').show();
- break;
- }
}
}
else {
@@ -2192,19 +2181,8 @@ function onUpdatePermission(e) {
}
$('#search-input').prop('disabled', true);
- // FIXME avoid hardcoding this stuff if possible
if (_inMobileMode()) {
$('#toolbar-down').hide();
- switch (map._docLayer._docType) {
- case 'text':
- $(map.options.documentContainer).css('bottom', '0px');
- break;
- case 'spreadsheet':
- $(map.options.documentContainer).css('bottom', '35px');
- $('#spreadsheet-row-column-frame').css('bottom', '35px');
- $('#spreadsheet-toolbar').show();
- break;
- }
}
}
}
diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js b/loleaflet/src/layer/tile/CalcTileLayer.js
index 76149cf82..b5ee7ca8d 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -214,6 +214,7 @@ L.CalcTileLayer = L.TileLayer.extend({
L.DomEvent.preventDefault(e);
}
});
+ toolbar.show();
toolbar = $('#toolbar-down');
toolbar.w2toolbar({
diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js
index ce3f727ec..b5e74a5ac 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -418,10 +418,8 @@ L.ImpressTileLayer = L.TileLayer.extend({
onUpdatePermission: function (e) {
if (window.mode.isMobile()) {
if (e.perm === 'edit') {
- $(this._map.options.documentContainer).css('bottom', '95px');
this._addButton.addTo(this._map);
} else {
- $(this._map.options.documentContainer).css('bottom', '60px');
this._addButton.remove();
}
}
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index f333fbe42..1c1213aa3 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -147,10 +147,7 @@ L.Map = L.Evented.extend({
this._clipboardContainer = L.clipboardContainer();
this.addLayer(this._clipboardContainer);
- // Avoid white bar on the bottom - force resize-detector to get full size
if (window.mode.isMobile()) {
- $(this.options.documentContainer).css('bottom', '0px');
- $(this._resizeDetector).css('bottom', '0px');
L.DomEvent.on(window, 'resize', function(e) {
this.fire('orientationchange', e);
}, this);
More information about the Libreoffice-commits
mailing list