Changeset 38187
- Timestamp:
- 08/03/2016 10:32:09 PM (8 years ago)
- Location:
- branches/4.6
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.6
-
branches/4.6/src/wp-admin/css/common.css
r38152 r38187 3025 3025 /* Metabox collapse arrow indicators */ 3026 3026 .js .sidebar-name .sidebar-name-arrow:before, 3027 .js .meta-box-sortables .postbox .toggle-indicator:before { 3027 .js .meta-box-sortables .postbox .toggle-indicator:before, 3028 .bulk-action-notice .toggle-indicator:before { 3028 3029 content: "\f142"; 3029 3030 display: inline-block; … … 3036 3037 3037 3038 .js .widgets-holder-wrap.closed .sidebar-name-arrow:before, 3038 .js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before { 3039 .js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before, 3040 .bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator:before { 3039 3041 content: "\f140"; 3040 3042 } … … 3064 3066 .rtl.js .postbox .handlediv .toggle-indicator:before { 3065 3067 text-indent: 1px; /* account for the dashicon alignment */ 3068 } 3069 3070 .bulk-action-notice .toggle-indicator:before { 3071 line-height: 16px; 3072 vertical-align: top; 3073 color: #72777c; 3066 3074 } 3067 3075 -
branches/4.6/src/wp-admin/includes/update.php
r38082 r38187 635 635 </script> 636 636 <script id="tmpl-wp-bulk-updates-admin-notice" type="text/html"> 637 <div id="{{ data.id }}" class=" notice <# if ( data.errors ) { #>notice-error<# } else { #>notice-success<# } #>">637 <div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errors ) { #>notice-error<# } else { #>notice-success<# } #>"> 638 638 <p> 639 639 <# if ( data.successes ) { #> … … 665 665 <# } #> 666 666 <# if ( data.errors ) { #> 667 < # if ( 1 === data.errors ) { #>668 < button class="button-link">667 <button class="button-link bulk-action-errors-collapsed" aria-expanded="false"> 668 <# if ( 1 === data.errors ) { #> 669 669 <?php 670 /* translators: %s: Number of fail ures */671 printf( __( '%s failure.' ), '{{ data.errors }}' );670 /* translators: %s: Number of failed updates */ 671 printf( __( '%s update failed.' ), '{{ data.errors }}' ); 672 672 ?> 673 </button> 674 <# } else { #> 675 <button class="button-link"> 673 <# } else { #> 676 674 <?php 677 /* translators: %s: Number of fail ures */678 printf( __( '%s failures.' ), '{{ data.errors }}' );675 /* translators: %s: Number of failed updates */ 676 printf( __( '%s updates failed.' ), '{{ data.errors }}' ); 679 677 ?> 680 </button> 681 <# } #> 678 <# } #> 679 <span class="screen-reader-text"><?php _e( 'Show more details' ); ?></span> 680 <span class="toggle-indicator" aria-hidden="true"></span> 681 </button> 682 682 <# } #> 683 683 </p> 684 684 <# if ( data.errors ) { #> 685 <ul class=" hidden">685 <ul class="bulk-action-errors hidden"> 686 686 <# _.each( data.errorMessages, function( errorMessage ) { #> 687 687 <li>{{ errorMessage }}</li> -
branches/4.6/src/wp-admin/js/updates.js
r38175 r38187 527 527 528 528 $document.trigger( 'wp-plugin-installing', args ); 529 529 530 530 return wp.updates.ajax( 'install-plugin', args ); 531 531 }; … … 719 719 720 720 $document.trigger( 'wp-plugin-deleting', args ); 721 721 722 722 return wp.updates.ajax( 'delete-plugin', args ); 723 723 }; … … 1044 1044 1045 1045 $document.trigger( 'wp-theme-installing', args ); 1046 1046 1047 1047 return wp.updates.ajax( 'install-theme', args ); 1048 1048 }; … … 1175 1175 1176 1176 $document.trigger( 'wp-theme-deleting', args ); 1177 1177 1178 1178 return wp.updates.ajax( 'delete-theme', args ); 1179 1179 }; … … 1983 1983 1984 1984 $document.trigger( 'wp-' + type + '-bulk-' + bulkAction, itemsSelected ); 1985 1985 1986 1986 // Find all the checkboxes which have been checked. 1987 1987 itemsSelected.each( function( index, element ) { … … 2024 2024 wp.updates.addAdminNotice( { 2025 2025 id: 'bulk-action-notice', 2026 className: 'bulk-action-notice', 2026 2027 successes: success, 2027 2028 errors: error, … … 2031 2032 2032 2033 $bulkActionNotice = $( '#bulk-action-notice' ).on( 'click', 'button', function() { 2033 $bulkActionNotice.find( 'ul' ).toggleClass( 'hidden' ); 2034 // $( this ) is the clicked button, no need to get it again. 2035 $( this ) 2036 .toggleClass( 'bulk-action-errors-collapsed' ) 2037 .attr( 'aria-expanded', ! $( this ).hasClass( 'bulk-action-errors-collapsed' ) ); 2038 // Show the errors list. 2039 $bulkActionNotice.find( '.bulk-action-errors' ).toggleClass( 'hidden' ); 2034 2040 } ); 2035 2041
Note: See TracChangeset
for help on using the changeset viewer.