Sha256: 71e0ef8e69b6c252ec74b00e40132882352ba8828a45893ae4e6c0dacfc86ec6

Contents?: true

Size: 1.56 KB

Versions: 21

Compression:

Stored size: 1.56 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).attr('disabled','disabled'); })
  $j('#state_members').hide();
  $j('#zone_members :input').each(function() { $(this).attr('disabled','disabled'); })
  $j('#zone_members').hide();
  $j('#country_members :input').each(function() { $(this).removeAttr('disabled'); })
  $j('#country_members').show();
};

var show_state = function() {
  $j('#country_members :input').each(function() { $(this).attr('disabled','disabled'); })
  $j('#country_members').hide();
  $j('#zone_members :input').each(function() { $(this).attr('disabled','disabled'); })
  $j('#zone_members').hide();
  $j('#state_members :input').each(function() { $(this).removeAttr('disabled'); })
  $j('#state_members').show();
};

var show_zone = function() {
  $j('#state_members :input').each(function() { $(this).attr('disabled','disabled'); })
  $j('#state_members').hide();
  $j('#country_members :input').each(function() { $(this).attr('disabled','disabled'); })
  $j('#country_members').hide();
  $j('#zone_members :input').each(function() { $(this).removeAttr('disabled'); })
  $j('#zone_members').show();
};

Version data entries

21 entries across 9 versions & 7 rubygems

Version Path
apispree_core-0.0.0 public/javascripts/zone.js
My-Commerce_core-1.1.0 public/javascripts/zone.js
My-Commerce_core-1.0.0 public/javascripts/zone.js
MyCommerceapi-1.0.0 core/public/javascripts/zone.js
MyCommerceapi-1.0.0 core/spec/test_app/public/javascripts/zone.js
MyCommerceapi-1.0.0 sandbox/public/javascripts/zone.js
MyCommerceapi-1.0.0 promo/spec/test_app/public/javascripts/zone.js
MyCommerceapi-1.0.0 dash/spec/test_app/public/javascripts/zone.js
MyCommerceapi-1.0.0 api/spec/test_app/public/javascripts/zone.js
MyCommerceapi-1.0.0 auth/spec/test_app/public/javascripts/zone.js
MyCommerce-0.0.3 sandbox/public/javascripts/zone.js
MyCommerce-0.0.3 api/spec/test_app/public/javascripts/zone.js
MyCommerce-0.0.3 auth/spec/test_app/public/javascripts/zone.js
MyCommerce-0.0.3 core/public/javascripts/zone.js
MyCommerce-0.0.3 core/spec/test_app/public/javascripts/zone.js
MyCommerce-0.0.3 dash/spec/test_app/public/javascripts/zone.js
MyCommerce-0.0.3 promo/spec/test_app/public/javascripts/zone.js
rfcommerce_sandbox-0.0.3 public/javascripts/zone.js
rfcommerce_core-0.0.3 public/javascripts/zone.js
spree_core-0.60.6 public/javascripts/zone.js