Wordpress/wp-admin/js/user-suggest.js
Andrew Nacin 245b0655d2 Remove user/site suggestions (autocompletion) from search inputs, as the UX isn't proper.
* Removes all instances of site-search, so away it goes. Sidesteps a number of bugs with site-search.
 * Renames user-search to user-suggest, which means it better describes the current behavior (autocompletion) while allowing for future behavior (instant search).
 * Ties user suggestions to a single .wp-suggest-user class.

with help from markjaquith, helenyhou, wonderboymusic. 
fixes #20835.



git-svn-id: https://develop.svn.wordpress.org/trunk@21003 602fd350-edb4-49c9-b593-d223f7449a82
2012-06-05 18:51:33 +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})});