for autocompletion. You may comma separate multiple types as in
C<part,assembly>.
+If C<%params> contains C<status> only parts of this status will be used
+for autocompletion. C<status> can be one of the following strings:
+C<active>, C<obsolete> or C<all>. C<active> is the default if C<status> is
+not given.
+
If C<%params> contains C<unit> only parts with this unit will be used
for autocompletion. You may comma separate multiple units as in
C<h,min>.
ajax_data: function(term) {
var data = {
'filter.all:substr:multi::ilike': term,
- 'filter.obsolete': 0,
current: this.$real.val(),
};
if (this.o.part_type)
data['filter.part_type'] = this.o.part_type.split(',');
+ if (this.o.status) {
+ if (this.o.status == 'active') data['filter.obsolete'] = 0;
+ if (this.o.status == 'obsolete') data['filter.obsolete'] = 1;
+ } else
+ data['filter.obsolete'] = 0;
+
if (this.o.classification_id)
data['filter.classification_id'] = this.o.classification_id.split(',');
[% P.part.picker('part_id13', undef, classification_id='4') %]<br>
Artikel-Klassifizierung: Eink.,Verk.,Prod. <br>
[% P.part.picker('part_id14', undef, classification_id='1,2,4') %]<br>
+Artikel-Status: Aktiv (default)<br>
+[% P.part.picker('part_id15') %]<br>
+Artikel-Status: Aktiv< (explizit)<br>
+[% P.part.picker('part_id16', undef, status="active") %]<br>
+Artikel-Status: Ungültig<br>
+[% P.part.picker('part_id17', undef, status="obsolete") %]<br>
+Artikel-Status: Alle<br>
+[% P.part.picker('part_id18', undef, status="all") %]<br>
+
Pre-filled:<br>
[% P.part.picker('part_id6', pre_filled_part) %]<br>
Convertible unit 'Std': (only select parts with unit Tag/Std/Min)<br>