2
0
forked from Wavyzz/dolibarr

Fix [ bug #1349 ] AJAX contact selector does not work fine in Project

card
This commit is contained in:
Florian HENRY
2014-06-17 11:18:30 +02:00
parent 11cb23f4ac
commit 0f77fbaea2
3 changed files with 9 additions and 0 deletions

View File

@@ -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,

View File

@@ -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("");
}
});
}
});';