Make WordPress Core

Changeset 43334

Timestamp:
06/07/2018 03:07:31 PM (6 years ago)
Author:
atimmer
Message:

Docs: Improve JSDoc for language-chooser.js.

Props ireneyoast, manuelaugustin.
Fixes #43950.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/lib/language-chooser.js

    r43309 r43334  
    11jQuery( function($) {
    2 
     2/*
     3 * Set the correct translation to the continue button and show a spinner
     4 * when downloading a language.
     5 */
    36var select = $( '#language' ),
    47    submit = $( '#language-continue' );
     
    912
    1013select.focus().on( 'change', function() {
     14
     15
     16
     17
    1118    var option = select.children( 'option:selected' );
    1219    submit.attr({
     
    1724
    1825$( '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.
    2127    if ( ! select.children( 'option:selected' ).data( 'installed' ) ) {
    2228        $( this ).find( '.step .spinner' ).css( 'visibility', 'visible' );
Note: See TracChangeset for help on using the changeset viewer.