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
57f11713
Commit
57f11713
authored
May 05, 2013
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor filter style adjustments
parent
df42cd14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
filters.js
flask_admin/static/js/filters.js
+4
-7
layout.html
flask_admin/templates/admin/model/layout.html
+8
-4
No files found.
flask_admin/static/js/filters.js
View file @
57f11713
...
@@ -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
]);
...
...
flask_admin/templates/admin/model/layout.html
View file @
57f11713
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
<div
class=
"clearfix"
></div>
<div
class=
"clearfix"
></div>
{% endmacro %}
{% endmacro %}
{% macro search_form(input_class="s
earch-query s
pan2") %}
{% 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 %}
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