Skip to content

Commit

Permalink
fix embed map bug on firefox (#376)
Browse files Browse the repository at this point in the history
fix #207
  • Loading branch information
boney-bun committed Oct 31, 2017
1 parent ddc0aba commit 9135d3d
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions geonode/maps/templates/maps/map_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ <h4>{% trans "Embed this map" %}</h4>
data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
Embed Map <span class="caret"></span></button>
<ul class="dropdown-menu btn-block">
<li>
<a href="javascript:$('#embed-iframe').modal()">Embed Iframe Link</a></li>
<li>
<a href="javascript:$('#embed-widget').modal()">Embed Widget Link</a></li>
<ul class="dropdown-menu btn-block" id="embed-map-list">
<li id="embed-iframe-link">
<a href="#">Embed Iframe Link</a></li>
<li id="embed-widget-link">
<a href="#">Embed Widget Link</a></li>
<li>
<a href="{% url 'map_download_leaflet' resource.id %}">Download Leaflet page</a></li>
</ul>
Expand Down Expand Up @@ -412,6 +412,15 @@ <h4 class="modal-title" id="myModalLabel">{% trans "Embed Widget" %}</h4>
createMapThumbnail();
$('#edit-map').modal('toggle');
});
$('#embed-map-list li').click(function(){
if ($(this).attr('id') === 'embed-iframe-link')
{
$('#embed-iframe').modal('toggle');
}
else if ($(this).attr('id') === 'embed-widget-link') {
$('#embed-widget').modal('toggle');
}
});
</script>

{% endblock %}

0 comments on commit 9135d3d

Please sign in to comment.