mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 20:58:55 +00:00
Site/user autocomplete fixes.
* Lengthen the inputs in the Right Now network dashboard widget * Border around the whole autocomplete widget/list * Handle long strings * Remove some CSS color cruft from the main stylesheet and de-dupe the JS closures for open/close callbacks. Props helenyhou fixes #20584 git-svn-id: https://develop.svn.wordpress.org/trunk@20984 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
jQuery( function($) {
|
||||
var isRTL = !! ( 'undefined' != typeof isRtl && isRtl );
|
||||
$( '#site-search-input' ).autocomplete({
|
||||
source: ajaxurl + '?action=autocomplete-site',
|
||||
delay: 500,
|
||||
source: ajaxurl + '?action=autocomplete-site',
|
||||
delay: 500,
|
||||
minLength: 2,
|
||||
open: function(e, ui) { $(this).addClass('open'); },
|
||||
close: function(e, ui) { $(this).removeClass('open'); }
|
||||
position: isRTL ? { my: 'right top', at: 'right bottom', offset: '0, -1' } : { offset: '0, -1' },
|
||||
open: function(e, ui) { $(this).addClass('open'); },
|
||||
close: function(e, ui) { $(this).removeClass('open'); }
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,27 +1,38 @@
|
||||
jQuery( function($) {
|
||||
var id = typeof( current_site_id ) != 'undefined' ? '&site_id=' + current_site_id : '';
|
||||
var id = typeof( current_site_id ) != 'undefined' ? '&site_id=' + current_site_id : '',
|
||||
isRTL = !! ( 'undefined' != typeof isRtl && isRtl ),
|
||||
position = isRTL ? { my: 'right top', at: 'right bottom', offset: '0, -1' } : { offset: '0, -1' },
|
||||
open = function(e, ui) {
|
||||
$(this).addClass('open');
|
||||
},
|
||||
close = function(e, ui) {
|
||||
$(this).removeClass('open');
|
||||
};
|
||||
|
||||
$( '#adduser-email, #newuser' ).autocomplete({
|
||||
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=add' + id,
|
||||
delay: 500,
|
||||
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=add' + id,
|
||||
delay: 500,
|
||||
minLength: 2,
|
||||
open: function(e, ui) { $(this).addClass('open'); },
|
||||
close: function(e, ui) { $(this).removeClass('open'); }
|
||||
position: position,
|
||||
open: open,
|
||||
close: close
|
||||
});
|
||||
|
||||
$( '#user-search-input' ).autocomplete({
|
||||
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=search' + id,
|
||||
delay: 500,
|
||||
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=search' + id,
|
||||
delay: 500,
|
||||
minLength: 2,
|
||||
open: function(e, ui) { $(this).addClass('open'); },
|
||||
close: function(e, ui) { $(this).removeClass('open'); }
|
||||
position: position,
|
||||
open: open,
|
||||
close: close
|
||||
});
|
||||
|
||||
$( '#all-user-search-input' ).autocomplete({
|
||||
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=search-all' + id,
|
||||
delay: 500,
|
||||
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=search-all' + id,
|
||||
delay: 500,
|
||||
minLength: 2,
|
||||
open: function(e, ui) { $(this).addClass('open'); },
|
||||
close: function(e, ui) { $(this).removeClass('open'); }
|
||||
position: position,
|
||||
open: open,
|
||||
close: close
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user