Make WordPress Core

Ticket #26017: 26017.2.diff

File 26017.2.diff, 1.3 KB (added by dougwollison, 12 years ago)

Revised declaration of globals.

  • 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 : '';
    35        $(document).ready( function() {
    46                $( '.wp-suggest-user' ).autocomplete({
    57                        source:    ajaxurl + '?action=autocomplete-user&autocomplete_type=add' + id,
    68                        delay:     500,
    79                        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                        }
    1123                });
    1224        });
    13 })(jQuery);
    14  No newline at end of file
     25})( jQuery );
     26 No newline at end of file