diff options
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/static/js/ishtar.js | 25 | ||||
-rw-r--r-- | ishtar_common/templates/ishtar/blocks/sheet_simple_map.html | 2 |
2 files changed, 15 insertions, 12 deletions
diff --git a/ishtar_common/static/js/ishtar.js b/ishtar_common/static/js/ishtar.js index 415398b95..0aac181ab 100644 --- a/ishtar_common/static/js/ishtar.js +++ b/ishtar_common/static/js/ishtar.js @@ -1269,18 +1269,21 @@ var displayed_map_msg = "{0} items displayed on the map"; var non_displayed_map_msg = "{0} items not displayed"; var non_displayed_map_link_msg = "(list)"; -var render_map = function(map_id, use_map_limit){ +var render_map = function(map_id, use_map_limit, hide_limit){ var html = ""; - html += "<div class='ishtar-map-top row'>"; - html += "<div class='ishtar-map-info col-sm' id='ishtar-map-info-" + map_id + "'></div>"; - html += "<div class='ishtar-map-limit col-sm form-check'>"; - html += "<input class='form-check-input' type='checkbox' id='ishtar-map-limit-" + map_id + "' "; - if (use_map_limit) html += " checked='checked'"; - html += "/> "; - html += "<label class='form-check-label' for='ishtar-map-limit-" + map_id + "'>"; - html += limit_map_msg.format(number_with_commas(limit_map_nb)); - html += " <i class='fa fa-question-circle' title=\""+ limit_map_help_msg +"\" aria-hidden='true'></i></label>"; - html += "</div></div>"; + if (!hide_limit){ + html += "<div class='ishtar-map-top row'>"; + html += "<div class='ishtar-map-info col-sm' id='ishtar-map-info-" + map_id + "'></div>"; + html += "<div class='ishtar-map-limit col-sm form-check'>"; + html += "<input class='form-check-input' type='checkbox' id='ishtar-map-limit-" + map_id + "' "; + if (use_map_limit) html += " checked='checked'"; + html += "/> "; + html += "<label class='form-check-label' for='ishtar-map-limit-" + map_id + "'>"; + html += limit_map_msg.format(number_with_commas(limit_map_nb)); + html += " <i class='fa fa-question-circle' title=\""+ limit_map_help_msg +"\" aria-hidden='true'></i></label>"; + html += "</div></div>"; + } + html += "<div class='ishtar-table-map' id='" + map_id + "'></div>"; html += "<div class='ishtar-map-popup' id='ishtar-map-popup-" + map_id + "'></div>"; html += render_map_list_modal(map_id); diff --git a/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html b/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html index d0ec50b5f..d94c6024c 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_simple_map.html @@ -5,7 +5,7 @@ <div id="map-content-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}"></div> </div> <script type="text/javascript"> -var html = render_map("map-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}"); +var html = render_map("map-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}", false, true); $("#map-content-{{window_id}}-{{geo_item.SLUG}}-{{geo_item.pk}}").html(html); {% if geo_item.point_source == 'P' or not geo_item.multi_polygon %} var {{geo_item.SLUG}}{{geo_item.pk}} = {{geo_item.point_2d_geojson|safe}}; |