[Libreoffice-commits] online.git: loleaflet/src

Henry Castro (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 15 21:46:18 UTC 2019


 loleaflet/src/control/Control.Toolbar.js     |    6 ------
 loleaflet/src/layer/tile/ImpressTileLayer.js |    2 ++
 2 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 72af6303b20c8e50a50d11cea4ff50ce1495f36c
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Tue Oct 15 17:43:19 2019 -0400
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Tue Oct 15 23:45:59 2019 +0200

    loleaflet: mobile: move code related to document property changes...
    
    to the ImpressTileLayer
    
    When onUpdatePermission in fired in Control.Toolbar.js. I was
    expecting read code related to only toolbar operations like
    enable, disable or remove buttons. It is better to move code
    related to document change properties to the ImpressTileLayer.
    
    Change-Id: I4b33fdd6a7846708b223bc1e80c03190c15711dd
    Reviewed-on: https://gerrit.libreoffice.org/80863
    Reviewed-by: Henry Castro <hcastro at collabora.com>
    Tested-by: Henry Castro <hcastro at collabora.com>

diff --git a/loleaflet/src/control/Control.Toolbar.js b/loleaflet/src/control/Control.Toolbar.js
index d1a455151..70877b498 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -2120,9 +2120,6 @@ function onUpdatePermission(e) {
 				$('#spreadsheet-row-column-frame').css('bottom', '68px');
 				$('#spreadsheet-toolbar').show();
 				break;
-			case 'presentation':
-				$(map.options.documentContainer).css('bottom', '95px');
-				break;
 			}
 		}
 	}
@@ -2177,9 +2174,6 @@ function onUpdatePermission(e) {
 				$('#spreadsheet-row-column-frame').css('bottom', '35px');
 				$('#spreadsheet-toolbar').show();
 				break;
-			case 'presentation':
-				$(map.options.documentContainer).css('bottom', '0px');
-				break;
 			}
 		}
 	}
diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js b/loleaflet/src/layer/tile/ImpressTileLayer.js
index 88b8b8fe6..dc2d69db3 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -359,8 +359,10 @@ 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', '0px');
 				this._addButton.remove();
 			}
 		}


More information about the Libreoffice-commits mailing list