jsdialog: build menubuttons with only image

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I6754545dac87a0860f07b4d47796bdb2eb25994e
This commit is contained in:
Szymon Kłos 2023-03-14 16:13:18 +01:00 committed by Szymon Kłos
parent 207d07cb1a
commit 6e2ef04e78

View file

@ -1830,7 +1830,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
});
builder.options.noLabelsForUnoButtons = noLabels;
} else if (data.text) {
} else if (data.text || data.image) {
var button = L.DomUtil.create('div', 'menubutton ' + builder.options.cssClass, parentContainer);
button.id = data.id;
if (data.image) {
@ -1838,7 +1838,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
image.src = data.image;
}
var label = L.DomUtil.create('span', '', button);
label.innerText = data.text;
label.innerText = data.text ? data.text : '';
L.DomUtil.create('i', 'arrow', button);
$(button).click(function () {