From: Sven Schöling Date: Mon, 23 Jan 2017 15:36:16 +0000 (+0100) Subject: Reste von altem autocomplete feature entfernt X-Git-Tag: release-3.5.4~1631 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a9c191deed45bf13c5a6983ad0409fd7cb0e86d3;p=kivitendo-erp.git Reste von altem autocomplete feature entfernt --- diff --git a/SL/IC.pm b/SL/IC.pm index ce3bc00a8..08dfe1237 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -602,7 +602,7 @@ SQL $main::lxdebug->leave_sub(); - return @{ $form->{parts} }; + return $form->{parts}; } sub _create_filter_for_priceupdate { diff --git a/bin/mozilla/ic.pl b/bin/mozilla/ic.pl index 320538229..8f4702cd1 100644 --- a/bin/mozilla/ic.pl +++ b/bin/mozilla/ic.pl @@ -668,25 +668,6 @@ sub generate_report { $lxdebug->leave_sub(); } #end generate_report -sub ajax_autocomplete { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my %myconfig = %main::myconfig; - - $form->{column} = 'description' unless $form->{column} =~ /^partnumber|description$/; - $form->{$form->{column}} = $form->{q} || ''; - $form->{limit} = ($form->{limit} * 1) || 10; - $form->{searchitems} ||= ''; - - my @results = IC->all_parts(\%myconfig, $form); - - print $form->ajax_response_header(), - $form->parse_html_template('ic/ajax_autocomplete'); - - $main::lxdebug->leave_sub(); -} - sub back_to_record { _check_io_auth(); diff --git a/scripts/locales.pl b/scripts/locales.pl index 29319632f..105ca7cae 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -57,7 +57,7 @@ our $missing = {}; our @lost = (); my %ignore_unused_templates = ( - map { $_ => 1 } qw(ct/testpage.html generic/autocomplete.html oe/periodic_invoices_email.txt part/testpage.html t/render.html t/render.js task_server/failure_notification_email.txt + map { $_ => 1 } qw(ct/testpage.html oe/periodic_invoices_email.txt part/testpage.html t/render.html t/render.js task_server/failure_notification_email.txt failed_background_jobs_report/email.txt) ); diff --git a/templates/webpages/generic/autocomplete.html b/templates/webpages/generic/autocomplete.html deleted file mode 100644 index 5bd35c0b2..000000000 --- a/templates/webpages/generic/autocomplete.html +++ /dev/null @@ -1,58 +0,0 @@ -[%#- - Autocompletion - - This template enables auto completion for input fields. - Calling Syntax is: - - INCLUDE 'generic/autocomplete', [ - { SPEC_1 }, - { SPEC_2 }, - ... - ] - - where SPEC is a hash containing the following keys: - - script : the script that is called for autocompletion, defaults to the invoking script - action : action in the ajax script, defaults to 'ajax_autocomplete' - selector : a jquery selector, specifying the input fields - column : specifies the column that is represented by the bound field. typically description or name. - params : additional params that should be included in the request, like customer/vendor information. expects a hash. - - TODO FIELDS: - - addition fields like type, vc etc. - - additional dependencies, see jquery.autocomplete documentation - - hook function on select, again see jquery documentation - - limit: maximum number of results shown. - - a simple SPEC would look like this: - - { selector => '#description', column => 'description' } - # field with id="description" should be autocompleted with descriptions - - { script => 'ic.pl', selector => '[name^="partnumber_"]', column => 'partnumber' } - # let ic.pl autocomplete by partnumbers, bind this to all fields where the name begins with "partnumber_" - - - - The Backend Side - - The called function will recieve the queried string as hashkey "q" in form, as well as every other param specified here. - It should generate a generic ajax header (see form), followed by newline separated list of possible completion values. - -%] - diff --git a/templates/webpages/ic/ajax_autocomplete.html b/templates/webpages/ic/ajax_autocomplete.html deleted file mode 100644 index 5bbd3b622..000000000 --- a/templates/webpages/ic/ajax_autocomplete.html +++ /dev/null @@ -1,6 +0,0 @@ -[%- USE HTML %] -[%- FOREACH part = parts %] -[% IF loop.count < limit %] -[% part.$column %] -[%- END %] -[%- END %]