Fix "where am I" on the edit page
This commit is contained in:
parent
25792ba304
commit
9d68b65cd3
1 changed files with 15 additions and 2 deletions
|
@ -7,12 +7,25 @@ function minimiseMap() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#search_form").submit(function () {
|
$("#search_form").submit(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
$("#sidebar_title").html(I18n.t('site.sidebar.search_results'));
|
$("#sidebar_title").html(I18n.t('site.sidebar.search_results'));
|
||||||
$("#sidebar_content").load($(this).attr("action"), {
|
$("#sidebar_content").load($(this).attr("action"), {
|
||||||
query: $("#query").val()
|
query: $("#query").val()
|
||||||
}, openSidebar);
|
}, openSidebar);
|
||||||
|
});
|
||||||
|
|
||||||
return false;
|
$("#describe_location").click(function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
var mapParams = OSM.mapParams();
|
||||||
|
|
||||||
|
$("#sidebar_title").html(I18n.t('site.sidebar.search_results'));
|
||||||
|
$("#sidebar_content").load($(this).attr("href"), {
|
||||||
|
lat: mapParams.lat,
|
||||||
|
lon: mapParams.lng,
|
||||||
|
zoom: mapParams.zoom
|
||||||
|
}, openSidebar);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue