Changeset 1453
- Timestamp:
- 03/26/2015 12:43:29 AM (10 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/js/theme.js
r1452 r1453 512 512 this.setNavButtonsState(); 513 513 514 // Hide previous/next navigation if there is only one theme515 if ( this.model.collection.length === 1 ) {516 preview.$el.addClass( 'no-navigation' );517 } else {518 preview.$el.removeClass( 'no-navigation' );519 }520 521 514 if ( themes.data.settings.isMobile ) { 522 515 preview.$el.addClass( 'wp-full-overlay collapsed' ); … … 531 524 // for `theme:next` and `theme:previous` events. 532 525 this.listenTo( preview, 'theme:next', function() { 526 this.trigger( 'theme:next' ); 527 533 528 // Keep local track of current theme model. 534 529 current = self.model; … … 556 551 }) 557 552 .listenTo( preview, 'theme:previous', function() { 553 this.trigger( 'theme:previous' ); 554 558 555 // Keep track of current theme model. 559 556 current = self.model; … … 813 810 this.$el.html( this.html( data ) ); 814 811 815 themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.get( 'id' ) + '/preview') );812 themes.router.navigate( themes.router.baseUrl( themes.router.themePath + this.model.get( 'id' ) ) ); 816 813 817 814 this.$el.fadeIn( 200, function() { … … 1073 1070 // Sanity check which also serves as a boundary test 1074 1071 if ( nextModel !== undefined ) { 1075 1076 // We have a new theme...1077 // Close the overlay1078 this.overlay.closeOverlay();1079 1080 1072 // Trigger a route update for the current model 1081 1073 self.theme.trigger( 'theme:expand', nextModel.cid ); 1082 1083 1074 } 1084 1075 }, … … 1097 1088 1098 1089 if ( previousModel !== undefined ) { 1099 1100 // We have a new theme...1101 // Close the overlay1102 this.overlay.closeOverlay();1103 1104 1090 // Trigger a route update for the current model 1105 1091 self.theme.trigger( 'theme:expand', previousModel.cid ); 1106 1107 1092 } 1108 1093 } … … 1461 1446 'search/:query/' : 'search', 1462 1447 'author/:author/': 'author', 1463 ':slug/preview/' : 'preview',1464 1448 ':slug/' : 'preview', 1465 1449 '' : 'sort' -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme-preview.php
r1374 r1453 12 12 <span class="theme-by"><?php printf( __( 'By %s' ), '{{ data.author.display_name }}' ); ?></span> 13 13 14 <img class="theme-screenshot" src="{{ data.screenshot_url }} " alt="" />14 <img class="theme-screenshot" src="{{ data.screenshot_url }}?w=520&strip=all" alt="" /> 15 15 16 16 <div class="theme-details">
Note: See TracChangeset
for help on using the changeset viewer.