minor fixes

This commit is contained in:
Adolfo Gómez García 2016-10-10 07:37:41 +02:00
parent 17044d38bd
commit 7ab956fa4a
2 changed files with 3 additions and 2 deletions

View File

@ -165,7 +165,8 @@
$select.val originalValues[sel.name] $select.val originalValues[sel.name]
# Refresh selectpicker if item is such # Refresh selectpicker if item is such
$select.selectpicker "refresh" if $select.hasClass("selectpicker") if $select.hasClass("selectpicker")
$select.selectpicker "refresh"
# Trigger change for the changed item # Trigger change for the changed item
$select.trigger "change" $select.trigger "change"

View File

@ -3,7 +3,7 @@
{% comment %}The choice item MUST be a Select{% endcomment %} {% comment %}The choice item MUST be a Select{% endcomment %}
{% block field %} {% block field %}
{% verbatim %} {% verbatim %}
<select class="selectpicker show-menu-arrow show-tick {{ css }}" name="{{ name }}" data-style="btn-default" data-width="100%" id="{{ name }}_field" {{# if readonly }} disabled{{/ if }}{{# if required }} required{{/ if }} tabindex="{{ index }}"> <select class="selectpicker show-menu-arrow show-tick {{ css }}" name="{{ name }}" data-style="btn-default" data-width="100%" id="{{ name }}_field" {{# if readonly }} disabled{{/ if }}{{# if required }} required{{/ if }} tabindex="{{ index }}"{{#ifequals length 10 }} data-live-search="true"{{/ ifequals }}>
{{#each values }} {{#each values }}
<option value="{{ id }}"{{# ifequals id ../value }} selected{{/ ifequals }}>{{ text }}</option> <option value="{{ id }}"{{# ifequals id ../value }} selected{{/ ifequals }}>{{ text }}</option>
{{/each}} {{/each}}