Ticket #26017: 26017.diff
File 26017.diff, 1.4 KB (added by , 11 years ago) |
---|
-
src/wp-admin/js/user-suggest.js
1 (function($) { 2 var id = 'undefined' !== typeof current_site_id ? '&site_id=' + current_site_id : ''; 1 /* global ajaxurl:false */ 2 /* global current_site_id:false */ 3 /* global isRtl:false */ 4 5 (function( $ ) { 6 var id = ( typeof current_site_id !== 'undefined' ) ? '&site_id=' + current_site_id : ''; 3 7 $(document).ready( function() { 4 8 $( '.wp-suggest-user' ).autocomplete({ 5 9 source: ajaxurl + '?action=autocomplete-user&autocomplete_type=add' + id, 6 10 delay: 500, 7 11 minLength: 2, 8 position: ( 'undefined' !== typeof isRtl && isRtl ) ? { my: 'right top', at: 'right bottom', offset: '0, -1' } : { offset: '0, -1' }, 9 open: function() { $(this).addClass('open'); }, 10 close: function() { $(this).removeClass('open'); } 12 position: ( typeof isRtl !== 'undefined' && isRtl ) ? { 13 my: 'right top', 14 at: 'right bottom', 15 offset: '0, -1' 16 } : { 17 offset: '0, -1' 18 }, 19 open: function() { 20 $( this ).addClass( 'open' ); 21 }, 22 close: function() { 23 $( this ).removeClass( 'open' ); 24 } 11 25 }); 12 26 }); 13 })( jQuery);14 No newline at end of file 27 })( jQuery ); 28 No newline at end of file