Ticket #26600: 26600.2.patch
File 26600.2.patch, 6.1 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/themes.css
1140 1140 font-size: 18px; 1141 1141 font-style: normal; 1142 1142 margin: 0; 1143 padding: 100px 00;1143 padding: 0; 1144 1144 text-align: center; 1145 1145 display: none; 1146 1146 } -
src/wp-admin/js/theme.js
79 79 80 80 // Render and append 81 81 this.view.render(); 82 this.$el.find( '.themes' ).remove(); 83 this.$el.append( this.view.el ).addClass( 'rendered' ); 82 this.$el.empty().append( this.view.el ).addClass('rendered'); 84 83 this.$el.append( '<br class="clear"/>' ); 85 84 }, 86 85 … … 157 156 // Useful for resetting the views when you clean the input 158 157 if ( this.terms === '' ) { 159 158 this.reset( themes.data.themes ); 159 $( 'body' ).removeClass( 'no-results' ); 160 160 } 161 161 162 162 // Trigger an 'update' event … … 831 831 // The theme count element 832 832 count: $( '.wp-core-ui .theme-count' ), 833 833 834 // The live themes count 835 liveThemeCount: 0, 836 834 837 initialize: function( options ) { 835 838 var self = this; 836 839 … … 854 857 this.listenTo( self.collection, 'query:success', function( count ) { 855 858 if ( _.isNumber( count ) ) { 856 859 self.count.text( count ); 860 self.announceSearchResults( count ); 857 861 } else { 858 862 self.count.text( self.collection.length ); 863 self.announceSearchResults( self.collection.length ); 859 864 } 860 865 }); 861 866 … … 926 931 } 927 932 928 933 // Display a live theme count for the collection 929 this.count.text( this.collection.count ? this.collection.count : this.collection.length ); 934 this.liveThemeCount = this.collection.count ? this.collection.count : this.collection.length; 935 this.count.text( this.liveThemeCount ); 936 937 this.announceSearchResults( this.liveThemeCount ); 930 938 }, 931 939 932 940 // Iterates through each instance of the collection … … 1078 1086 self.theme.trigger( 'theme:expand', previousModel.cid ); 1079 1087 1080 1088 } 1089 }, 1090 1091 // Dispatch audible search results feedback message 1092 announceSearchResults: function( count ) { 1093 if ( 0 === count ) { 1094 wp.a11y.speak( l10n.noThemesFound ); 1095 } else { 1096 wp.a11y.speak( l10n.themesFound + ' ' + count ); 1097 } 1081 1098 } 1082 1099 }); 1083 1100 -
src/wp-admin/theme-install.php
44 44 ), 45 45 'l10n' => array( 46 46 'addNew' => __( 'Add New Theme' ), 47 'search' 47 'search' => __( 'Search Themes' ), 48 48 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) 49 49 'upload' => __( 'Upload Theme' ), 50 50 'back' => __( 'Back' ), 51 'error' => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) 51 'error' => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ), 52 'themesFound' => __( 'Number of Themes found:' ), 53 'noThemesFound' => __( 'No themes found. Try a different search.' ), 52 54 ), 53 55 'installedThemes' => array_keys( $installed_themes ), 54 56 ) ); … … 166 168 </div> 167 169 </div> 168 170 </div> 169 <div class="theme-browser content-filterable" aria-live="polite"> 170 <p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p> 171 </div> 171 <div class="theme-browser content-filterable"></div> 172 172 <div class="theme-install-overlay wp-full-overlay expanded"></div> 173 174 <p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p> 173 175 <span class="spinner"></span> 174 176 175 177 <br class="clear" /> -
src/wp-admin/themes.php
107 107 'adminUrl' => parse_url( admin_url(), PHP_URL_PATH ), 108 108 ), 109 109 'l10n' => array( 110 'addNew' => __( 'Add New Theme' ),111 'search' => __( 'Search Installed Themes' ),110 'addNew' => __( 'Add New Theme' ), 111 'search' => __( 'Search Installed Themes' ), 112 112 'searchPlaceholder' => __( 'Search installed themes...' ), // placeholder (no ellipsis) 113 'themesFound' => __( 'Number of Themes found:' ), 114 'noThemesFound' => __( 'No themes found. Try a different search.' ), 113 115 ), 114 116 ) ); 115 117 … … 198 200 199 201 ?> 200 202 201 <div class="theme-browser" aria-live="polite">203 <div class="theme-browser"> 202 204 <div class="themes"> 203 205 204 206 <?php … … 250 252 <?php endforeach; ?> 251 253 <br class="clear" /> 252 254 </div> 253 <p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p>254 255 </div> 255 256 <div class="theme-overlay"></div> 256 257 258 <p class="no-themes"><?php _e( 'No themes found. Try a different search.' ); ?></p> 259 257 260 <?php 258 261 // List broken themes, if any. 259 262 if ( ! is_multisite() && current_user_can('edit_themes') && $broken_themes = wp_get_themes( array( 'errors' => true ) ) ) { -
src/wp-includes/script-loader.php
496 496 497 497 $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), false, 1 ); 498 498 499 $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone' ), false, 1 );499 $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y' ), false, 1 ); 500 500 501 501 $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), false, 1 ); 502 502 did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(