Ticket #28577: 28577.2.diff
File 28577.2.diff, 5.4 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/install.css
337 337 height: 250px; 338 338 } 339 339 340 /* TODO:add focus style via JS */341 340 .language-chooser fieldset.focus { 342 341 border-color: #5b9dd9; 343 342 -webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8); … … 355 354 356 355 .language-chooser input:checked + label{ 357 356 color:white; 357 background: #777; 358 } 359 360 .language-chooser .focus input:checked + label{ 358 361 background: #0074A2; 359 362 } 360 363 364 .language-chooser label:hover { 365 background: #eee; 366 } 367 361 368 .language-chooser label{ 362 369 display:block; 363 370 } -
src/wp-admin/includes/upgrade.php
2162 2162 function wp_install_language_form( $body ) { 2163 2163 echo "<fieldset>\n"; 2164 2164 echo "<legend class='screen-reader-text'>Select a default language</legend>\n"; 2165 echo '<input type="radio" checked="checked" class="screen-reader-input " name="language" id="language_default" value="">';2165 echo '<input type="radio" checked="checked" class="screen-reader-input language-chooser-input" name="language" id="language_default" value="">'; 2166 2166 echo '<label for="language_default">English (United States)</label>'; 2167 2167 echo "\n"; 2168 2168 … … 2169 2169 if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && ( 'en_US' !== WPLANG ) ) { 2170 2170 if ( isset( $body['languages'][WPLANG] ) ) { 2171 2171 $language = $body['languages'][WPLANG]; 2172 echo '<input type="radio" name="language" checked="checked" class="' . esc_attr( $language['language'] ) . ' screen-reader-input " id="language_wplang" value="' . esc_attr( $language['language'] ) . '">';2172 echo '<input type="radio" name="language" checked="checked" class="' . esc_attr( $language['language'] ) . ' screen-reader-input language-chooser-input" id="language_wplang" value="' . esc_attr( $language['language'] ) . '">'; 2173 2173 echo '<label for="language_wplang">' . esc_html( $language['native_name'] ) . "</label>\n"; 2174 2174 } 2175 2175 } 2176 2176 2177 2177 foreach ( $body['languages'] as $language ) { 2178 echo '<input type="radio" name="language" class="' . esc_attr( $language['language'] ) . ' screen-reader-input " id="language_'. esc_attr( $language['language'] ) .'" value="' . esc_attr( $language['language'] ) . '">';2178 echo '<input type="radio" name="language" class="' . esc_attr( $language['language'] ) . ' screen-reader-input language-chooser-input" id="language_'. esc_attr( $language['language'] ) .'" value="' . esc_attr( $language['language'] ) . '">'; 2179 2179 echo '<label for="language_' . esc_attr( $language['language'] ) . '">' . esc_html( $language['native_name'] ) . "</label>\n"; 2180 2180 } 2181 2181 echo "</fieldset>\n"; -
src/wp-admin/install.php
281 281 <script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script> 282 282 <?php } ?> 283 283 <?php wp_print_scripts( 'user-profile' ); ?> 284 <?php wp_print_scripts( 'language-chooser' ); ?> 284 285 </body> 285 286 </html> -
src/wp-admin/js/language-chooser.js
1 (function($){ 2 if ( $('body').hasClass('language-chooser') === false ) 3 return; 4 5 var mouseDown = 0, 6 $fieldset = $('fieldset'); 7 8 // simple way to check if mousebutton is depressed while accounting for multiple mouse buttons being used independently 9 document.body.onmousedown = function() { 10 ++mouseDown; 11 }; 12 document.body.onmouseup = function() { 13 --mouseDown; 14 }; 15 16 /* 17 we can't rely upon the focusout event 18 since clicking on a label triggers it 19 */ 20 function maybeRemoveFieldsetFocus(){ 21 if (mouseDown) { 22 setTimeout( maybeRemoveFieldsetFocus, 50); 23 return; 24 } 25 if ( $(':focus').hasClass('language-chooser-input') !== true ) { 26 $fieldset.removeClass('focus'); 27 } 28 } 29 30 $fieldset.focusin( function() { 31 $(this).addClass('focus'); 32 }); 33 34 $fieldset.focusout( function() { 35 setTimeout( maybeRemoveFieldsetFocus, 50); 36 }); 37 38 })(jQuery); -
src/wp-admin/setup-config.php
Property changes on: src/wp-admin/js/language-chooser.js ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property
317 317 break; 318 318 } 319 319 ?> 320 <?php wp_print_scripts( 'language-chooser' ); ?> 320 321 </body> 321 322 </html> -
src/wp-includes/script-loader.php
345 345 ) ); 346 346 347 347 $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter' ), false, 1 ); 348 $scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 ); 348 349 349 350 $scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 ); 350 351