]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/edit.js
Refactor updatelinks to avoid exceptions in updateLocation
[rails.git] / app / assets / javascripts / edit.js
index f5ada1508ccfc4c7879d76f337da4fc8eb844e30..0b2b329b5d358223c4c1487737a9ad8813a2d768 100644 (file)
@@ -28,5 +28,16 @@ function minimiseMap() {
   handleResize();
 }
 
-$(document).ready(handleResize);
-$(window).resize(handleResize);
+$(document).ready(function () {
+  $(window).resize(handleResize);
+  handleResize();
+
+  $("#search_form").submit(function () {
+    $("#sidebar_title").html(I18n.t('site.sidebar.search_results'));
+    $("#sidebar_content").load($(this).attr("action"), {
+      query: $("#query").val()
+    }, openSidebar);
+
+    return false;
+  });
+});