Clean up search JS
Move it to index.js/edit.js and eliminate the global doSearch function. Not enough code is shared to justify it.
This commit is contained in:
parent
e83d43ca82
commit
605c700895
4 changed files with 32 additions and 34 deletions
|
@ -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;
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue