Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix embed map bug on firefox #376

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 %}