summaryrefslogtreecommitdiff
path: root/templates/chimere/main_map.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/chimere/main_map.html')
-rw-r--r--templates/chimere/main_map.html19
1 files changed, 17 insertions, 2 deletions
diff --git a/templates/chimere/main_map.html b/templates/chimere/main_map.html
index 38c4bbe..9dce672 100644
--- a/templates/chimere/main_map.html
+++ b/templates/chimere/main_map.html
@@ -8,6 +8,9 @@
<script src="{{ STATIC_URL }}chimere/js/jquery.chimere.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}saclay/js/SaclayCloud.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}saclay/js/jquery.form.js" type="text/javascript"></script>
+{% if has_search %}
+<script src="{{ STATIC_URL }}saclay/js/search.js" type="text/javascript"></script>
+<script src="{{ STATIC_URL }}chimere/js/search-autocomplete.js" type="text/javascript"></script>{% endif %}
<script type='text/javascript' language='javascript'>
<!--
@@ -26,11 +29,13 @@
</div>
{% comment %}
<!-- SUPPRIME POUR LA VUE MOBILE
- <div id='action-panel'>
+ <div id='action-panel'{% if has_search %} class='three'{% endif %}>
<ul id='map-actions' class='action'>
<li id='action-categories' class='state-active'>
<label>{% trans "Categories" %}</label>
- </li>{% if itinerary_form %}
+ </li>{% if has_search %}<li id='action-search'>
+ <label>{% trans "Search" %}</label>
+ </li>{% endif %}{% if itinerary_form %}
<li id='action-routing'>
<label>{% trans "Routing" %}</label>
</li>{% endif %}
@@ -55,6 +60,7 @@
<div id='categories'>{# dynamic content #}
</div>
</form>
+ <div id='search-box'></div>
{% routing %}
</div>
<div id='edit-panel'>
@@ -108,6 +114,15 @@
<script type="text/javascript">
<!--
$("#main-map").show();
+ var has_search = {% if has_search %}true{% else %}false{% endif %};
+ // array to keep trace of already displayed items
+ var search_result = new Array();
+ var search_url = "/search/";
+ $(function(){
+ if (has_search){
+ load_search_box();
+ }
+ });
// -->
</script>
{% map_menu %}