Changeset 1464 for trunk/gestorpsi

Show
Ignore:
Timestamp:
14/12/2009 17:42:38 (2 years ago)
Author:
czd
Message:

fixed group show/hide in subscription page

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gestorpsi/media/js/gestorpsi.forms.js

    r1450 r1464  
    725725 
    726726            // filter only groups from selected service 
    727             $('select[name=group] option:not(:first)').hide(); 
     727            $('select[name=group] option').hide(); 
    728728            $('select[name=group] option[service='+$(this).val()+']').show(); 
    729             $('select[name=group] option:first').attr('selected', 'selected'); 
     729             
    730730            // display or hide group field 
    731             if($('select[name=group] option:visible').size() > 1) { 
     731            if($('select[name=group] option:visible').size() >= 1) { 
    732732                $('label.referral_group').show('slow'); 
    733733            } else { 
    734734                $('label.referral_group').hide(); 
    735735            } 
     736            $('select[name=group] option:visible:first').attr('selected', 'selected'); 
    736737        } 
    737738    });