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

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 28 09:42:06 UTC 2020


 loleaflet/src/control/Control.JSDialogBuilder.js |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 052c2809e5dd7154f5e56c4f645edbda3976e303
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Mar 19 14:02:21 2020 +0100
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Apr 28 11:41:45 2020 +0200

    jsdialog: add custom text for select range button
    
    Change-Id: Id8a28b3dbb83d4b41507b530448f88d4b2abac83
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93042
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js b/loleaflet/src/control/Control.JSDialogBuilder.js
index 57e6ed607..85dcf5a48 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1218,9 +1218,17 @@ L.Control.JSDialogBuilder = L.Control.extend({
 		return false;
 	},
 
+	_customPushButtonTextForId: function(buttonId) {
+		if (buttonId == 'validref')
+			return _('Select range');
+
+		return '';
+	},
+
 	_pushbuttonControl: function(parentContainer, data, builder, customCallback) {
 		var pushbutton = L.DomUtil.create('button', '', parentContainer);
-		pushbutton.innerHTML = builder._cleanText(data.text);
+		var customText = builder._customPushButtonTextForId(data.id);
+		pushbutton.innerHTML = customText !== '' ? customText : builder._cleanText(data.text);
 		pushbutton.id = data.id;
 
 		if (data.enabled == 'false')


More information about the Libreoffice-commits mailing list