Make WordPress Core

Ticket #26527: 26527.diff

File 26527.diff, 3.1 KB (added by jorbin, 11 years ago)
  • src/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
     6496
    64946497/**
    64956498 * Displays a theme update notice
    64966499 * when an update is available.
  • src/wp-admin/js/theme.js

     
    188188
    189189        events: {
    190190                'click': 'expand',
     191        'click': 'preventDefault',
    191192                'touchend': 'expand',
    192193                'touchmove': 'preventExpand'
    193194        },
     
    235236                this.trigger( 'theme:expand', self.model.cid );
    236237        },
    237238
     239    preventDefault: function( event ) {
     240        event.preventDefault();
     241        this.expand();
     242
     243    },
     244
    238245        preventExpand: function() {
    239246                this.touchDrag = true;
    240247        }
     
    487494                        // Binds to theme:expand to show the modal box
    488495                        // with the theme details
    489496                        self.listenTo( self.theme, 'theme:expand', self.expand, self );
     497                        self.listenTo( self.theme, 'theme:expand', self.expand, self );
    490498                });
    491499
    492500                // 'Add new theme' element shown at the end of the grid
     
    735743        };
    736744
    737745        $(window).resize(function(){ tb_position(); });
     746
     747
     748    // Hacky Hack to make theme actions available via keyboard navigation
     749    $('.theme-browser .theme .theme-actions a').on('focus', function(){
     750        if ( $(this).parent().parent().hasClass('active') === false ) {
     751            $(this).parent().css('opacity', '1')
     752        }
     753    });
     754    $('.theme-browser .theme .theme-actions a').on('blur', function(){
     755        console.log( $(this).parent().parent().hasClass('active') )
     756        if ( $(this).parent().parent().hasClass('active') === false ) {
     757            $(this).parent().css('opacity', '0')
     758        }
     759    });
     760   
    738761});
  • src/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 _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="#"><?php _e( 'Theme Details' ); ?></a>
    281281        <div class="theme-author"><?php printf( __( 'By %s' ), '{{{ data.author }}}' ); ?></div>
    282282       
    283283        <# if ( data.active ) { #>