Sha256: 8875c98288f6687438feafbc36a8c41cb2c7d1562793032af550e4b3770d2cfd

Contents?: true

Size: 438 Bytes

Versions: 76

Compression:

Stored size: 438 Bytes

Contents

$(document).ready(function () {
  'use strict'

  if ($('#new_state_link').length) {
    $('#country').on('change', function () {
      var newStateLinkHref = $('#new_state_link').prop('href')
      var selectedCountryId = $('#country option:selected').prop('value')
      var newLink = newStateLinkHref.replace(/countries\/(\d+)/,
        'countries/' + selectedCountryId)
      $('#new_state_link').attr('href', newLink)
    })
  };
})

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
spree_backend-4.0.9 app/assets/javascripts/spree/backend/states.js
spree_backend-4.1.15 app/assets/javascripts/spree/backend/states.js
spree_backend-4.2.7 app/assets/javascripts/spree/backend/states.js
spree_backend-4.3.3 app/assets/javascripts/spree/backend/states.js
spree_backend-4.2.6 app/assets/javascripts/spree/backend/states.js
spree_backend-4.3.2 app/assets/javascripts/spree/backend/states.js
spree_backend-4.3.1 app/assets/javascripts/spree/backend/states.js
spree_backend-4.3.0 app/assets/javascripts/spree/backend/states.js
spree_backend-4.3.0.rc3 app/assets/javascripts/spree/backend/states.js
spree_backend-4.3.0.rc2 app/assets/javascripts/spree/backend/states.js
spree_backend-4.3.0.rc1 app/assets/javascripts/spree/backend/states.js
spree_backend-4.2.5 app/assets/javascripts/spree/backend/states.js
spree_backend-4.1.14 app/assets/javascripts/spree/backend/states.js
spree_backend-4.0.8 app/assets/javascripts/spree/backend/states.js
spree_backend-4.2.4 app/assets/javascripts/spree/backend/states.js
spree_backend-3.7.14.1 app/assets/javascripts/spree/backend/states.js
spree_backend-4.2.3.1 app/assets/javascripts/spree/backend/states.js
spree_backend-4.1.13.1 app/assets/javascripts/spree/backend/states.js
spree_backend-4.0.7.1 app/assets/javascripts/spree/backend/states.js
spree_backend-4.2.3 app/assets/javascripts/spree/backend/states.js