force zoom when clicking on edit button in changeset view

This commit is contained in:
Laura Klünder 2017-06-18 23:21:23 +02:00
parent c75c52ea44
commit 9c8028c770
2 changed files with 3 additions and 2 deletions

View file

@ -98,7 +98,6 @@ editor = {
};
},
sidebar_get: function(location, no_push) {
if (location === '') return;
// load a new page into the sidebar using a GET request
if (!no_push) history.pushState({}, '', location);
editor._sidebar_unload();
@ -199,6 +198,8 @@ editor = {
// listener for link-clicks in the sidebar.
e.preventDefault();
if (editor._loading_geometry) return;
if ($(this).attr('href') === '') return;
if ($(this).is('[data-force-next-zoom]')) editor._next_zoom = true;
editor.sidebar_get($(this).attr('href'));
},
_sidebar_submit_btn_click: function() {

View file

@ -17,7 +17,7 @@
<tr>
<th colspan="3">
{% if group.edit_url %}
<a class="btn btn-default btn-xs pull-right" href="{{ group.edit_url }}">
<a class="btn btn-default btn-xs pull-right" data-force-next-zoom href="{{ group.edit_url }}">
{% trans 'Edit' %}
</a>
{% endif %}