Sha256: 6b6dd7dfbba06298d74178f1810d3edde0261292dd69e60f3372c99972b3454d

Contents?: true

Size: 1.61 KB

Versions: 127

Compression:

Stored size: 1.61 KB

Contents

//= require jquery.payment
$(document).ready(function() {
  if ($("#new_payment").is("*")) {
    $(".cardNumber").payment('formatCardNumber');
    $(".cardExpiry").payment('formatCardExpiry');
    $(".cardCode").payment('formatCardCVC');

    $(".cardNumber").change(function() {
      $(".ccType").val($.payment.cardType(this.value))
    })

    $('.payment_methods_radios').click(
      function() {
        $('.payment-methods').hide();
        $('.payment-methods :input').prop('disabled', true);
        if (this.checked) {
          $('#payment_method_' + this.value + ' :input').prop('disabled', false);
          $('#payment_method_' + this.value).show();
        }
      }
    );

    $('.payment_methods_radios').each(
      function() {
        if (this.checked) {
          $('#payment_method_' + this.value + ' :input').prop('disabled', false);
          $('#payment_method_' + this.value).show();
        } else {
          $('#payment_method_' + this.value).hide();
          $('#payment_method_' + this.value + ' :input').prop('disabled', true);
        }

        if ($("#card_new" + this.value).is("*")) {
          $("#card_new" + this.value).radioControlsVisibilityOfElement('#card_form' + this.value);
        }
      }
    );

    $('.cvvLink').click(function(event){
      window_name = 'cvv_info';
      window_options = 'left=20,top=20,width=500,height=500,toolbar=0,resizable=0,scrollbars=1';
      window.open($(this).prop('href'), window_name, window_options);
      event.preventDefault();
    });

    $('select.jump_menu').change(function(){
      window.location = this.options[this.selectedIndex].value;
    });
  }
});

Version data entries

127 entries across 127 versions & 2 rubygems

Version Path
spree_backend-3.4.6 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.2.9 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.1.14 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.5.0 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.3.6 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.2.8 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.1.13 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.5.0.rc2 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.5.0.rc1 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.4.5 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.3.5 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.4.4 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.4.3 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.3.4 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.2.7 app/assets/javascripts/spree/backend/payments/new.js
spree_backend-3.1.12 app/assets/javascripts/spree/backend/payments/new.js
solidus_backend-2.1.1 app/assets/javascripts/spree/backend/payments/new.js
solidus_backend-2.0.3 app/assets/javascripts/spree/backend/payments/new.js
solidus_backend-1.4.2 app/assets/javascripts/spree/backend/payments/new.js
solidus_backend-1.3.2 app/assets/javascripts/spree/backend/payments/new.js