Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
108c7b79
Commit
108c7b79
authored
Apr 12, 2012
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 'x' to the filter remove button.
parent
5fe6bd03
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
7 deletions
+25
-7
TODO.txt
TODO.txt
+1
-1
admin.css
flask_adminex/static/css/admin.css
+17
-1
filters.js
flask_adminex/static/js/filters.js
+6
-4
list.html
flask_adminex/templates/admin/model/list.html
+1
-1
No files found.
TODO.txt
View file @
108c7b79
...
...
@@ -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?
...
...
flask_adminex/static/css/admin.css
View file @
108c7b79
...
...
@@ -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
;
}
flask_adminex/static/js/filters.js
View file @
108c7b79
...
...
@@ -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">×</span>'
))
.
append
(
' '
)
.
append
(
name
)
.
appendTo
(
$el
)
.
click
(
removeFilter
);
...
...
flask_adminex/templates/admin/model/list.html
View file @
108c7b79
...
...
@@ -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"
>
×
</span>
{{ 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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment