Resolves #409
This commit is contained in:
Andrew Hayward 2013-06-05 13:05:06 +01:00
Родитель e17a406ca6
Коммит a9279eae49
2 изменённых файлов: 26 добавлений и 27 удалений

Просмотреть файл

@ -12,9 +12,6 @@ if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) mob
var selectID = ($(this).attr('for'));
var selectEle = $('#' + selectID);
$('#' + selectID + ' option:first').text($(this).text());
var selectWrap = $('<div class="selectWrapper"></div>').append(this,selectEle);
$('.navbar.filter form').prepend(selectWrap);
});
}

Просмотреть файл

@ -6,30 +6,32 @@
{% if filters %}
<div class="navbar filter">
<form class="navbar-inner navbar-form form-inline text-center" method="get">
{% for filter in filters %}
<label for="filter-{{ filter.name }}" class="filter-icon filter-{{ filter.name }}">{{ filter.label }}</label>
{% if filter.options %}
<select id="filter-{{ filter.name }}" name="{{ filter.name }}" class="input-medium{% if filter.class %} {{ filter.class }}{% endif %}">
<option></option>
{% if filter.is_grouped %}
{% for label, options in filter.options %}
<optgroup label="{{ label }}">
{% for value, label in options %}
<option value="{{ value }}"{% if filter.selected == value %} selected="selected"{% endif %}>{{ label }}</option>
{% endfor %}
</optgroup>
{% endfor %}
{% else %}
{% for item in filter.options %}
<option value="{{ item.value }}"{% if filter.selected == item.value %} selected="selected"{% endif %}>{{ item.label }}</option>
{% endfor %}
{% endif %}
</select>
{% else %}
<input type="{{ filter.type | default('text') }}" id="filter-{{ filter.name }}" name="{{ filter.name }}" class="input-medium{% if filter.class %} {{ filter.class }}{% endif %}"{% if filter.value %} value="{{ filter.value }}"{% endif %}>
{% endif %}
{% endfor %}
<input type="submit" value="Update" class="btn">
{% for filter in filters %}
<div class="selectWrapper">
<label for="filter-{{ filter.name }}" class="filter-icon filter-{{ filter.name }}">{{ filter.label }}</label>
{% if filter.options %}
<select id="filter-{{ filter.name }}" name="{{ filter.name }}" class="input-medium{% if filter.class %} {{ filter.class }}{% endif %}">
<option></option>
{% if filter.is_grouped %}
{% for label, options in filter.options %}
<optgroup label="{{ label }}">
{% for value, label in options %}
<option value="{{ value }}"{% if filter.selected == value %} selected="selected"{% endif %}>{{ label }}</option>
{% endfor %}
</optgroup>
{% endfor %}
{% else %}
{% for item in filter.options %}
<option value="{{ item.value }}"{% if filter.selected == item.value %} selected="selected"{% endif %}>{{ item.label }}</option>
{% endfor %}
{% endif %}
</select>
{% else %}
<input type="{{ filter.type | default('text') }}" id="filter-{{ filter.name }}" name="{{ filter.name }}" class="input-medium{% if filter.class %} {{ filter.class }}{% endif %}"{% if filter.value %} value="{{ filter.value }}"{% endif %}>
{% endif %}
</div>
{% endfor %}
<input type="submit" value="Update" class="btn">
</form>
</div>
{% endif %}