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-0.11.4 vendor/extensions/theme_default/public/javascripts/zone.js
spree-0.11.3 vendor/extensions/theme_default/public/javascripts/zone.js
spree_core-0.30.2 public/javascripts/zone.js
spree_core-0.40.4 public/javascripts/zone.js
spree_core-0.50.4 public/javascripts/zone.js
spree_core-0.60.4 public/javascripts/zone.js
spree_core-0.50.3 public/javascripts/zone.js
spree_core-0.60.3 public/javascripts/zone.js
spree_core-0.60.2 public/javascripts/zone.js
spree_core-0.60.1 public/javascripts/zone.js
spree_core-0.60.0 public/javascripts/zone.js
spree_core-0.60.0.RC1 public/javascripts/zone.js
spree_essential_press-0.1.0.pre3 test/dummy/public/javascripts/zone.js
spree_essential_press-0.1.0.pre2 test/dummy/public/javascripts/zone.js
spree_core-0.50.2 public/javascripts/zone.js
spree_core-0.50.1 public/javascripts/zone.js
spree_core-0.50.0 public/javascripts/zone.js
spree_core-0.40.3 public/javascripts/zone.js
spree_core-0.40.2 public/javascripts/zone.js
spree_core-0.40.1 public/javascripts/zone.js