Ticket #35457: 35457.5.patch
File 35457.5.patch, 4.7 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/common.css
601 601 text-shadow: none; 602 602 font-weight: 600; 603 603 font-size: 13px; 604 cursor: pointer; 605 outline: 0; 604 606 } 605 607 606 608 .wrap .add-new-h2:hover, /* deprecated */ -
src/wp-admin/css/themes.css
1073 1073 box-sizing: border-box; 1074 1074 display: none; 1075 1075 margin: 0; 1076 padding: 0;1076 padding: 50px 0; 1077 1077 width: 100%; 1078 1078 overflow: hidden; 1079 1079 position: relative; … … 1100 1100 font-size: 18px; 1101 1101 font-style: normal; 1102 1102 margin: 0; 1103 padding: 40px 00;1103 padding: 0; 1104 1104 text-align: center; 1105 1105 } 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 1106 1111 1107 p.no-themes { 1112 1108 clear: both; … … 1119 1115 display: none; 1120 1116 } 1121 1117 1122 body.no-results p.no-themes {1118 .no-results p.no-themes { 1123 1119 display: block; 1124 1120 } 1125 1121 1126 body.show-upload-theme p.no-themes {1127 display: none !important;1128 }1129 1130 1122 .theme-install-php .add-new-theme { 1131 1123 display: none !important; 1132 1124 } -
src/wp-admin/js/theme.js
1605 1605 searchContainer: $( '.wp-filter .search-form' ), 1606 1606 1607 1607 /* 1608 * When a user presses the "Upload Theme" button, show the upload form in place. 1609 * @todo consider to abstract this in a generic, reusable, utility, see plugin-install.js 1608 * When users press the "Upload Theme" button, show the upload form in place. 1610 1609 */ 1611 1610 uploader: function() { 1612 1611 var uploadViewToggle = $( '.upload-view-toggle' ), 1613 1612 $body = $( document.body ); 1614 1613 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 }); 1614 uploadViewToggle.on( 'click', function() { 1615 // Toggle the upload view. 1616 $body.toggleClass( 'show-upload-view' ); 1617 // Toggle the `aria-expanded` button attribute. 1618 uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) ); 1619 }); 1625 1620 }, 1626 1621 1627 1622 // Toggle the full filters navigation … … 1675 1670 routes: { 1676 1671 'theme-install.php?theme=:slug': 'preview', 1677 1672 'theme-install.php?browse=:sort': 'sort', 1678 'theme-install.php?upload': 'upload',1679 1673 'theme-install.php?search=:query': 'search', 1680 1674 'theme-install.php': 'sort' 1681 1675 }, … … 1757 1751 self.view.trigger( 'theme:close' ); 1758 1752 }); 1759 1753 1760 // Support the `upload` route by going straight to upload section1761 themes.router.on( 'route:upload', function() {1762 $( 'a.upload' ).trigger( 'click' );1763 });1764 1765 1754 // The `search` route event. The router populates the input field. 1766 1755 themes.router.on( 'route:search', function() { 1767 1756 $( '.wp-filter-search' ).focus().trigger( 'keyup' ); -
src/wp-admin/theme-install.php
126 126 */ 127 127 $tabs = apply_filters( 'install_themes_tabs', array( 'upload' => __( 'Upload Theme' ) ) ); 128 128 if ( ! empty( $tabs['upload'] ) && current_user_can( 'upload_themes' ) ) { 129 echo ' < a href="#" class="upload-view-toggle page-title-action">' . __( 'Upload Theme' ) . '</a>';129 echo ' <button type="button" class="upload-view-toggle page-title-action hide-if-no-js" aria-expanded="false">' . __( 'Upload Theme' ) . '</button>'; 130 130 } 131 131 ?></h1> 132 <div class="error hide-if-js"> 133 <p><?php _e( 'The Theme Installer screen requires JavaScript.' ); ?></p> 134 </div> 132 135 133 136 <div class="upload-theme"> 134 137 <?php install_themes_upload(); ?> 135 138 </div> 136 139 137 <h2 class="screen-reader-text "><?php _e( 'Filter themes list' ); ?></h2>140 <h2 class="screen-reader-text hide-if-no-js"><?php _e( 'Filter themes list' ); ?></h2> 138 141 139 <div class="wp-filter ">142 <div class="wp-filter hide-if-no-js"> 140 143 <div class="filter-count"> 141 144 <span class="count theme-count"></span> 142 145 </div> … … 200 203 </div> 201 204 </div> 202 205 </div> 203 <h2 class="screen-reader-text "><?php _e( 'Themes list' ); ?></h2>206 <h2 class="screen-reader-text hide-if-no-js"><?php _e( 'Themes list' ); ?></h2> 204 207 <div class="theme-browser content-filterable"></div> 205 208 <div class="theme-install-overlay wp-full-overlay expanded"></div> 206 209