Changeset 43334
- Timestamp:
- 06/07/2018 03:07:31 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/lib/language-chooser.js
r43309 r43334 1 1 jQuery( function($) { 2 2 /* 3 * Set the correct translation to the continue button and show a spinner 4 * when downloading a language. 5 */ 3 6 var select = $( '#language' ), 4 7 submit = $( '#language-continue' ); … … 9 12 10 13 select.focus().on( 'change', function() { 14 /* 15 * When a language is selected, set matching translation to continue button 16 * and attach the language attribute. 17 */ 11 18 var option = select.children( 'option:selected' ); 12 19 submit.attr({ … … 17 24 18 25 $( 'form' ).submit( function() { 19 // Don't show a spinner for English and installed languages, 20 // as there is nothing to download. 26 // Show spinner for languages that need to be downloaded. 21 27 if ( ! select.children( 'option:selected' ).data( 'installed' ) ) { 22 28 $( this ).find( '.step .spinner' ).css( 'visibility', 'visible' );
Note: See TracChangeset
for help on using the changeset viewer.