Ticket #35457: 35457.6.patch
File 35457.6.patch, 4.7 KB (added by , 8 years ago) |
---|
-
src/wp-admin/css/common.css
601 601 text-shadow: none; 602 602 font-weight: 600; 603 603 font-size: 13px; 604 line-height: normal; /* IE8-IE11 need this for buttons */ 605 cursor: pointer; 606 outline: 0; 604 607 } 605 608 606 609 .wrap .add-new-h2:hover, /* deprecated */ -
src/wp-admin/css/themes.css
1039 1039 box-sizing: border-box; 1040 1040 display: none; 1041 1041 margin: 0; 1042 padding: 0;1042 padding: 50px 0; 1043 1043 width: 100%; 1044 1044 overflow: hidden; 1045 1045 position: relative; … … 1066 1066 font-size: 18px; 1067 1067 font-style: normal; 1068 1068 margin: 0; 1069 padding: 40px 00;1069 padding: 0; 1070 1070 text-align: center; 1071 1071 } 1072 body.show-upload-theme .upload-theme + .wp-filter,1073 body.show-upload-theme .upload-theme + .wp-filter + .theme-browser {1074 display: none;1075 }1076 1072 1077 1073 p.no-themes { 1078 1074 clear: both; … … 1085 1081 display: none; 1086 1082 } 1087 1083 1088 body.no-results p.no-themes {1084 .no-results p.no-themes { 1089 1085 display: block; 1090 1086 } 1091 1087 1092 body.show-upload-theme p.no-themes {1093 display: none !important;1094 }1095 1096 1088 .theme-install-php .add-new-theme { 1097 1089 display: none !important; 1098 1090 } -
src/wp-admin/js/theme.js
1745 1745 searchContainer: $( '.wp-filter .search-form' ), 1746 1746 1747 1747 /* 1748 * When a user presses the "Upload Theme" button, show the upload form in place. 1749 * @todo consider to abstract this in a generic, reusable, utility, see plugin-install.js 1748 * When users press the "Upload Theme" button, show the upload form in place. 1750 1749 */ 1751 1750 uploader: function() { 1752 1751 var uploadViewToggle = $( '.upload-view-toggle' ), 1753 1752 $body = $( document.body ); 1754 1753 1755 uploadViewToggle 1756 .attr({ 1757 role: 'button', 1758 'aria-expanded': 'false' 1759 }) 1760 .on( 'click', function( event ) { 1761 event.preventDefault(); 1762 $body.toggleClass( 'show-upload-view' ); 1763 uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) ); 1764 }); 1754 uploadViewToggle.on( 'click', function() { 1755 // Toggle the upload view. 1756 $body.toggleClass( 'show-upload-view' ); 1757 // Toggle the `aria-expanded` button attribute. 1758 uploadViewToggle.attr( 'aria-expanded', $body.hasClass( 'show-upload-view' ) ); 1759 }); 1765 1760 }, 1766 1761 1767 1762 // Toggle the full filters navigation … … 1815 1810 routes: { 1816 1811 'theme-install.php?theme=:slug': 'preview', 1817 1812 'theme-install.php?browse=:sort': 'sort', 1818 'theme-install.php?upload': 'upload',1819 1813 'theme-install.php?search=:query': 'search', 1820 1814 'theme-install.php': 'sort' 1821 1815 }, … … 1897 1891 self.view.trigger( 'theme:close' ); 1898 1892 }); 1899 1893 1900 // Support the `upload` route by going straight to upload section1901 themes.router.on( 'route:upload', function() {1902 $( 'a.upload' ).trigger( 'click' );1903 });1904 1905 1894 // The `search` route event. The router populates the input field. 1906 1895 themes.router.on( 'route:search', function() { 1907 1896 $( '.wp-filter-search' ).focus().trigger( 'keyup' ); -
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"><?php _e( 'Filter themes list' ); ?></h2> 139 142 140 <div class="wp-filter ">143 <div class="wp-filter hide-if-no-js"> 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>207 <h2 class="screen-reader-text hide-if-no-js"><?php _e( 'Themes list' ); ?></h2> 205 208 <div class="theme-browser content-filterable"></div> 206 209 <div class="theme-install-overlay wp-full-overlay expanded"></div> 207 210