Author: mgallegos Date: 2012-11-06 16:09:59 +0100 (Tue, 06 Nov 2012) New Revision: 583 Modified: trunk/src/mc-dia-form2.js Log: Modified: trunk/src/mc-dia-form2.js =================================================================== --- trunk/src/mc-dia-form2.js 2012-11-05 22:14:36 UTC (rev 582) +++ trunk/src/mc-dia-form2.js 2012-11-06 15:09:59 UTC (rev 583) @@ -128,14 +128,18 @@ $j('#sixthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step6_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 478px;margin-top: 0"><div class="marker" style="background-position: -130px 0;"></div></div>'); } - function onClickImageMap(e){ - if (e.key=='#first_step'){ + function onClickImageMap(e){ + $j(current_step).slideUp(); + $j(e.key).slideDown(); + if (e.key=='#first_step'){ $j('#progress_text').html('0% Complete'); $j('#progress').css('width','0'); + current_step='#first_step'; } else if (e.key=='#second_step'){ $j('#progress_text').html('20% Complete'); $j('#progress').css('width','68px'); + current_step='#second_step'; if($j('#np-checkbox').val()=='S') $j('label[for*="step2-yes"]').addClass('ui-state-active'); else if ($j('#np-checkbox').val()=='N') @@ -144,6 +148,7 @@ else if (e.key=='#third_step'){ $j('#progress_text').html('40% Complete'); $j('#progress').css('width','136px'); + current_step='#third_step'; if($j('#rp-checkbox').val()=='S') $j('label[for*="step3-yes"]').addClass('ui-state-active'); else if ($j('#rp-checkbox').val()=='N') @@ -152,6 +157,7 @@ else if (e.key=='#fourth_step'){ $j('#progress_text').html('60% Complete'); $j('#progress').css('width','204px'); + current_step='#fourth_step'; if($j('#rc-checkbox').val()=='S') $j('label[for*="step4-yes"]').addClass('ui-state-active'); else if ($j('#rc-checkbox').val()=='N') @@ -160,6 +166,7 @@ else if (e.key=='#fifth_step'){ $j('#progress_text').html('60% Complete'); $j('#progress').css('width','204px'); + current_step='#fifth_step'; if($j('#gr-checkbox').val()=='S') $j('label[for*="step5-yes"]').addClass('ui-state-active'); else if ($j('#gr-checkbox').val()=='N') @@ -168,9 +175,8 @@ else if (e.key=='#sixth_step'){ $j('#progress_text').html('100% Complete'); $j('#progress').css('width','339px'); - } - $j(current_step).slideUp(); - $j(e.key).slideDown(); + current_step='#sixth_step'; + } } function select_cat($id, $id2) { @@ -490,7 +496,7 @@ }); if(!error) { - + current_step='#second_step'; if(!step_two_reached){
participants (1)
-
Mario Gallegos