Changeset 31341
- Timestamp:
- 02/05/2015 07:51:42 PM (10 years ago)
- 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 */ 2 2 3 3 /* Plugin Browser Thickbox related JS*/ -
trunk/src/wp-admin/js/updates.js
r31333 r31341 1 1 window.wp = window.wp || {}; 2 2 3 (function( $, wp ) { 4 3 (function( $, wp, pagenow, ajaxurl ) { 5 4 wp.updates = {}; 6 5 … … 53 52 pluginCount, 54 53 $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' ), 56 55 $pluginsMenuItem = $( '#menu-plugins' ); 57 56 … … 154 153 alertText += ': ' + jqxhr.responseJSON.data.error; 155 154 } 156 alert( alertText );155 window.alert( alertText ); 157 156 if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.slug ) { 158 157 wp.updates.updateError( jqxhr.responseJSON ); … … 163 162 */ 164 163 wp.updates.queueChecker(); 165 } 164 }; 166 165 167 166 /** … … 263 262 alertText += ': ' + jqxhr.responseJSON.data.error; 264 263 } 265 alert( alertText );264 window.alert( alertText ); 266 265 if ( jqxhr.responseJSON && jqxhr.responseJSON.data && jqxhr.responseJSON.data.slug ) { 267 266 wp.updates.installError( jqxhr.responseJSON ); … … 323 322 break; 324 323 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 ); 327 326 break; 328 327 } … … 337 336 338 337 $( '#bulk-action-form' ).on( 'submit', function( e ) { 339 var checkbox, plugin, slug;338 var $checkbox, plugin, slug; 340 339 341 340 if ( $( '#bulk-action-selector-top' ).val() == 'update-selected' ) { … … 356 355 $( '.plugin-card .update-now' ).on( 'click', function( e ) { 357 356 e.preventDefault(); 358 $button = $( e.target );357 var $button = $( e.target ); 359 358 wp.updates.updatePlugin( $button.data( 'plugin' ), $button.data( 'slug' ) ); 360 359 } ); … … 362 361 $( '.plugin-card .install-now' ).on( 'click', function( e ) { 363 362 e.preventDefault(); 364 $button = $( e.target );363 var $button = $( e.target ); 365 364 if ( $button.hasClass( 'button-disabled' ) ) { 366 365 return; … … 390 389 } ); 391 390 392 })( jQuery, window.wp );391 })( jQuery, window.wp, window.pagenow, window.ajaxurl );
Note: See TracChangeset
for help on using the changeset viewer.