Skip to content
This repository was archived by the owner on Jul 17, 2022. It is now read-only.

Commit c9cf070

Browse files
committed
Renaming search_query function to search
1 parent ab3aae7 commit c9cf070

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

js/ajaxlivesearch.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
* @param bypass_check_last_value
168168
* @param reset_current_page
169169
*/
170-
function search_query(search_object, form, options, bypass_check_last_value, reset_current_page) {
170+
function search(search_object, form, options, bypass_check_last_value, reset_current_page) {
171171
var result = getFormInfo(form, 'result', options);
172172

173173
if ($.trim(search_object.value).length && $.trim(search_object.value).length >= options.min_chars_to_search) {
@@ -422,7 +422,7 @@
422422
}
423423
} else {
424424
// If something other than enter is pressed start search immediately
425-
search_query(this, form, ls, false, true);
425+
search(this, form, ls, false, true);
426426
}
427427
});
428428

@@ -483,7 +483,7 @@
483483
query.on('focus', function () {
484484
// check if the result is not empty show it
485485
if ($.trim(query.val()).length && (result.is(":hidden") || result.is(":animated")) && result.find("tr").length !== 0) {
486-
search_query(this, form, ls, false, true);
486+
search(this, form, ls, false, true);
487487
show_result(result, ls);
488488
}
489489
});
@@ -537,7 +537,7 @@
537537
current_page_lbl.html(new_current_page);
538538

539539
// search again
540-
search_query(query[0], form, ls, true, false);
540+
search(query[0], form, ls, true, false);
541541
});
542542

543543
// Search again when the items per page dropdown is changed
@@ -546,7 +546,7 @@
546546
* we need to pass a DOM Element: query[0]
547547
* In this case last value should not check against the current one
548548
*/
549-
search_query(query[0], form, ls, true, true);
549+
search(query[0], form, ls, true, true);
550550
});
551551

552552
result.css({left: query.position().left + 1, width: query.outerWidth() - 2});
@@ -642,7 +642,7 @@
642642

643643
$(this).on('ajaxlivesearch:search', function (e, params) {
644644
$(this).val(params.query);
645-
search_query(this, form, ls, true, true);
645+
search(this, form, ls, true, true);
646646
});
647647
});
648648

0 commit comments

Comments
 (0)