mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
40258a41b8
* Use a translated 'Continue' string. * Go back to using a select element. * Only show a spinner when we're installing a language. see #28577. Built from https://develop.svn.wordpress.org/trunk@29372 git-svn-id: http://core.svn.wordpress.org/trunk@29150 1a063a9b-81f0-0310-95a4-ce76da25c4cd
27 lines
625 B
JavaScript
27 lines
625 B
JavaScript
jQuery( function($) {
|
|
|
|
var select = $( '#language' ),
|
|
submit = $( '#language-continue' );
|
|
|
|
if ( ! $( 'body' ).hasClass( 'language-chooser' ) ) {
|
|
return;
|
|
}
|
|
|
|
select.focus().on( 'change', function() {
|
|
var option = select.children( 'option:selected' );
|
|
submit.attr({
|
|
value: option.data( 'continue' ),
|
|
lang: option.attr( 'lang' )
|
|
});
|
|
});
|
|
|
|
$( 'form' ).submit( function() {
|
|
// Don't show a spinner for English and installed languages,
|
|
// as there is nothing to download.
|
|
if ( ! select.children( 'option:selected' ).data( 'installed' ) ) {
|
|
$( this ).find( '.step .spinner' ).css( 'visibility', 'visible' );
|
|
}
|
|
});
|
|
|
|
});
|