Revision 9be50d3a
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
js/autocomplete_part.js | ||
---|---|---|
29 | 29 |
|
30 | 30 |
function ajax_data(term) { |
31 | 31 |
return { |
32 |
'filter.all:substr::ilike': term, |
|
33 |
'filter.type': function() { return $type.val() }, |
|
32 |
'filter.all:substr::ilike': term, |
|
33 |
// due to a bug in $.param functions returning arrays don't get serialized correctly, so call it manually |
|
34 |
'filter.type': $type.val().split(','), |
|
34 | 35 |
'filter.obsolete': 0, |
35 |
column: function() { return $column.val()===undefined ? '' : $column.val() },
|
|
36 |
current: function() { return $real.val() },
|
|
36 |
column: $column.val()===undefined ? '' : $column.val(),
|
|
37 |
current: $real.val(),
|
|
37 | 38 |
} |
38 | 39 |
} |
39 | 40 |
|
templates/webpages/part/test_page.html | ||
---|---|---|
9 | 9 |
[% L.part_picker('part_id2', undef, type='part') %]<br> |
10 | 10 |
Nur Dienstleistungen: <br> |
11 | 11 |
[% L.part_picker('part_id3', undef, type='service') %]<br> |
12 |
Waren und Dienstleistungen: <br> |
|
13 |
[% L.part_picker('part_id4', undef, type='part,service') %]<br> |
Auch abrufbar als: Unified diff
multiple types