Ticket #35457: 35457.2.patch
File 35457.2.patch, 4.7 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/common.css
608 608 text-shadow: none; 609 609 font-weight: 600; 610 610 font-size: 13px; 611 cursor: pointer; 611 612 } 612 613 613 614 .wrap .add-new-h2:hover, /* deprecated */ -
src/wp-admin/css/themes.css
1058 1058 } 1059 1059 1060 1060 .upload-view-toggle .browse, 1061 .upload-view-toggle.upload-tab .upload { 1061 .upload-view-toggle.upload-tab .upload, 1062 .show-upload-view .hide-if-upload-view { 1062 1063 display: none; 1063 1064 } 1064 1065 … … 1103 1104 padding: 40px 0 0; 1104 1105 text-align: center; 1105 1106 } 1106 body.show-upload-theme .upload-theme + .wp-filter,1107 body.show-upload-theme .upload-theme + .wp-filter + .theme-browser {1108 display: none;1109 }1110 1107 1111 1108 p.no-themes { 1112 1109 clear: both; … … 1119 1116 display: none; 1120 1117 } 1121 1118 1122 body.no-results p.no-themes {1119 .no-results p.no-themes { 1123 1120 display: block; 1124 1121 } 1125 1122 1126 body.show-upload-theme p.no-themes {1127 display: none !important;1128 }1129 1130 1123 .theme-install-php .add-new-theme { 1131 1124 display: none !important; 1132 1125 } -
src/wp-admin/js/theme.js
1610 1610 */ 1611 1611 uploader: function() { 1612 1612 var uploadViewToggle = $( '.upload-view-toggle' ), 1613 $body = $( document.body ); 1613 $body = $( document.body ), 1614 uploaderOpen; 1614 1615 1615 uploadViewToggle 1616 .attr({ 1617 role: 'button', 1618 'aria-expanded': 'false' 1619 }) 1620 .on( 'click', function( event ) { 1621 event.preventDefault(); 1622 $body.toggleClass( 'show-upload-view' ); 1623 uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) ); 1624 }); 1616 uploadViewToggle.on( 'click', function() { 1617 // Toggle the upload view. 1618 $body.toggleClass( 'show-upload-view' ); 1619 // Get and store the upload view collapsed/expanded status. 1620 uploaderOpen = $body.hasClass( 'show-upload-view' ) 1621 // Toggle the `aria-expanded` button attribute. 1622 uploadViewToggle.attr( 'aria-expanded', uploaderOpen ); 1623 // Support the `upload` route. 1624 if ( uploaderOpen ) { 1625 themes.router.navigate( themes.router.baseUrl( '?upload' ), { replace: true } ); 1626 } else { 1627 themes.router.navigate( themes.router.baseUrl( '' ), { replace: true } ); 1628 } 1629 }); 1625 1630 }, 1626 1631 1627 1632 // Toggle the full filters navigation … … 1759 1764 1760 1765 // Support the `upload` route by going straight to upload section 1761 1766 themes.router.on( 'route:upload', function() { 1762 $( ' a.upload' ).trigger( 'click' );1767 $( '.upload-view-toggle' ).trigger( 'click' ); 1763 1768 }); 1764 1769 1765 1770 // The `search` route event. The router populates the input field. -
src/wp-admin/theme-install.php
127 127 */ 128 128 $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) ); 129 129 if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) { 130 echo ' < a href="#" class="upload-view-toggle page-title-action">' . __( 'Upload Theme' ) . '</a>';130 echo ' <button type="button" class="upload-view-toggle page-title-action hide-if-no-js" aria-expanded="false">' . __( 'Upload Theme' ) . '</button>'; 131 131 } 132 132 ?></h1> 133 <div class="error hide-if-js"> 134 <p><?php _e( 'The Theme Installer screen requires JavaScript.' ); ?></p> 135 </div> 133 136 134 137 <div class="upload-theme"> 135 138 <?php install_themes_upload(); ?> 136 139 </div> 137 140 138 <h2 class="screen-reader-text "><?php _e( 'Filter themes list' ); ?></h2>141 <h2 class="screen-reader-text hide-if-no-js hide-if-upload-view"><?php _e( 'Filter themes list' ); ?></h2> 139 142 140 <div class="wp-filter ">143 <div class="wp-filter hide-if-no-js hide-if-upload-view"> 141 144 <div class="filter-count"> 142 145 <span class="count theme-count"></span> 143 146 </div> … … 201 204 </div> 202 205 </div> 203 206 </div> 204 <h2 class="screen-reader-text "><?php _e( 'Themes list' ); ?></h2>205 <div class="theme-browser content-filterable "></div>207 <h2 class="screen-reader-text hide-if-no-js hide-if-upload-view"><?php _e( 'Themes list' ); ?></h2> 208 <div class="theme-browser content-filterable hide-if-upload-view"></div> 206 209 <div class="theme-install-overlay wp-full-overlay expanded"></div> 207 210 208 <p class="no-themes "><?php _e( 'No themes found. Try a different search.' ); ?></p>211 <p class="no-themes hide-if-upload-view"><?php _e( 'No themes found. Try a different search.' ); ?></p> 209 212 <span class="spinner"></span> 210 213 211 214 <?php