summaryrefslogtreecommitdiff
path: root/chimere/templates
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-05-16 18:28:17 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-05-16 18:28:17 +0200
commit0afeb1336987ae644a9fbb66c24c0d35c739b360 (patch)
treeebe40526588085496f30fca27a5b72d03cbec847 /chimere/templates
parent173f32bfffbdbe3861e81681e8ee8c3a1afde737 (diff)
downloadChimère-0afeb1336987ae644a9fbb66c24c0d35c739b360.tar.bz2
Chimère-0afeb1336987ae644a9fbb66c24c0d35c739b360.zip
Extra JS in map configuration
Diffstat (limited to 'chimere/templates')
-rw-r--r--chimere/templates/chimere/blocks/map.html36
1 files changed, 33 insertions, 3 deletions
diff --git a/chimere/templates/chimere/blocks/map.html b/chimere/templates/chimere/blocks/map.html
index 1b18e3e..c6c7179 100644
--- a/chimere/templates/chimere/blocks/map.html
+++ b/chimere/templates/chimere/blocks/map.html
@@ -1,4 +1,17 @@
{% load i18n %}
+<div id='category_description' class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-label="{% trans "Close" %}"><span aria-hidden="true">&times;</span></button>
+ <h4 class="modal-title" id="category_description-label"></h4>
+ </div>
+ <div class="modal-body" id="category_description-content">
+ </div>
+ </div>
+ </div>
+</div>
+
<div id='{{map_id}}'></div>
<script type="text/javascript">
$("#{{map_id}}").show();
@@ -23,7 +36,11 @@ $(function(){
</div>
<script type="text/javascript">
{% if not display_category_menu %}
- $(function() {$('#panel').hide()});{% endif %}
+ $(function() {
+ $('#panel').hide();
+ $(".show-hide-panel").hide();
+ $("#categories-lnk").hide();
+ });{% endif %}
var chimere_init_options = {};
{% if MOBILE %}chimere_init_options["mobile"] = true;{% endif %}
{% if enable_clustering %}chimere_init_options["enable_clustering"] = true;{% endif %}
@@ -46,7 +63,9 @@ $(function(){
{% if p_routing_steps %}chimere_init_options["routing_steps_lonlat"] = [{{ p_routing_steps }}];{% endif %}
{% if p_routing_transport %}chimere_init_options["routing_transport"] = "{{ p_routing_transport }}";{% endif %}
{% if p_routing_speed %}chimere_init_options["routing_speed"] = "{{ p_routing_speed }}";{% endif %}
- chimere_init_options["icon_offset"] = [{{icon_offset_x}}, {{icon_offset_y}}];
+ //chimere_init_options["icon_offset"] = new OpenLayers.Pixel({{icon_offset_x}},
+ // {{icon_offset_y}});
+ chimere_init_options["icon_offset"] = ({{icon_offset_x}}, {{icon_offset_y}});
chimere_init_options["dynamic_categories"] = {{ dynamic_categories }};
{% if p_display_submited %}chimere_init_options["display_submited"] = {{ p_display_submited }};{% endif %}
chimere_init_options["checked_categories"] = [{% for cc in checked_categories %}{% if forloop.counter0 > 0 %}, {% endif %}{{cc}}{% endfor %}];
@@ -61,13 +80,22 @@ $(function(){
{% if selected_map_layer %}
chimere_init_options["selected_map_layer"] = {{selected_map_layer}};
{% endif %}
+
+ $('#category_description').modal({show:false});
+ chimere_init_options["open_dialog_fx"] = function (title, content){
+ $('#category_description-content').html(content);
+ $('#category_description-label').html(title);
+ $('#category_description').modal('show');
+ }
$("#main-map").chimere(chimere_init_options);
{% if zoom %}
$('#maps').chimere('zoom', {'area':{{zoom}} });
{% endif %}
+ {{extra_map_def|safe}}
+
// init layer selection
- $(function() {
+ /* $(function() {
{% for layer_name, js, def in map_layers %}
$('#layer_list').append("<li><input type='radio' value='{{forloop.counter0}}' name='layer_type' id='layer_{{forloop.counter}}'{% if def %} checked='checked'{% endif %}><label for='layer_{{forloop.counter}}'>{{layer_name}}</li>");{% endfor %}
{% for subcat in subcat_layer %}
@@ -87,7 +115,9 @@ $(function(){
$('#'+$(this).val()).trigger('click');
$('#'+$(this).val()).prop("checked", this.checked);
});
+ highlight_selected_categories();
});
+ */
</script>
<div id='marker_hover'><div id='marker_hover_content'></div></div>
<div id='cluster_list'></div>