From: Sven Schöling Date: Thu, 11 Jul 2013 08:34:00 +0000 (+0200) Subject: multiple types X-Git-Tag: release-3.1.0beta1~179 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9be50d3a150fde70377e0f10bc25d10cd155557b;p=kivitendo-erp.git multiple types --- diff --git a/js/autocomplete_part.js b/js/autocomplete_part.js index 00bdc5dd6..8e95d8d47 100644 --- a/js/autocomplete_part.js +++ b/js/autocomplete_part.js @@ -29,11 +29,12 @@ namespace('kivi', function(k){ function ajax_data(term) { return { - 'filter.all:substr::ilike': term, - 'filter.type': function() { return $type.val() }, + 'filter.all:substr::ilike': term, + // due to a bug in $.param functions returning arrays don't get serialized correctly, so call it manually + 'filter.type': $type.val().split(','), 'filter.obsolete': 0, - column: function() { return $column.val()===undefined ? '' : $column.val() }, - current: function() { return $real.val() }, + column: $column.val()===undefined ? '' : $column.val(), + current: $real.val(), } } diff --git a/templates/webpages/part/test_page.html b/templates/webpages/part/test_page.html index 3d285185e..202b5d3cd 100644 --- a/templates/webpages/part/test_page.html +++ b/templates/webpages/part/test_page.html @@ -9,3 +9,5 @@ Nur Waren:
[% L.part_picker('part_id2', undef, type='part') %]
Nur Dienstleistungen:
[% L.part_picker('part_id3', undef, type='service') %]
+Waren und Dienstleistungen:
+[% L.part_picker('part_id4', undef, type='part,service') %]