Sha256: cde16beec7d922b09a5495721db2777e8d286ca5c121e1bd03f006eb2eb613f9

Contents?: true

Size: 626 Bytes

Versions: 65

Compression:

Stored size: 626 Bytes

Contents

$ ->
  $new_state = $("#new_state")
  if $new_state.length
    $new_state_link = $("#new_state_link")
    $country_select = $("#country")
    $cancel_button = $new_state.find(".fa-remove")
    $form = $new_state.find("form")
    $new_state.hide()

    $new_state_link.click (e) ->
      e.preventDefault()
      $new_state.show()
      $new_state_link.hide()

    $cancel_button.click (e) ->
      e.preventDefault()
      $new_state.hide()
      $new_state_link.show()

    $country_select.on 'change', (e) ->
      $form.attr 'action', $form.attr('action').replace(/countries\/(\d+)/, "countries/#{$country_select.val()}")

Version data entries

65 entries across 65 versions & 1 rubygems

Version Path
solidus_backend-1.4.1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.2.1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.2.0 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.2.0.rc1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.2.0.beta1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.1.0 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.1.0.rc1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.0.1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.1.0.beta1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.0.0 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-1.4.0 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.0.0.rc1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-1.4.0.rc1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-2.0.0.beta1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-1.4.0.beta1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-1.3.1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-1.3.0 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-1.3.0.rc2 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-1.3.0.rc1 app/assets/javascripts/spree/backend/states.coffee
solidus_backend-1.3.0.beta1 app/assets/javascripts/spree/backend/states.coffee