2012-02-10 09:45:17 +01:00
|
|
|
jQuery( function($) {
|
|
|
|
var id = typeof( current_site_id ) != 'undefined' ? '&site_id=' + current_site_id : '';
|
|
|
|
|
|
|
|
$( '#adduser-email, #newuser' ).autocomplete({
|
2012-03-24 05:54:58 +01:00
|
|
|
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=add' + id,
|
2012-02-10 09:45:17 +01:00
|
|
|
delay: 500,
|
2012-05-02 23:33:43 +02:00
|
|
|
minLength: 2,
|
|
|
|
open: function(e, ui) { $(this).addClass('open'); },
|
|
|
|
close: function(e, ui) { $(this).removeClass('open'); }
|
2012-02-10 09:45:17 +01:00
|
|
|
});
|
2012-03-24 05:54:58 +01:00
|
|
|
|
|
|
|
$( '#user-search-input' ).autocomplete({
|
|
|
|
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=search' + id,
|
|
|
|
delay: 500,
|
2012-05-02 23:33:43 +02:00
|
|
|
minLength: 2,
|
|
|
|
open: function(e, ui) { $(this).addClass('open'); },
|
|
|
|
close: function(e, ui) { $(this).removeClass('open'); }
|
2012-03-24 05:54:58 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
$( '#all-user-search-input' ).autocomplete({
|
|
|
|
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=search-all' + id,
|
|
|
|
delay: 500,
|
2012-05-02 23:33:43 +02:00
|
|
|
minLength: 2,
|
|
|
|
open: function(e, ui) { $(this).addClass('open'); },
|
|
|
|
close: function(e, ui) { $(this).removeClass('open'); }
|
2012-03-24 05:54:58 +01:00
|
|
|
});
|
|
|
|
});
|