loleaflet: apply a border style when the "valueset" item is selected

When the user selects an item (touch), the LO server updates and send
selected data to apply border styles.

Change-Id: Ic6f877712514806b822d70342738ee04ae2ea0a8
Reviewed-on: https://gerrit.libreoffice.org/81419
Reviewed-by: Henry Castro <hcastro@collabora.com>
Tested-by: Henry Castro <hcastro@collabora.com>
This commit is contained in:
Henry Castro 2019-10-23 15:34:22 -04:00
parent 3d576a07de
commit 298cffd6b6

View file

@ -547,7 +547,8 @@ L.Control.JSDialogBuilder = L.Control.extend({
image = data.entries[index].image; image = data.entries[index].image;
image = image.substr(0, image.lastIndexOf('.')); image = image.substr(0, image.lastIndexOf('.'));
image = image.substr(image.lastIndexOf('/') + 1); image = image.substr(image.lastIndexOf('/') + 1);
elem = L.DomUtil.create('div', 'layout ' + image, parentContainer); elem = L.DomUtil.create('div', 'layout ' + image +
(data.entries[index].selected ? ' loleaflet-context-down' : ''), parentContainer);
$(elem).data('id', data.entries[index].id); $(elem).data('id', data.entries[index].id);
$(elem).click(function () { $(elem).click(function () {
builder.callback('valueset', 'selected', { id: data.id }, $(this).data('id'), builder); builder.callback('valueset', 'selected', { id: data.id }, $(this).data('id'), builder);