Ticket #21283: 21283.diff
File 21283.diff, 4.5 KB (added by , 12 years ago) |
---|
-
wp-includes/class-wp-customize-section.php
80 80 protected function render() { 81 81 ?> 82 82 <li id="customize-section-<?php echo esc_attr( $this->id ); ?>" class="control-section customize-section"> 83 <h3 class="customize-section-title" t itle="<?php echo esc_attr( $this->description ); ?>"><?php echo esc_html( $this->title ); ?></h3>83 <h3 class="customize-section-title" tabindex="0" title="<?php echo esc_attr( $this->description ); ?>"><?php echo esc_html( $this->title ); ?></h3> 84 84 <ul class="customize-section-content"> 85 85 <?php 86 86 foreach ( $this->controls as $control ) -
wp-admin/customize.php
83 83 $cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') ); 84 84 ?> 85 85 86 <div class="wp-full-overlay-sidebar-content" >86 <div class="wp-full-overlay-sidebar-content" tabindex="-1"> 87 87 <div id="customize-info" class="customize-section<?php if ( $cannot_expand ) echo ' cannot-expand'; ?>"> 88 <div class="customize-section-title" >88 <div class="customize-section-title" tabindex="0"> 89 89 <span class="preview-notice"><?php 90 90 /* translators: %s is the theme name in the Customize/Live Preview pane */ 91 91 echo sprintf( __( 'You are previewing %s' ), '<strong class="theme-name">' . $wp_customize->theme()->display('Name') . '</strong>' ); -
wp-admin/js/customize-controls.js
824 824 }()); 825 825 826 826 // Temporary accordion code. 827 $('.customize-section-title').click( function( event ) { 827 var accordianFrozen = false; 828 $('.customize-section-title').bind('click focus', function( event ) { 828 829 var clicked = $( this ).parents( '.customize-section' ); 829 830 830 if ( clicked.hasClass('cannot-expand') )831 if ( clicked.hasClass('cannot-expand') || accordianFrozen ) 831 832 return; 833 834 // Don't want to fire focus and click at same time 835 accordianFrozen = true; 836 setTimeout(function () { 837 accordianFrozen = false; 838 }, 400); 839 840 // Scroll up if on #customize-section-title_tagline 841 if ('customize-section-title_tagline' === clicked.attr('id')) 842 $('.wp-full-overlay-sidebar-content').scrollTop(0); 832 843 833 844 $( '.customize-section' ).not( clicked ).removeClass( 'open' ); 834 845 clicked.toggleClass( 'open' ); … … 839 850 $('#save').click( function( event ) { 840 851 previewer.save(); 841 852 event.preventDefault(); 853 }).keydown( function( event ) { 854 if ( 13 === event.which ) // enter 855 previewer.save(); 856 event.preventDefault(); 842 857 }); 858 859 $('.back').keydown( function( event ) { 860 if ( 9 === event.which ) // tab 861 return; 862 var thisHref = $(this).attr('href'); 863 if ( 13 === event.which ) // enter 864 window.location = thisHref; 865 event.preventDefault(); 866 }); 843 867 844 868 $('.collapse-sidebar').click( function( event ) { 845 869 overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' ); … … 958 982 }); 959 983 960 984 api.trigger( 'ready' ); 985 986 // Make sure left column gets focus 987 $('.back').focus(); 988 setTimeout(function () { 989 $('.back').focus(); 990 }, 800); 991 961 992 }); 962 993 963 994 })( wp, jQuery ); 995 No newline at end of file -
wp-admin/css/customize-controls.css
67 67 68 68 .control-section:hover .customize-section-title, 69 69 .control-section .customize-section-title:hover, 70 .control-section.open .customize-section-title { 70 .control-section.open .customize-section-title, 71 .customize-section-title:focus { 71 72 color: #fff; 72 73 text-shadow: 0 -1px 0 #333; 73 74 background: #808080; … … 126 127 color: #999; 127 128 } 128 129 130 #customize-info .customize-section-title:focus .preview-notice { 131 color: #ccc; 132 text-shadow: 0 -1px 0 #333; 133 } 134 129 135 #customize-info .theme-name { 130 136 font-size: 20px; 131 137 font-weight: 200; … … 135 141 text-shadow: 0 1px 0 #fff; 136 142 } 137 143 144 #customize-info .customize-section-title:focus .theme-name { 145 color: #fff; 146 text-shadow: 0 -1px 0 #333; 147 } 148 138 149 #customize-info .theme-screenshot { 139 150 width: 258px; 140 151 border: 1px solid #ccc;