forked from Wavyzz/dolibarr
Fix [ bug #1349 ] AJAX contact selector does not work fine in Project
card
This commit is contained in:
@@ -808,6 +808,7 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton,
|
||||
var input = this.input = $( "<input>" )
|
||||
.insertAfter( select )
|
||||
.val( value )
|
||||
.attr('id', 'inputautocomplete'+select.attr('id'))
|
||||
.autocomplete({
|
||||
delay: 0,
|
||||
minLength: this.options.minLengthToAutocomplete,
|
||||
|
||||
@@ -358,6 +358,13 @@ function ajax_combobox($htmlname, $event=array(), $minLengthToAutocomplete=0)
|
||||
}
|
||||
});
|
||||
$("select#" + htmlname).html(response.value);
|
||||
if (response.num) {
|
||||
var selecthtml_str = response.value;
|
||||
var selecthtml_dom=$.parseHTML(selecthtml_str);
|
||||
$("#inputautocomplete"+htmlname).val(selecthtml_dom[0][0].innerHTML);
|
||||
} else {
|
||||
$("#inputautocomplete"+htmlname).val("");
|
||||
}
|
||||
});
|
||||
}
|
||||
});';
|
||||
|
||||
Reference in New Issue
Block a user