add files
[uma.git] / public / javascripts / zone.js
blobcd34f7b805640a3a353dfe3b5d36c623951d8ac8
1 $j(function() { 
2   if ($j('#country_based').attr('checked')) {
3     show_country();
4   } else if ($j('#state_based').attr('checked')) {
5     show_state();
6   } else {        
7     show_zone();
8   }
9   $j('#country_based').click(function() { show_country();} );
10   $j('#state_based').click(function() { show_state();} );
11   $j('#zone_based').click(function() { show_zone();} ); 
12 })   
13                                                         
14 var show_country = function() {
15   $j('#state_members :input').each(function() { $(this).disable(); })
16   $j('#state_members').hide();
17   $j('#zone_members :input').each(function() { $(this).disable(); })
18   $j('#zone_members').hide();
19   $j('#country_members :input').each(function() { $(this).enable(); })
20   $j('#country_members').show();
23 var show_state = function() {
24   $j('#country_members :input').each(function() { $(this).disable(); })
25   $j('#country_members').hide();
26   $j('#zone_members :input').each(function() { $(this).disable(); })
27   $j('#zone_members').hide();
28   $j('#state_members :input').each(function() { $(this).enable(); })
29   $j('#state_members').show();
32 var show_zone = function() {
33   $j('#state_members :input').each(function() { $(this).disable(); })
34   $j('#state_members').hide();
35   $j('#country_members :input').each(function() { $(this).disable(); })
36   $j('#country_members').hide();
37   $j('#zone_members :input').each(function() { $(this).enable(); })
38   $j('#zone_members').show();