diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-11-14 16:13:40 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-11-14 16:13:40 +0100 |
| commit | 742152206bef716b9b6afa688b18b81dc7cb5db2 (patch) | |
| tree | 1b2c0b1d93c969f1cfab43b773e9daef2b1ce0c2 | |
| parent | 5ac62ddc8935d853cb4ab49baa9f2cb6b99408a0 (diff) | |
| parent | 594b06d8d8ac5ba6db749e14289425b635b67228 (diff) | |
| download | Chimère - projet Saclay-742152206bef716b9b6afa688b18b81dc7cb5db2.tar.bz2 Chimère - projet Saclay-742152206bef716b9b6afa688b18b81dc7cb5db2.zip | |
Merge branch 'master-v3.0' into saclay-v3.0
Conflicts:
templates/chimere/blocks/map.html
| -rw-r--r-- | static/saclay/css/styles.css | 6 | ||||
| -rw-r--r-- | templates/chimere/blocks/map.html | 11 | ||||
| -rw-r--r-- | templates/chimere/main_map.html | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/static/saclay/css/styles.css b/static/saclay/css/styles.css index a46375f..2c8be22 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; @@ -225,6 +225,7 @@ h3.warn{ } #permalink{ + display: none; position:absolute; z-index:20; right:280px; @@ -233,9 +234,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 20c5d4b..00c5079 100644 --- a/templates/chimere/blocks/map.html +++ b/templates/chimere/blocks/map.html @@ -99,6 +99,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 %} @@ -109,8 +110,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 %} @@ -131,7 +130,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; @@ -181,10 +181,13 @@ $("#{{map_id}}").show(); $("#{{map_id}}").chimere(chimere_init_options); {% if zoom %} - $('#maps').chimere('zoom', {'area':{{zoom}} }); + if (!permalink) $('#{{map_id}}').chimere('zoom', {'area':{{zoom}} }); {% endif %} $('#{{map_id}}').chimere('addJSON', "{{STATIC_URL}}saclay/json/limites.json"); + function update_permalink(){ + $('#{{map_id}}').chimere('update_permalink'); + }; // init layer selection $(function() { diff --git a/templates/chimere/main_map.html b/templates/chimere/main_map.html index 1f22207..67f44f4 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%} |
