Revision 3cecb906
Von Sven Schöling vor fast 15 Jahren hinzugefügt
bin/mozilla/ct.pl | ||
---|---|---|
714 | 714 |
$main::lxdebug->leave_sub(); |
715 | 715 |
} |
716 | 716 |
|
717 |
sub ajax_autocomplete { |
|
718 |
$main::lxdebug->enter_sub(); |
|
719 |
|
|
720 |
my $form = $main::form; |
|
721 |
my %myconfig = %main::myconfig; |
|
722 |
|
|
723 |
$form->{column} = 'name' unless $form->{column} =~ /^name$/; |
|
724 |
$form->{vc} = 'customer' unless $form->{vc} =~ /^customer|vendor$/; |
|
725 |
$form->{db} = $form->{vc}; # CT expects this |
|
726 |
$form->{$form->{column}} = $form->{q} || ''; |
|
727 |
$form->{limit} = ($form->{limit} * 1) || 10; |
|
728 |
$form->{searchitems} ||= ''; |
|
729 |
|
|
730 |
CT->search(\%myconfig, $form); |
|
731 |
|
|
732 |
print $form->ajax_response_header(), |
|
733 |
$form->parse_html_template('ct/ajax_autocomplete'); |
|
734 |
|
|
735 |
$main::lxdebug->leave_sub(); |
|
736 |
} |
|
737 |
|
|
717 | 738 |
sub continue { call_sub($main::form->{nextsub}); } |
Auch abrufbar als: Unified diff
ajax_autocomplete für Kunden/Lieferanten.