Make WordPress Core

Changeset 26728


Ignore:
Timestamp:
12/06/2013 05:10:38 PM (10 years ago)
Author:
nacin
Message:

Remove screenshotGallery. see #25948.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/theme.js

    r26726 r26728  
    340340    },
    341341
    342     // Setups an image gallery using the theme screenshots supplied by a theme
    343     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 it
    350         // at the top of the stack in a larger size
    351         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 
    361342    // Confirmation dialoge for deleting a theme
    362343    deleteTheme: function() {
     
    524505        this.overlay.render();
    525506        this.$el.append( this.overlay.el );
    526 
    527         this.overlay.screenshotGallery();
    528507
    529508        // Bind to theme:next and theme:previous
     
    535514            // Renders the next theme on the overlay
    536515            self.next( [ self.model.cid ] );
    537             self.overlay.screenshotGallery();
    538516
    539517        })
     
    541519            // Renders the previous theme on the overlay
    542520            self.previous( [ self.model.cid ] );
    543             self.overlay.screenshotGallery();
    544521        });
    545522    },
  • trunk/src/wp-admin/themes.php

    r26726 r26728  
    312312            <div class="theme-screenshots">
    313313            <# 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>
    320315            <# } else { #>
    321                 <div class="screenshot first blank"></div>
     316                <div class="screenshot blank"></div>
    322317            <# } #>
    323318            </div>
Note: See TracChangeset for help on using the changeset viewer.