Making WordPress.org


Ignore:
Timestamp:
03/28/2016 05:18:43 PM (11 years ago)
Author:
kovshenin
Message:

Sync with trunk.

Location:
sites/branches/application-tracking/wordcamp.org
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sites/branches/application-tracking/wordcamp.org

  • sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments

  • sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php

    r2701 r2825  
    129129                        plugins_url( 'javascript/wordcamp-budgets.js', __DIR__ ),
    130130                        array( 'jquery', 'jquery-ui-datepicker', 'media-upload', 'media-views' ),
    131                         2,
     131                        3,
    132132                        true
    133133                );
  • sites/branches/application-tracking/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/wordcamp-budgets.js

    r2693 r2825  
    3737                                $( inputField ).prop( 'required', false );
    3838                        } );
     39
     40                        app.checkRadioButtons();
    3941                },
    4042
    … …  
    7678
    7779                        // todo make the transition smoother
     80
     81                        app.checkRadioButtons();
     82                },
     83
     84                /*
     85                 * Make sure all radio buttons have values in Chrome
     86                 *
     87                 * This is only to work around bug #596138
     88                 *
     89                 * @see  https://bugs.chromium.org/p/chromium/issues/detail?id=596138
     90                 * @todo remove this after Chrome 51 is adopted by most users
     91                 */
     92                checkRadioButtons : function() {
     93                        var checkedPaymentMethods = $( 'input[name="payment_method"]:checked' );
     94
     95                        if ( ! window.hasOwnProperty( 'chrome' ) ) {
     96                                return;
     97                        }
     98
     99                        if ( 'Direct Deposit' != checkedPaymentMethods.val() ) {
     100                                if ( 0 === $( 'input[name="ach_account_type"]:checked' ).length ) {
     101                                        $( '#ach_account_type_company' ).prop( 'checked', true );
     102                                }
     103                        }
     104
     105                        if ( 0 === checkedPaymentMethods.length ) {
     106                                $( '#payment_method_direct_deposit' ).prop( 'checked', true );
     107                        }
    78108                },
    79109
Note: See TracChangeset for help on using the changeset viewer.