mirror of
https://github.com/YunoHost-Apps/webtrees_ynh.git
synced 2024-09-03 18:26:37 +02:00
1 line
No EOL
546 B
JavaScript
1 line
No EOL
546 B
JavaScript
(function(b){function g(d,a){var f=new RegExp(b.ui.autocomplete.escapeRegex(a),"i");return b.grep(d,function(c){return f.test(b("<div>").html(c.label||c.value||c).text())})}var h=b.ui.autocomplete.prototype,e=h._initSource;b.extend(h,{_initSource:function(){this.options.html&&b.isArray(this.options.source)?this.source=function(d,c){c(g(this.options.source,d.term))}:e.call(this)},_renderItem:function(d,a){return b("<li></li>").data("item.autocomplete",a).append(b("<a></a>")[this.options.html?"html":"text"](a.label)).appendTo(d)}})})(jQuery); |