From: Bernd Bleßmann Date: Fri, 19 Jul 2019 12:07:34 +0000 (+0200) Subject: PartPicker: Mehrfachauswahl: Ursprüngliche Filter für Dialog merken. X-Git-Tag: release-3.5.6.1~551 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1f6dae289732896411da0c63ad173a17cb968e22;p=kivitendo-erp.git PartPicker: Mehrfachauswahl: Ursprüngliche Filter für Dialog merken. Damit klappt das auch hier mit der Suche nach gültigen/ungültigen/allen Artikeln. --- 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 @@ - +
[%- 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) %]