Changeset 29596
- Timestamp:
- 08/25/2014 03:57:34 PM (10 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/common.css
r29591 r29596 935 935 936 936 /* Filter bar */ 937 938 .wp-title-count {939 display: inline;940 position: relative;941 top: -3px;942 margin-left: 5px;943 margin-right: 20px;944 padding: 4px 10px;945 -webkit-border-radius: 30px;946 border-radius: 30px;947 background: #777;948 color: #fff;949 font-size: 14px;950 font-weight: 600;951 }952 953 937 .wp-filter { 954 938 display: inline-block; … … 972 956 } 973 957 974 . wp-filter-count {958 .filter-count { 975 959 display: inline-block; 976 960 vertical-align: middle; … … 978 962 } 979 963 980 .wp-filter-count .count { 964 .title-count, 965 .filter-count .count { 981 966 display: inline-block; 982 967 position: relative; … … 991 976 } 992 977 993 .wp-filter-links { 978 /* not a part of filter bar, but derived from it, so here for now */ 979 .title-count { 980 display: inline; 981 top: -3px; 982 margin-left: 5px; 983 margin-right: 20px; 984 } 985 986 .filter-links { 994 987 display: inline-block; 995 988 margin: 0; 996 989 } 997 990 998 . wp-filter-links li {991 .filter-links li { 999 992 display: inline-block; 1000 993 margin: 0; 1001 994 } 1002 995 1003 . wp-filter-link{996 .filter-links li > a { 1004 997 display: inline-block; 1005 998 margin: 0 10px; … … 1010 1003 } 1011 1004 1012 .wp-filter-links .current { 1005 .filter-links .current { 1006 box-shadow: none; 1013 1007 border-bottom: 4px solid #666; 1014 1008 color: #222; 1015 1009 } 1016 1010 1017 .wp-filter-search { 1018 position: absolute; 1019 top: 9px; 1020 right: 10px; 1021 left: auto; 1011 .filter-links li > a:hover, 1012 .filter-links li > a:focus, 1013 .show-filters .filter-links a.current:hover, 1014 .show-filters .filter-links a.current:focus { 1015 color: #2ea2cc; 1016 } 1017 1018 .wp-filter .search-form { 1019 float: right; 1020 margin-top: 9px; 1021 } 1022 1023 .wp-filter .search-form input[type="search"] { 1022 1024 padding: 3px 5px; 1023 1025 width: 280px; … … 1027 1029 } 1028 1030 1029 .wp-filter-no-results { 1030 color: #999; 1031 font-size: 18px; 1032 font-style: normal; 1033 margin: 0; 1034 padding: 100px 0 0; 1035 text-align: center; 1036 } 1037 1038 .wp-filter-drawer-toggle { 1031 .wp-filter .search-form select { 1032 height: 33px; 1033 vertical-align: top; 1034 } 1035 1036 .wp-filter .drawer-toggle { 1039 1037 display: inline-block; 1040 1038 margin: 0 10px; … … 1044 1042 } 1045 1043 1046 .wp-filter -drawer-toggle:before {1044 .wp-filter .drawer-toggle:before { 1047 1045 display: inline-block; 1048 1046 vertical-align: top; … … 1064 1062 } 1065 1063 1066 .wp-filter-drawer-toggle:hover { 1067 color: #777; 1068 } 1069 1070 .wp-filter-drawer-toggle.current:before { 1064 .wp-filter .drawer-toggle:hover, 1065 .wp-filter .drawer-toggle:hover:before { 1066 color: #2ea2cc; 1067 } 1068 1069 .wp-filter .drawer-toggle.current:before { 1071 1070 color: #fff; 1072 1071 } 1073 1072 1074 . wp-filter-drawer {1073 .filter-drawer { 1075 1074 display: none; 1076 1075 margin: 0 -20px; … … 1080 1079 } 1081 1080 1082 body.show-filter-drawer .wp-filter-drawer {1081 .show-filters .filter-drawer { 1083 1082 display: block; 1084 1083 overflow: hidden; 1085 1084 } 1086 1085 1087 body.show-filter-drawer .wp-filter-drawer-toggle:hover,1088 body.show-filter-drawer .wp-filter-drawer-toggle:focus {1086 .show-filters .wp-filter .drawer-toggle:hover, 1087 .show-filters .wp-filter .drawer-toggle:focus { 1089 1088 background: rgb(46, 162, 204); 1090 1089 } 1091 1090 1092 body.show-filter-drawer .wp-filter-link.current {1091 .show-filters .filter-links a.current { 1093 1092 border-bottom: none; 1094 1093 } 1095 1094 1096 body.show-filter-drawer .wp-filter-drawer-toggle {1095 .show-filters .wp-filter .drawer-toggle { 1097 1096 -webkit-border-radius: 2px; 1098 1097 border-radius: 2px; … … 1102 1101 } 1103 1102 1104 body.show-filter-drawer .wp-filter-drawer-toggle:before {1103 .show-filters .wp-filter .drawer-toggle:before { 1105 1104 color: #fff; 1106 1105 } 1107 1106 1108 . wp-filter-group {1107 .filter-group { 1109 1108 -webkit-box-sizing: border-box; 1110 1109 -moz-box-sizing: border-box; … … 1120 1119 } 1121 1120 1122 . wp-filter-group-wide {1121 .filter-group.wide { 1123 1122 width: 38%; 1124 1123 } 1125 1124 1126 . wp-filter-group-title{1125 .filter-group h4 { 1127 1126 position: relative; 1128 1127 margin: 0; 1129 1128 } 1130 1129 1131 . wp-filter-drawer ol {1130 .filter-drawer ol { 1132 1131 margin: 20px 0 0; 1133 1132 list-style-type: none; … … 1135 1134 } 1136 1135 1137 . wp-filter-drawer li {1136 .filter-drawer li { 1138 1137 display: inline-block; 1139 1138 vertical-align: top; … … 1144 1143 } 1145 1144 1146 . wp-filter-drawer-buttons {1145 .filter-drawer .buttons { 1147 1146 margin-bottom: 20px; 1148 1147 } 1149 1148 1150 . wp-filter .wp-filter-drawer-buttons .button span {1149 .filter-drawer .buttons .button span { 1151 1150 display: inline-block; 1152 1151 opacity: 0.8; … … 1160 1159 } 1161 1160 1162 . wp-filter-by {1161 .filtered-by { 1163 1162 display: none; 1164 1163 margin: 0; 1165 1164 } 1166 1165 1167 . wp-filter-by > span {1166 .filtered-by > span { 1168 1167 font-weight: 600; 1169 1168 } 1170 1169 1171 . wp-filter-by a {1170 .filtered-by a { 1172 1171 margin-left: 10px; 1173 1172 } 1174 1173 1175 . wp-filter-by .tags {1174 .filtered-by .tags { 1176 1175 display: inline; 1177 1176 } 1178 1177 1179 . wp-filter-by .tag {1178 .filtered-by .tag { 1180 1179 margin: 0 5px; 1181 1180 padding: 4px 8px; … … 1187 1186 } 1188 1187 1189 body.filters-applied .wp-filter-group,1190 body.filters-applied .wp-filter-drawer a.button,1191 body.filters-applied .wp-filter-drawer br {1188 .filters-applied .filter-group, 1189 .filters-applied .filter-drawer .buttons, 1190 .filters-applied .filter-drawer br { 1192 1191 display: none !important; 1193 1192 } 1194 1193 1195 body.filters-applied .wp-filter-by {1194 .filters-applied .filtered-by { 1196 1195 display: block; 1197 1196 } 1198 1197 1199 body.filters-applied .wp-filter-drawer {1198 .filters-applied .filter-drawer { 1200 1199 padding: 20px; 1201 1200 } 1202 1201 1203 body.show-filter-drawer .wp-filter-content, 1204 body.show-filter-drawer.filters-applied.loading-content .wp-filter-content { 1202 .show-filters .content-filterable, 1203 .show-filters.filters-applied.loading-content .content-filterable, 1204 .loading-content .content-filterable, 1205 .error .content-filterable { 1205 1206 display: none; 1206 1207 } 1207 1208 1208 body.show-filter-drawer.filters-applied .wp-filter-content{1209 .show-filters.filters-applied .content-filterable { 1209 1210 display: block; 1210 }1211 1212 .loading-content .wp-filter-content,1213 .error .wp-filter-content {1214 display: none;1215 1211 } 1216 1212 … … 1222 1218 1223 1219 @media only screen and (max-width: 1120px) { 1224 .wp-filter -search{1225 position: static;1220 .wp-filter .search-form { 1221 float: none; 1226 1222 margin: 20px 0; 1227 width: 100%; 1228 } 1229 1230 .wp-filter-drawer { 1223 } 1224 1225 .filter-drawer { 1231 1226 border-bottom: 1px solid #eee; 1232 1227 } 1233 1228 1234 . wp-filter-group {1229 .filter-group { 1235 1230 margin-bottom: 0; 1236 1231 margin-top: 5px; … … 1238 1233 } 1239 1234 1240 . wp-filter-group li {1235 .filter-group li { 1241 1236 margin: 10px 0; 1242 1237 } … … 1244 1239 1245 1240 @media only screen and (max-width: 782px) { 1246 . wp-filter-group,1247 . wp-filter-group li {1241 .filter-group, 1242 .filter-group li { 1248 1243 width: 100%; 1249 1244 } -
trunk/src/wp-admin/js/theme.js
r29346 r29596 1289 1289 } 1290 1290 1291 $( '. wp-filter-link.current' ).removeClass( 'current' );1292 $( 'body' ).removeClass( 'show-filter -drawerfilters-applied' );1291 $( '.filter-links li > a.current' ).removeClass( 'current' ); 1292 $( 'body' ).removeClass( 'show-filters filters-applied' ); 1293 1293 1294 1294 // Get the themes by sending Ajax POST request to api.wordpress.org/themes … … 1307 1307 // Register events for sorting and filters in theme-navigation 1308 1308 events: { 1309 'click . wp-filter-link': 'onSort',1309 'click .filter-links li > a': 'onSort', 1310 1310 'click .theme-filter': 'onFilter', 1311 'click .wp-filter-drawer-toggle': 'moreFilters', 1312 'click .wp-filter-drawer .apply-filters': 'applyFilters', 1313 'click .wp-filter-group [type="checkbox"]': 'addFilter', 1314 'click .wp-filter-drawer .clear-filters': 'clearFilters', 1315 'click .wp-filter-group-title': 'filterSection', 1316 'click .wp-filter-by a': 'backToFilters' 1311 'click .drawer-toggle': 'moreFilters', 1312 'click .filter-drawer .apply-filters': 'applyFilters', 1313 'click .filter-group [type="checkbox"]': 'addFilter', 1314 'click .filter-drawer .clear-filters': 'clearFilters', 1315 'click .filtered-by': 'backToFilters' 1317 1316 }, 1318 1317 … … 1387 1386 event.preventDefault(); 1388 1387 1389 $( 'body' ).removeClass( 'filters-applied show-filter -drawer' );1388 $( 'body' ).removeClass( 'filters-applied show-filters' ); 1390 1389 1391 1390 // Bail if this is already active … … 1403 1402 this.clearSearch(); 1404 1403 1405 $( '. wp-filter-link, .theme-filter' ).removeClass( this.activeClass );1404 $( '.filter-links li > a, .theme-filter' ).removeClass( this.activeClass ); 1406 1405 $( '[data-sort="' + sort + '"]' ).addClass( this.activeClass ); 1407 1406 … … 1420 1419 } 1421 1420 1422 $( '. wp-filter-link, .theme-section' ).removeClass( this.activeClass );1421 $( '.filter-links li > a, .theme-section' ).removeClass( this.activeClass ); 1423 1422 $el.addClass( this.activeClass ); 1424 1423 … … 1447 1446 tags = this.filtersChecked(), 1448 1447 request = { tag: tags }, 1449 filteringBy = $( '. wp-filter-by .tags' );1448 filteringBy = $( '.filtered-by .tags' ); 1450 1449 1451 1450 if ( event ) { … … 1454 1453 1455 1454 $( 'body' ).addClass( 'filters-applied' ); 1456 $( '. wp-filter-link.current' ).removeClass( 'current' );1455 $( '.filter-links li > a.current' ).removeClass( 'current' ); 1457 1456 filteringBy.empty(); 1458 1457 … … 1470 1469 // @return {array} of tags or false 1471 1470 filtersChecked: function() { 1472 var items = $( '. wp-filter-group' ).find( ':checkbox' ),1471 var items = $( '.filter-group' ).find( ':checkbox' ), 1473 1472 tags = []; 1474 1473 … … 1479 1478 // When no filters are checked, restore initial state and return 1480 1479 if ( tags.length === 0 ) { 1481 $( '. wp-filter-drawer .apply-filters' ).find( 'span' ).text( '' );1482 $( '. wp-filter-drawer .clear-filters' ).hide();1480 $( '.filter-drawer .apply-filters' ).find( 'span' ).text( '' ); 1481 $( '.filter-drawer .clear-filters' ).hide(); 1483 1482 $( 'body' ).removeClass( 'filters-applied' ); 1484 1483 return false; 1485 1484 } 1486 1485 1487 $( '. wp-filter-drawer .apply-filters' ).find( 'span' ).text( tags.length );1488 $( '. wp-filter-drawer .clear-filters' ).css( 'display', 'inline-block' );1486 $( '.filter-drawer .apply-filters' ).find( 'span' ).text( tags.length ); 1487 $( '.filter-drawer .clear-filters' ).css( 'display', 'inline-block' ); 1489 1488 1490 1489 return tags; … … 1495 1494 // Overwrite search container class to append search 1496 1495 // in new location 1497 searchContainer: $( '.wp-filter ' ),1496 searchContainer: $( '.wp-filter .search-form' ), 1498 1497 1499 1498 uploader: function() { … … 1520 1519 // If the filters section is opened and filters are checked 1521 1520 // run the relevant query collapsing to filtered-by state 1522 if ( $( 'body' ).hasClass( 'show-filter -drawer' ) && this.filtersChecked() ) {1521 if ( $( 'body' ).hasClass( 'show-filters' ) && this.filtersChecked() ) { 1523 1522 return this.addFilter(); 1524 1523 } … … 1527 1526 1528 1527 themes.router.navigate( themes.router.baseUrl( '' ) ); 1529 $( 'body' ).toggleClass( 'show-filter-drawer' ); 1530 }, 1531 1532 // Expand/collapse each individual filter section 1533 filterSection: function() { 1534 $( event.target ).parent().toggleClass( 'open' ); 1528 $( 'body' ).toggleClass( 'show-filters' ); 1535 1529 }, 1536 1530 … … 1538 1532 // @uses filtersChecked() 1539 1533 clearFilters: function( event ) { 1540 var items = $( '. wp-filter-group' ).find( ':checkbox' ),1534 var items = $( '.filter-group' ).find( ':checkbox' ), 1541 1535 self = this; 1542 1536 -
trunk/src/wp-admin/theme-install.php
r29217 r29596 136 136 137 137 <div class="wp-filter"> 138 <div class=" wp-filter-count">138 <div class="filter-count"> 139 139 <span class="count theme-count"></span> 140 140 </div> 141 141 142 <ul class=" wp-filter-links">143 <li><a class="wp-filter-link"href="#" data-sort="featured"><?php _ex( 'Featured', 'themes' ); ?></a></li>144 <li><a class="wp-filter-link"href="#" data-sort="popular"><?php _ex( 'Popular', 'themes' ); ?></a></li>145 <li><a class="wp-filter-link"href="#" data-sort="new"><?php _ex( 'Latest', 'themes' ); ?></a></li>142 <ul class="filter-links"> 143 <li><a href="#" data-sort="featured"><?php _ex( 'Featured', 'themes' ); ?></a></li> 144 <li><a href="#" data-sort="popular"><?php _ex( 'Popular', 'themes' ); ?></a></li> 145 <li><a href="#" data-sort="new"><?php _ex( 'Latest', 'themes' ); ?></a></li> 146 146 </ul> 147 147 148 <a class="wp-filter-drawer-toggle" href="#"><?php _e( 'Feature Filter' ); ?></a> 149 150 <div class="wp-filter-drawer"> 151 <div class="wp-filter-drawer-buttons"> 148 <a class="drawer-toggle" href="#"><?php _e( 'Feature Filter' ); ?></a> 149 150 <div class="search-form"></div> 151 152 <div class="filter-drawer"> 153 <div class="buttons"> 152 154 <a class="apply-filters button button-secondary" href="#"><?php _e( 'Apply Filters' ); ?><span></span></a> 153 155 <a class="clear-filters button button-secondary" href="#"><?php _e( 'Clear' ); ?></a> … … 157 159 foreach ( $feature_list as $feature_name => $features ) { 158 160 if ( $feature_name === 'Features' || $feature_name === __( 'Features' ) ) { // hack hack hack 159 echo '<div class=" wp-filter-group wp-filter-group-wide">';161 echo '<div class="filter-group wide">'; 160 162 } else { 161 echo '<div class=" wp-filter-group">';163 echo '<div class="filter-group">'; 162 164 } 163 165 $feature_name = esc_html( $feature_name ); 164 echo '<h4 class="wp-filter-group-title">' . $feature_name . '</h4>';166 echo '<h4>' . $feature_name . '</h4>'; 165 167 echo '<ol class="feature-group">'; 166 168 foreach ( $features as $feature => $feature_name ) { … … 173 175 } 174 176 ?> 175 <div class=" wp-filter-by">177 <div class="filtered-by"> 176 178 <span><?php _e( 'Filtering by:' ); ?></span> 177 179 <div class="tags"></div> … … 180 182 </div> 181 183 </div> 182 <div class="theme-browser wp-filter-content"></div>184 <div class="theme-browser content-filterable"></div> 183 185 <div class="theme-install-overlay wp-full-overlay expanded"></div> 184 186 -
trunk/src/wp-admin/themes.php
r29324 r29596 118 118 <div class="wrap"> 119 119 <h2><?php esc_html_e( 'Themes' ); ?> 120 <span class=" wp-title-count theme-count"><?php echo count( $themes ); ?></span>120 <span class="title-count theme-count"><?php echo count( $themes ); ?></span> 121 121 <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?> 122 122 <a href="<?php echo admin_url( 'theme-install.php' ); ?>" class="hide-if-no-js add-new-h2"><?php echo esc_html( _x( 'Add New', 'Add new theme' ) ); ?></a>
Note: See TracChangeset
for help on using the changeset viewer.