Changeset 38640
- Timestamp:
- 09/21/2016 05:53:29 PM (8 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/common.css
r38617 r38640 1046 1046 } 1047 1047 1048 .wp-filter .drawer-toggle { 1049 display: inline-block; 1050 margin: 0 10px; 1051 padding: 4px 6px; 1048 .wp-filter .button.drawer-toggle { 1049 margin: 10px 9px 0; 1050 padding: 0 10px 0 6px; 1051 border-color: transparent; 1052 background-color: transparent; 1052 1053 color: #666; 1053 cursor: pointer; 1054 vertical-align: baseline; 1055 -webkit-box-shadow: none; 1056 box-shadow: none; 1054 1057 } 1055 1058 1056 1059 .wp-filter .drawer-toggle:before { 1057 display: inline-block;1058 vertical-align: top;1059 1060 content: "\f111"; 1060 1061 margin: 0 5px 0 0; 1061 width: 16px;1062 height: 16px;1063 1062 color: #72777c; 1064 -webkit-transition: color .1s ease-in 0; 1065 transition: color .1s ease-in 0; 1066 font-family: dashicons; 1067 font-size: 16px; 1068 line-height: 1; 1069 text-align: center; 1070 text-decoration: inherit; 1071 font-weight: 400; 1072 font-style: normal; 1063 font: normal 16px/1 dashicons; 1064 vertical-align: text-bottom; 1073 1065 -webkit-font-smoothing: antialiased; 1074 } 1075 1076 .wp-filter .drawer-toggle:hover, 1077 .wp-filter .drawer-toggle:hover:before { 1066 -moz-osx-font-smoothing: grayscale; 1067 } 1068 1069 .wp-filter .button.drawer-toggle:hover, 1070 .wp-filter .drawer-toggle:hover:before, 1071 .wp-filter .button.drawer-toggle:focus, 1072 .wp-filter .drawer-toggle:focus:before { 1073 background-color: transparent; 1078 1074 color: #00a0d2; 1075 } 1076 1077 .wp-filter .button.drawer-toggle:hover, 1078 .wp-filter .button.drawer-toggle:focus:active { 1079 border-color: transparent; 1080 } 1081 1082 .wp-filter .button.drawer-toggle:focus { 1083 border-color: #5b9dd9; 1084 } 1085 1086 .wp-filter .button.drawer-toggle:active { 1087 background: transparent; 1088 -webkit-box-shadow: none; 1089 box-shadow: none; 1090 -webkit-transform: none; 1091 -ms-transform: none; 1092 transform: none; 1079 1093 } 1080 1094 … … 1093 1107 } 1094 1108 1095 .show-favorites-form . wp-filter .favorites-form {1109 .show-favorites-form .favorites-form { 1096 1110 display: block; 1097 1111 } … … 1111 1125 } 1112 1126 1127 .show-filters .filter-links a.current { 1128 border-bottom: none; 1129 } 1130 1131 .show-filters .wp-filter .button.drawer-toggle { 1132 -webkit-border-radius: 2px; 1133 border-radius: 2px; 1134 background: #72777c; 1135 color: #fff; 1136 } 1137 1113 1138 .show-filters .wp-filter .drawer-toggle:hover, 1114 1139 .show-filters .wp-filter .drawer-toggle:focus { 1115 1140 background: rgb(46, 162, 204); 1116 }1117 1118 .show-filters .filter-links a.current {1119 border-bottom: none;1120 }1121 1122 .show-filters .wp-filter .drawer-toggle {1123 -webkit-border-radius: 2px;1124 border-radius: 2px;1125 border: none;1126 background: #72777c;1127 color: #fff;1128 1141 } 1129 1142 … … 1171 1184 1172 1185 .filter-drawer .buttons { 1186 clear: both; 1173 1187 margin-bottom: 20px; 1188 } 1189 1190 .filter-drawer .filter-group + .buttons { 1191 margin-bottom: 0; 1192 padding-top: 20px; 1174 1193 } 1175 1194 … … 1184 1203 display: none; 1185 1204 margin-left: 10px; 1205 } 1206 1207 .wp-filter .button-link.edit-filters { 1208 color: #0073aa; 1209 text-decoration: underline; 1210 padding: 0 5px; 1211 line-height: 28px; 1212 } 1213 1214 .wp-filter .button-link.edit-filters:hover { 1215 color: #00a0d2; 1216 } 1217 1218 .wp-filter .button-link.edit-filters:focus { 1219 color: #124964; 1186 1220 } 1187 1221 … … 1227 1261 } 1228 1262 1263 .show-filters .favorites-form, 1229 1264 .show-filters .content-filterable, 1230 1265 .show-filters.filters-applied.loading-content .content-filterable, … … 3722 3757 line-height: 25px; 3723 3758 } 3759 3760 .wp-filter .button.drawer-toggle { 3761 font-size: 13px; 3762 line-height: 26px; 3763 height: 28px; 3764 } 3724 3765 } 3725 3766 -
trunk/src/wp-admin/js/theme.js
r38520 r38640 1524 1524 $( '.filter-links li > a.current' ).removeClass( 'current' ); 1525 1525 $( 'body' ).removeClass( 'show-filters filters-applied show-favorites-form' ); 1526 $( '.drawer-toggle' ).attr( 'aria-expanded', 'false' ); 1526 1527 1527 1528 // Get the themes by sending Ajax POST request to api.wordpress.org/themes … … 1546 1547 'click .filter-group [type="checkbox"]': 'addFilter', 1547 1548 'click .filter-drawer .clear-filters': 'clearFilters', 1548 'click . filtered-by': 'backToFilters',1549 'click .edit-filters': 'backToFilters', 1549 1550 'click .favorites-form-submit' : 'saveUsername', 1550 1551 'keyup #wporg-username-input': 'saveUsername' … … 1622 1623 1623 1624 $( 'body' ).removeClass( 'filters-applied show-filters' ); 1625 $( '.drawer-toggle' ).attr( 'aria-expanded', 'false' ); 1624 1626 1625 1627 // Bail if this is already active … … 1641 1643 1642 1644 if ( 'favorites' === sort ) { 1643 $ 1645 $( 'body' ).addClass( 'show-favorites-form' ); 1644 1646 } else { 1645 $ 1647 $( 'body' ).removeClass( 'show-favorites-form' ); 1646 1648 } 1647 1649 … … 1691 1693 if ( event ) { 1692 1694 event.preventDefault(); 1695 } 1696 1697 if ( ! tags ) { 1698 wp.a11y.speak( l10n.selectFeatureFilter ); 1699 return; 1693 1700 } 1694 1701 … … 1783 1790 // Toggle the full filters navigation 1784 1791 moreFilters: function( event ) { 1792 var $body = $( 'body' ), 1793 $toggleButton = $( '.drawer-toggle' ); 1794 1785 1795 event.preventDefault(); 1786 1796 1787 if ( $ ( 'body' ).hasClass( 'filters-applied' ) ) {1797 if ( $body.hasClass( 'filters-applied' ) ) { 1788 1798 return this.backToFilters(); 1789 1799 } 1790 1800 1791 // If the filters section is opened and filters are checked1792 // run the relevant query collapsing to filtered-by state1793 if ( $( 'body' ).hasClass( 'show-filters' ) && this.filtersChecked() ) {1794 return this.addFilter();1795 }1796 1797 1801 this.clearSearch(); 1798 1802 1799 1803 themes.router.navigate( themes.router.baseUrl( '' ) ); 1800 $( 'body' ).toggleClass( 'show-filters' ); 1804 // Toggle the feature filters view. 1805 $body.toggleClass( 'show-filters' ); 1806 // Toggle the `aria-expanded` button attribute. 1807 $toggleButton.attr( 'aria-expanded', $body.hasClass( 'show-filters' ) ); 1801 1808 }, 1802 1809 -
trunk/src/wp-admin/theme-install.php
r38071 r38640 38 38 'themes' => false, 39 39 'settings' => array( 40 'isInstall' 41 'canInstall' 42 'installURI' 43 'adminUrl' 40 'isInstall' => true, 41 'canInstall' => current_user_can( 'install_themes' ), 42 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null, 43 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ) 44 44 ), 45 45 'l10n' => array( 46 'addNew' => __( 'Add New Theme' ), 47 'search' => __( 'Search Themes' ), 48 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) 49 'upload' => __( 'Upload Theme' ), 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>.' ), 52 'themesFound' => __( 'Number of Themes found: %d' ), 53 'noThemesFound' => __( 'No themes found. Try a different search.' ), 54 'collapseSidebar' => __( 'Collapse Sidebar' ), 55 'expandSidebar' => __( 'Expand Sidebar' ), 46 'addNew' => __( 'Add New Theme' ), 47 'search' => __( 'Search Themes' ), 48 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis) 49 'upload' => __( 'Upload Theme' ), 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>.' ), 52 'themesFound' => __( 'Number of Themes found: %d' ), 53 'noThemesFound' => __( 'No themes found. Try a different search.' ), 54 'collapseSidebar' => __( 'Collapse Sidebar' ), 55 'expandSidebar' => __( 'Expand Sidebar' ), 56 /* translators: hidden accessibility text */ 57 'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ), 56 58 ), 57 59 'installedThemes' => array_keys( $installed_themes ), … … 153 155 </ul> 154 156 155 < a class="drawer-toggle" href="#"><?php _e( 'Feature Filter' ); ?></a>157 <button type="button" class="button drawer-toggle" aria-expanded="false"><?php _e( 'Feature Filter' ); ?></button> 156 158 157 159 <div class="search-form"></div> … … 179 181 <div class="filter-drawer"> 180 182 <div class="buttons"> 181 < a class="apply-filters button button-secondary" href="#"><?php _e( 'Apply Filters' ); ?><span></span></a>182 < a class="clear-filters button button-secondary" href="#"><?php _e( 'Clear' ); ?></a>183 <button type="button" class="apply-filters button"><?php _e( 'Apply Filters' ); ?><span></span></button> 184 <button type="button" class="clear-filters button" aria-label="<?php esc_attr_e( 'Clear current filters' ); ?>"><?php _e( 'Clear' ); ?></button> 183 185 </div> 184 186 <?php … … 198 200 } 199 201 ?> 202 <div class="buttons"> 203 <button type="button" class="apply-filters button"><?php _e( 'Apply Filters' ); ?><span></span></button> 204 <button type="button" class="clear-filters button" aria-label="<?php esc_attr_e( 'Clear current filters' ); ?>"><?php _e( 'Clear' ); ?></button> 205 </div> 200 206 <div class="filtered-by"> 201 207 <span><?php _e( 'Filtering by:' ); ?></span> 202 208 <div class="tags"></div> 203 < a href="#"><?php _e( 'Edit' ); ?></a>209 <button type="button" class="button-link edit-filters"><?php _e( 'Edit Filters' ); ?></button> 204 210 </div> 205 211 </div>
Note: See TracChangeset
for help on using the changeset viewer.