[Libreoffice-commits] online.git: Branch 'feature/jsdialogs' - 5 commits - loleaflet/css loleaflet/src

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 31 10:19:42 UTC 2020


 loleaflet/css/mobilewizard.css                   |   10 ++++++++++
 loleaflet/src/control/Control.JSDialogBuilder.js |   18 ++++++++++++++++--
 loleaflet/src/map/handler/Map.TouchGesture.js    |    2 +-
 3 files changed, 27 insertions(+), 3 deletions(-)

New commits:
commit ad6da562b603b96e416762558db92b860f4cab41
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Mar 31 12:17:20 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Mar 31 12:17:20 2020 +0200

    jsdialog: show ok button in message boxes
    
    Change-Id: I4f57b6cc0275875150a6cd1c944e2d12394a59a4

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index de49745d8..bbc9f4e05 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -35,6 +35,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 		this._controlHandlers['edit'] = this._editControl;
 		this._controlHandlers['multilineedit'] = this._multiLineEditControl;
 		this._controlHandlers['pushbutton'] = this._pushbuttonControl;
+		this._controlHandlers['okbutton'] = this._pushbuttonControl;
 		this._controlHandlers['combobox'] = this._comboboxControl;
 		this._controlHandlers['comboboxentry'] = this._comboboxEntry;
 		this._controlHandlers['listbox'] = this._listboxControl;
commit 635b675828267427097ada5d382d05c083349398
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Mar 31 12:14:40 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Mar 31 12:14:43 2020 +0200

    jsdialog: close mobilewizard before all dialogs
    
    Mobilewizard has reference to the last window so in
    case of message box it will be closed first.
    This prevent us from closing parent window before child
    as we close all windows in closePopups.
    
    Change-Id: I9887b56374f2fc7e1cabb46d97e2c8ee03511596

diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js b/loleaflet/src/map/handler/Map.TouchGesture.js
index 849f64d69..0b5bb095b 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -330,8 +330,8 @@ L.Map.TouchGesture = L.Handler.extend({
 		    this._map.hyperlinkPopup._contentNode == e.target.parentNode)
 			this._map.fire('hyperlinkclicked', {url: e.target.href});
 
-		this._map.fire('closepopups');
 		this._map.fire('closemobilewizard');
+		this._map.fire('closepopups');
 		this._map.fire('editorgotfocus');
 
 		var docLayer = this._map._docLayer;
commit a2c4e82fad9d26ed26ef9dff1557dd758f619cf1
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Mar 26 14:58:14 2020 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Mar 26 14:58:14 2020 +0100

    jsdialog: customize spell checking error label
    
    Change-Id: Ieb977363bda76af51a4e5d41052fc378995e24ea

diff --git a/loleaflet/css/mobilewizard.css b/loleaflet/css/mobilewizard.css
index 88b9ab199..3adedab41 100644
--- a/loleaflet/css/mobilewizard.css
+++ b/loleaflet/css/mobilewizard.css
@@ -822,6 +822,12 @@
 		font-size: 15pt;
 	}
 
+	#mobile-spell-error {
+		border: none;
+		font-size: 15pt;
+		color: red !important;
+	}
+
 	#searchlabel {
 		border: none;
 		font-size: 11pt;
commit c305a07b9e9138e7201d50ee0e44b6ca47a9a9dd
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Mar 25 12:17:06 2020 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Mar 25 12:17:06 2020 +0100

    jsdialog: handle drawingarea
    
    Change-Id: Ia3bc01e76c71edc7ac59e3157e7de5700397c21d

diff --git a/loleaflet/css/mobilewizard.css b/loleaflet/css/mobilewizard.css
index 9bb813415..88b9ab199 100644
--- a/loleaflet/css/mobilewizard.css
+++ b/loleaflet/css/mobilewizard.css
@@ -831,4 +831,8 @@
 		width: 30% !important;
 	}
 
+	.mobile-wizard.ui-drawing-area {
+		margin: 10px 5% 10px 5% !important;
+		width: 90%;
+	}
 }
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 94869da71..de49745d8 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -58,6 +58,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 		this._controlHandlers['divcontainer'] = this._divContainerHandler;
 		this._controlHandlers['colorlistbox'] = this._colorControl;
 		this._controlHandlers['treelistbox'] = this._listboxControl;
+		this._controlHandlers['drawingarea'] = this._drawingAreaControl;
 
 		this._controlHandlers['mainmenu'] = this._containerHandler;
 		this._controlHandlers['submenu'] = this._subMenuHandler;
@@ -1350,6 +1351,15 @@ L.Control.JSDialogBuilder = L.Control.extend({
 		return false;
 	},
 
+	_drawingAreaControl: function(parentContainer, data) {
+		if (data.image) {
+			var image = L.DomUtil.create('img', 'mobile-wizard ui-drawing-area', parentContainer);
+			image.src = data.image.replace('\\', '');
+			image.id = data.id;
+		}
+		return false;
+	},
+
 	_htmlControl: function(parentContainer, data) {
 		var container = L.DomUtil.create('div', 'mobile-wizard', parentContainer);
 		container.appendChild(data.content);
commit ed0099df31e30f45af20c73c9d2077b4a936dec1
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Mar 24 14:53:35 2020 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Mar 24 14:53:35 2020 +0100

    jsdialog: handle treelistbox
    
    Change-Id: I89da1b60591f8a83413b0d25ec75812120ab5f11

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index fc084bdfc..94869da71 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -57,6 +57,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 		this._controlHandlers['colorsample'] = this._colorSampleControl;
 		this._controlHandlers['divcontainer'] = this._divContainerHandler;
 		this._controlHandlers['colorlistbox'] = this._colorControl;
+		this._controlHandlers['treelistbox'] = this._listboxControl;
 
 		this._controlHandlers['mainmenu'] = this._containerHandler;
 		this._controlHandlers['submenu'] = this._subMenuHandler;
@@ -1253,9 +1254,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
 				var value = data.entries[data.selectedEntries[0]];
 				valueNode = L.DomUtil.create('div', '', null);
 				valueNode.innerHTML = value;
-			} else {
+			} else if (isNaN(parseInt(data.selectedEntries[0])))
+				title = builder._cleanText(data.selectedEntries[0]);
+			else
 				title = data.entries[data.selectedEntries[0]];
-			}
 		}
 		title = builder._cleanText(title);
 		data.text = title;
@@ -1264,6 +1266,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
 		for (var index in data.entries) {
 			var style = 'ui-combobox-text';
 			if ((data.selectedEntries && index == data.selectedEntries[0])
+				|| (data.selectedEntries && data.entries[index] == data.selectedEntries[0])
 				|| data.entries[index] == title) {
 				style += ' selected';
 			}


More information about the Libreoffice-commits mailing list