Sindbad~EG File Manager
function SGPBSelect2(){this.init()}SGPBSelect2.prototype.init=function(){jQuery(".js-sg-select2").length&&(this.hideProOptions(),jQuery("select.js-sg-select2").each(function(){var e=jQuery(this).attr("data-select-type"),t=(jQuery(this).attr("data-select-class"),{width:"100%"});"ajax"==e&&(t=jQuery.extend(t,{minimumInputLength:1,ajax:{url:SGPB_JS_PARAMS.url,dataType:"json",delay:250,type:"POST",data:function(e){var t=jQuery(this).attr("data-value-param");return{action:"select2_search_data",nonce_ajax:SGPB_JS_PARAMS.nonce,searchTerm:e.term,searchKey:t}},processResults:function(e){return{results:jQuery.map(e.items,function(e){return{text:e.text,id:e.id}})}}}})),jQuery(this).sgpbselect2(t)}))},SGPBSelect2.prototype.hideProOptions=function(){if("undefined"!=typeof SGPB_JS_PACKAGES&&SGPB_JS_PACKAGES.packages.current<SGPB_JS_PACKAGES.packages.platinum){var e=SGPB_JS_PACKAGES.proEvents;if(SGPB_JS_PACKAGES.packages.current<SGPB_JS_PACKAGES.packages.silver)for(var t in e){var a=e[t];jQuery(".sgpb-selectbox-settings option").each(function(){jQuery(this).val()==a&&jQuery(this).attr("disabled","disabled")})}if(void 0===SGPB_JS_PACKAGES.extensions)return}},jQuery(document).ready(function(){new SGPBSelect2});
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists