mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-30 16:36:59 +02:00
JSHint fixes for user-suggest.js.
props dougwollison. fixes #26017. Built from https://develop.svn.wordpress.org/trunk@26238 git-svn-id: http://core.svn.wordpress.org/trunk@26145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
38c5e9a668
commit
7d1fda5b52
wp-admin/js
@ -1,13 +1,24 @@
|
||||
(function($) {
|
||||
var id = 'undefined' !== typeof current_site_id ? '&site_id=' + current_site_id : '';
|
||||
/* global ajaxurl, current_site_id, isRtl */
|
||||
|
||||
(function( $ ) {
|
||||
var id = ( typeof current_site_id !== 'undefined' ) ? '&site_id=' + current_site_id : '';
|
||||
$(document).ready( function() {
|
||||
var position = { offset: '0, -1' };
|
||||
if ( typeof isRtl !== 'undefined' && isRtl ) {
|
||||
position.my = 'right top';
|
||||
position.at = 'right bottom';
|
||||
}
|
||||
$( '.wp-suggest-user' ).autocomplete({
|
||||
source: ajaxurl + '?action=autocomplete-user&autocomplete_type=add' + id,
|
||||
delay: 500,
|
||||
minLength: 2,
|
||||
position: ( 'undefined' !== typeof isRtl && isRtl ) ? { my: 'right top', at: 'right bottom', offset: '0, -1' } : { offset: '0, -1' },
|
||||
open: function() { $(this).addClass('open'); },
|
||||
close: function() { $(this).removeClass('open'); }
|
||||
position: position,
|
||||
open: function() {
|
||||
$( this ).addClass( 'open' );
|
||||
},
|
||||
close: function() {
|
||||
$( this ).removeClass( 'open' );
|
||||
}
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
})( jQuery );
|
2
wp-admin/js/user-suggest.min.js
vendored
2
wp-admin/js/user-suggest.min.js
vendored
@ -1 +1 @@
|
||||
!function(a){var b="undefined"!=typeof current_site_id?"&site_id="+current_site_id:"";a(document).ready(function(){a(".wp-suggest-user").autocomplete({source:ajaxurl+"?action=autocomplete-user&autocomplete_type=add"+b,delay:500,minLength:2,position:"undefined"!=typeof isRtl&&isRtl?{my:"right top",at:"right bottom",offset:"0, -1"}:{offset:"0, -1"},open:function(){a(this).addClass("open")},close:function(){a(this).removeClass("open")}})})}(jQuery);
|
||||
!function(a){var b="undefined"!=typeof current_site_id?"&site_id="+current_site_id:"";a(document).ready(function(){var c={offset:"0, -1"};"undefined"!=typeof isRtl&&isRtl&&(c.my="right top",c.at="right bottom"),a(".wp-suggest-user").autocomplete({source:ajaxurl+"?action=autocomplete-user&autocomplete_type=add"+b,delay:500,minLength:2,position:c,open:function(){a(this).addClass("open")},close:function(){a(this).removeClass("open")}})})}(jQuery);
|
Loading…
Reference in New Issue
Block a user