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
822dd85c
Commit
822dd85c
authored
Jun 01, 2015
by
Geoffrey Vedernikoff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makes leaflet search globally configurable
parent
6ecad925
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
24 deletions
+30
-24
form-1.0.0.js
flask_admin/static/admin/js/form-1.0.0.js
+24
-22
loader.gif
flask_admin/static/vendor/leaflet/images/loader.gif
+0
-0
search-icon.png
flask_admin/static/vendor/leaflet/images/search-icon.png
+0
-0
leaflet.search.css
flask_admin/static/vendor/leaflet/leaflet.search.css
+1
-1
lib.html
flask_admin/templates/bootstrap2/admin/lib.html
+5
-1
No files found.
flask_admin/static/admin/js/form-1.0.0.js
View file @
822dd85c
...
...
@@ -168,6 +168,7 @@
return
true
;
}
if
(
window
.
google
)
{
var
geocoder
=
new
google
.
maps
.
Geocoder
();
function
googleGeocoding
(
text
,
callResponse
)
{
...
...
@@ -194,6 +195,7 @@
minLength
:
2
,
zoom
:
10
}));
}
// set up Leaflet.draw editor
var
drawOptions
=
{
...
...
flask_admin/static/vendor/leaflet/images/loader.gif
0 → 100644
View file @
822dd85c
1.81 KB
flask_admin/static/vendor/leaflet/images/search-icon.png
0 → 100644
View file @
822dd85c
3.75 KB
flask_admin/static/vendor/leaflet/leaflet.search.css
View file @
822dd85c
...
...
@@ -15,4 +15,4 @@
*
*/
.leaflet-container
.leaflet-control-search
{
position
:
relative
;
float
:
left
;
background
:
#fff
;
color
:
#1978cf
;
-moz-border-radius
:
4px
;
-webkit-border-radius
:
4px
;
border-radius
:
4px
;
background-color
:
rgba
(
255
,
255
,
255
,
.8
);
z-index
:
1000
;
box-shadow
:
0
1px
7px
rgba
(
0
,
0
,
0
,
.65
);
margin-left
:
10px
;
margin-top
:
10px
}
.leaflet-control-search.search-exp
{
box-shadow
:
0
1px
7px
#999
;
background
:
#fff
}
.leaflet-control-search
.search-input
{
display
:
block
;
float
:
left
;
background
:
#fff
;
border
:
1px
solid
#666
;
border-radius
:
2px
;
height
:
18px
;
padding
:
0
18px
0
2px
;
margin
:
3px
0
3px
3px
}
.leaflet-control-search.search-load
.search-input
{
background
:
url(../images/loader.gif)
no-repeat
center
right
#fff
}
.leaflet-control-search.search-load
.search-cancel
{
visibility
:
hidden
}
.leaflet-control-search
.search-cancel
{
display
:
block
;
width
:
22px
;
height
:
18px
;
position
:
absolute
;
right
:
22px
;
margin
:
3px
0
;
background
:
url(../images/search-icon.png)
no-repeat
0
-46px
;
text-decoration
:
none
;
filter
:
alpha
(
opacity
=
80
);
opacity
:
.8
}
.leaflet-control-search
.search-cancel
:hover
{
filter
:
alpha
(
opacity
=
100
);
opacity
:
1
}
.leaflet-control-search
.search-cancel
span
{
display
:
none
;
font-size
:
18px
;
line-height
:
20px
;
color
:
#ccc
;
font-weight
:
700
}
.leaflet-control-search
.search-cancel
:hover
span
{
color
:
#aaa
}
.leaflet-control-search
.search-button
{
display
:
block
;
float
:
left
;
width
:
26px
;
height
:
26px
;
background
:
url(../images/search-icon.png)
no-repeat
2px
2px
;
border-radius
:
4px
}
.leaflet-control-search
.search-button
:hover
{
background
:
url(../images/search-icon.png)
no-repeat
2px
-22px
}
.leaflet-control-search
.search-tooltip
{
position
:
absolute
;
top
:
100%
;
left
:
0
;
float
:
left
;
min-width
:
120px
;
max-height
:
122px
;
box-shadow
:
1px
1px
6px
rgba
(
0
,
0
,
0
,
.4
);
background-color
:
rgba
(
0
,
0
,
0
,
.25
);
z-index
:
1010
;
overflow-y
:
auto
;
overflow-x
:
hidden
}
.leaflet-control-search
.search-tip
{
margin
:
2px
;
padding
:
2px
4px
;
display
:
block
;
color
:
#000
;
background
:
#eee
;
border-radius
:
.25em
;
text-decoration
:
none
;
white-space
:
nowrap
;
vertical-align
:
center
}
.leaflet-control-search
.search-button
:hover
,
.leaflet-control-search
.search-tip-select
,
.leaflet-control-search
.search-tip
:hover
{
background-color
:
#fff
}
.leaflet-control-search
.search-alert
{
cursor
:
pointer
;
clear
:
both
;
font-size
:
.75em
;
margin-bottom
:
5px
;
padding
:
0
.25em
;
color
:
#e00
;
font-weight
:
700
;
border-radius
:
.25em
}
\ No newline at end of file
eaflet-container
.leaflet-control-search
{
position
:
relative
;
float
:
left
;
background
:
#fff
;
color
:
#1978cf
;
-moz-border-radius
:
4px
;
-webkit-border-radius
:
4px
;
border-radius
:
4px
;
background-color
:
rgba
(
255
,
255
,
255
,
.8
);
z-index
:
1000
;
box-shadow
:
0
1px
7px
rgba
(
0
,
0
,
0
,
.65
);
margin-left
:
10px
;
margin-top
:
10px
}
.leaflet-control-search.search-exp
{
box-shadow
:
0
1px
7px
#999
;
background
:
#fff
}
.leaflet-control-search
.search-input
{
display
:
block
;
float
:
left
;
background
:
#fff
;
border
:
1px
solid
#666
;
border-radius
:
2px
;
height
:
18px
;
padding
:
0
18px
0
2px
;
margin
:
3px
0
3px
3px
}
.leaflet-control-search.search-load
.search-input
{
background
:
url(./images/loader.gif)
no-repeat
center
right
#fff
}
.leaflet-control-search.search-load
.search-cancel
{
visibility
:
hidden
}
.leaflet-control-search
.search-cancel
{
display
:
block
;
width
:
22px
;
height
:
18px
;
position
:
absolute
;
right
:
22px
;
margin
:
3px
0
;
background
:
url(./images/search-icon.png)
no-repeat
0
-46px
;
text-decoration
:
none
;
filter
:
alpha
(
opacity
=
80
);
opacity
:
.8
}
.leaflet-control-search
.search-cancel
:hover
{
filter
:
alpha
(
opacity
=
100
);
opacity
:
1
}
.leaflet-control-search
.search-cancel
span
{
display
:
none
;
font-size
:
18px
;
line-height
:
20px
;
color
:
#ccc
;
font-weight
:
700
}
.leaflet-control-search
.search-cancel
:hover
span
{
color
:
#aaa
}
.leaflet-control-search
.search-button
{
display
:
block
;
float
:
left
;
width
:
26px
;
height
:
26px
;
background
:
url(./images/search-icon.png)
no-repeat
2px
2px
;
border-radius
:
4px
}
.leaflet-control-search
.search-button
:hover
{
background
:
url(./images/search-icon.png)
no-repeat
2px
-22px
}
.leaflet-control-search
.search-tooltip
{
position
:
absolute
;
top
:
100%
;
left
:
0
;
float
:
left
;
min-width
:
120px
;
max-height
:
122px
;
box-shadow
:
1px
1px
6px
rgba
(
0
,
0
,
0
,
.4
);
background-color
:
rgba
(
0
,
0
,
0
,
.25
);
z-index
:
1010
;
overflow-y
:
auto
;
overflow-x
:
hidden
}
.leaflet-control-search
.search-tip
{
margin
:
2px
;
padding
:
2px
4px
;
display
:
block
;
color
:
#000
;
background
:
#eee
;
border-radius
:
.25em
;
text-decoration
:
none
;
white-space
:
nowrap
;
vertical-align
:
center
}
.leaflet-control-search
.search-button
:hover
,
.leaflet-control-search
.search-tip-select
,
.leaflet-control-search
.search-tip
:hover
{
background-color
:
#fff
}
.leaflet-control-search
.search-alert
{
cursor
:
pointer
;
clear
:
both
;
font-size
:
.75em
;
margin-bottom
:
5px
;
padding
:
0
.25em
;
color
:
#e00
;
font-weight
:
700
;
border-radius
:
.25em
}
flask_admin/templates/bootstrap2/admin/lib.html
View file @
822dd85c
...
...
@@ -177,8 +177,10 @@
{% if config.MAPBOX_MAP_ID %}
<link
href=
"{{ admin_static.url(filename='vendor/leaflet/leaflet.css') }}"
rel=
"stylesheet"
>
<link
href=
"{{ admin_static.url(filename='vendor/leaflet/leaflet.draw.css') }}"
rel=
"stylesheet"
>
{% if config.MAPBOX_SEARCH %}
<link
href=
"{{ admin_static.url(filename='vendor/leaflet/leaflet.search.css') }}"
rel=
"stylesheet"
>
{% endif %}
{% endif %}
{% if editable_columns %}
<link
href=
"{{ admin_static.url(filename='vendor/x-editable/css/bootstrap2-editable-1.5.1.css') }}"
rel=
"stylesheet"
>
{% endif %}
...
...
@@ -192,11 +194,13 @@
window
.
MAPBOX_ACCESS_TOKEN
=
"{{ config.MAPBOX_ACCESS_TOKEN }}"
;
{
%
endif
%
}
</script>
<script
src=
"https://maps.googleapis.com/maps/api/js?v=3&sensor=false"
></script>
<script
src=
"{{ admin_static.url(filename='vendor/leaflet/leaflet.js') }}"
></script>
<script
src=
"{{ admin_static.url(filename='vendor/leaflet/leaflet.draw.js') }}"
></script>
{% if config.MAPBOX_SEARCH %}
<script
src=
"https://maps.googleapis.com/maps/api/js?v=3&sensor=false"
></script>
<script
src=
"{{ admin_static.url(filename='vendor/leaflet/leaflet.search.js') }}"
></script>
{% endif %}
{% endif %}
<script
src=
"{{ admin_static.url(filename='vendor/bootstrap-daterangepicker/daterangepicker.js') }}"
></script>
{% if editable_columns %}
<script
src=
"{{ admin_static.url(filename='vendor/x-editable/js/bootstrap2-editable-1.5.1.min.js') }}"
></script>
...
...
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