Changeset 1209
- Timestamp:
- 01/30/2015 10:28:07 PM (8 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
r1188 r1209 19 19 'touchmove': 'preventExpand' 20 20 }, 21 22 render: function() { 23 var data = this.model.toJSON(); 24 25 data.permalink = wp.themes.router.baseUrl( data.slug ); 26 27 // Render themes using the html template 28 this.$el.html( this.html( data ) ).attr({ 29 tabindex: 0, 30 'aria-describedby' : data.id + '-action ' + data.id + '-name' 31 }); 32 }, 33 34 // Single theme overlay screen 35 // It's shown when clicking a theme 36 expand: function( event ) { 37 var self = this; 38 39 event = event || window.event; 40 41 // 'enter' and 'space' keys expand the details view when a theme is :focused 42 if ( event.type === 'keydown' && ( event.which !== 13 && event.which !== 32 ) ) { 43 return; 44 } 45 46 // Bail if the user scrolled on a touch device 47 if ( this.touchDrag === true ) { 48 return this.touchDrag = false; 49 } 50 51 // Prevent the modal from showing when the user clicks 52 // one of the direct action buttons 53 if ( $( event.target ).is( '.theme-actions a' ) ) { 54 return; 55 } 56 57 // Set focused theme to current element 58 themes.focusedTheme = this.$el; 59 60 this.trigger( 'theme:expand', self.model.cid ); 61 event.preventDefault(); 62 } 21 63 }); 22 64 … … 41 83 data.is_outdated = updated.setYear(updated.getYear() + 1902).valueOf() < new Date().valueOf(); 42 84 43 // Make tags click able and seprated by a comma.85 // Make tags click-able and separated by a comma. 44 86 data.tags = _.map( data.tags, function( tag ) { 45 return '<a href="' +wp.themes.data.settings.adminUrl+'tag/'+tag+'/">'+tag+'</a>';87 return '<a href="' + wp.themes.router.baseUrl( 'tag/' + tag ) + '">' + tag + '</a>'; 46 88 }).join( ', ' ); 47 89 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/view-templates/theme.php
r1034 r1209 7 7 <div class="theme-screenshot blank"></div> 8 8 <# } #> 9 < span class="more-details "><?php _ex( 'More Info', 'theme' ); ?></span>9 <a class="more-details url" href="{{{ data.permalink }}}" rel="bookmark"><?php _ex( 'More Info', 'theme' ); ?></a> 10 10 <div class="theme-author"><?php printf( __( 'By %s' ), '<span class="author">{{ data.author }}</span>' ); ?></div> 11 11 <h3 class="theme-name entry-title">{{ data.name }}</h3>
Note: See TracChangeset
for help on using the changeset viewer.