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