From: Moritz Bunkus Date: Tue, 28 Jan 2014 15:42:58 +0000 (+0100) Subject: PartPicker: nach Artikelauswahl custom event 'set_item:PartPicker' mit item-Daten... X-Git-Tag: release-3.1.0beta1~17 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=579f58424a31d4f0c8784b483d13398d5490fc2b;p=kivitendo-erp.git PartPicker: nach Artikelauswahl custom event 'set_item:PartPicker' mit item-Daten verschicken --- diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index 60bebd4c1..6b76252cc 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -50,6 +50,7 @@ sub action_ajax_autocomplete { partnumber => $_->partnumber, description => $_->description, type => $_->type, + unit => $_->unit, } } @{ $self->parts }; # neato: if exact match triggers we don't even need the init_parts diff --git a/js/autocomplete_part.js b/js/autocomplete_part.js index 04af286b2..158f8bd37 100644 --- a/js/autocomplete_part.js +++ b/js/autocomplete_part.js @@ -71,7 +71,7 @@ namespace('kivi', function(k){ state = STATES.PICKED; last_real = $real.val(); last_dummy = $dummy.val(); - $real.trigger('change'); + $real.trigger('change').trigger('set_item:PartPicker', item); } function make_defined_state () {