jsdialog: create more containers around spinfields

Change-Id: I6833ec415c9ea869091caf23f151944415807cab
This commit is contained in:
Szymon Kłos 2019-10-09 14:24:36 +02:00
parent 1dc6bd9dfb
commit acc9529c27
2 changed files with 12 additions and 3 deletions

View file

@ -66,7 +66,6 @@
height: 32px;
margin: 24px 28px 24px 28px !important;
width: 70%;
background: url(images/lc_linespacing.svg) no-repeat 1px center;
border: 1px solid #ccc;
border-radius: 2px;
background-size: 28px;
@ -1107,3 +1106,7 @@ menu-entry-with-icon.padding-left + menu-entry-icon.width */
float: left;
height: 32px;
}
.spinfieldcontainer {
display: inline-block;
}

View file

@ -320,9 +320,15 @@ L.Control.JSDialogBuilder = L.Control.extend({
},
_spinfieldControl: function(parentContainer, data, builder) {
var spinfield = L.DomUtil.create('input', '', parentContainer);
var div = L.DomUtil.createWithId('div', data.id, parentContainer);
$(div).addClass('spinfieldcontainer');
var image = L.DomUtil.create('img', 'spinfieldimage', div);
var icon = builder._createIconPath(data.id);
image.src = icon;
var spinfield = L.DomUtil.create('input', 'spinfield', div);
spinfield.type = 'number';
spinfield.id = data.id;
if (data.enabled == 'false')
$(spinfield).attr('disabled', 'disabled');