Ticket #25821: 25821.10.diff
File 25821.10.diff, 2.0 KB (added by , 11 years ago) |
---|
-
src/wp-admin/js/widgets.js
440 440 // No longer "new" widget 441 441 widget.find( 'input.add_new' ).val(''); 442 442 443 $( 'html, body' ).animate({444 scrollTop: sidebar.offset().top - 130445 }, 200 );446 443 444 /* 445 * Check if any part of the sidebar is visible in 446 * the viewport. If it is, don't scroll. Otherwise, 447 * scroll up to so the sidebar is in view. 448 * 449 * We do this by comparing the top and bottom, of 450 * the sidebar so see if they are within the bounds 451 * of the viewport. 452 */ 453 var viewport_top = $(window).scrollTop(), 454 viewport_bottom = viewport_top + $(window).height(), 455 sidebar_bounds = sidebar.offset(); 456 457 sidebar_bounds.bottom = sidebar_bounds.top + sidebar.outerHeight(); 458 459 if ( viewport_top > sidebar_bounds.bottom || viewport_bottom < sidebar_bounds.top ) { 460 $( 'html, body' ).animate({ 461 scrollTop: sidebar.offset().top - 130 462 }, 200 ); 463 } 464 447 465 window.setTimeout( function() { 448 466 // Cannot use a callback in the animation above as it fires twice, 449 467 // have to queue this "by hand". … … 468 486 469 487 $(document).ready( function(){ wpWidgets.init(); } ); 470 488 471 })(jQuery); 489 })(jQuery); 490 No newline at end of file -
src/wp-admin/themes.php
270 270 271 271 <div class="theme-info"> 272 272 <# if ( data.active ) { #> 273 <span class="current-label"><?php _e( ' CurrentTheme' ); ?></span>273 <span class="current-label"><?php _e( 'Active Theme' ); ?></span> 274 274 <# } #> 275 275 <h3 class="theme-name">{{{ data.name }}}<span class="theme-version"><?php printf( __( 'Version: %s' ), '{{{ data.version }}}' ); ?></span></h3> 276 276 <h4 class="theme-author"><?php printf( __( 'By %s' ), '{{{ data.authorAndUri }}}' ); ?></h4>