Merge pull request #4122 from mrsof/patch-7

FIX: Cannot set property '_renderItem of undefined
This commit is contained in:
Laurent Destailleur 2015-12-03 11:52:30 +01:00
commit 63879c1ca6
2 changed files with 4 additions and 4 deletions

View File

@ -864,8 +864,8 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton,
.addClass( "ui-widget ui-widget-content ui-corner-left dolibarrcombobox" );
input.data("ui-autocomplete")._renderItem = function( ul, item ) {
return $("<li></li>")
.data( "item.autocomplete", item )
return $("<li>")
.data( "ui-autocomplete-item", item ) // jQuery UI > 1.10.0
.append( "<a>" + item.label + "</a>" )
.appendTo( ul );
};

View File

@ -170,8 +170,8 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt
}
,delay: 500
}).data("ui-autocomplete")._renderItem = function( ul, item ) {
return $("<li></li>")
.data( "item.autocomplete", item )
return $("<li>")
.data( "ui-autocomplete-item", item ) // jQuery UI > 1.10.0
.append( \'<a><span class="tag">\' + item.label + "</span></a>" )
.appendTo(ul);
};