Make WordPress Core

Ticket #26527: 26527.2.diff

File 26527.2.diff, 2.4 KB (added by lancewillett, 11 years ago)

Use real href values, spaces to tabs for indentation, and simpler preventDefault

  • wp-admin/css/wp-admin.css

     
    64836483        padding: 15px 12px;
    64846484        text-align: center;
    64856485        border-radius: 3px;
     6486        text-decoration:none;
    64866487        -webkit-transition: opacity 0.1s ease-in-out;
    64876488        transition:         opacity 0.1s ease-in-out;
    64886489}
    64896490
    6490 .theme-browser.rendered .theme:hover .more-details {
     6491.theme-browser.rendered .theme:hover .more-details,
     6492.theme-browser.rendered .theme .more-details:focus {
    64916493        opacity: 1;
    64926494}
    64936495
  • wp-admin/js/theme.js

     
    233233                }
    234234
    235235                this.trigger( 'theme:expand', self.model.cid );
     236
     237                event.preventDefault();
    236238        },
    237239
    238240        preventExpand: function() {
     
    735737        };
    736738
    737739        $(window).resize(function(){ tb_position(); });
     740
     741        // Make theme actions available via keyboard navigation.
     742        $( '.theme-browser .theme .theme-actions a' ).on( 'focus', function() {
     743                if ( $( this ).parent().parent().hasClass( 'active' ) === false ) {
     744                        $( this ).parent().css( 'opacity', '1' );
     745                }
     746        } );
     747
     748        $( '.theme-browser .theme .theme-actions a' ).on( 'blur', function() {
     749                if ( $( this ).parent().parent().hasClass( 'active' ) === false ) {
     750                        $( this ).parent().css( 'opacity', '0' );
     751                }
     752        } );
    738753});
  • wp-admin/themes.php

     
    200200        <?php } else { ?>
    201201                <div class="theme-screenshot blank"></div>
    202202        <?php } ?>
    203         <span class="more-details"><?php _e( 'Theme Details' ); ?></span>
     203        <a class="more-details" href="<?php echo $theme['actions']['preview']; ?>"><?php _e( 'Theme Details' ); ?></a>
    204204        <div class="theme-author"><?php printf( __( 'By %s' ), $theme['author'] ); ?></div>
    205205
    206206        <?php if ( $theme['active'] ) { ?>
     
    277277        <# } else { #>
    278278                <div class="theme-screenshot blank"></div>
    279279        <# } #>
    280         <span class="more-details"><?php _e( 'Theme Details' ); ?></span>
     280        <a class="more-details" href="{{{ data.actions.preview }}}"><?php _e( 'Theme Details' ); ?></a>
    281281        <div class="theme-author"><?php printf( __( 'By %s' ), '{{{ data.author }}}' ); ?></div>
    282282       
    283283        <# if ( data.active ) { #>