Commit 1d6a7be1 authored by Romain Loth's avatar Romain Loth

[FIX] do not overwrite jquery's autocomplete prototype for a specific search...

[FIX] do not overwrite jquery's autocomplete prototype for a specific search box otherwise can't reuse it elsewhere
parent 97d7cf0a
......@@ -376,14 +376,14 @@ TinaWebJS = function ( sigmacanvas ) {
var SelInst = new SelectionEngine();
$.ui.autocomplete.prototype._renderItem = function(ul, item) {
var searchVal = $("#searchinput").val();
var desc = extractContext(item.desc, searchVal);
return $('<li onclick=\'var s = "'+item.label+'"; search(s);$("#searchinput").val(strSearchBar);\'></li>')
.data('item.autocomplete', item)
.append("<a><span class=\"labelresult\">" + item.label + "</span></a>" )
.appendTo(ul);
};
//~ $.ui.autocomplete.prototype._renderItem = function(ul, item) {
//~ var searchVal = $("#searchinput").val();
//~ var desc = extractContext(item.desc, searchVal);
//~ return $('<li onclick=\'var s = "'+item.label+'"; search(s);$("#searchinput").val(strSearchBar);\'></li>')
//~ .data('item.autocomplete', item)
//~ .append("<a><span class=\"labelresult\">" + item.label + "</span></a>" )
//~ .appendTo(ul);
//~ };
$('input#searchinput').autocomplete({
source: function(request, response) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment