зеркало из https://github.com/mozilla/CSOL-site.git
Родитель
e17a406ca6
Коммит
a9279eae49
|
@ -12,9 +12,6 @@ if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) mob
|
||||||
var selectID = ($(this).attr('for'));
|
var selectID = ($(this).attr('for'));
|
||||||
var selectEle = $('#' + selectID);
|
var selectEle = $('#' + selectID);
|
||||||
$('#' + selectID + ' option:first').text($(this).text());
|
$('#' + 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 %}
|
{% if filters %}
|
||||||
<div class="navbar filter">
|
<div class="navbar filter">
|
||||||
<form class="navbar-inner navbar-form form-inline text-center" method="get">
|
<form class="navbar-inner navbar-form form-inline text-center" method="get">
|
||||||
{% for filter in filters %}
|
{% for filter in filters %}
|
||||||
<label for="filter-{{ filter.name }}" class="filter-icon filter-{{ filter.name }}">{{ filter.label }}</label>
|
<div class="selectWrapper">
|
||||||
{% if filter.options %}
|
<label for="filter-{{ filter.name }}" class="filter-icon filter-{{ filter.name }}">{{ filter.label }}</label>
|
||||||
<select id="filter-{{ filter.name }}" name="{{ filter.name }}" class="input-medium{% if filter.class %} {{ filter.class }}{% endif %}">
|
{% if filter.options %}
|
||||||
<option></option>
|
<select id="filter-{{ filter.name }}" name="{{ filter.name }}" class="input-medium{% if filter.class %} {{ filter.class }}{% endif %}">
|
||||||
{% if filter.is_grouped %}
|
<option></option>
|
||||||
{% for label, options in filter.options %}
|
{% if filter.is_grouped %}
|
||||||
<optgroup label="{{ label }}">
|
{% for label, options in filter.options %}
|
||||||
{% for value, label in options %}
|
<optgroup label="{{ label }}">
|
||||||
<option value="{{ value }}"{% if filter.selected == value %} selected="selected"{% endif %}>{{ label }}</option>
|
{% for value, label in options %}
|
||||||
{% endfor %}
|
<option value="{{ value }}"{% if filter.selected == value %} selected="selected"{% endif %}>{{ label }}</option>
|
||||||
</optgroup>
|
{% endfor %}
|
||||||
{% endfor %}
|
</optgroup>
|
||||||
{% else %}
|
{% endfor %}
|
||||||
{% for item in filter.options %}
|
{% else %}
|
||||||
<option value="{{ item.value }}"{% if filter.selected == item.value %} selected="selected"{% endif %}>{{ item.label }}</option>
|
{% for item in filter.options %}
|
||||||
{% endfor %}
|
<option value="{{ item.value }}"{% if filter.selected == item.value %} selected="selected"{% endif %}>{{ item.label }}</option>
|
||||||
{% endif %}
|
{% endfor %}
|
||||||
</select>
|
{% endif %}
|
||||||
{% else %}
|
</select>
|
||||||
<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 %}>
|
{% else %}
|
||||||
{% endif %}
|
<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 %}>
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
<input type="submit" value="Update" class="btn">
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
<input type="submit" value="Update" class="btn">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче