Wordpress/wp-admin/js/user-search.js
2012-06-04 14:58:23 +00:00

1 line
777 B
JavaScript

jQuery(function(d){var f=typeof(current_site_id)!="undefined"?"&site_id="+current_site_id:"",c=!!("undefined"!=typeof isRtl&&isRtl),a=c?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},b=function(h,g){d(this).addClass("open")},e=function(h,g){d(this).removeClass("open")};d("#adduser-email, #newuser").autocomplete({source:ajaxurl+"?action=autocomplete-user&autocomplete_type=add"+f,delay:500,minLength:2,position:a,open:b,close:e});d("#user-search-input").autocomplete({source:ajaxurl+"?action=autocomplete-user&autocomplete_type=search"+f,delay:500,minLength:2,position:a,open:b,close:e});d("#all-user-search-input").autocomplete({source:ajaxurl+"?action=autocomplete-user&autocomplete_type=search-all"+f,delay:500,minLength:2,position:a,open:b,close:e})});