diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-11-09 21:48:46 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-11-09 21:48:46 +0100 |
commit | 9d4c601bfd517ce5da689abb0056157be8250af5 (patch) | |
tree | 3ad45bacbaf0590d7dd1a97a240db9727b40b492 | |
parent | 18dda2927561f32f9f4535a685bff71dd0e6c6dc (diff) | |
download | Chimère - projet Saclay-9d4c601bfd517ce5da689abb0056157be8250af5.tar.bz2 Chimère - projet Saclay-9d4c601bfd517ce5da689abb0056157be8250af5.zip |
Adapt to new permalink management
-rw-r--r-- | static/saclay/css/styles.css | 5 | ||||
-rw-r--r-- | templates/chimere/blocks/map.html | 8 | ||||
-rw-r--r-- | templates/chimere/main_map.html | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/static/saclay/css/styles.css b/static/saclay/css/styles.css index 1ab87b2..d2c6e63 100644 --- a/static/saclay/css/styles.css +++ b/static/saclay/css/styles.css @@ -17,7 +17,7 @@ html, h1, h2, } /* light */ -h2, .cloud h4, #layer_selection, #layer_selection h4, #permalink a, +h2, .cloud h4, #layer_selection, #layer_selection h4, #permalink, #chimere_itinerary_panel label, .ui-menu .ui-menu-item a, #submited-window, #welcome .footer a, label, .map_button a, #marker_hover_content, .notice{ color:#929288; @@ -233,9 +233,6 @@ h3.warn{ border-width:1px; border-style:solid; padding:2px 12px; -} - -#permalink a{ font-weight:normal; } diff --git a/templates/chimere/blocks/map.html b/templates/chimere/blocks/map.html index 99880e9..3633146 100644 --- a/templates/chimere/blocks/map.html +++ b/templates/chimere/blocks/map.html @@ -59,6 +59,7 @@ $("#{{map_id}}").show(); {% if single_category %} $(function() {$('#panel').hide()});{% endif %} + var permalink = window.location.hash.substr(1); var chimere_init_options = { {% if MOBILE %}"mobile": true,{% endif %} {% if enable_clustering %}"enable_clustering": true,{% endif %} @@ -69,8 +70,6 @@ $("#{{map_id}}").show(); "popupContentFull": true, "explicit_popup_hide": true, "map_layers": [{{js_map_layers|safe|escape}}], - 'permalink_label': '{%trans "Permalink"%}', - 'permalink_element': document.getElementById('permalink'), 'routing': {{routing}}, {% if dynamic_categories %}'dynamic_categories': true,{% endif %} {% if default_area %}"default_area": new Array({{default_area.upper_left_corner.x}}, {{default_area.upper_left_corner.y}}, {{default_area.lower_right_corner.x}}, {{default_area.lower_right_corner.y}}),{% endif %} @@ -91,7 +90,8 @@ $("#{{map_id}}").show(); {% if p_current_feature %}"display_feature": {{ p_current_feature }},{% endif %} {% if selected_map_layer %}"selected_map_layer": {{selected_map_layer}},{% endif %} "display_feature_detail_callback": display_feature_detail_callback, - "edition_type_is_route": true + "edition_type_is_route": true, + "permalink": permalink } {% if restricted_extent %}{{ restricted_extent }} chimere_init_options["restricted_extent"] = bounds; @@ -141,7 +141,7 @@ $("#{{map_id}}").show(); $("#{{map_id}}").chimere(chimere_init_options); {% if zoom %} - $('#maps').chimere('zoom', {'area':{{zoom}} }); + if (!permalink) $('#maps').chimere('zoom', {'area':{{zoom}} }); {% endif %} // init layer selection diff --git a/templates/chimere/main_map.html b/templates/chimere/main_map.html index 305c0ee..139ad7f 100644 --- a/templates/chimere/main_map.html +++ b/templates/chimere/main_map.html @@ -91,7 +91,7 @@ {% trans "Draw" %} </a> </div>{% endif %} - <div id='permalink'></div> + <a href='#' id='permalink'><span class='fa fa-chimere-action fa-bookmark'></span></a> {% if simple %} {% display_welcome 0 %} {%else%} |