Commit 57f11713 authored by Serge S. Koval's avatar Serge S. Koval

Minor filter style adjustments

parent df42cd14
...@@ -62,21 +62,18 @@ var AdminFilters = function(element, filters_element, operations, options, types ...@@ -62,21 +62,18 @@ var AdminFilters = function(element, filters_element, operations, options, types
$(options[optId]).each(function() { $(options[optId]).each(function() {
$field.append($('<option/>') $field.append($('<option/>')
.val(this[0]).text(this[1])) .val(this[0]).text(this[1]));
.appendTo($el);
}); });
$field.select2(); $el.append($('<td/>').append($field));
$field.select2({width: 'resolve'});
} else } else
{ {
$field = $('<input type="text" class="filter-val" />') $field = $('<input type="text" class="filter-val" />')
.attr('name', 'flt' + lastCount + '_' + optId); .attr('name', 'flt' + lastCount + '_' + optId);
$el.append($('<td/>').append($field));
} }
$el.append(
$('<td/>').append($field)
);
if (optId in types) { if (optId in types) {
$field.attr('data-role', types[optId]); $field.attr('data-role', types[optId]);
faForm.applyStyle($field, types[optId]); faForm.applyStyle($field, types[optId]);
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<div class="clearfix"></div> <div class="clearfix"></div>
{% endmacro %} {% endmacro %}
{% macro search_form(input_class="search-query span2") %} {% macro search_form(input_class="span2") %}
<form method="GET" action="{{ return_url }}" class="search-form"> <form method="GET" action="{{ return_url }}" class="search-form">
{% if sort_column is not none %} {% if sort_column is not none %}
<input type="hidden" name="sort" value="{{ sort_column }}"></input> <input type="hidden" name="sort" value="{{ sort_column }}"></input>
...@@ -63,13 +63,17 @@ ...@@ -63,13 +63,17 @@
{% if sort_desc %} {% if sort_desc %}
<input type="hidden" name="desc" value="{{ sort_desc }}"></input> <input type="hidden" name="desc" value="{{ sort_desc }}"></input>
{% endif %} {% endif %}
{% if search %}
<div class="input-append"> <div class="input-append">
<input type="text" name="search" value="{{ search or '' }}" class="{{ input_class }}" placeholder="{{ _gettext('Search') }}"></input> <input type="text" name="search" value="{{ search }}" class="{{ input_class }}" placeholder="{{ _gettext('Search') }}"></input>
{% if search %}
<a href="{{ clear_search_url }}" class="clear add-on"> <a href="{{ clear_search_url }}" class="clear add-on">
<i class="icon-remove"></i> <i class="icon-remove"></i>
</a> </a>
{% endif %}
</div> </div>
{% else %}
<div>
<input type="text" name="search" value="" class="{{ input_class }}" placeholder="{{ _gettext('Search') }}"></input>
</div>
{% endif %}
</form> </form>
{% endmacro %} {% endmacro %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment