Sha256: 0fcf96ddd94b42359d4a6ccbe33562202cd333f2da2ef478ebcc36112efca447

Contents?: true

Size: 1.41 KB

Versions: 36

Compression:

Stored size: 1.41 KB

Contents

$j(function() { 
  if ($j('#country_based').attr('checked')) {
    show_country();
  } else if ($j('#state_based').attr('checked')) {
    show_state();
  } else {        
    show_zone();
  }
  $j('#country_based').click(function() { show_country();} );
  $j('#state_based').click(function() { show_state();} );
  $j('#zone_based').click(function() { show_zone();} ); 
})   
                                                        
var show_country = function() {
  $j('#state_members :input').each(function() { $(this).disable(); })
  $j('#state_members').hide();
  $j('#zone_members :input').each(function() { $(this).disable(); })
  $j('#zone_members').hide();
  $j('#country_members :input').each(function() { $(this).enable(); })
  $j('#country_members').show();
};

var show_state = function() {
  $j('#country_members :input').each(function() { $(this).disable(); })
  $j('#country_members').hide();
  $j('#zone_members :input').each(function() { $(this).disable(); })
  $j('#zone_members').hide();
  $j('#state_members :input').each(function() { $(this).enable(); })
  $j('#state_members').show();
};

var show_zone = function() {
  $j('#state_members :input').each(function() { $(this).disable(); })
  $j('#state_members').hide();
  $j('#country_members :input').each(function() { $(this).disable(); })
  $j('#country_members').hide();
  $j('#zone_members :input').each(function() { $(this).enable(); })
  $j('#zone_members').show();
};

Version data entries

36 entries across 31 versions & 3 rubygems

Version Path
spree_core-0.40.0 public/javascripts/zone.js
spree_core-0.30.1 public/javascripts/zone.js
spree_core-0.30.0 public/javascripts/zone.js
spree-0.11.2 vendor/extensions/theme_default/public/javascripts/zone.js
spree-0.11.1 vendor/extensions/theme_default/public/javascripts/zone.js
spree_core-0.30.0.beta1 lib/generators/templates/public/javascripts/zone.js
spree-0.11.0 vendor/extensions/theme_default/public/javascripts/zone.js
spree-0.11.0 public/javascripts/zone.js
spree-0.10.2 public/javascripts/zone.js
spree-0.10.2 vendor/extensions/theme_default/public/javascripts/zone.js
spree-0.10.1 vendor/extensions/theme_default/public/javascripts/zone.js
spree-0.10.1 public/javascripts/zone.js
spree-0.10.0 public/javascripts/zone.js
spree-0.10.0 vendor/extensions/theme_default/public/javascripts/zone.js
spree-0.10.0.beta vendor/extensions/theme_default/public/javascripts/zone.js
spree-0.10.0.beta public/javascripts/zone.js