var o = $.extend({
limit: 20,
delay: 50,
- fat_set_item: 0, // use this option to get a fat item json with all
- // relevant data instead of the guaranteed id + name
+ fat_set_item: $real.hasClass('partpicker_fat_set_item'),
}, options);
var STATES = {
UNIQUE: 1,
function ajax_data(term) {
var data = {
- 'filter.all:substr::ilike': term,
+ 'filter.all:substr:multi::ilike': term,
'filter.obsolete': 0,
'filter.unit_obj.convertible_to': $convertible_unit && $convertible_unit.val() ? $convertible_unit.val() : '',
no_paginate: $('#no_paginate').prop('checked') ? 1 : 0,
last_dummy = $dummy.val();
$real.trigger('change');
- if (o.fat_set_item) {
+ if (o.fat_set_item && item.id) {
$.ajax({
url: 'controller.pl?action=Part/show.json',
data: { id: item.id },