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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Nov 19 11:23:10 UTC 2018


 loleaflet/js/toolbar.js |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit fd5f32be40fdfae35445c5a9efc3d2d4bc515efd
Author:     Henry Castro <hcastro at collabora.com>
AuthorDate: Sun Sep 30 18:02:31 2018 -0400
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:17:18 2018 +0200

    lolefalet: mobile: hide custom combo boxes
    
    Change-Id: I6a55fb55c7473010a29a72503d81ccf1e90fc1a4

diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 9155476a7..4c69cb027 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -793,7 +793,16 @@ function initMobileToolbar(toolItems) {
 			onClick(e, e.target);
 			hideTooltip(this, e.target);
 		},
-		onRefresh: function() {
+		onRefresh: function(edata) {
+			if (edata.item && (edata.item.id === 'styles' || edata.item.id === 'fonts' || edata.item.id === 'fontsizes')) {
+				var toolItem = $(this.box).find('#tb_'+ this.name +'_item_'+ w2utils.escapeId(edata.item.id));
+				if (edata.item.hidden) {
+					toolItem.css('display', 'none');
+				} else {
+					toolItem.css('display', '');
+				}
+			}
+
 			if (map.getDocType() === 'presentation') {
 				// Fill the style select box if not yet filled
 				if ($('.styles-select')[0] && $('.styles-select')[0].length === 0) {


More information about the Libreoffice-commits mailing list