Ticket #21283: 21283.10.patch
File 21283.10.patch, 9.3 KB (added by , 12 years ago) |
---|
-
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; … … 155 166 margin: 0; 156 167 } 157 168 169 #customize-footer-actions .button-primary, 158 170 #customize-header-actions .button-primary { 159 171 float: right; 160 172 margin-top: 10px; 161 173 } 162 174 175 #customize-footer-actions .spinner, 163 176 #customize-header-actions .spinner { 164 177 margin-top: 16px; 165 178 margin-right: 4px; 166 179 } 167 180 181 .saving #customize-footer-actions .spinner, 168 182 .saving #customize-header-actions .spinner { 169 183 display: block; 170 184 } -
wp-admin/css/wp-admin.css
5571 5571 height: 100%; 5572 5572 } 5573 5573 5574 .wp-full-overlay-sidebar .wp-full-overlay-header, 5575 .wp-full-overlay-sidebar .wp-full-overlay-footer { 5574 .wp-full-overlay-sidebar .wp-full-overlay-header { 5576 5575 position: absolute; 5577 5576 left: 0; 5578 5577 right: 0; … … 5583 5582 margin: 0; 5584 5583 } 5585 5584 5586 .wp-full-overlay-sidebar .wp-full-overlay-header {5587 top: 0;5588 border-top: 0;5589 border-bottom: 1px solid #fff;5590 box-shadow: inset 0 -1px 0 0px #dfdfdf;5591 }5592 5593 5585 .wp-full-overlay-sidebar .wp-full-overlay-footer { 5594 5586 bottom: 0; 5595 5587 border-bottom: 0; … … 5638 5630 display: block; 5639 5631 width: 15px; 5640 5632 height: 15px; 5641 background: transparent url('../images/arrows.png') no-repeat 0 -72px;5633 background: transparent url('../images/arrows.png') no-repeat -1px -73px; 5642 5634 } 5643 5635 5644 5636 .wp-full-overlay.collapsed .collapse-sidebar-arrow { 5645 background-position: 0 -108px;5637 background-position: -1px -109px; 5646 5638 } 5647 5639 5648 5640 .wp-full-overlay .collapse-sidebar-label { -
wp-admin/customize.php
67 67 <body class="<?php echo esc_attr( $body_class ); ?>"> 68 68 <div class="wp-full-overlay expanded"> 69 69 <form id="customize-controls" class="wrap wp-full-overlay-sidebar"> 70 70 71 <div id="customize-header-actions" class="wp-full-overlay-header"> 71 72 <?php 72 73 $save_text = $wp_customize->is_theme_active() ? __( 'Save & Publish' ) : __( 'Save & Activate' ); 73 submit_button( $save_text, 'primary ', 'save', false );74 submit_button( $save_text, 'primary save', 'save', false ); 74 75 ?> 75 76 <span class="spinner"></span> 76 77 <a class="back button" href="<?php echo esc_url( $return ? $return : admin_url( 'themes.php' ) ); ?>"> 77 78 <?php _e( 'Cancel' ); ?> 78 79 </a> 79 80 </div> 80 81 81 82 <?php 82 83 $screenshot = $wp_customize->theme()->get_screenshot(); 83 84 $cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') ); 84 85 ?> 85 86 86 <div class="wp-full-overlay-sidebar-content" >87 <div class="wp-full-overlay-sidebar-content" tabindex="-1"> 87 88 <div id="customize-info" class="customize-section<?php if ( $cannot_expand ) echo ' cannot-expand'; ?>"> 88 <div class="customize-section-title" >89 <div class="customize-section-title" aria-label="<?php esc_attr_e( 'Theme Customizer Options' ); ?>" tabindex="0"> 89 90 <span class="preview-notice"><?php 90 91 /* translators: %s is the theme name in the Customize/Live Preview pane */ 91 92 echo sprintf( __( 'You are previewing %s' ), '<strong class="theme-name">' . $wp_customize->theme()->display('Name') . '</strong>' ); -
wp-admin/js/customize-controls.js
94 94 else 95 95 statuses.hide(); 96 96 }; 97 97 98 var toggleFreeze = false; 99 98 100 // Support the .dropdown class to open/close complex elements 99 this.container.on( 'click ', '.dropdown', function( event ) {101 this.container.on( 'click focus', '.dropdown', function( event ) { 100 102 event.preventDefault(); 101 control.container.toggleClass('open'); 103 104 if (!toggleFreeze) 105 control.container.toggleClass('open'); 106 107 // Don't want to fire focus and click at same time 108 toggleFreeze = true; 109 setTimeout(function () { 110 toggleFreeze = false; 111 }, 400); 102 112 }); 103 113 104 114 this.setting.bind( update ); … … 210 220 }); 211 221 212 222 // Bind tab switch events 213 this.library.children('ul').on( 'click', 'li', function( event ) { 223 this.library.children('ul').on( 'click keydown', 'li', function( event ) { 224 225 if ( event.type === 'keydown' && 13 !== event.which ) 226 return; 227 214 228 var id = $(this).data('customizeTab'), 215 229 tab = control.tabs[ id ]; 216 230 … … 225 239 }); 226 240 227 241 // Bind events to switch image urls. 228 this.library.on( 'click', 'a', function( event ) { 242 this.library.on( 'click keydown', 'a', function( event ) { 243 if ( event.type === 'keydown' && 13 !== event.which ) // enter 244 return; 245 229 246 var value = $(this).data('customizeImageValue'); 230 247 231 248 if ( value ) { … … 814 831 }()); 815 832 816 833 // Temporary accordion code. 817 $('.customize-section-title').click( function( event ) { 834 var accordionFrozen = false; 835 $('.customize-section-title').bind('click keydown', function( event ) { 836 837 if ( event.type === 'keydown' && 13 !== event.which ) // enter 838 return; 839 818 840 var clicked = $( this ).parents( '.customize-section' ); 819 841 820 if ( clicked.hasClass('cannot-expand') )842 if ( clicked.hasClass('cannot-expand') || accordionFrozen ) 821 843 return; 844 845 // Don't want to fire focus and click at same time 846 accordionFrozen = true; 847 setTimeout(function () { 848 accordionFrozen = false; 849 }, 400); 850 851 // Scroll up if on #customize-section-title_tagline 852 if ('customize-section-title_tagline' === clicked.attr('id')) 853 $('.wp-full-overlay-sidebar-content').scrollTop(0); 822 854 823 855 $( '.customize-section' ).not( clicked ).removeClass( 'open' ); 824 856 clicked.toggleClass( 'open' ); … … 829 861 $('#save').click( function( event ) { 830 862 previewer.save(); 831 863 event.preventDefault(); 864 }).keydown( function( event ) { 865 if ( 9 === event.which ) // tab 866 return; 867 if ( 13 === event.which ) // enter 868 previewer.save(); 869 event.preventDefault(); 832 870 }); 871 872 $('.back').keydown( function( event ) { 873 if ( 9 === event.which ) // tab 874 return; 875 var thisHref = $(this).attr('href'); 876 if ( 13 === event.which ) // enter 877 window.location = thisHref; 878 event.preventDefault(); 879 }); 833 880 834 881 $('.collapse-sidebar').click( function( event ) { 835 882 overlay.toggleClass( 'collapsed' ).toggleClass( 'expanded' ); … … 948 995 }); 949 996 950 997 api.trigger( 'ready' ); 998 999 // Make sure left column gets focus 1000 var topFocus = $('.back'); 1001 topFocus.focus(); 1002 setTimeout(function () { 1003 topFocus.focus(); 1004 }, 200); 1005 951 1006 }); 952 1007 953 })( wp, jQuery ); 954 No newline at end of file 1008 })( wp, jQuery ); -
wp-includes/class-wp-customize-control.php
521 521 <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> 522 522 523 523 <div class="customize-control-content"> 524 <div class="dropdown preview-thumbnail" >524 <div class="dropdown preview-thumbnail" tabindex="0"> 525 525 <div class="dropdown-content"> 526 526 <?php if ( empty( $src ) ): ?> 527 527 <img style="display:none;" /> … … 537 537 <div class="library"> 538 538 <ul> 539 539 <?php foreach ( $this->tabs as $id => $tab ): ?> 540 <li data-customize-tab='<?php echo esc_attr( $id ); ?>' >540 <li data-customize-tab='<?php echo esc_attr( $id ); ?>' tabindex='0'> 541 541 <?php echo esc_html( $tab['label'] ); ?> 542 542 </li> 543 543 <?php endforeach; ?> -
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 )