Fix edit links on browse and changeset pages

This commit is contained in:
John Firebaugh 2013-04-18 14:30:22 -07:00
parent 3ddc803259
commit daf9166298
2 changed files with 499 additions and 404 deletions

View file

@ -7,12 +7,17 @@
coord.lon = <%= @lon %>;
coord.zoom = <%= @zoom %>;
<% else -%>
var params = OSM.mapParams();
coord.lat = params.lat;
coord.lon = params.lon;
coord.zoom = params.zoom;
coord = OSM.mapParams();
<% 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>
<% else %>
<script type="text/javascript">alert("<%= t 'site.edit.id_not_configured' %>")</script>

888
vendor/assets/iD/iD.js vendored

File diff suppressed because it is too large Load diff