Make WordPress Core

Ticket #31791: 31791.diff

File 31791.diff, 3.7 KB (added by celloexpressions, 11 years ago)
  • src/wp-admin/css/customize-controls.css

     
    883883        margin-bottom: 8px;
    884884}
    885885
     886.wp-customizer .theme-browser .themes .more-details {
     887        z-index: 1;
     888}
     889.wp-customizer .theme-browser .theme a:focus .more-details {
     890        opacity: 1;
     891}
     892
    886893.wp-customizer .theme-browser .themes {
    887894        padding-bottom: 8px;
    888895}
  • src/wp-admin/js/customize-controls.js

     
    639639                                section.closeDetails();
    640640                        });
    641641
    642                         section.container.on( 'click keydown', '.theme-actions .button', function( event ) {
    643                                 if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
    644                                         return;
    645                                 }
    646 
    647                                 $( '.wp-full-overlay' ).addClass( 'customize-loading' );
    648                         });
    649 
    650642                        section.container.on( 'input', '#themes-filter', function( event ) {
    651643                                var count,
    652644                                        term = event.currentTarget.value.toLowerCase().trim().replace( '-', ' ' ),
     
    18541846                        var control = this;
    18551847
    18561848                        // Bind details view trigger.
    1857                         control.container.on( 'click keydown', '.theme', function( event ) {
     1849                        control.container.on( 'click keydown', '.theme-actions .button', function( event ) {
    18581850                                if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
    18591851                                        return;
    18601852                                }
    18611853
    1862                                 if ( 'button' === event.target.className ) {
    1863                                         return;
    1864                                 }
    1865 
    18661854                                api.section( control.section() ).showDetails( control.params.theme );
    18671855                        });
    18681856
    1869                         control.container.on( 'click keydown', '.theme-actions .button', function( event ) {
     1857                        control.container.on( 'click keydown', '.preview-link', function( event ) {
    18701858                                if ( api.utils.isKeydownButNotEnterEvent( event ) ) {
    18711859                                        return;
    18721860                                }
  • src/wp-includes/class-wp-customize-control.php

     
    12011201         */
    12021202        public function content_template() {
    12031203        ?>
    1204                 <div class="theme<# if ( data.theme.active ) { #> active<# } #>" tabindex="0" aria-describedby="{{ data.theme.id }}-action {{ data.theme.id }}-name">
     1204                <div class="theme<# if ( data.theme.active ) { #> active<# } #>" aria-describedby="{{ data.theme.id }}-action {{ data.theme.id }}-name">
    12051205                        <# if ( data.theme.screenshot[0] ) { #>
    12061206                                <div class="theme-screenshot">
    1207                                         <img src="{{ data.theme.screenshot[0] }}" alt="" />
     1207                                        <a class="preview-link" href="<?php echo add_query_arg( 'theme', '{{ data.theme.id }}', remove_query_arg( 'theme' ) ); ?>" target="_top">
     1208                                                <span class="more-details"><?php _e( 'Live Preview' ); ?></span>
     1209                                                <img src="{{ data.theme.screenshot[0] }}" alt="{{ data.theme.name }}" />
     1210                                        </a>
    12081211                                </div>
    12091212                        <# } else { #>
    12101213                                <div class="theme-screenshot blank"></div>
    12111214                        <# } #>
    1212                         <span class="more-details" id="{{ data.theme.id }}-action"><?php _e( 'Theme Details' ); ?></span>
    12131215                        <div class="theme-author"><?php printf( __( 'By %s' ), '{{ data.theme.author }}' ); ?></div>
    12141216
    12151217                        <# if ( data.theme.active ) { #>
     
    12251227
    12261228                        <# if ( ! data.theme.active ) { #>
    12271229                                <div class="theme-actions">
    1228                                         <a class="button" href="<?php echo add_query_arg( 'theme', '{{ data.theme.id }}', remove_query_arg( 'theme' ) ); ?>" target="_top"><?php _e( 'Live Preview' ); ?></a>
     1230                                        <span class="button" tabindex="0" id="{{ data.theme.id }}-action"><?php _e( 'Theme Details' ); ?></span>
    12291231                                </div>
    12301232                        <# } #>
    12311233                </div>