jshint fixes for shiny updates JS.

As introduced in [31333].

Props iseulde.
See #29820.
Built from https://develop.svn.wordpress.org/trunk@31341


git-svn-id: http://core.svn.wordpress.org/trunk@31322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2015-02-05 19:52:22 +00:00
parent 7bde88d02e
commit 69504de9d8
4 changed files with 14 additions and 15 deletions

View File

@ -1,4 +1,4 @@
/* global plugininstallL10n, tb_click, confirm */ /* global plugininstallL10n, tb_click */
/* Plugin Browser Thickbox related JS*/ /* Plugin Browser Thickbox related JS*/
var tb_position; var tb_position;

View File

@ -1,7 +1,6 @@
window.wp = window.wp || {}; window.wp = window.wp || {};
(function( $, wp ) { (function( $, wp, pagenow, ajaxurl ) {
wp.updates = {}; wp.updates = {};
/** /**
@ -52,7 +51,7 @@ window.wp = window.wp || {};
var count, var count,
pluginCount, pluginCount,
$adminBarUpdateCount = $( '#wp-admin-bar-updates .ab-label' ), $adminBarUpdateCount = $( '#wp-admin-bar-updates .ab-label' ),
$dashboardNavMenuUpdateCount = $( 'a[href="update-core.php"] .update-plugins' ) $dashboardNavMenuUpdateCount = $( 'a[href="update-core.php"] .update-plugins' ),
$pluginsMenuItem = $( '#menu-plugins' ); $pluginsMenuItem = $( '#menu-plugins' );
@ -153,7 +152,7 @@ window.wp = window.wp || {};
if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.error ) { if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.error ) {
alertText += ': ' + jqxhr.responseJSON.data.error; alertText += ': ' + jqxhr.responseJSON.data.error;
} }
alert( alertText ); window.alert( alertText );
if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.slug ) { if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.slug ) {
wp.updates.updateError( jqxhr.responseJSON ); wp.updates.updateError( jqxhr.responseJSON );
} }
@ -162,7 +161,7 @@ window.wp = window.wp || {};
* Check the queue. * Check the queue.
*/ */
wp.updates.queueChecker(); wp.updates.queueChecker();
} };
/** /**
* On a successful plugin update, update the UI with the result. * On a successful plugin update, update the UI with the result.
@ -262,7 +261,7 @@ window.wp = window.wp || {};
if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.error ) { if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.error ) {
alertText += ': ' + jqxhr.responseJSON.data.error; alertText += ': ' + jqxhr.responseJSON.data.error;
} }
alert( alertText ); window.alert( alertText );
if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.slug ) { if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.slug ) {
wp.updates.installError( jqxhr.responseJSON ); wp.updates.installError( jqxhr.responseJSON );
} }
@ -322,8 +321,8 @@ window.wp = window.wp || {};
wp.updates.installPlugin( job.data.slug ); wp.updates.installPlugin( job.data.slug );
break; break;
default: default:
console.log( 'Failed to exect queued update job.' ); window.console.log( 'Failed to exect queued update job.' );
console.log( job ); window.console.log( job );
break; break;
} }
}; };
@ -336,7 +335,7 @@ window.wp = window.wp || {};
} ); } );
$( '#bulk-action-form' ).on( 'submit', function( e ) { $( '#bulk-action-form' ).on( 'submit', function( e ) {
var checkbox, plugin, slug; var $checkbox, plugin, slug;
if ( $( '#bulk-action-selector-top' ).val() == 'update-selected' ) { if ( $( '#bulk-action-selector-top' ).val() == 'update-selected' ) {
e.preventDefault(); e.preventDefault();
@ -355,13 +354,13 @@ window.wp = window.wp || {};
$( '.plugin-card .update-now' ).on( 'click', function( e ) { $( '.plugin-card .update-now' ).on( 'click', function( e ) {
e.preventDefault(); e.preventDefault();
$button = $( e.target ); var $button = $( e.target );
wp.updates.updatePlugin( $button.data( 'plugin' ), $button.data( 'slug' ) ); wp.updates.updatePlugin( $button.data( 'plugin' ), $button.data( 'slug' ) );
} ); } );
$( '.plugin-card .install-now' ).on( 'click', function( e ) { $( '.plugin-card .install-now' ).on( 'click', function( e ) {
e.preventDefault(); e.preventDefault();
$button = $( e.target ); var $button = $( e.target );
if ( $button.hasClass( 'button-disabled' ) ) { if ( $button.hasClass( 'button-disabled' ) ) {
return; return;
} }
@ -389,4 +388,4 @@ window.wp = window.wp || {};
} ); } );
})( jQuery, window.wp ); })( jQuery, window.wp, window.pagenow, window.ajaxurl );

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-alpha-31340'; $wp_version = '4.2-alpha-31341';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.