Sha256: 85c11a9dbdf2872978254236b45867810aa13e91e9e264d695ae1356edff15ef

Contents?: true

Size: 850 Bytes

Versions: 137

Compression:

Stored size: 850 Bytes

Contents

Spree.ready(function() {
  var $gateway_type = $('select.js-gateway-type');
  var $preference_source = $('select.js-preference-source');
  var original_gateway_type = $gateway_type.val();
  var original_preference_source = $preference_source.val();

  var render = function() {
    var gateway_type = $gateway_type.val();
    var preference_source = $preference_source.val();
    $('.js-preference-source-wrapper').toggle(gateway_type === original_gateway_type);
    if (gateway_type === original_gateway_type && preference_source === original_preference_source) {
      $('.js-gateway-settings').show();
      $('.js-gateway-settings-warning').hide();
    } else {
      $('.js-gateway-settings').hide();
      $('.js-gateway-settings-warning').show();
    }
  };
  $gateway_type.change(render);
  $preference_source.change(render);
  render();
});

Version data entries

137 entries across 137 versions & 2 rubygems

Version Path
solidus_backend-2.6.5 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.5.2 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.9.1 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.9.0 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.9.0.rc.1 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.8.4 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.8.3 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.7.2 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.6.4 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.8.2 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.8.1 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.5.1 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.6.3 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.8.0 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.7.1 app/assets/javascripts/spree/backend/gateway.js
solidus_backend-2.6.2 app/assets/javascripts/spree/backend/gateway.js
solidus_backend_devise_token_auth-2.8.0.alpha.14 app/assets/javascripts/spree/backend/gateway.js
solidus_backend_devise_token_auth-2.8.0.alpha.13 app/assets/javascripts/spree/backend/gateway.js
solidus_backend_devise_token_auth-2.8.0.alpha.12 app/assets/javascripts/spree/backend/gateway.js
solidus_backend_devise_token_auth-2.8.0.alpha.11 app/assets/javascripts/spree/backend/gateway.js