Make WordPress Core

Changeset 31341


Ignore:
Timestamp:
02/05/2015 07:51:42 PM (10 years ago)
Author:
boonebgorges
Message:

jshint fixes for shiny updates JS.

As introduced in [31333].

Props iseulde.
See #29820.

Location:
trunk/src/wp-admin/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/plugin-install.js

    r31333 r31341  
    1 /* global plugininstallL10n, tb_click, confirm */
     1/* global plugininstallL10n, tb_click */
    22
    33/* Plugin Browser Thickbox related JS*/
  • trunk/src/wp-admin/js/updates.js

    r31333 r31341  
    11window.wp = window.wp || {};
    22
    3 (function( $, wp ) {
    4 
     3(function( $, wp, pagenow, ajaxurl ) {
    54    wp.updates = {};
    65
     
    5352            pluginCount,
    5453            $adminBarUpdateCount = $( '#wp-admin-bar-updates .ab-label' ),
    55             $dashboardNavMenuUpdateCount = $( 'a[href="update-core.php"] .update-plugins' )
     54            $dashboardNavMenuUpdateCount = $( 'a[href="update-core.php"] .update-plugins' ),
    5655            $pluginsMenuItem = $( '#menu-plugins' );
    5756
     
    154153                 alertText += ': ' + jqxhr.responseJSON.data.error;
    155154            }
    156             alert( alertText );
     155            window.alert( alertText );
    157156            if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.slug ) {
    158157                wp.updates.updateError( jqxhr.responseJSON );
     
    163162         */
    164163        wp.updates.queueChecker();
    165     }
     164    };
    166165
    167166    /**
     
    263262                 alertText += ': ' + jqxhr.responseJSON.data.error;
    264263            }
    265             alert( alertText );
     264            window.alert( alertText );
    266265            if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.slug ) {
    267266                wp.updates.installError( jqxhr.responseJSON );
     
    323322                break;
    324323            default:
    325                 console.log( 'Failed to exect queued update job.' );
    326                 console.log( job );
     324                window.console.log( 'Failed to exect queued update job.' );
     325                window.console.log( job );
    327326                break;
    328327        }
     
    337336
    338337        $( '#bulk-action-form' ).on( 'submit', function( e ) {
    339             var checkbox, plugin, slug;
     338            var $checkbox, plugin, slug;
    340339
    341340            if ( $( '#bulk-action-selector-top' ).val() == 'update-selected' ) {
     
    356355        $( '.plugin-card .update-now' ).on( 'click', function( e ) {
    357356            e.preventDefault();
    358             $button = $( e.target );
     357            var $button = $( e.target );
    359358            wp.updates.updatePlugin( $button.data( 'plugin' ), $button.data( 'slug' ) );
    360359        } );
     
    362361        $( '.plugin-card .install-now' ).on( 'click', function( e ) {
    363362            e.preventDefault();
    364             $button = $( e.target );
     363            var $button = $( e.target );
    365364            if ( $button.hasClass( 'button-disabled' ) ) {
    366365                return;
     
    390389    } );
    391390
    392 })( jQuery, window.wp );
     391})( jQuery, window.wp, window.pagenow, window.ajaxurl );
Note: See TracChangeset for help on using the changeset viewer.