2022-05-14 19:43:00 +02:00
|
|
|
<input type="text" placeholder="Rechercher..." value="{{ query }}" data-searchsidebar-input="{{ base_url_relative }}{{ config.plugins.simplesearch.route}}/query" />
|
2015-02-18 18:03:05 +01:00
|
|
|
<script>
|
|
|
|
jQuery(document).ready(function($){
|
|
|
|
var input = $('[data-searchsidebar-input]');
|
|
|
|
|
|
|
|
input.on('keypress', function(event) {
|
|
|
|
if (event.which == 13 && input.val().length > 3) {
|
|
|
|
event.preventDefault();
|
2017-04-12 15:06:47 +02:00
|
|
|
window.location.href = input.data('searchsidebar-input') + '{{ config.system.param_sep }}' + input.val();
|
2015-02-18 18:03:05 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|