loleaflet/src/control/Control.JSDialogBuilder.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
New commits: commit ca26293040950a2a6cc076876c0cb7a508ce3432 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Oct 2 14:29:32 2019 +0200 Commit: Szymon Kłos <szymon.k...@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.k...@collabora.com> Tested-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 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; }, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits