芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/.trash/media.8/legacy/js/ajax-chosen.min.js
!function(e){e.fn.ajaxChosen=function(t,n,a){var r,o,i,l;return null==t&&(t={}),null==n&&(n={}),null==a&&(a=function(){}),o={minTermLength:3,afterTypeDelay:500,jsonTermKey:"term",keepTypingMsg:Joomla.Text._("JGLOBAL_KEEP_TYPING"),lookingForMsg:Joomla.Text._("JGLOBAL_LOOKING_FOR")},l=this,r=null,i=e.extend({},o,e(l).data(),t),this.jchosen(a||{}),this.each((function(){return e(this).next(".chosen-container").find(".search-field > input, .chosen-search > input").bind("keyup",(function(){var t,a,o,s,u;return s=e(this).val(),a=(u=e.trim(e(this).val())).length<i.minTermLength?i.keepTypingMsg:i.lookingForMsg+" '"+u+"'",l.next(".chosen-container").find(".no-results").text(a),u!==e(this).data("prevVal")&&(e(this).data("prevVal",u),this.timer&&clearTimeout(this.timer),!(u.length<i.minTermLength)&&(t=e(this),null==i.data&&(i.data={}),i.data[i.jsonTermKey]=u,null!=i.dataCallback&&(i.data=i.dataCallback(i.data)),o=i.success,i.success=function(a){var r,i,u;if(null!=a)return u=[],l.find("option").each((function(){return e(this).is(":selected")?u.push(e(this).val()+"-"+e(this).text()):e(this).remove()})),l.find("optgroup:empty").each((function(){return e(this).remove()})),r=n.apply(null,a),i=0,e.each(r,(function(t,n){var a,r,o;return i++,n.group?((a=l.find("optgroup[label='"+n.text+"']")).size()||(a=e("<optgroup />")),a.attr("label",n.text).appendTo(l),e.each(n.items,(function(t,n){var r,o;if("string"==typeof n?(o=t,r=n):(o=n.value,r=n.text),-1===e.inArray(o+"-"+r,u))return e("<option />").attr("value",o).html(r).appendTo(a)}))):("string"==typeof n?(o=t,r=n):(o=n.value,r=n.text),-1===e.inArray(o+"-"+r,u)?e("<option />").attr("value",o).html(r).appendTo(l):void 0)})),i?l.trigger("chosen:updated"):(l.data().jchosen.no_results_clear(),l.data().jchosen.no_results(t.val())),null!=o&&o(a),t.val(s)},this.timer=setTimeout((function(){return r&&r.abort(),r=e.ajax(i)}),i.afterTypeDelay)))}))}))}}(jQuery),jQuery(document).ready((function(e){if(Joomla.getOptions("ajax-chosen")){var t=Joomla.getOptions("ajax-chosen");e(t.selector).ajaxChosen({type:t.type,url:t.url,dataType:t.dataType,jsonTermKey:t.jsonTermKey,afterTypeDelay:t.afterTypeDelay,minTermLength:t.minTermLength},(function(t){var n=[];return e.each(t,(function(e,t){n.push({value:t.value,text:t.text})})),n}))}}));