Changeset 37742
- Timestamp:
- 06/17/2016 08:46:08 PM (9 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/common.css
r37740 r37742 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 -
trunk/src/wp-admin/css/themes.css
r37740 r37742 1040 1040 display: none; 1041 1041 margin: 0; 1042 padding: 0;1042 padding: 50px 0; 1043 1043 width: 100%; 1044 1044 overflow: hidden; … … 1067 1067 font-style: normal; 1068 1068 margin: 0; 1069 padding: 40px 00;1069 padding: 0; 1070 1070 text-align: center; 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 1071 } 1076 1072 … … 1086 1082 } 1087 1083 1088 body.no-results p.no-themes { 1089 display: block; 1090 } 1091 1092 body.show-upload-theme p.no-themes { 1093 display: none !important; 1084 .no-results p.no-themes { 1085 display: block; 1094 1086 } 1095 1087 -
trunk/src/wp-admin/js/theme.js
r37714 r37742 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() { … … 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 … … 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' … … 1896 1890 self.view.sort( sort ); 1897 1891 self.view.trigger( 'theme:close' ); 1898 });1899 1900 // Support the `upload` route by going straight to upload section1901 themes.router.on( 'route:upload', function() {1902 $( 'a.upload' ).trigger( 'click' );1903 1892 }); 1904 1893 -
trunk/src/wp-admin/theme-install.php
r37714 r37742 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"> … … 136 139 </div> 137 140 138 <h2 class="screen-reader-text "><?php _e( 'Filter themes list' ); ?></h2>139 140 <div class="wp-filter ">141 <h2 class="screen-reader-text hide-if-no-js"><?php _e( 'Filter themes list' ); ?></h2> 142 143 <div class="wp-filter hide-if-no-js"> 141 144 <div class="filter-count"> 142 145 <span class="count theme-count"></span> … … 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>
Note: See TracChangeset
for help on using the changeset viewer.