From 1f6dae289732896411da0c63ad173a17cb968e22 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 19 Jul 2019 14:07:34 +0200 Subject: [PATCH] =?utf8?q?PartPicker:=20Mehrfachauswahl:=20Urspr=C3=BCngli?= =?utf8?q?che=20Filter=20f=C3=BCr=20Dialog=20merken.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Damit klappt das auch hier mit der Suche nach gültigen/ungültigen/allen Artikeln. --- SL/Controller/Part.pm | 2 -- js/kivi.Part.js | 5 +++++ templates/webpages/part/_multi_items_dialog.html | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/SL/Controller/Part.pm b/SL/Controller/Part.pm index 95951617f..2b5ac56c5 100644 --- a/SL/Controller/Part.pm +++ b/SL/Controller/Part.pm @@ -407,8 +407,6 @@ sub action_show_multi_items_dialog { sub action_multi_items_update_result { my $max_count = 100; - $::form->{multi_items}->{filter}->{obsolete} = 0; - my $count = $_[0]->multi_items_models->count; if ($count == 0) { diff --git a/js/kivi.Part.js b/js/kivi.Part.js index 0b0185bf3..e8a721d29 100644 --- a/js/kivi.Part.js +++ b/js/kivi.Part.js @@ -687,6 +687,11 @@ namespace('kivi.Part', function(ns) { var self = this; var data = $('#multi_items_form').serializeArray(); data.push({ name: 'type', value: self.pp.type }); + var ppdata = self.pp.ajax_data(function(){ + var val = $('#multi_items_filter').val(); + return val === undefined ? '' : val + }); + $.each(Object.keys(ppdata), function() {data.push({ name: 'multi_items.' + this, value: ppdata[this]});}); $.ajax({ url: 'controller.pl?action=Part/multi_items_update_result', data: data, diff --git a/templates/webpages/part/_multi_items_dialog.html b/templates/webpages/part/_multi_items_dialog.html index e2a90dfc9..dfaeb949c 100644 --- a/templates/webpages/part/_multi_items_dialog.html +++ b/templates/webpages/part/_multi_items_dialog.html @@ -5,7 +5,7 @@ - + -- 2.20.1
[%- LxERP.t8("Description") %]/[%- LxERP.t8("Partnumber") %]:[%- L.input_tag('multi_items.filter.all:substr:multi::ilike', SELF.multi_items_models.filtered.laundered.all_substr_multi__ilike) %][%- L.input_tag('multi_items_filter', SELF.multi_items_models.filtered.laundered.all_substr_multi__ilike) %] [%- LxERP.t8("Partsgroup") %] [%- L.select_tag('multi_items.filter.partsgroup_id', all_partsgroups, title_key='partsgroup', value_key='id', with_empty=1) %]