]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Make close button on route dialogue return to index.
[rails.git] / app / assets / javascripts / index.js
index 66dfa5b6fac3975a2c00daa6b651d76034303ef0..afb6b3d6546b3de788bf0a834c0c6db72ac3b494 100644 (file)
@@ -236,6 +236,10 @@ $(document).ready(function () {
     };
 
     page.load = function() {
+      var params = querystring.parse(location.search.substring(1));
+      if (params.query) {
+        $("#sidebar .search_form input[name=query]").value(params.query);
+      }
       if (!("autofocus" in document.createElement("input"))) {
         $("#sidebar .search_form input[name=query]").focus();
       }