[Libreoffice-commits] online.git: loleaflet/src
Szymon Kłos (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 2 12:30:57 UTC 2019
loleaflet/src/control/Control.JSDialogBuilder.js | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
New commits:
commit ca26293040950a2a6cc076876c0cb7a508ce3432
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Oct 2 14:29:32 2019 +0200
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Oct 2 14:30:39 2019 +0200
jsdialogs: add more change listeners
Change-Id: I72e7dfbce20b5dc7989c4cfdfa42d76c41d162bf
Reviewed-on: https://gerrit.libreoffice.org/80033
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Tested-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 c00b1ce59..7d01dbe6d 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -198,6 +198,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
if (data.checked == 'true')
$(radiobutton).attr('checked', 'checked');
+ radiobutton.addEventListener('change', function() {
+ builder.callback('radiobutton', 'change', radiobutton, this.checked, builder);
+ });
+
return false;
},
@@ -221,7 +225,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
return false;
},
- _spinfieldControl: function(parentContainer, data) {
+ _spinfieldControl: function(parentContainer, data, builder) {
var spinfield = L.DomUtil.create('input', '', parentContainer);
spinfield.type = 'number';
@@ -233,6 +237,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
$(spinfield).attr('value', data.children[0].text.replace('%', ''));
}
+ spinfield.addEventListener('change', function() {
+ builder.callback('spinfield', 'change', spinfield, this.value, builder);
+ });
+
return false;
},
@@ -243,6 +251,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
if (data.enabled == 'false')
$(edit).attr('disabled', 'disabled');
+ edit.addEventListener('change', function() {
+ builder.callback('edit', 'change', edit, this.value, builder);
+ });
+
return false;
},
@@ -253,6 +265,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
if (data.enabled == 'false')
$(pushbutton).attr('disabled', 'disabled');
+ $(pushbutton).click(function () {
+ builder.callback('pushbutton', 'click', pushbutton, data.command, builder);
+ });
+
return false;
},
@@ -280,6 +296,10 @@ L.Control.JSDialogBuilder = L.Control.extend({
$(option).attr('selected', 'selected');
}
+ listbox.addEventListener('change', function() {
+ builder.callback('combobox', 'change', listbox, this.value, builder);
+ });
+
return false;
},
More information about the Libreoffice-commits
mailing list