|
167 | 167 | * @param bypass_check_last_value
|
168 | 168 | * @param reset_current_page
|
169 | 169 | */
|
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) { |
171 | 171 | var result = getFormInfo(form, 'result', options);
|
172 | 172 |
|
173 | 173 | if ($.trim(search_object.value).length && $.trim(search_object.value).length >= options.min_chars_to_search) {
|
|
422 | 422 | }
|
423 | 423 | } else {
|
424 | 424 | // 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); |
426 | 426 | }
|
427 | 427 | });
|
428 | 428 |
|
|
483 | 483 | query.on('focus', function () {
|
484 | 484 | // check if the result is not empty show it
|
485 | 485 | 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); |
487 | 487 | show_result(result, ls);
|
488 | 488 | }
|
489 | 489 | });
|
|
537 | 537 | current_page_lbl.html(new_current_page);
|
538 | 538 |
|
539 | 539 | // search again
|
540 |
| - search_query(query[0], form, ls, true, false); |
| 540 | + search(query[0], form, ls, true, false); |
541 | 541 | });
|
542 | 542 |
|
543 | 543 | // Search again when the items per page dropdown is changed
|
|
546 | 546 | * we need to pass a DOM Element: query[0]
|
547 | 547 | * In this case last value should not check against the current one
|
548 | 548 | */
|
549 |
| - search_query(query[0], form, ls, true, true); |
| 549 | + search(query[0], form, ls, true, true); |
550 | 550 | });
|
551 | 551 |
|
552 | 552 | result.css({left: query.position().left + 1, width: query.outerWidth() - 2});
|
|
642 | 642 |
|
643 | 643 | $(this).on('ajaxlivesearch:search', function (e, params) {
|
644 | 644 | $(this).val(params.query);
|
645 |
| - search_query(this, form, ls, true, true); |
| 645 | + search(this, form, ls, true, true); |
646 | 646 | });
|
647 | 647 | });
|
648 | 648 |
|
|
0 commit comments