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
253af1dc
Commit
253af1dc
authored
Dec 15, 2012
by
Artem Serga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1 - Refine selector for tooltip
parent
d71a3807
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
form.py
flask_admin/contrib/sqlamodel/form.py
+4
-5
list.html
flask_admin/templates/admin/model/list.html
+2
-2
No files found.
flask_admin/contrib/sqlamodel/form.py
View file @
253af1dc
...
@@ -142,11 +142,10 @@ class AdminModelConverter(ModelConverterBase):
...
@@ -142,11 +142,10 @@ class AdminModelConverter(ModelConverterBase):
if
not
column
.
nullable
and
not
isinstance
(
column
.
type
,
Boolean
):
if
not
column
.
nullable
and
not
isinstance
(
column
.
type
,
Boolean
):
kwargs
[
'validators'
]
.
append
(
validators
.
Required
())
kwargs
[
'validators'
]
.
append
(
validators
.
Required
())
# Apply label
# Apply label and description if it isn't inline form field
kwargs
[
'label'
]
=
self
.
_get_label
(
prop
.
key
,
kwargs
)
if
self
.
view
.
model
==
mapper
.
class_
:
kwargs
[
'label'
]
=
self
.
_get_label
(
prop
.
key
,
kwargs
)
# Apply description
kwargs
[
'description'
]
=
self
.
_get_description
(
prop
.
key
,
kwargs
)
kwargs
[
'description'
]
=
self
.
_get_description
(
prop
.
key
,
kwargs
)
# Figure out default value
# Figure out default value
default
=
getattr
(
column
,
'default'
,
None
)
default
=
getattr
(
column
,
'default'
,
None
)
...
...
flask_admin/templates/admin/model/list.html
View file @
253af1dc
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
{{ name }}
{{ name }}
{% endif %}
{% endif %}
{% if c in admin_view.column_descriptions %}
{% if c in admin_view.column_descriptions %}
<a
class=
"icon-question-sign"
title=
"{{ admin_view.column_descriptions[c] }}"
href=
"#"
></a>
<a
class=
"icon-question-sign
js-tooltip
"
title=
"{{ admin_view.column_descriptions[c] }}"
href=
"#"
></a>
{% endif %}
{% endif %}
</th>
</th>
{% set column = column + 1 %}
{% set column = column + 1 %}
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
<script
language=
"javascript"
>
<script
language=
"javascript"
>
(
function
(
$
)
{
(
function
(
$
)
{
$
(
'.
icon-question-sign
'
).
tooltip
();
$
(
'.
js-tooltip
'
).
tooltip
();
{
%
if
filter_groups
is
not
none
and
filter_data
is
not
none
%
}
{
%
if
filter_groups
is
not
none
and
filter_data
is
not
none
%
}
var
filter
=
new
AdminFilters
(
'#filter_form'
,
'.field-filters'
,
var
filter
=
new
AdminFilters
(
'#filter_form'
,
'.field-filters'
,
{{
admin_view
.
_filter_dict
|
tojson
|
safe
}},
{{
admin_view
.
_filter_dict
|
tojson
|
safe
}},
...
...
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