initial focus on attribute type instead of name

This commit is contained in:
azivner 2018-08-18 14:49:25 +02:00
parent 7f9a8a55ca
commit 406d74c4d7
3 changed files with 1237 additions and 1286 deletions

2519
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -91,7 +91,7 @@ function AttributesModel() {
await showAttributes(attributes);
// attribute might not be rendered immediatelly so could not focus
setTimeout(() => $(".attribute-name:last").focus(), 100);
setTimeout(() => $(".attribute-type-select:last").focus(), 100);
$ownedAttributesBody.sortable({
handle: '.handle',

View file

@ -615,7 +615,7 @@
<input type="hidden" name="position" data-bind="value: position"/>
</td>
<td>
<select class="form-control" style="width: auto;" data-bind="options: $parent.availableTypes, optionsText: 'text', optionsValue: 'value', value: type, event: { change: $parent.typeChanged }"></select>
<select class="form-control attribute-type-select" style="width: auto;" data-bind="options: $parent.availableTypes, optionsText: 'text', optionsValue: 'value', value: type, event: { change: $parent.typeChanged }"></select>
</td>
<td>
<!-- Change to valueUpdate: blur is necessary because jQuery UI autocomplete hijacks change event -->