| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/Engineering/V2/components/com_jce/editor/extensions/browser/js/ |
Upload File : |
(function($){$.widget("ui.searchables",{options:{list:null,items:null,clear:null,sort:null},_init:function(){var self=this,el=this.element,busy;var clear=this.options.clear;if(clear){$(clear).click(function(e){if($(clear).hasClass('clear')){$(clear).removeClass('clear');if($(el).val()){self._reset();$(el).val('');self._trigger('onFind',e,[])}}})}$(el).keyup(function(e){if(!busy){busy=true;window.setTimeout(function(){self._find($(el).val(),e);busy=false},500)}})},_find:function(s,e){var self=this,x=[];$(this.options.clear).toggleClass('clear',!!s);if(/[a-z0-9_\.-]/i.test(s)){$(this.options.items).each(function(){var f=$.String.basename($(this).attr('title')).substring(0,s.length);if(f.toLowerCase()==s.toLowerCase()){if($.inArray(this,x)==-1){x.push(this)}}else{var i=$.inArray(this,x);if(i!=-1){x.splice(i,1)}}})}else{x=[]}if(x.length){x=self._sort(x);self._scroll(x[0])}else{self._reset()}self._trigger('onFind',e,x)},_scroll:function(el){var self=this,$list=$(this.options.list);var pos=$(el).position();var top=$list.scrollTop();$list.css('overflow','hidden').animate({scrollTop:pos.top+top},1000,function(){$list.css('overflow','auto')})},_sort:function(x){var a=[];$(this.options.items).each(function(){if($.inArray(this,x)!=-1){a.push(this)}});return a},_reset:function(){this._scroll($('li:first',this.options.list))},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments)}});$.extend($.ui.searchables,{version:"2.0.21"})})(jQuery);