loleaflet/src/control/Control.JSDialogBuilder.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit 052c2809e5dd7154f5e56c4f645edbda3976e303 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Thu Mar 19 14:02:21 2020 +0100 Commit: Szymon Kłos <szymon.k...@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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@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') _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits