Sha256: 78e0fe436ccab75a02af5c5c22d9faa3e1b1e8d54e8b69aeda9507e4ab3f5447

Contents?: true

Size: 947 Bytes

Versions: 193

Compression:

Stored size: 947 Bytes

Contents

$ ->
  ($ '#country_based').click ->
    show_country()

  ($ '#state_based').click ->
    show_state()

  if ($ '#country_based').is(':checked')
    show_country()
  else if ($ '#state_based').is(':checked')
    show_state()
  else
    show_state()
    ($ '#state_based').click()


show_country = ->
  ($ '#state_members :input').each ->
    ($ this).prop 'disabled', true

  ($ '#state_members').hide()
  ($ '#zone_members :input').each ->
    ($ this).prop 'disabled', true

  ($ '#zone_members').hide()
  ($ '#country_members :input').each ->
    ($ this).prop 'disabled', false

  ($ '#country_members').show()

show_state = ->
  ($ '#country_members :input').each ->
    ($ this).prop 'disabled', true

  ($ '#country_members').hide()
  ($ '#zone_members :input').each ->
    ($ this).prop 'disabled', true

  ($ '#zone_members').hide()
  ($ '#state_members :input').each ->
    ($ this).prop 'disabled', false

  ($ '#state_members').show()

Version data entries

193 entries across 193 versions & 2 rubygems

Version Path
solidus_backend-1.2.0.rc2 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.0.4 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.1.2 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.2.0.rc1 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.2.0.beta1 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.0.3 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.1.1 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.1.0 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.1.0.pre2 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.1.0.pre1 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.1.0.beta1 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.0.2 app/assets/javascripts/spree/backend/zone.js.coffee
spree_backend-3.0.4 app/assets/javascripts/spree/backend/zone.js.coffee
spree_backend-2.4.10 app/assets/javascripts/spree/backend/zone.js.coffee
spree_backend-2.3.13 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.0.1 app/assets/javascripts/spree/backend/zone.js.coffee
spree_backend-2.2.14 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.0.0 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.0.0.rc2 app/assets/javascripts/spree/backend/zone.js.coffee
solidus_backend-1.0.0.rc1 app/assets/javascripts/spree/backend/zone.js.coffee