Changeset 26728
- Timestamp:
- 12/06/2013 05:10:38 PM (10 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/theme.js
r26726 r26728 340 340 }, 341 341 342 // Setups an image gallery using the theme screenshots supplied by a theme343 screenshotGallery: function() {344 var screenshots = $( '#theme-screenshots' ),345 current, img;346 347 screenshots.find( 'div.first' ).next().addClass( 'selected' );348 349 // Clicking on a screenshot thumbnail drops it350 // at the top of the stack in a larger size351 screenshots.on( 'click', 'div.thumb', function() {352 current = $( this );353 img = $( this ).find( 'img' ).clone();354 355 current.siblings( '.first' ).html( img );356 current.siblings( '.selected' ).removeClass( 'selected' );357 current.addClass( 'selected' );358 });359 },360 361 342 // Confirmation dialoge for deleting a theme 362 343 deleteTheme: function() { … … 524 505 this.overlay.render(); 525 506 this.$el.append( this.overlay.el ); 526 527 this.overlay.screenshotGallery();528 507 529 508 // Bind to theme:next and theme:previous … … 535 514 // Renders the next theme on the overlay 536 515 self.next( [ self.model.cid ] ); 537 self.overlay.screenshotGallery();538 516 539 517 }) … … 541 519 // Renders the previous theme on the overlay 542 520 self.previous( [ self.model.cid ] ); 543 self.overlay.screenshotGallery();544 521 }); 545 522 }, -
trunk/src/wp-admin/themes.php
r26726 r26728 312 312 <div class="theme-screenshots"> 313 313 <# if ( data.screenshot[0] ) { #> 314 <div class="screenshot first"><img src="{{ data.screenshot[0] }}" alt="" /></div> 315 <# if ( _.size( data.screenshot ) > 1 ) { 316 _.each ( data.screenshot, function( image ) { 317 #><div class="screenshot thumb"><img src="{{ image }}" alt="" /></div><# 318 }); 319 } #> 314 <div class="screenshot"><img src="{{ data.screenshot[0] }}" alt="" /></div> 320 315 <# } else { #> 321 <div class="screenshot firstblank"></div>316 <div class="screenshot blank"></div> 322 317 <# } #> 323 318 </div>
Note: See TracChangeset
for help on using the changeset viewer.