Fix edit links on browse and changeset pages
This commit is contained in:
parent
3ddc803259
commit
daf9166298
2 changed files with 499 additions and 404 deletions
|
@ -7,12 +7,17 @@
|
||||||
coord.lon = <%= @lon %>;
|
coord.lon = <%= @lon %>;
|
||||||
coord.zoom = <%= @zoom %>;
|
coord.zoom = <%= @zoom %>;
|
||||||
<% else -%>
|
<% else -%>
|
||||||
var params = OSM.mapParams();
|
coord = OSM.mapParams();
|
||||||
coord.lat = params.lat;
|
|
||||||
coord.lon = params.lon;
|
|
||||||
coord.zoom = params.zoom;
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
$('#id-embed').attr('src', 'id_iframe#map=' + coord.zoom + '/' + coord.lon + '/' + coord.lat);
|
|
||||||
|
var hash;
|
||||||
|
if (coord.object && coord.object.type !== 'relation') {
|
||||||
|
hash = '#id=' + coord.object.type[0] + coord.object.id;
|
||||||
|
} else {
|
||||||
|
hash = '#map=' + (coord.zoom || 17) + '/' + coord.lon + '/' + coord.lat
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#id-embed').attr('src', 'id_iframe' + hash);
|
||||||
</script>
|
</script>
|
||||||
<% else %>
|
<% else %>
|
||||||
<script type="text/javascript">alert("<%= t 'site.edit.id_not_configured' %>")</script>
|
<script type="text/javascript">alert("<%= t 'site.edit.id_not_configured' %>")</script>
|
||||||
|
|
882
vendor/assets/iD/iD.js
vendored
882
vendor/assets/iD/iD.js
vendored
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue