From 579f58424a31d4f0c8784b483d13398d5490fc2b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 28 Jan 2014 16:42:58 +0100 Subject: [PATCH] PartPicker: nach Artikelauswahl custom event 'set_item:PartPicker' mit item-Daten verschicken --- SL/Controller/Part.pm | 1 + js/autocomplete_part.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 () { -- 2.20.1