kivitendo/js/quicksearch_input.js @ fd71c09e
68dbf4a4 | Sven Schöling | function on_keydown_quicksearch(event) {
|
||
bbf383bf | Moritz Bunkus | var key;
|
||
68dbf4a4 | Sven Schöling | var element = $(this);
|
||
bbf383bf | Moritz Bunkus | |||
if (window.event)
|
||||
key = window.event.keyCode; // IE
|
||||
else
|
||||
key = event.which; // Firefox
|
||||
if (key != 13)
|
||||
return true;
|
||||
var search_term = $(element);
|
||||
var value = search_term.val();
|
||||
if (!value)
|
||||
return true;
|
||||
var url = "ct.pl?action=list_contacts&INPUT_ENCODING=utf-8&filter.status=active&search_term=" + encodeURIComponent(value);
|
||||
window.location.href = url;
|
||||
return false;
|
||||
}
|
||||
68dbf4a4 | Sven Schöling | $(function(){ $('#frame_header_contact_search').keydown(on_keydown_quicksearch) });
|