[Libreoffice-commits] online.git: Branch 'libreoffice-5-3' - 2 commits - loleaflet/dist loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Mon Mar 20 10:17:14 UTC 2017


 loleaflet/dist/loleaflet.css                 |    9 +++++++++
 loleaflet/dist/toolbar/toolbar.js            |   10 ++++++++--
 loleaflet/src/control/Control.ContextMenu.js |    4 ++--
 3 files changed, 19 insertions(+), 4 deletions(-)

New commits:
commit 49831620ecf32d77053a9532836bef29acfca596
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Thu Dec 8 22:15:15 2016 +0530

    loleaflet: Use same loleaflet font for color picker
    
    Change-Id: I4e8235a913db81f3d270a23a95e1b3144de47d08
    Reviewed-on: https://gerrit.libreoffice.org/35456
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>

diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js
index 0cd55736..76f44553 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -178,12 +178,18 @@ function onClick(id, item, subItem) {
 	else if (id === 'fontcolor') {
 		// absolutely no idea why, but without the timeout, the popup is
 		// closed as soon as it is opend
-		setTimeout(function () {$('#fontColorPicker').colorpicker('showPalette');}, 0);
+		setTimeout(function () {
+			$('#fontColorPicker').colorpicker('showPalette');
+			$('.ui-widget-content').addClass('loleaflet-font');
+		}, 0);
 	}
 	else if (id === 'backcolor') {
 		// absolutely no idea why, but without the timeout, the popup is
 		// closed as soon as it is opend
-		setTimeout(function () {$('#backColorPicker').colorpicker('showPalette');}, 0);
+		setTimeout(function () {
+			$('#backColorPicker').colorpicker('showPalette');
+			$('.ui-widget-content').addClass('loleaflet-font');
+		}, 0);
 	}
 	else if (id === 'sum') {
 		map.sendUnoCommand('.uno:AutoSum');
commit d5d0b91944e44016f52cb6512b227a40e81439dd
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Thu Dec 8 21:58:22 2016 +0530

    loleaflet: Check boxes against checked items in context menu
    
    Change-Id: I1a51fec67ba79dc2e82cccb54731bfabb9731470
    Reviewed-on: https://gerrit.libreoffice.org/35455
    Reviewed-by: pranavk <pranavk at collabora.co.uk>
    Tested-by: pranavk <pranavk at collabora.co.uk>

diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css
index fe40839a..a0f3ef7b 100644
--- a/loleaflet/dist/loleaflet.css
+++ b/loleaflet/dist/loleaflet.css
@@ -57,3 +57,12 @@ body {
 .loleaflet-scrolled {
 	overflow: auto;
 }
+
+/* Important to override context-menu-icon's font-family here otherwise, jquery-contextmenu.css
+ * will try to load its own font file which is not available in dist/ */
+.context-menu-icon::before {
+	font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif !important;
+}
+.context-menu-icon-lo-checkmark:before {
+	content: '\2713';
+}
diff --git a/loleaflet/src/control/Control.ContextMenu.js b/loleaflet/src/control/Control.ContextMenu.js
index 60c4a328..17800609 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -134,11 +134,11 @@ L.Control.ContextMenu = L.Control.extend({
 
 				if (item.checktype === 'checkmark') {
 					if (item.checked === 'true') {
-						contextMenu[item.command.icon] = 'checkmark';
+						contextMenu[item.command]['icon'] = 'lo-checkmark';
 					}
 				} else if (item.checktype === 'radio') {
 					if (item.checked === 'true') {
-						contextMenu[item.command.icon] = 'radio';
+						contextMenu[item.command]['icon'] = 'radio';
 					}
 				}
 


More information about the Libreoffice-commits mailing list