Commit 108c7b79 authored by Serge S. Koval's avatar Serge S. Koval

Added 'x' to the filter remove button.

parent 5fe6bd03
......@@ -6,7 +6,7 @@
- Reduce number of parameters passed to list view
- Checkboxes and mass operations
- Filters
- Add 'x' to remove filter and remove button
- Use table to draw filters so column names will line up?
- Custom filters for date fields?
- Change boolean filter to True/False instead of Yes/No
- Ability to sort by fields that are not visible?
......
......@@ -44,3 +44,19 @@ form.search-form a.clear i {
margin-bottom: 0px;
width: 208px;
}
.filter-row .remove-filter
{
vertical-align: middle;
}
.filter-row .remove-filter .close-icon
{
font-size: 16px;
}
.filter-row .remove-filter .close-icon:hover
{
color: black;
opacity: 0.4;
}
......@@ -24,8 +24,10 @@ var AdminFilters = function(element, filters_element, adminForm, operations, opt
function addFilter(name, op) {
var $el = $('<div class="filter-row" />').appendTo($container);
$('<a href="#" class="btn remove-filter" title="Remove Filter" />')
.text(name)
$('<a href="#" class="btn remove-filter" />')
.append($('<span class="close-icon">&times;</span>'))
.append('&nbsp;')
.append(name)
.appendTo($el)
.click(removeFilter);
......
......@@ -65,7 +65,7 @@
<div class="filter-row">
{% set filter = admin_view._filters[flt[0]] %}
<a href="#" class="btn remove-filter" title="{{ _gettext('Remove Filter') }}">
{{ filters[flt[0]] }}
<span class="close-icon">&times;</span>&nbsp;{{ filters[flt[0]] }}
</a><select class="filter-op" data-role="chosen">
{% for op in admin_view._filter_dict[filter.name] %}
<option value="{{ op[0] }}"{% if flt[0] == op[0] %} selected="selected"{% endif %}>{{ op[1] }}</option>
......
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