Movecommons-commits
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
November 2012
- 2 participants
- 50 discussions
Author: mgallegos
Date: 2012-11-13 17:50:05 +0100 (Tue, 13 Nov 2012)
New Revision: 587
Modified:
trunk/src/mc-dia-form2.js
trunk/wp-theme/mc2-form.php
Log:
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2012-11-07 21:36:24 UTC (rev 586)
+++ trunk/src/mc-dia-form2.js 2012-11-13 16:50:05 UTC (rev 587)
@@ -84,10 +84,6 @@
$j('#infield-other-license-website').hide();
$j('#submit_third').click();
}
- if(id=='rc'){
- reset_areas();
- $j('#submit_fourth').click();
- }
if(id=='gr'){
$("#decisions-general-assemblies").attr("disabled", "disabled");
$('#decisions-general-assemblies').attr('checked', false);
@@ -97,8 +93,13 @@
$('#representatives-democratically').attr('checked', false);
$("#decisions-voting").attr("disabled", "disabled");
$('#decisions-voting').attr('checked', false);
- $j('#submit_fifth').click();
+ $j('#submit_fourth').click();
}
+ if(id=='rc'){
+ reset_areas();
+ $j('#submit_fifth').click();
+ }
+
}
}
@@ -233,11 +234,22 @@
}
function validations_step4(){
- if($j('#rc-checkbox').val()=='A'){
+
+ if($j('#gr-checkbox').val()=='A'){
$j('#step4question').effect("shake", { times:3 }, 50);
return true;
}
+ return false;
+ }
+
+ //original 4
+ function validations_step5(){
+ if($j('#rc-checkbox').val()=='A'){
+ $j('#step5question').effect("shake", { times:3 }, 50);
+ return true;
+ }
+
if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rc60.png' && $j('#rc-checkbox').val()=='S'){
$j('#mc-form-optional-reinforcing').effect("shake", { times:3 }, 50);
return true;
@@ -245,16 +257,7 @@
return false;
}
-
- function validations_step5(){
- if($j('#gr-checkbox').val()=='A'){
- $j('#step5question').effect("shake", { times:3 }, 50);
- return true;
- }
-
- return false;
- }
function onClickImageMap(e){
switch (current_step) {
@@ -304,23 +307,23 @@
$j('label[for*="step3-yes"]').addClass('ui-state-active');
else if ($j('#rp-checkbox').val()=='N')
$j('label[for*="step3-no"]').addClass('ui-state-active');
- break;
- case '#fourth_step':
- $j('#progress_text').html('60% Complete');
- $j('#progress').css('width','204px');
- if($j('#rc-checkbox').val()=='S')
- $j('label[for*="step4-yes"]').addClass('ui-state-active');
- else if ($j('#rc-checkbox').val()=='N')
- $j('label[for*="step4-no"]').addClass('ui-state-active');
break;
- case '#fifth_step':
+ case '#fourth_step':
$j('#progress_text').html('60% Complete');
$j('#progress').css('width','204px');
if($j('#gr-checkbox').val()=='S')
+ $j('label[for*="step4-yes"]').addClass('ui-state-active');
+ else if ($j('#gr-checkbox').val()=='N')
+ $j('label[for*="step4-no"]').addClass('ui-state-active');
+ break;
+ case '#fifth_step': //4 original
+ $j('#progress_text').html('80% Complete');//Pasar a 80
+ $j('#progress').css('width','272px');// Pasar a 272
+ if($j('#rc-checkbox').val()=='S')
$j('label[for*="step5-yes"]').addClass('ui-state-active');
- else if ($j('#gr-checkbox').val()=='N')
+ else if ($j('#rc-checkbox').val()=='N')
$j('label[for*="step5-no"]').addClass('ui-state-active');
- break;
+ break;
case '#sixth_step':
$j('#progress_text').html('100% Complete');
$j('#progress').css('width','339px');
@@ -711,39 +714,40 @@
$j('#progress_text').html('60% Complete');
$j('#progress').css('width','204px');
- if($j('#rc-checkbox').val()=='S')
- $j('label[for*="step4-yes"]').addClass('ui-state-active');
- else if ($j('#rc-checkbox').val()=='N')
- $j('label[for*="step4-no"]').addClass('ui-state-active');
-
+ if($j('#gr-checkbox').val()=='S')
+ $j('label[for*="step5-yes"]').addClass('ui-state-active');
+ else if ($j('#gr-checkbox').val()=='N')
+ $j('label[for*="step5-no"]').addClass('ui-state-active');
+
//slide steps
$j('#third_step').slideUp();
$j('#fourth_step').slideDown();
});
- $j('#p_submit_fourth').click(function(){
+ $j('#p_submit_fourth').click(function(){
if(validations_step4())
return;
- current_step='#third_step';
+ current_step='#third_step';
- //update progress bar
+ //update progress bar
$j('#progress_text').html('40% Complete');
$j('#progress').css('width','136px');
-
+
if($j('#rp-checkbox').val()=='S')
$j('label[for*="step3-yes"]').addClass('ui-state-active');
else if ($j('#rp-checkbox').val()=='N')
$j('label[for*="step3-no"]').addClass('ui-state-active');
-
+
//slide steps
$j('#fourth_step').slideUp();
$j('#third_step').slideDown();
+
});
$j('#submit_fourth').click(function(){
-
+
if(validations_step4())
return;
@@ -761,33 +765,33 @@
//update progress bar
$j('#progress_text').html('80% Complete');
- $j('#progress').css('width','272px');
+ $j('#progress').css('width','272px');
- if($j('#gr-checkbox').val()=='S')
- $j('label[for*="step5-yes"]').addClass('ui-state-active');
- else if ($j('#gr-checkbox').val()=='N')
- $j('label[for*="step5-no"]').addClass('ui-state-active');
+ if($j('#rc-checkbox').val()=='S')
+ $j('label[for*="step4-yes"]').addClass('ui-state-active');
+ else if ($j('#rc-checkbox').val()=='N')
+ $j('label[for*="step4-no"]').addClass('ui-state-active');
//slide steps
$j('#fourth_step').slideUp();
$j('#fifth_step').slideDown();
-
+
});
- $j('#p_submit_fifth').click(function(){
+ $j('#p_submit_fifth').click(function(){ //original 4
if(validations_step5())
return;
current_step='#fourth_step';
-
- //update progress bar
+
+ //update progress bar
$j('#progress_text').html('60% Complete');
$j('#progress').css('width','204px');
- if($j('#rc-checkbox').val()=='S')
+ if($j('#gr-checkbox').val()=='S')
$j('label[for*="step4-yes"]').addClass('ui-state-active');
- else if ($j('#rc-checkbox').val()=='N')
+ else if ($j('#gr-checkbox').val()=='N')
$j('label[for*="step4-no"]').addClass('ui-state-active');
//slide steps
@@ -795,7 +799,7 @@
$j('#fourth_step').slideDown();
});
- $j('#submit_fifth').click(function(){
+ $j('#submit_fifth').click(function(){//original 4
if(validations_step5())
return;
@@ -817,9 +821,10 @@
$j('#progress').css('width','339px');
$j('#fifth_step').slideUp();
- $j('#sixth_step').slideDown();
-
+ $j('#sixth_step').slideDown();
+
});
+
$j('#p_submit_sixth').click(function(){
@@ -829,9 +834,9 @@
$j('#progress_text').html('80% Complete');
$j('#progress').css('width','272px');
- if($j('#gr-checkbox').val()=='S')
+ if($j('#rc-checkbox').val()=='S')
$j('label[for*="step5-yes"]').addClass('ui-state-active');
- else if ($j('#gr-checkbox').val()=='N')
+ else if ($j('#rc-checkbox').val()=='N')
$j('label[for*="step5-no"]').addClass('ui-state-active');
//slide steps
@@ -965,12 +970,12 @@
$j("#step3-yes").click(function(){clickCheckBox('rp','yes');});
$j("#step3-no").click(function(){clickCheckBox('rp','no');});
+
+ $j("#step4-yes").click(function(){clickCheckBox('gr','yes');});
+ $j("#step4-no").click(function(){clickCheckBox('gr','no');});
- $j("#step4-yes").click(function(){clickCheckBox('rc','yes');});
- $j("#step4-no").click(function(){clickCheckBox('rc','no');});
-
- $j("#step5-yes").click(function(){clickCheckBox('gr','yes');});
- $j("#step5-no").click(function(){clickCheckBox('gr','no');});
+ $j("#step5-yes").click(function(){clickCheckBox('rc','yes');});
+ $j("#step5-no").click(function(){clickCheckBox('rc','no');});
select_area("ec");
select_area("bo");
Modified: trunk/wp-theme/mc2-form.php
===================================================================
--- trunk/wp-theme/mc2-form.php 2012-11-07 21:36:24 UTC (rev 586)
+++ trunk/wp-theme/mc2-form.php 2012-11-13 16:50:05 UTC (rev 587)
@@ -230,88 +230,22 @@
</div><!-- End third slide -->
<div class="clear"></div>
-
- <div id="fourth_step"><!-- Fourth slide -->
- <div class="mc-cat-group-v2" id="mc-cat-group-c">
+
+ <div id="fourth_step"><!-- Fourth slide 5 original-->
+ <div class="mc-cat-group-v2" id="mc-cat-group-d">
<div style="float: left;" class="mc-form-category-group-a-v2">
<div id="fourthStepProgressLine" class="progressLine">
<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step4_image_map" class="map" style="border: 0px;float: left;">
<div class="complete" style="width: 295px;">
<div class="marker" style="background-position: -78px 0;"></div>
</div>
- </div>
- <div id="step4question" style="width: 100%;float: left;margin-bottom: 20px;">
- <div class="label2" style="margin-left: 170px;float: left;"><?php _e("4. Does your initiative Reinforce the Commons?", "mc"); ?></div>
+ </div>
+ <div style="width: 100%;float: left;margin-bottom: 20px;">
+ <div id="step4question" class="label2" style="margin-left: 125px;float: left;"><?php _e("4. Is your initiative driven by horizontal collective decisions?", "mc"); ?></div>
<div id="step4-radio" style="float: left;margin-left: 10px;margin-top: 10px;">
<input type="radio" id="step4-yes" name="radio"/><label for="step4-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
<input type="radio" id="step4-no" name="radio"/><label for="step4-no" style="font-size: 14px;color: #FFFFFF;">No</label>
</div>
- </div>
- <div class="mc-form-rounded mc-form-category-group-v2 float-left" style="padding-top: 35px;" id="mc-form-category-group-c">
- <img src="/mc/0.1/images/cat-selected.png" alt="selected" class="mc-cat-selected mc-cat-selected-a" id="mc-cat-selected-rc" />
- <div id="mc-form-rc" class="mc-form-rounded mc-form-descbox mc-form-descbox-a">
- <!--
- <div id="mc-form-more-link-rc" class="mc-form-link"><?php _e("What is this?", "mc"); ?></div>
- <div id="mc-form-less-link-rc" class="mc-form-link"><?php _e("less info", "mc"); ?></div>
- -->
- <div class="mc-form-descbox-header"><?php _e("Reinforcing the Commons", "mc"); ?><input id="rc-checkbox" name="rc-checkbox" type="hidden" value="A"></div>
- <div class="mc-form-descbox-intro"><?php _e("Your initiative protectes/expands The Commons, resources that are collectively owned", "mc"); ?></div>
- <div id="mc-form-more-text-rc" class="mc-form-more-text-v2">
- <?php _e("The Commons are those resources that are collectively owned or shared among populations. Thus, your initiative is promoting The Commons by focusing its work in protecting/expanding any of them in any particular area of action", "mc"); ?>
- </div>
- </div>
- <div class="mc-form-icon mc-form-icon-a">
- <img id="mc-form-icon-rc" alt="rc" src="/mc/0.1/images/rc60.png" />
- </div>
- </div>
- <div style="float: left;width: auto;">
- <!--<img src="/mc/0.1/images/step3.png" alt="step3" class="mc-steps-number-v2" />-->
- <div id="mc-form-optional-reinforcing" style="width: 500px;">
- <!--<img src="/mc/0.1/images/button_cancel.png" alt="selected" id="button-close-c" style="display: inline;position: relative;top: -23px;z-index: 1000;left: 476px;"/>-->
- <div class="blockMe3" style="position: relative;float: left;width: 440px;font-size: 16px;margin-left: 10px;margin-top: 30px;border: 1px solid #B7C4C8;">
- <label id="mc-optional-reinforcing" style="color: #444;background-color: #FEFBFD;"><?php _e("Which area is the main focus of your initiative?", "mc"); ?></label>
- <div class="mc-cat-rc-options" id="mc-cat-rc-options">
- <!--
- <div class="mc-cat-rc-options-intro" id="mc-cat-rc-options-intro"><?php _e("Which area is the main focus of your initiative?", "mc"); ?></div>
- -->
- <div class="mc-cat-rc-option-box-v2" id="mc-cat-rc-option-box-ec" style="margin-top: 15px;"> <div class="mc-cat-rc-option-text"><?php _e("Nature Commons", "mc"); ?></div><div class="mc-cat-rc-option-desc">
- <?php _e("the natural environment: forests, seeds, the Moon", "mc"); ?></div></div><div class="mc-cat-rc-option-icon-v2" id="mc-cat-rc-option-icon-ec"><img src="/mc/0.1/images/rcec25.png" alt="ec" /></div><div class="mc-cat-rc-option-box-v2" id="mc-cat-rc-option-box-bo"> <div class="mc-cat-rc-option-text">
- <?php _e("Body/Health Commons", "mc"); ?></div><div class="mc-cat-rc-option-desc">
- <?php _e("the human bodies: blood donation, smiles, non-alienation", "mc"); ?></div></div><div class="mc-cat-rc-option-icon-v2" id="mc-cat-rc-option-icon-bo"><img src="/mc/0.1/images/rcbo25.png" alt="bo" /></div><div class="mc-cat-rc-option-box-v2" id="mc-cat-rc-option-box-to"> <div class="mc-cat-rc-option-text">
- <?php _e("Town/Community/Society Commons", "mc"); ?></div><div class="mc-cat-rc-option-desc">
- <?php _e("the socio-cultural spaces: language, music, streets, science", "mc"); ?></div></div><div class="mc-cat-rc-option-icon-v2" id="mc-cat-rc-option-icon-to"><img src="/mc/0.1/images/rcto25.png" alt="to" /></div><div class="mc-cat-rc-option-box-v2" id="mc-cat-rc-option-box-di"> <div class="mc-cat-rc-option-text">
- <?php _e("Digital Commons", "mc"); ?></div><div class="mc-cat-rc-option-desc">
- <?php _e("the cyberspace: internet, cyber-rights, Wikipedia", "mc"); ?></div></div><div class="mc-cat-rc-option-icon-v2" id="mc-cat-rc-option-icon-di"><img src="/mc/0.1/images/rcdi25.png" alt="di" /></div></div>
-
- </div>
- </div>
- </div>
- <div class="clear"></div>
- <div>
- <button class="submit buttonp" type="submit" name="p_submit_fourth" id="p_submit_fourth" ><?php _e("Previous", "mc"); ?></button>
- <button class="submit buttonn" type="submit" name="submit_fourth" id="submit_fourth" value="" ><?php _e("Next", "mc"); ?></button>
- </div>
- <div class="clear"></div>
- </div>
- </div>
- <div class="mc-clean"></div>
- </div><!-- End Fourth slide -->
- <div class="clear"></div>
- <div id="fifth_step"><!-- Fifth slide -->
- <div class="mc-cat-group-v2" id="mc-cat-group-d">
- <div style="float: left;" class="mc-form-category-group-a-v2">
- <div id="fifthStepProgressLine" class="progressLine">
- <img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;">
- <div class="complete" style="width: 386px;">
- <div class="marker" style="background-position: -104px 0;"></div>
- </div>
- </div>
- <div style="width: 100%;float: left;margin-bottom: 20px;">
- <div id="step5question" class="label2" style="margin-left: 125px;float: left;"><?php _e("5. Is your initiative driven by horizontal collective decisions?", "mc"); ?></div>
- <div id="step5-radio" style="float: left;margin-left: 10px;margin-top: 10px;">
- <input type="radio" id="step5-yes" name="radio"/><label for="step5-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
- <input type="radio" id="step5-no" name="radio"/><label for="step5-no" style="font-size: 14px;color: #FFFFFF;">No</label>
- </div>
</div>
<div class="mc-form-rounded mc-form-category-group-v2 float-left" id="mc-form-category-group-d">
<img src="/mc/0.1/images/cat-selected.png" alt="selected" class="mc-cat-selected mc-cat-selected-a" id="mc-cat-selected-gr" />
@@ -357,14 +291,82 @@
</div>
<div class="clear"></div>
<div>
- <button class="submit buttonp" type="submit" name="p_submit_fifth" id="p_submit_fifth"><?php _e("Previous", "mc"); ?></button>
- <button class="submit buttonn" type="submit" name="submit_fifth" id="submit_fifth" onblur="$j('#decisions-general-assemblies').focus();" ><?php _e("Next", "mc"); ?></button>
+ <button class="submit buttonp" type="submit" name="p_submit_fourth" id="p_submit_fourth"><?php _e("Previous", "mc"); ?></button>
+ <button class="submit buttonn" type="submit" name="submit_fourth" id="submit_fourth" onblur="$j('#decisions-general-assemblies').focus();" ><?php _e("Next", "mc"); ?></button>
</div>
<div class="clear"></div>
</div>
</div>
<div class="mc-clean"></div>
- </div><!-- End Fifth slide -->
+ </div><!-- End Fourth slide -->
+
+ <div id="fifth_step"><!-- Fifth slide 4 original -->
+ <div class="mc-cat-group-v2" id="mc-cat-group-c">
+ <div style="float: left;" class="mc-form-category-group-a-v2">
+ <div id="fifthStepProgressLine" class="progressLine">
+ <img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;">
+ <div class="complete" style="width: 386px;">
+ <div class="marker" style="background-position: -104px 0;"></div>
+ </div>
+ </div>
+ <div id="step5question" style="width: 100%;float: left;margin-bottom: 20px;">
+ <div class="label2" style="margin-left: 170px;float: left;"><?php _e("5. Does your initiative Reinforce the Commons?", "mc"); ?></div>
+ <div id="step5-radio" style="float: left;margin-left: 10px;margin-top: 10px;">
+ <input type="radio" id="step5-yes" name="radio"/><label for="step5-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
+ <input type="radio" id="step5-no" name="radio"/><label for="step5-no" style="font-size: 14px;color: #FFFFFF;">No</label>
+ </div>
+ </div>
+ <div class="mc-form-rounded mc-form-category-group-v2 float-left" style="padding-top: 35px;" id="mc-form-category-group-c">
+ <img src="/mc/0.1/images/cat-selected.png" alt="selected" class="mc-cat-selected mc-cat-selected-a" id="mc-cat-selected-rc" />
+ <div id="mc-form-rc" class="mc-form-rounded mc-form-descbox mc-form-descbox-a">
+ <!--
+ <div id="mc-form-more-link-rc" class="mc-form-link"><?php _e("What is this?", "mc"); ?></div>
+ <div id="mc-form-less-link-rc" class="mc-form-link"><?php _e("less info", "mc"); ?></div>
+ -->
+ <div class="mc-form-descbox-header"><?php _e("Reinforcing the Commons", "mc"); ?><input id="rc-checkbox" name="rc-checkbox" type="hidden" value="A"></div>
+ <div class="mc-form-descbox-intro"><?php _e("Your initiative protectes/expands The Commons, resources that are collectively owned", "mc"); ?></div>
+ <div id="mc-form-more-text-rc" class="mc-form-more-text-v2">
+ <?php _e("The Commons are those resources that are collectively owned or shared among populations. Thus, your initiative is promoting The Commons by focusing its work in protecting/expanding any of them in any particular area of action", "mc"); ?>
+ </div>
+ </div>
+ <div class="mc-form-icon mc-form-icon-a">
+ <img id="mc-form-icon-rc" alt="rc" src="/mc/0.1/images/rc60.png" />
+ </div>
+ </div>
+ <div style="float: left;width: auto;">
+ <!--<img src="/mc/0.1/images/step3.png" alt="step3" class="mc-steps-number-v2" />-->
+ <div id="mc-form-optional-reinforcing" style="width: 500px;">
+ <!--<img src="/mc/0.1/images/button_cancel.png" alt="selected" id="button-close-c" style="display: inline;position: relative;top: -23px;z-index: 1000;left: 476px;"/>-->
+ <div class="blockMe3" style="position: relative;float: left;width: 440px;font-size: 16px;margin-left: 10px;margin-top: 30px;border: 1px solid #B7C4C8;">
+ <label id="mc-optional-reinforcing" style="color: #444;background-color: #FEFBFD;"><?php _e("Which area is the main focus of your initiative?", "mc"); ?></label>
+ <div class="mc-cat-rc-options" id="mc-cat-rc-options">
+ <!--
+ <div class="mc-cat-rc-options-intro" id="mc-cat-rc-options-intro"><?php _e("Which area is the main focus of your initiative?", "mc"); ?></div>
+ -->
+ <div class="mc-cat-rc-option-box-v2" id="mc-cat-rc-option-box-ec" style="margin-top: 15px;"> <div class="mc-cat-rc-option-text"><?php _e("Nature Commons", "mc"); ?></div><div class="mc-cat-rc-option-desc">
+ <?php _e("the natural environment: forests, seeds, the Moon", "mc"); ?></div></div><div class="mc-cat-rc-option-icon-v2" id="mc-cat-rc-option-icon-ec"><img src="/mc/0.1/images/rcec25.png" alt="ec" /></div><div class="mc-cat-rc-option-box-v2" id="mc-cat-rc-option-box-bo"> <div class="mc-cat-rc-option-text">
+ <?php _e("Body/Health Commons", "mc"); ?></div><div class="mc-cat-rc-option-desc">
+ <?php _e("the human bodies: blood donation, smiles, non-alienation", "mc"); ?></div></div><div class="mc-cat-rc-option-icon-v2" id="mc-cat-rc-option-icon-bo"><img src="/mc/0.1/images/rcbo25.png" alt="bo" /></div><div class="mc-cat-rc-option-box-v2" id="mc-cat-rc-option-box-to"> <div class="mc-cat-rc-option-text">
+ <?php _e("Town/Community/Society Commons", "mc"); ?></div><div class="mc-cat-rc-option-desc">
+ <?php _e("the socio-cultural spaces: language, music, streets, science", "mc"); ?></div></div><div class="mc-cat-rc-option-icon-v2" id="mc-cat-rc-option-icon-to"><img src="/mc/0.1/images/rcto25.png" alt="to" /></div><div class="mc-cat-rc-option-box-v2" id="mc-cat-rc-option-box-di"> <div class="mc-cat-rc-option-text">
+ <?php _e("Digital Commons", "mc"); ?></div><div class="mc-cat-rc-option-desc">
+ <?php _e("the cyberspace: internet, cyber-rights, Wikipedia", "mc"); ?></div></div><div class="mc-cat-rc-option-icon-v2" id="mc-cat-rc-option-icon-di"><img src="/mc/0.1/images/rcdi25.png" alt="di" /></div></div>
+
+ </div>
+ </div>
+ </div>
+ <div class="clear"></div>
+ <div>
+ <button class="submit buttonp" type="submit" name="p_submit_fifth" id="p_submit_fifth" ><?php _e("Previous", "mc"); ?></button>
+ <button class="submit buttonn" type="submit" name="submit_fifth" id="submit_fifth" value="" ><?php _e("Next", "mc"); ?></button>
+ </div>
+ <div class="clear"></div>
+ </div>
+ </div>
+ <div class="mc-clean"></div>
+ </div><!-- End fifth slide -->
+ <div class="clear"></div>
+
<div id="sixth_step"><!--Sixth slide -->
<div style="float: left;" class="mc-form-category-group-a-v2">
<div id="sixthStepProgressLine" class="progressLine">
1
0
Author: mgallegos
Date: 2012-11-07 22:36:24 +0100 (Wed, 07 Nov 2012)
New Revision: 586
Modified:
trunk/src/mc-dia-form2.js
trunk/wp-theme/mc2-form.php
Log:
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2012-11-07 19:24:32 UTC (rev 585)
+++ trunk/src/mc-dia-form2.js 2012-11-07 21:36:24 UTC (rev 586)
@@ -35,8 +35,7 @@
if(id=='gr'){
$("#decisions-general-assemblies").removeAttr("disabled");
$("#decisions-consensus").removeAttr("disabled");
- $("#representatives-democratically").removeAttr("disabled");
- $("#meetings-transparent").removeAttr("disabled");
+ $("#representatives-democratically").removeAttr("disabled");
$("#decisions-voting").removeAttr("disabled");
$j("#mc-form-optional-grassroots").effect("shake", { times:1 }, 200);
}
@@ -95,9 +94,7 @@
$("#decisions-consensus").attr("disabled", "disabled");
$('#decisions-consensus').attr('checked', false);
$("#representatives-democratically").attr("disabled", "disabled");
- $('#representatives-democratically').attr('checked', false);
- $("#meetings-transparent").attr("disabled", "disabled");
- $('#meetings-transparent').attr('checked', false);
+ $('#representatives-democratically').attr('checked', false);
$("#decisions-voting").attr("disabled", "disabled");
$('#decisions-voting').attr('checked', false);
$j('#submit_fifth').click();
@@ -594,37 +591,6 @@
});
}
-
-
- /*
- // http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-an…
- $.fn.labelOver = function(overClass) {
- return this.each(function()
- {
- var label = $j(this);
- var f = label.attr('for');
- if (f) {
- var input = $j('#' + f);
-
- this.hide = function() {
- label.css({ textIndent: -10000 });
- };
-
- this.show = function() {
- if (input.val() == '') label.css({ textIndent: 0 });
- };
-
- // handlers
- input.focus(this.hide);
- input.blur(this.show);
- label.addClass(overClass).click(function(){ input.focus(); });
-
- if (input.val() != '') this.hide();
- }
- });
- };
- */
-
$j('#submit_first').click(function(){
Modified: trunk/wp-theme/mc2-form.php
===================================================================
--- trunk/wp-theme/mc2-form.php 2012-11-07 19:24:32 UTC (rev 585)
+++ trunk/wp-theme/mc2-form.php 2012-11-07 21:36:24 UTC (rev 586)
@@ -51,7 +51,7 @@
<input type="hidden" name="languages" id="languages" class="firstStepInput"/>
<label for="languages"><?php _e("Pendiente texto descriptivo... (press enter or comma to separate)", "mc"); ?></label>
<input type="hidden" name="keywords" id="keywords"/>
- <label for="keywords"><?php _e("For example: health, education, etc (press enter or comma to separate).", "mc"); ?></label>
+ <label for="keywords"><?php _e("keywords that define your project, for example: health, education, etc (press enter or comma to separate).", "mc"); ?></label>
<input type="text" name="location" value="Location" id="location" class="firstStepInput"/>
<label for="location"><span class="required-field">*</span><?php _e("Pendiente texto descriptivo...", "mc"); ?></label>
</div>
@@ -351,11 +351,7 @@
<label class="optional-labels-fields">
<input type="checkbox" name="representatives-democratically" value="S" id="representatives-democratically" tabindex="25" disabled="disabled"/>
<?php _e("We have representatives chosen democratically", "mc"); ?>
- </label>
- <label class="optional-labels-fields">
- <input type="checkbox" name="meetings-transparent" value="S" id="meetings-transparent" tabindex="26" disabled="disabled"/>
- <?php _e("We have a board whose meetings are transparent", "mc"); ?>
- </label>
+ </label>
</div>
</div>
</div>
1
0
Author: mgallegos
Date: 2012-11-07 20:24:32 +0100 (Wed, 07 Nov 2012)
New Revision: 585
Modified:
trunk/src/mc-dia-form2.js
Log:
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2012-11-07 16:57:57 UTC (rev 584)
+++ trunk/src/mc-dia-form2.js 2012-11-07 19:24:32 UTC (rev 585)
@@ -982,9 +982,9 @@
if($j("#other-license").attr("checked")){
$j('#other-license-website').show();
$j('#infield-other-license-website').show();
- if($j("#creative-commons").attr("checked")){
- $j('#other-license-website').hide();
- $j('#infield-other-license-website').hide();
+ if($j("#creative-commons").attr("checked")){
+ $j('#creative-commons-website').hide();
+ $j('#infield-creative-commons-website').hide();
$j('#creative-commons').removeAttr('checked');
}
}
1
0
Author: mgallegos
Date: 2012-11-07 17:57:57 +0100 (Wed, 07 Nov 2012)
New Revision: 584
Modified:
trunk/src/mc-dia-form2.js
Log:
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2012-11-06 15:09:59 UTC (rev 583)
+++ trunk/src/mc-dia-form2.js 2012-11-07 16:57:57 UTC (rev 584)
@@ -128,57 +128,211 @@
$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){
- $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')
- $j('label[for*="step2-no"]').addClass('ui-state-active');
+ function validations_step1(){
+ var error = false;
+
+ //remove classes
+ $j('#first_step input').removeClass('error').removeClass('valid');
+
+ //ckeck if inputs aren't empty
+ var fields = $j('#first_step input[type=text], #first_step input[type=password]');
+
+ fields.each(function(){
+ var value = $j.trim($j(this).val());
+ if( value=="" || value==field_values[$j(this).attr('id')] ) {
+ $j(this).addClass('error');
+ $j(this).effect("shake", { times:3 }, 50);
+ error=true;
+ } else {
+ /*if($j(this).attr('id')=='url'){
+ if(!(/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value))){
+ $j(this).addClass('error');
+ $j(this).effect("shake", { times:3 }, 50);
+ error++;
+ }
+ }
+ else*/
+ $j(this).addClass('valid');
+ }
+ });
+
+ return error;
+ }
+
+ function validations_step2(){
+ var error=false;
+
+ if($j('#np-checkbox').val()=='A'){
+ $j('#step2question').effect("shake", { times:3 }, 50);
+ return true;
}
- 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')
- $j('label[for*="step3-no"]').addClass('ui-state-active');
- }
- 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')
- $j('label[for*="step4-no"]').addClass('ui-state-active');
+
+ if($j("#registered-non-profit").attr("checked"))
+ if($j.trim($j('#non-profit-website').val())==""){
+ $j('#non-profit-website').addClass('error');
+ $j('#non-profit-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#non-profit-website').addClass('valid');
+
+ if($j("#open-accounting").attr("checked"))
+ if($j.trim($j('#open-accounting-website').val())==""){
+ $j('#open-accounting-website').addClass('error');
+ $j('#open-accounting-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#open-accounting-website').addClass('valid');
+
+ if($j("#accept-donations").attr("checked"))
+ if($j.trim($j('#donation-website').val())==""){
+ $j('#donation-website').addClass('error');
+ $j('#donation-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#accept-donations').addClass('valid');
+
+ return error;
+ }
+
+ function validations_step3(){
+ var error=false;
+
+ if($j('#rp-checkbox').val()=='A'){
+ $j('#step3question').effect("shake", { times:3 }, 50);
+ return true;
}
- 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')
- $j('label[for*="step5-no"]').addClass('ui-state-active');
+
+ if($j("#terms-of-use").attr("checked"))
+ if($j.trim($j('#terms-of-use-website').val())==""){
+ $j('#terms-of-use-website').addClass('error');
+ $j('#terms-of-use-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#terms-of-use-website').addClass('valid');
+
+ if($j("#creative-commons").attr("checked"))
+ if($j.trim($j('#creative-commons-website').val())==""){
+ $j('#creative-commons-website').addClass('error');
+ $j('#creative-commons-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#creative-commons-website').addClass('valid');
+
+ if($j("#other-license").attr("checked"))
+ if($j.trim($j('#other-license-website').val())==""){
+ $j('#other-license-website').addClass('error');
+ $j('#other-license-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#other-license-website').addClass('valid');
+
+ return error;
+ }
+
+ function validations_step4(){
+ if($j('#rc-checkbox').val()=='A'){
+ $j('#step4question').effect("shake", { times:3 }, 50);
+ return true;
}
- else if (e.key=='#sixth_step'){
- $j('#progress_text').html('100% Complete');
- $j('#progress').css('width','339px');
- current_step='#sixth_step';
- }
+
+ if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rc60.png' && $j('#rc-checkbox').val()=='S'){
+ $j('#mc-form-optional-reinforcing').effect("shake", { times:3 }, 50);
+ return true;
+ }
+
+ return false;
}
+ function validations_step5(){
+
+ if($j('#gr-checkbox').val()=='A'){
+ $j('#step5question').effect("shake", { times:3 }, 50);
+ return true;
+ }
+
+ return false;
+ }
+
+ function onClickImageMap(e){
+ switch (current_step) {
+ case '#first_step':
+ if(validations_step1())
+ return;
+ break;
+ case '#second_step':
+ if(validations_step2())
+ return;
+ break;
+ case '#third_step':
+ if(validations_step3())
+ return;
+ break;
+ case '#fourth_step':
+ if(validations_step4())
+ return;
+ break;
+ case '#fifth_step':
+ if(validations_step5())
+ return;
+ break;
+ default:
+ break;
+ }
+ $j(current_step).slideUp();
+ $j(e.key).slideDown();
+ current_step=e.key;
+ switch (e.key) {
+ case '#first_step':
+ $j('#progress_text').html('0% Complete');
+ $j('#progress').css('width','0');
+ break;
+ case '#second_step':
+ $j('#progress_text').html('20% Complete');
+ $j('#progress').css('width','68px');
+ if($j('#np-checkbox').val()=='S')
+ $j('label[for*="step2-yes"]').addClass('ui-state-active');
+ else if ($j('#np-checkbox').val()=='N')
+ $j('label[for*="step2-no"]').addClass('ui-state-active');
+ break;
+ case '#third_step':
+ $j('#progress_text').html('40% Complete');
+ $j('#progress').css('width','136px');
+ if($j('#rp-checkbox').val()=='S')
+ $j('label[for*="step3-yes"]').addClass('ui-state-active');
+ else if ($j('#rp-checkbox').val()=='N')
+ $j('label[for*="step3-no"]').addClass('ui-state-active');
+ break;
+ case '#fourth_step':
+ $j('#progress_text').html('60% Complete');
+ $j('#progress').css('width','204px');
+ if($j('#rc-checkbox').val()=='S')
+ $j('label[for*="step4-yes"]').addClass('ui-state-active');
+ else if ($j('#rc-checkbox').val()=='N')
+ $j('label[for*="step4-no"]').addClass('ui-state-active');
+ break;
+ case '#fifth_step':
+ $j('#progress_text').html('60% Complete');
+ $j('#progress').css('width','204px');
+ if($j('#gr-checkbox').val()=='S')
+ $j('label[for*="step5-yes"]').addClass('ui-state-active');
+ else if ($j('#gr-checkbox').val()=='N')
+ $j('label[for*="step5-no"]').addClass('ui-state-active');
+ break;
+ case '#sixth_step':
+ $j('#progress_text').html('100% Complete');
+ $j('#progress').css('width','339px');
+ break;
+ default:
+ break;
+ }
+ }
+
function select_cat($id, $id2) {
var cat_id = "#mc-form-" + $id;
$j(cat_id + ",#mc-form-icon-" + $id).click(
@@ -441,6 +595,8 @@
}
+
+ /*
// http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-an…
$.fn.labelOver = function(overClass) {
return this.each(function()
@@ -467,62 +623,43 @@
}
});
};
+ */
- $j('#submit_first').click(function(){
- //remove classes
- $j('#first_step input').removeClass('error').removeClass('valid');
-
- //ckeck if inputs aren't empty
- var fields = $j('#first_step input[type=text], #first_step input[type=password]');
- var error = 0;
- fields.each(function(){
- var value = $j.trim($j(this).val());
- if( value=="" || value==field_values[$j(this).attr('id')] ) {
- $j(this).addClass('error');
- $j(this).effect("shake", { times:3 }, 50);
- error++;
- } else {
- /*if($j(this).attr('id')=='url'){
- if(!(/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value))){
- $j(this).addClass('error');
- $j(this).effect("shake", { times:3 }, 50);
- error++;
- }
- }
- else*/
- $j(this).addClass('valid');
- }
- });
-
- if(!error) {
+ $j('#submit_first').click(function(){
+
+ if(validations_step1())
+ return;
- current_step='#second_step';
-
- if(!step_two_reached){
- $j('#step1_image_map').append('<area href="#" step="#second_step" shape="circle" coords="122,12,12"><!--2-->');
- imageMapUnBind();
- imageMapInit();
- step_two_reached=true;
- }
-
- //update progress bar
- $j('#progress_text').html('20% Complete');
- $j('#progress').css('width','68px');
-
- //slide steps
- $j('#first_step').slideUp();
- $j('#second_step').slideDown();
-
- if($j('#np-checkbox').val()=='S')
- $j('label[for*="step2-yes"]').addClass('ui-state-active');
- else if ($j('#np-checkbox').val()=='N')
- $j('label[for*="step2-no"]').addClass('ui-state-active');
- } else return false;
+ current_step='#second_step';
+
+ if(!step_two_reached){
+ $j('#step1_image_map').append('<area href="#" step="#second_step" shape="circle" coords="122,12,12"><!--2-->');
+ imageMapUnBind();
+ imageMapInit();
+ step_two_reached=true;
+ }
+
+ //update progress bar
+ $j('#progress_text').html('20% Complete');
+ $j('#progress').css('width','68px');
+
+ //slide steps
+ $j('#first_step').slideUp();
+ $j('#second_step').slideDown();
+
+ if($j('#np-checkbox').val()=='S')
+ $j('label[for*="step2-yes"]').addClass('ui-state-active');
+ else if ($j('#np-checkbox').val()=='N')
+ $j('label[for*="step2-no"]').addClass('ui-state-active');
+
});
$j('#p_submit_second').click(function(){
+ if(validations_step2())
+ return;
+
current_step='#first_step';
//update progress bar
@@ -535,45 +672,11 @@
});
- $j('#submit_second').click(function(){
+ $j('#submit_second').click(function(){
- var error=false;
-
- if($j('#np-checkbox').val()=='A'){
- $j('#step2question').effect("shake", { times:3 }, 50);
+ if(validations_step2())
return;
- }
- if($j("#registered-non-profit").attr("checked"))
- if($j.trim($j('#non-profit-website').val())==""){
- $j('#non-profit-website').addClass('error');
- $j('#non-profit-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#non-profit-website').addClass('valid');
-
- if($j("#open-accounting").attr("checked"))
- if($j.trim($j('#open-accounting-website').val())==""){
- $j('#open-accounting-website').addClass('error');
- $j('#open-accounting-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#open-accounting-website').addClass('valid');
-
- if($j("#accept-donations").attr("checked"))
- if($j.trim($j('#donation-website').val())==""){
- $j('#donation-website').addClass('error');
- $j('#donation-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#accept-donations').addClass('valid');
-
- if(error)
- return;
-
current_step='#third_step';
if(!step_three_reached){
@@ -596,11 +699,15 @@
//slide steps
$j('#second_step').slideUp();
$j('#third_step').slideDown();
+
});
$j('#p_submit_third').click(function(){
+ if(validations_step3())
+ return;
+
current_step='#second_step';
//update progress bar
@@ -619,44 +726,10 @@
$j('#submit_third').click(function(){
-
- var error=false;
-
- if($j('#rp-checkbox').val()=='A'){
- $j('#step3question').effect("shake", { times:3 }, 50);
+
+ if(validations_step3())
return;
- }
- if($j("#terms-of-use").attr("checked"))
- if($j.trim($j('#terms-of-use-website').val())==""){
- $j('#terms-of-use-website').addClass('error');
- $j('#terms-of-use-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#terms-of-use-website').addClass('valid');
-
- if($j("#creative-commons").attr("checked"))
- if($j.trim($j('#creative-commons-website').val())==""){
- $j('#creative-commons-website').addClass('error');
- $j('#creative-commons-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#creative-commons-website').addClass('valid');
-
- if($j("#other-license").attr("checked"))
- if($j.trim($j('#other-license-website').val())==""){
- $j('#other-license-website').addClass('error');
- $j('#other-license-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#other-license-website').addClass('valid');
-
- if(error)
- return;
-
current_step='#fourth_step';
if(!step_four_reached){
@@ -682,8 +755,11 @@
$j('#fourth_step').slideDown();
});
- $j('#p_submit_fourth').click(function(){
+ $j('#p_submit_fourth').click(function(){
+ if(validations_step4())
+ return;
+
current_step='#third_step';
//update progress bar
@@ -702,17 +778,9 @@
$j('#submit_fourth').click(function(){
- if($j('#rc-checkbox').val()=='A'){
- $j('#step4question').effect("shake", { times:3 }, 50);
+ if(validations_step4())
return;
- }
-
- if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rc60.png' && $j('#rc-checkbox').val()=='S'){
- $j('#mc-form-optional-reinforcing').effect("shake", { times:3 }, 50);
- return;
- }
-
current_step='#fifth_step';
if(!step_five_reached){
@@ -742,6 +810,9 @@
$j('#p_submit_fifth').click(function(){
+ if(validations_step5())
+ return;
+
current_step='#fourth_step';
//update progress bar
@@ -759,12 +830,10 @@
});
$j('#submit_fifth').click(function(){
-
- if($j('#gr-checkbox').val()=='A'){
- $j('#step5question').effect("shake", { times:3 }, 50);
- return;
- }
+ if(validations_step5())
+ return;
+
current_step='#sixth_step';
if(!step_six_reached){
@@ -897,6 +966,11 @@
if($j("#creative-commons").attr("checked")){
$j('#creative-commons-website').show();
$j('#infield-creative-commons-website').show();
+ if($j("#other-license").attr("checked")){
+ $j('#other-license-website').hide();
+ $j('#infield-other-license-website').hide();
+ $j('#other-license').removeAttr('checked');
+ }
}
else{
$j('#creative-commons-website').hide();
@@ -905,9 +979,14 @@
});
$j("#other-license").click(function(){
- if($j("#other-license").attr("checked")){
+ if($j("#other-license").attr("checked")){
$j('#other-license-website').show();
$j('#infield-other-license-website').show();
+ if($j("#creative-commons").attr("checked")){
+ $j('#other-license-website').hide();
+ $j('#infield-other-license-website').hide();
+ $j('#creative-commons').removeAttr('checked');
+ }
}
else{
$j('#other-license-website').hide();
1
0
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){
1
0
Author: mgallegos
Date: 2012-11-05 23:14:36 +0100 (Mon, 05 Nov 2012)
New Revision: 582
Modified:
trunk/src/mc-dia-form2.js
Log:
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2012-11-05 20:00:59 UTC (rev 581)
+++ trunk/src/mc-dia-form2.js 2012-11-05 22:14:36 UTC (rev 582)
@@ -121,11 +121,11 @@
function imageMapUnBind(){
$j('.map').mapster('unbind');
$j('#firstStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step1_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 19px;margin-top: 0"><div class="marker"></div>');
- $j('#secondStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step2_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 111px;margin-top: 0"><div class="marker"></div>');
- $j('#thirdStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step3_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 203px;margin-top: 0"><div class="marker"></div>');
- $j('#fourthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step4_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 295px;margin-top: 0"><div class="marker"></div>');
- $j('#fifthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 386px;margin-top: 0"><div class="marker"></div>');
- $j('#sixthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 478px;margin-top: 0"><div class="marker"></div>');
+ $j('#secondStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step2_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 111px;margin-top: 0"><div class="marker" style="background-position: -26px 0;"></div></div>');
+ $j('#thirdStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step3_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 203px;margin-top: 0"><div class="marker" style="background-position: -52px 0;"></div></div>');
+ $j('#fourthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step4_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 295px;margin-top: 0"><div class="marker" style="background-position: -78px 0;"></div></div>');
+ $j('#fifthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 386px;margin-top: 0"><div class="marker" style="background-position: -104px 0;"></div></div>');
+ $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){
1
0
Author: mgallegos
Date: 2012-11-05 21:00:59 +0100 (Mon, 05 Nov 2012)
New Revision: 581
Modified:
trunk/src/mc-dia-form2.js
Log:
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2012-11-05 17:16:59 UTC (rev 580)
+++ trunk/src/mc-dia-form2.js 2012-11-05 20:00:59 UTC (rev 581)
@@ -1,938 +1,937 @@
var $j = jQuery.noConflict();
-var current_step='#first_step';
+$j(function(){
-var step_two_reached=step_three_reached=step_four_reached=step_five_reached=step_six_reached=false;
-
-var field_values = {'ininame' : 'Name of your initiative','url' : 'Web address','languages' : 'Language(s)','keywords' : 'Keywords','location' : 'Location','email' : 'email address' };
-
-var mc_np = "0",mc_rp = "0",mc_rc = "0",mc_gr = "0",mc_category = "",nameIni = "", urlIni = "",keywordsIni = "";
-
-function clickCheckBox(id,answer){
- if(answer=='yes'){
- if ($j("#mc-form-" + id).is('.mc-form-descbox-selected')) return;
- $j('#'+id+'-checkbox').val('S');
- $j("#mc-form-" + id).addClass("mc-form-descbox-selected");
- $j("#mc-cat-selected-"+ id).slideDown();
- if(id=='np'){
- $("#registered-non-profit").removeAttr("disabled");
- $("#open-accounting").removeAttr("disabled");
- $("#accept-donations").removeAttr("disabled");
- $j("#mc-form-optional-non-profit").effect("shake", { times:1 }, 200);
+ var current_step='#first_step';
+
+ var step_two_reached=step_three_reached=step_four_reached=step_five_reached=step_six_reached=false;
+
+ var field_values = {'ininame' : 'Name of your initiative','url' : 'Web address','languages' : 'Language(s)','keywords' : 'Keywords','location' : 'Location','email' : 'email address' };
+
+ var mc_np = "0",mc_rp = "0",mc_rc = "0",mc_gr = "0",mc_category = "",nameIni = "", urlIni = "",keywordsIni = "";
+
+ function clickCheckBox(id,answer){
+ if(answer=='yes'){
+ if ($j("#mc-form-" + id).is('.mc-form-descbox-selected')) return;
+ $j('#'+id+'-checkbox').val('S');
+ $j("#mc-form-" + id).addClass("mc-form-descbox-selected");
+ $j("#mc-cat-selected-"+ id).slideDown();
+ if(id=='np'){
+ $("#registered-non-profit").removeAttr("disabled");
+ $("#open-accounting").removeAttr("disabled");
+ $("#accept-donations").removeAttr("disabled");
+ $j("#mc-form-optional-non-profit").effect("shake", { times:1 }, 200);
+ }
+ if(id=='rp'){
+ $("#terms-of-use").removeAttr("disabled");
+ $("#creative-commons").removeAttr("disabled");
+ $("#other-license").removeAttr("disabled");
+ $("#organization-structure").removeAttr("disabled");
+ $("#projects-and-results").removeAttr("disabled");
+ $("#methods-procedures").removeAttr("disabled");
+ $("#documentation").removeAttr("disabled");
+ $j("#mc-form-optional-reproducible").effect("shake", { times:1 }, 200);
+ }
+ if(id=='gr'){
+ $("#decisions-general-assemblies").removeAttr("disabled");
+ $("#decisions-consensus").removeAttr("disabled");
+ $("#representatives-democratically").removeAttr("disabled");
+ $("#meetings-transparent").removeAttr("disabled");
+ $("#decisions-voting").removeAttr("disabled");
+ $j("#mc-form-optional-grassroots").effect("shake", { times:1 }, 200);
+ }
+ if(id=='rc')
+ $j("#mc-form-optional-reinforcing").effect("shake", { times:1 }, 200);
+ }
+ else{
+ $j('#'+id+'-checkbox').val('N');
+ $j("#mc-form-" + id).removeClass("mc-form-descbox-selected");
+ $j("#mc-cat-selected-"+ id).slideUp();
+ if(id=='np'){
+ $("#registered-non-profit").attr("disabled", "disabled");
+ $('#registered-non-profit').attr('checked', false);
+ $("#open-accounting").attr("disabled", "disabled");
+ $('#open-accounting').attr('checked', false);
+ $("#accept-donations").attr("disabled", "disabled");
+ $('#accept-donations').attr('checked', false);
+ $j('#non-profit-website').hide();
+ $j('#infield-non-profit-website').hide();
+ $j('#open-accounting-website').hide();
+ $j('#infield-open-accounting-website').hide();
+ $j('#donation-website').hide();
+ $j('#infield-donation-website').hide();
+ $j('#submit_second').click();
+ }
+ if(id=='rp'){
+ $("#terms-of-use").attr("disabled", "disabled");
+ $('#terms-of-use').attr('checked', false);
+ $("#creative-commons").attr("disabled", "disabled");
+ $('#creative-commons').attr('checked', false);
+ $("#other-license").attr("disabled", "disabled");
+ $('#other-license').attr('checked', false);
+ $("#organization-structure").attr("disabled", "disabled");
+ $('#organization-structure').attr('checked', false);
+ $("#projects-and-results").attr("disabled", "disabled");
+ $('#projects-and-results').attr('checked', false);
+ $("#methods-procedures").attr("disabled", "disabled");
+ $('#methods-procedures').attr('checked', false);
+ $("#documentation").attr("disabled", "disabled");
+ $('#documentation').attr('checked', false);
+ $j('#terms-of-use-website').hide();
+ $j('#infield-terms-of-use-website').hide();
+ $j('#creative-commons-website').hide();
+ $j('#infield-creative-commons-website').hide();
+ $j('#other-license-website').hide();
+ $j('#infield-other-license-website').hide();
+ $j('#submit_third').click();
+ }
+ if(id=='rc'){
+ reset_areas();
+ $j('#submit_fourth').click();
+ }
+ if(id=='gr'){
+ $("#decisions-general-assemblies").attr("disabled", "disabled");
+ $('#decisions-general-assemblies').attr('checked', false);
+ $("#decisions-consensus").attr("disabled", "disabled");
+ $('#decisions-consensus').attr('checked', false);
+ $("#representatives-democratically").attr("disabled", "disabled");
+ $('#representatives-democratically').attr('checked', false);
+ $("#meetings-transparent").attr("disabled", "disabled");
+ $('#meetings-transparent').attr('checked', false);
+ $("#decisions-voting").attr("disabled", "disabled");
+ $('#decisions-voting').attr('checked', false);
+ $j('#submit_fifth').click();
+ }
+
}
- if(id=='rp'){
- $("#terms-of-use").removeAttr("disabled");
- $("#creative-commons").removeAttr("disabled");
- $("#other-license").removeAttr("disabled");
- $("#organization-structure").removeAttr("disabled");
- $("#projects-and-results").removeAttr("disabled");
- $("#methods-procedures").removeAttr("disabled");
- $("#documentation").removeAttr("disabled");
- $j("#mc-form-optional-reproducible").effect("shake", { times:1 }, 200);
+ }
+
+ function imageMapInit(){
+ $j('.map').mapster({
+ fillColor: 'EA8F5F',
+ fillOpacity: 0.8,
+ isSelectable: false,
+ mapKey: 'step',
+ onClick: function (e) {
+ onClickImageMap(e);
+ }
+ });
+ }
+
+ function imageMapUnBind(){
+ $j('.map').mapster('unbind');
+ $j('#firstStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step1_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 19px;margin-top: 0"><div class="marker"></div>');
+ $j('#secondStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step2_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 111px;margin-top: 0"><div class="marker"></div>');
+ $j('#thirdStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step3_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 203px;margin-top: 0"><div class="marker"></div>');
+ $j('#fourthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step4_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 295px;margin-top: 0"><div class="marker"></div>');
+ $j('#fifthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 386px;margin-top: 0"><div class="marker"></div>');
+ $j('#sixthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 478px;margin-top: 0"><div class="marker"></div>');
+ }
+
+ function onClickImageMap(e){
+ if (e.key=='#first_step'){
+ $j('#progress_text').html('0% Complete');
+ $j('#progress').css('width','0');
+ }
+ else if (e.key=='#second_step'){
+ $j('#progress_text').html('20% Complete');
+ $j('#progress').css('width','68px');
+ if($j('#np-checkbox').val()=='S')
+ $j('label[for*="step2-yes"]').addClass('ui-state-active');
+ else if ($j('#np-checkbox').val()=='N')
+ $j('label[for*="step2-no"]').addClass('ui-state-active');
}
- if(id=='gr'){
- $("#decisions-general-assemblies").removeAttr("disabled");
- $("#decisions-consensus").removeAttr("disabled");
- $("#representatives-democratically").removeAttr("disabled");
- $("#meetings-transparent").removeAttr("disabled");
- $("#decisions-voting").removeAttr("disabled");
- $j("#mc-form-optional-grassroots").effect("shake", { times:1 }, 200);
+ else if (e.key=='#third_step'){
+ $j('#progress_text').html('40% Complete');
+ $j('#progress').css('width','136px');
+ if($j('#rp-checkbox').val()=='S')
+ $j('label[for*="step3-yes"]').addClass('ui-state-active');
+ else if ($j('#rp-checkbox').val()=='N')
+ $j('label[for*="step3-no"]').addClass('ui-state-active');
+ }
+ else if (e.key=='#fourth_step'){
+ $j('#progress_text').html('60% Complete');
+ $j('#progress').css('width','204px');
+ if($j('#rc-checkbox').val()=='S')
+ $j('label[for*="step4-yes"]').addClass('ui-state-active');
+ else if ($j('#rc-checkbox').val()=='N')
+ $j('label[for*="step4-no"]').addClass('ui-state-active');
}
- if(id=='rc')
- $j("#mc-form-optional-reinforcing").effect("shake", { times:1 }, 200);
- }
- else{
- $j('#'+id+'-checkbox').val('N');
- $j("#mc-form-" + id).removeClass("mc-form-descbox-selected");
- $j("#mc-cat-selected-"+ id).slideUp();
- if(id=='np'){
- $("#registered-non-profit").attr("disabled", "disabled");
- $('#registered-non-profit').attr('checked', false);
- $("#open-accounting").attr("disabled", "disabled");
- $('#open-accounting').attr('checked', false);
- $("#accept-donations").attr("disabled", "disabled");
- $('#accept-donations').attr('checked', false);
- $j('#non-profit-website').hide();
- $j('#infield-non-profit-website').hide();
- $j('#open-accounting-website').hide();
- $j('#infield-open-accounting-website').hide();
- $j('#donation-website').hide();
- $j('#infield-donation-website').hide();
- $j('#submit_second').click();
+ else if (e.key=='#fifth_step'){
+ $j('#progress_text').html('60% Complete');
+ $j('#progress').css('width','204px');
+ if($j('#gr-checkbox').val()=='S')
+ $j('label[for*="step5-yes"]').addClass('ui-state-active');
+ else if ($j('#gr-checkbox').val()=='N')
+ $j('label[for*="step5-no"]').addClass('ui-state-active');
}
- if(id=='rp'){
- $("#terms-of-use").attr("disabled", "disabled");
- $('#terms-of-use').attr('checked', false);
- $("#creative-commons").attr("disabled", "disabled");
- $('#creative-commons').attr('checked', false);
- $("#other-license").attr("disabled", "disabled");
- $('#other-license').attr('checked', false);
- $("#organization-structure").attr("disabled", "disabled");
- $('#organization-structure').attr('checked', false);
- $("#projects-and-results").attr("disabled", "disabled");
- $('#projects-and-results').attr('checked', false);
- $("#methods-procedures").attr("disabled", "disabled");
- $('#methods-procedures').attr('checked', false);
- $("#documentation").attr("disabled", "disabled");
- $('#documentation').attr('checked', false);
- $j('#terms-of-use-website').hide();
- $j('#infield-terms-of-use-website').hide();
- $j('#creative-commons-website').hide();
- $j('#infield-creative-commons-website').hide();
- $j('#other-license-website').hide();
- $j('#infield-other-license-website').hide();
- $j('#submit_third').click();
- }
- if(id=='rc'){
- reset_areas();
- $j('#submit_fourth').click();
- }
- if(id=='gr'){
- $("#decisions-general-assemblies").attr("disabled", "disabled");
- $('#decisions-general-assemblies').attr('checked', false);
- $("#decisions-consensus").attr("disabled", "disabled");
- $('#decisions-consensus').attr('checked', false);
- $("#representatives-democratically").attr("disabled", "disabled");
- $('#representatives-democratically').attr('checked', false);
- $("#meetings-transparent").attr("disabled", "disabled");
- $('#meetings-transparent').attr('checked', false);
- $("#decisions-voting").attr("disabled", "disabled");
- $('#decisions-voting').attr('checked', false);
- $j('#submit_fifth').click();
- }
-
+ 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();
}
-}
-
-function imageMapInit(){
- $j('.map').mapster({
- fillColor: 'EA8F5F',
- fillOpacity: 0.8,
- isSelectable: false,
- mapKey: 'step',
- onClick: function (e) {
- onClickImageMap(e);
- }
- });
-}
-
-function imageMapUnBind(){
- $j('.map').mapster('unbind');
- $j('#firstStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step1_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 19px;margin-top: 0"><div class="marker"></div>');
- $j('#secondStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step2_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 111px;margin-top: 0"><div class="marker"></div>');
- $j('#thirdStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step3_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 203px;margin-top: 0"><div class="marker"></div>');
- $j('#fourthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step4_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 295px;margin-top: 0"><div class="marker"></div>');
- $j('#fifthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 386px;margin-top: 0"><div class="marker"></div>');
- $j('#sixthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 478px;margin-top: 0"><div class="marker"></div>');
-}
-
-function onClickImageMap(e){
- if (e.key=='#first_step'){
- $j('#progress_text').html('0% Complete');
- $j('#progress').css('width','0');
- }
- else if (e.key=='#second_step'){
- $j('#progress_text').html('20% Complete');
- $j('#progress').css('width','68px');
- if($j('#np-checkbox').val()=='S')
- $j('label[for*="step2-yes"]').addClass('ui-state-active');
- else if ($j('#np-checkbox').val()=='N')
- $j('label[for*="step2-no"]').addClass('ui-state-active');
- }
- else if (e.key=='#third_step'){
- $j('#progress_text').html('40% Complete');
- $j('#progress').css('width','136px');
- if($j('#rp-checkbox').val()=='S')
- $j('label[for*="step3-yes"]').addClass('ui-state-active');
- else if ($j('#rp-checkbox').val()=='N')
- $j('label[for*="step3-no"]').addClass('ui-state-active');
- }
- else if (e.key=='#fourth_step'){
- $j('#progress_text').html('60% Complete');
- $j('#progress').css('width','204px');
- if($j('#rc-checkbox').val()=='S')
- $j('label[for*="step4-yes"]').addClass('ui-state-active');
- else if ($j('#rc-checkbox').val()=='N')
- $j('label[for*="step4-no"]').addClass('ui-state-active');
- }
- else if (e.key=='#fifth_step'){
- $j('#progress_text').html('60% Complete');
- $j('#progress').css('width','204px');
- if($j('#gr-checkbox').val()=='S')
- $j('label[for*="step5-yes"]').addClass('ui-state-active');
- else if ($j('#gr-checkbox').val()=='N')
- $j('label[for*="step5-no"]').addClass('ui-state-active');
- }
- 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();
-}
-
-function select_cat($id, $id2) {
- var cat_id = "#mc-form-" + $id;
- $j(cat_id + ",#mc-form-icon-" + $id).click(
- function ()
- {/*
- // if ($id != "rc") {
- $j(cat_id).addClass("mc-form-descbox-selected");
- $j("#mc-cat-selected-"+ $id).slideDown();
- //}
- $j("#mc-form-" + $id2).removeClass("mc-form-descbox-selected");
- $j("#mc-cat-selected-"+ $id2).slideUp();
- // $j("#mc-form-more-link-" + $id2).show('slow');
- $j("#mc-form-less-link-" + $id2).hide();
- // $j("#mc-form-" + $id).removeAttr("title");
- // $j("#mc-form-" + $id2).attr("title", click_to_select);
- $j("#mc-form-more-text-" + $id2).slideUp(function() {adjustHeights();});*/
- if (cat_id == "#mc-form-rc") {
- //$j("#mc-cat-rc-options").slideDown(function() {adjustHeights();});
- mc_rc="0";
- update_logo($id);
- //$j('div.blockMe3').unblock();
- //$('#mc-form-optional-reinforcing').show();
- } else if (cat_id == "#mc-form-nrc") {
- //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
- reset_areas();
- update_logo($id);
- } else if (cat_id == "#mc-form-np") {
- //$j('div.blockMe1').unblock();
- //$('#mc-form-optional-non-profit').show();
- } else if (cat_id == "#mc-form-rp") {
- //$j('div.blockMe2').unblock();
- //$('#mc-form-optional-reproducible').show();
- } else if (cat_id == "#mc-form-gr") {
- //$j('div.blockMe4').unblock();
- //$('#mc-form-optional-grassroots').show();
- } else {
- update_logo($id);
- //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
- }
- });
-};
-
-function hover_cat($id) {
- var cat_id = "#mc-form-" + $id;
- $j(cat_id + ",#mc-form-icon-" + $id).hover(
- function ()
- {
- $j(cat_id).addClass("mc-form-descbox-high");
- //if ($j('#mc-form-less-link-'+$id).is(':hidden'))
- // $j("#mc-form-more-link-"+$id).show();
- }, function () {
- $j(cat_id).removeClass("mc-form-descbox-high");
- //if ($j('#mc-form-less-link-'+$id).is(':hidden'))
- // $j("#mc-form-more-link-"+$id).hide();
- });
-};
-
-// More links
-
-function click_more_link($id) {
- $j("#mc-form-more-link-" + $id).click(
- function (event) {
- event.stopPropagation();
- $j(this).hide();
- /*if ($id == "rc") {
- $j("#mc-cat-rc-options").slideDown();
- }*/
- $j("#mc-form-less-link-" + $id).show('slow');
- $j("#mc-form-more-text-" + $id).show('slow',function() {adjustHeights();});
-
- });
-};
-
-function click_less_link($id) {
- $j("#mc-form-less-link-" + $id).click(
- function (event) {
- event.stopPropagation();
- $j(this).hide();
- /*if ($id == "rc") {
- $j("#mc-cat-rc-options").slideUp();
- }*/
- $j("#mc-form-more-link-" + $id).show('slow');
- $j("#mc-form-more-text-" + $id).slideUp(function() {adjustHeights();});
- //if ($id == "rc") { $j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});}
- });
-};
-
-function hover_more_link($id) {
- $j("#mc-form-more-link-" + $id).hover(
- function () {
- $j(this).addClass("mc-form-link-high");
- }, function () {
- $j(this).removeClass("mc-form-link-high");
- });
-};
-
-function hover_less_link($id) {
- $j("#mc-form-less-link-" + $id).hover(
- function () {
- $j(this).addClass("mc-form-link-high");
- }, function () {
- $j(this).removeClass("mc-form-link-high");
- });
-};
-
-function hide_initial($id) {
- $j("#mc-form-more-link-" + $id).hide();
- //$j("#mc-form-more-text-" + $id).hide();
- $j("#mc-form-less-link-" + $id).hide();
-};
-
-function dclick_toggle($id) {
- $j("#mc-form-" + $id).dblclick(
- function () {
- var id_text = "#mc-form-more-text-" + $id;
- var id_link = "#mc-form-more-link-" + $id;
- if ($j(id_text).is(':visible')) { $j(id_text).slideUp(); $j(id_link).slideDown(); }
- else { $j(id_text).slideDown(); $j(id_link).slideUp(); };
- });};
-
-function reset_areas() {
- mc_rc="0";
- $j("#mc-cat-rc-option-box-ec").removeClass("mc-cat-rc-option-box-selected");
- $j("#mc-cat-rc-option-box-bo").removeClass("mc-cat-rc-option-box-selected");
- $j("#mc-cat-rc-option-box-to").removeClass("mc-cat-rc-option-box-selected");
- $j("#mc-cat-rc-option-box-di").removeClass("mc-cat-rc-option-box-selected");
- $j("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc60.png"});
- $j("#mc-cat-selected-rc").slideUp();
-}
-
-function select_area($id) {
- var cat_id = "#mc-cat-rc-option-box-" + $id;
- $j(cat_id + ",#mc-cat-rc-option-icon-" + $id).click(
- function (event) {
- if($j('#rc-checkbox').val()=='N')
- return;
- event.stopPropagation();
- reset_areas();
- $j("#mc-form-rc").addClass("mc-form-descbox-selected");
- $j("#mc-cat-selected-rc").slideDown();
- $j(cat_id).addClass("mc-cat-rc-option-box-selected");
- $j("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc" + $id + "60.png"});
- update_logo($id);
- });
-};
-
-// Inspired in:
-// http://stackoverflow.com/questions/803688/how-do-i-keep-multiple-divs-the-s…
-
-function adjustPairHeights($id1, $id2) {
- var maxHeight = 0;
- var idcat1 = "#mc-form-category-group-" + $id1;
- var idcat2 = "#mc-form-category-group-" + $id2;
- var ids = idcat1 + "," + idcat2;
- $j(ids).each(function(){
- $j(this).height('auto');
- if (maxHeight < $j(this).height()) {maxHeight = $j(this).height();}
- });
- if($j(idcat1).height() < maxHeight) { $j(idcat1).height(maxHeight); };
- if($j(idcat2).height() < maxHeight) { $j(idcat2).height(maxHeight); };
-}
-
-function adjustHeights() {
- adjustPairHeights("aa", "ab");
- adjustPairHeights("bb", "ba");
-}
-
-function update_logo($cat) {
- if ($cat == "np" ) mc_np="np-";
- if ($cat == "nnp") mc_np="fp-";
- if ($cat == "rp" ) mc_rp="rp-";
- if ($cat == "nrp") mc_rp="ex-";
- if ($cat == "gr" ) mc_gr="gr-";
- if ($cat == "ngr") mc_gr="rs-";
- if ($cat == "ec" || $cat == "bo" ||
- $cat == "to" || $cat == "di") mc_rc="rc." + $cat + "-";
- if ($cat == "nrc") mc_rc="ro-";
-
- mc_category = "";
- var icon_url = "";
-
- if (mc_np != "0" && mc_rp != "0" && mc_rc != "0" && mc_gr != "0") {
- if (mc_np!="") { mc_category += mc_np; }
- if (mc_rp!="") { mc_category += mc_rp; }
- if (mc_rc!="") { mc_category += mc_rc; }
- if (mc_gr!="") { mc_category += mc_gr; }
- // /lang/mc-0-1-np-rp-sc-dc/
- mc_category = mc_category.replace(/-$/, "");
- icon_url = "/mc/0.1/images/" + mc_category + "-120x90-0.1.png";
- }
- if (icon_url != "") {
- $j("#mc-form-icon-result").attr({src : icon_url});
- $j("#mc-form-icon-result").show('fast');
- } else {
- $j("#mc-form-icon-result").hide();
- }
- checkIfFormReady();
-}
-
-function checkIfFormReady() {
- urlIni = $j('#url').val();
- nameIni = $j('#ininame').val();
- keywordsIni = $j('#keywords').val();
- if (mc_category != "" && nameIni.length > 0 && urlIni.length > 0) {
- $j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-enabled");
- $j("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-disabled");
- $j("#mc-dia-continue-btn").effect("highlight", {}, 2000);
- } else {
- $j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-disabled");
- $j("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-enabled");
- }
-}
-
-function confInputValidation($id) {
- $j($id).bind("change keyup", function(event) {
- checkIfFormReady();
- });
-}
-
-// adapted from:
-// http://stackoverflow.com/questions/1277070/is-there-an-equivalent-javascrip…
-function doadjustwithsleep( part ) {
- if( part == 0 ) {
- setTimeout( function() { doadjustwithsleep( 1 ); }, 1000 );
- } else if( part == 1 ) {
- adjustHeights();
- }
-}
-
-function conf_link($id) {
- var nid = "n" + $id;
- select_cat($id, nid);
- select_cat(nid, $id);
-};
-
-function conf_click_continue() {
- $j("#mc-dia-continue-btn").click(
- function (event) {
- event.stopPropagation();
- if (mc_category != "" && urlIni.length > 0 && nameIni.length > 0) {
- var currentUrl = window.location.pathname.split('/');
- var langCode = "";
- if (currentUrl[1] == 'preview') { langCode = 'en'; }
- else { langCode = currentUrl[1]; };
- window.location.href="/" + langCode + "/" + mc_category + "-html/0.1/?ini_name=" + nameIni +
- "&ini_url=" + urlIni + "&ini_keywords=" + keywordsIni;
- }
- });
-};
-
-
-// http://www.richreuter.com/2008/08/01/UsingJQueryToResizeTextBoxesToMaxLengt…
-function max_textsize() {
- $j('input[type=text]').each(function() {
- var max_length = $j(this).attr('maxlength');
- var multiplier = (max_length > 10) ? 7.3 : 8;
- var w = (max_length * multiplier) + "px";
- $j(this).width(w);
-});
-
-}
-
-// http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-an…
-$.fn.labelOver = function(overClass) {
- return this.each(function()
- {
- var label = $j(this);
- var f = label.attr('for');
- if (f) {
- var input = $j('#' + f);
-
- this.hide = function() {
- label.css({ textIndent: -10000 });
+
+ function select_cat($id, $id2) {
+ var cat_id = "#mc-form-" + $id;
+ $j(cat_id + ",#mc-form-icon-" + $id).click(
+ function ()
+ {/*
+ // if ($id != "rc") {
+ $j(cat_id).addClass("mc-form-descbox-selected");
+ $j("#mc-cat-selected-"+ $id).slideDown();
+ //}
+ $j("#mc-form-" + $id2).removeClass("mc-form-descbox-selected");
+ $j("#mc-cat-selected-"+ $id2).slideUp();
+ // $j("#mc-form-more-link-" + $id2).show('slow');
+ $j("#mc-form-less-link-" + $id2).hide();
+ // $j("#mc-form-" + $id).removeAttr("title");
+ // $j("#mc-form-" + $id2).attr("title", click_to_select);
+ $j("#mc-form-more-text-" + $id2).slideUp(function() {adjustHeights();});*/
+ if (cat_id == "#mc-form-rc") {
+ //$j("#mc-cat-rc-options").slideDown(function() {adjustHeights();});
+ mc_rc="0";
+ update_logo($id);
+ //$j('div.blockMe3').unblock();
+ //$('#mc-form-optional-reinforcing').show();
+ } else if (cat_id == "#mc-form-nrc") {
+ //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
+ reset_areas();
+ update_logo($id);
+ } else if (cat_id == "#mc-form-np") {
+ //$j('div.blockMe1').unblock();
+ //$('#mc-form-optional-non-profit').show();
+ } else if (cat_id == "#mc-form-rp") {
+ //$j('div.blockMe2').unblock();
+ //$('#mc-form-optional-reproducible').show();
+ } else if (cat_id == "#mc-form-gr") {
+ //$j('div.blockMe4').unblock();
+ //$('#mc-form-optional-grassroots').show();
+ } else {
+ update_logo($id);
+ //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
+ }
+ });
};
-
- this.show = function() {
- if (input.val() == '') label.css({ textIndent: 0 });
+
+ function hover_cat($id) {
+ var cat_id = "#mc-form-" + $id;
+ $j(cat_id + ",#mc-form-icon-" + $id).hover(
+ function ()
+ {
+ $j(cat_id).addClass("mc-form-descbox-high");
+ //if ($j('#mc-form-less-link-'+$id).is(':hidden'))
+ // $j("#mc-form-more-link-"+$id).show();
+ }, function () {
+ $j(cat_id).removeClass("mc-form-descbox-high");
+ //if ($j('#mc-form-less-link-'+$id).is(':hidden'))
+ // $j("#mc-form-more-link-"+$id).hide();
+ });
};
-
- // handlers
- input.focus(this.hide);
- input.blur(this.show);
- label.addClass(overClass).click(function(){ input.focus(); });
-
- if (input.val() != '') this.hide();
- }
- });
- };
-
-
- $j('#submit_first').click(function(){
- //remove classes
- $j('#first_step input').removeClass('error').removeClass('valid');
-
- //ckeck if inputs aren't empty
- var fields = $j('#first_step input[type=text], #first_step input[type=password]');
- var error = 0;
- fields.each(function(){
- var value = $j.trim($j(this).val());
- if( value=="" || value==field_values[$j(this).attr('id')] ) {
- $j(this).addClass('error');
- $j(this).effect("shake", { times:3 }, 50);
- error++;
- } else {
- /*if($j(this).attr('id')=='url'){
- if(!(/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value))){
- $j(this).addClass('error');
- $j(this).effect("shake", { times:3 }, 50);
- error++;
- }
- }
- else*/
- $j(this).addClass('valid');
- }
- });
-
- if(!error) {
-
- current_step='#second_step';
-
- if(!step_two_reached){
- $j('#step1_image_map').append('<area href="#" step="#second_step" shape="circle" coords="122,12,12"><!--2-->');
- imageMapUnBind();
- imageMapInit();
- step_two_reached=true;
- }
-
- //update progress bar
- $j('#progress_text').html('20% Complete');
- $j('#progress').css('width','68px');
-
- //slide steps
- $j('#first_step').slideUp();
- $j('#second_step').slideDown();
-
- if($j('#np-checkbox').val()=='S')
- $j('label[for*="step2-yes"]').addClass('ui-state-active');
- else if ($j('#np-checkbox').val()=='N')
- $j('label[for*="step2-no"]').addClass('ui-state-active');
- } else return false;
-});
-
-$j('#p_submit_second').click(function(){
- current_step='#first_step';
-
- //update progress bar
- $j('#progress').css('width','0');
- $j('#progress_text').html('0% Complete');
-
- //slide steps
- $j('#second_step').slideUp();
- $j('#first_step').slideDown();
-});
-
-
-$j('#submit_second').click(function(){
+ // More links
- var error=false;
+ function click_more_link($id) {
+ $j("#mc-form-more-link-" + $id).click(
+ function (event) {
+ event.stopPropagation();
+ $j(this).hide();
+ /*if ($id == "rc") {
+ $j("#mc-cat-rc-options").slideDown();
+ }*/
+ $j("#mc-form-less-link-" + $id).show('slow');
+ $j("#mc-form-more-text-" + $id).show('slow',function() {adjustHeights();});
- if($j('#np-checkbox').val()=='A'){
- $j('#step2question').effect("shake", { times:3 }, 50);
- return;
- }
+ });
+ };
- if($j("#registered-non-profit").attr("checked"))
- if($j.trim($j('#non-profit-website').val())==""){
- $j('#non-profit-website').addClass('error');
- $j('#non-profit-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#non-profit-website').addClass('valid');
+ function click_less_link($id) {
+ $j("#mc-form-less-link-" + $id).click(
+ function (event) {
+ event.stopPropagation();
+ $j(this).hide();
+ /*if ($id == "rc") {
+ $j("#mc-cat-rc-options").slideUp();
+ }*/
+ $j("#mc-form-more-link-" + $id).show('slow');
+ $j("#mc-form-more-text-" + $id).slideUp(function() {adjustHeights();});
+ //if ($id == "rc") { $j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});}
+ });
+ };
- if($j("#open-accounting").attr("checked"))
- if($j.trim($j('#open-accounting-website').val())==""){
- $j('#open-accounting-website').addClass('error');
- $j('#open-accounting-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#open-accounting-website').addClass('valid');
+ function hover_more_link($id) {
+ $j("#mc-form-more-link-" + $id).hover(
+ function () {
+ $j(this).addClass("mc-form-link-high");
+ }, function () {
+ $j(this).removeClass("mc-form-link-high");
+ });
+ };
- if($j("#accept-donations").attr("checked"))
- if($j.trim($j('#donation-website').val())==""){
- $j('#donation-website').addClass('error');
- $j('#donation-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#accept-donations').addClass('valid');
+ function hover_less_link($id) {
+ $j("#mc-form-less-link-" + $id).hover(
+ function () {
+ $j(this).addClass("mc-form-link-high");
+ }, function () {
+ $j(this).removeClass("mc-form-link-high");
+ });
+ };
- if(error)
- return;
+ function hide_initial($id) {
+ $j("#mc-form-more-link-" + $id).hide();
+ //$j("#mc-form-more-text-" + $id).hide();
+ $j("#mc-form-less-link-" + $id).hide();
+ };
- current_step='#third_step';
-
- if(!step_three_reached){
- $j('#step1_image_map').append('<area href="#" step="#third_step" shape="circle" coords="214,12,12"><!--3-->');
- $j('#step2_image_map').append('<area href="#" step="#third_step" shape="circle" coords="214,12,12"><!--3-->');
- imageMapUnBind();
- imageMapInit();
- step_three_reached=true;
+ function dclick_toggle($id) {
+ $j("#mc-form-" + $id).dblclick(
+ function () {
+ var id_text = "#mc-form-more-text-" + $id;
+ var id_link = "#mc-form-more-link-" + $id;
+ if ($j(id_text).is(':visible')) { $j(id_text).slideUp(); $j(id_link).slideDown(); }
+ else { $j(id_text).slideDown(); $j(id_link).slideUp(); };
+ });};
+
+ function reset_areas() {
+ mc_rc="0";
+ $j("#mc-cat-rc-option-box-ec").removeClass("mc-cat-rc-option-box-selected");
+ $j("#mc-cat-rc-option-box-bo").removeClass("mc-cat-rc-option-box-selected");
+ $j("#mc-cat-rc-option-box-to").removeClass("mc-cat-rc-option-box-selected");
+ $j("#mc-cat-rc-option-box-di").removeClass("mc-cat-rc-option-box-selected");
+ $j("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc60.png"});
+ $j("#mc-cat-selected-rc").slideUp();
}
-
- //update progress bar
- $j('#progress_text').html('40% Complete');
- $j('#progress').css('width','136px');
-
- if($j('#rp-checkbox').val()=='S')
- $j('label[for*="step3-yes"]').addClass('ui-state-active');
- else if ($j('#rp-checkbox').val()=='N')
- $j('label[for*="step3-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#second_step').slideUp();
- $j('#third_step').slideDown();
-
-});
-
-$j('#p_submit_third').click(function(){
- current_step='#second_step';
+ function select_area($id) {
+ var cat_id = "#mc-cat-rc-option-box-" + $id;
+ $j(cat_id + ",#mc-cat-rc-option-icon-" + $id).click(
+ function (event) {
+ if($j('#rc-checkbox').val()=='N')
+ return;
+ event.stopPropagation();
+ reset_areas();
+ $j("#mc-form-rc").addClass("mc-form-descbox-selected");
+ $j("#mc-cat-selected-rc").slideDown();
+ $j(cat_id).addClass("mc-cat-rc-option-box-selected");
+ $j("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc" + $id + "60.png"});
+ update_logo($id);
+ });
+ };
- //update progress bar
- $j('#progress_text').html('20% Complete');
- $j('#progress').css('width','68px');
-
- if($j('#np-checkbox').val()=='S')
- $j('label[for*="step2-yes"]').addClass('ui-state-active');
- else if ($j('#np-checkbox').val()=='N')
- $j('label[for*="step2-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#third_step').slideUp();
- $j('#second_step').slideDown();
-});
-
-
-$j('#submit_third').click(function(){
+ // Inspired in:
+ // http://stackoverflow.com/questions/803688/how-do-i-keep-multiple-divs-the-s…
- var error=false;
+ function adjustPairHeights($id1, $id2) {
+ var maxHeight = 0;
+ var idcat1 = "#mc-form-category-group-" + $id1;
+ var idcat2 = "#mc-form-category-group-" + $id2;
+ var ids = idcat1 + "," + idcat2;
+ $j(ids).each(function(){
+ $j(this).height('auto');
+ if (maxHeight < $j(this).height()) {maxHeight = $j(this).height();}
+ });
+ if($j(idcat1).height() < maxHeight) { $j(idcat1).height(maxHeight); };
+ if($j(idcat2).height() < maxHeight) { $j(idcat2).height(maxHeight); };
+ }
- if($j('#rp-checkbox').val()=='A'){
- $j('#step3question').effect("shake", { times:3 }, 50);
- return;
+ function adjustHeights() {
+ adjustPairHeights("aa", "ab");
+ adjustPairHeights("bb", "ba");
}
- if($j("#terms-of-use").attr("checked"))
- if($j.trim($j('#terms-of-use-website').val())==""){
- $j('#terms-of-use-website').addClass('error');
- $j('#terms-of-use-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#terms-of-use-website').addClass('valid');
+ function update_logo($cat) {
+ if ($cat == "np" ) mc_np="np-";
+ if ($cat == "nnp") mc_np="fp-";
+ if ($cat == "rp" ) mc_rp="rp-";
+ if ($cat == "nrp") mc_rp="ex-";
+ if ($cat == "gr" ) mc_gr="gr-";
+ if ($cat == "ngr") mc_gr="rs-";
+ if ($cat == "ec" || $cat == "bo" ||
+ $cat == "to" || $cat == "di") mc_rc="rc." + $cat + "-";
+ if ($cat == "nrc") mc_rc="ro-";
- if($j("#creative-commons").attr("checked"))
- if($j.trim($j('#creative-commons-website').val())==""){
- $j('#creative-commons-website').addClass('error');
- $j('#creative-commons-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#creative-commons-website').addClass('valid');
+ mc_category = "";
+ var icon_url = "";
- if($j("#other-license").attr("checked"))
- if($j.trim($j('#other-license-website').val())==""){
- $j('#other-license-website').addClass('error');
- $j('#other-license-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#other-license-website').addClass('valid');
+ if (mc_np != "0" && mc_rp != "0" && mc_rc != "0" && mc_gr != "0") {
+ if (mc_np!="") { mc_category += mc_np; }
+ if (mc_rp!="") { mc_category += mc_rp; }
+ if (mc_rc!="") { mc_category += mc_rc; }
+ if (mc_gr!="") { mc_category += mc_gr; }
+ // /lang/mc-0-1-np-rp-sc-dc/
+ mc_category = mc_category.replace(/-$/, "");
+ icon_url = "/mc/0.1/images/" + mc_category + "-120x90-0.1.png";
+ }
+ if (icon_url != "") {
+ $j("#mc-form-icon-result").attr({src : icon_url});
+ $j("#mc-form-icon-result").show('fast');
+ } else {
+ $j("#mc-form-icon-result").hide();
+ }
+ checkIfFormReady();
+ }
- if(error)
- return;
+ function checkIfFormReady() {
+ urlIni = $j('#url').val();
+ nameIni = $j('#ininame').val();
+ keywordsIni = $j('#keywords').val();
+ if (mc_category != "" && nameIni.length > 0 && urlIni.length > 0) {
+ $j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-enabled");
+ $j("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-disabled");
+ $j("#mc-dia-continue-btn").effect("highlight", {}, 2000);
+ } else {
+ $j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-disabled");
+ $j("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-enabled");
+ }
+ }
- current_step='#fourth_step';
+ function confInputValidation($id) {
+ $j($id).bind("change keyup", function(event) {
+ checkIfFormReady();
+ });
+ }
- if(!step_four_reached){
- $j('#step1_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
- $j('#step2_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
- $j('#step3_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
- imageMapUnBind();
- imageMapInit();
- step_four_reached=true;
+ // adapted from:
+ // http://stackoverflow.com/questions/1277070/is-there-an-equivalent-javascrip…
+ function doadjustwithsleep( part ) {
+ if( part == 0 ) {
+ setTimeout( function() { doadjustwithsleep( 1 ); }, 1000 );
+ } else if( part == 1 ) {
+ adjustHeights();
+ }
}
- //update progress bar
- $j('#progress_text').html('60% Complete');
- $j('#progress').css('width','204px');
-
- if($j('#rc-checkbox').val()=='S')
- $j('label[for*="step4-yes"]').addClass('ui-state-active');
- else if ($j('#rc-checkbox').val()=='N')
- $j('label[for*="step4-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#third_step').slideUp();
- $j('#fourth_step').slideDown();
-});
-
-$j('#p_submit_fourth').click(function(){
+ function conf_link($id) {
+ var nid = "n" + $id;
+ select_cat($id, nid);
+ select_cat(nid, $id);
+ };
- current_step='#third_step';
+ function conf_click_continue() {
+ $j("#mc-dia-continue-btn").click(
+ function (event) {
+ event.stopPropagation();
+ if (mc_category != "" && urlIni.length > 0 && nameIni.length > 0) {
+ var currentUrl = window.location.pathname.split('/');
+ var langCode = "";
+ if (currentUrl[1] == 'preview') { langCode = 'en'; }
+ else { langCode = currentUrl[1]; };
+ window.location.href="/" + langCode + "/" + mc_category + "-html/0.1/?ini_name=" + nameIni +
+ "&ini_url=" + urlIni + "&ini_keywords=" + keywordsIni;
+ }
+ });
+ };
- //update progress bar
- $j('#progress_text').html('40% Complete');
- $j('#progress').css('width','136px');
-
- if($j('#rp-checkbox').val()=='S')
- $j('label[for*="step3-yes"]').addClass('ui-state-active');
- else if ($j('#rp-checkbox').val()=='N')
- $j('label[for*="step3-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#fourth_step').slideUp();
- $j('#third_step').slideDown();
-});
-
-$j('#submit_fourth').click(function(){
-
- if($j('#rc-checkbox').val()=='A'){
- $j('#step4question').effect("shake", { times:3 }, 50);
- return;
- }
-
- if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rc60.png' && $j('#rc-checkbox').val()=='S'){
- $j('#mc-form-optional-reinforcing').effect("shake", { times:3 }, 50);
- return;
- }
+ // http://www.richreuter.com/2008/08/01/UsingJQueryToResizeTextBoxesToMaxLengt…
+ function max_textsize() {
+ $j('input[type=text]').each(function() {
+ var max_length = $j(this).attr('maxlength');
+ var multiplier = (max_length > 10) ? 7.3 : 8;
+ var w = (max_length * multiplier) + "px";
+ $j(this).width(w);
+ });
- current_step='#fifth_step';
-
- if(!step_five_reached){
- $j('#step1_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
- $j('#step2_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
- $j('#step3_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
- $j('#step4_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
- imageMapUnBind();
- imageMapInit();
- step_five_reached=true;
}
-
- //update progress bar
- $j('#progress_text').html('80% Complete');
- $j('#progress').css('width','272px');
-
- if($j('#gr-checkbox').val()=='S')
- $j('label[for*="step5-yes"]').addClass('ui-state-active');
- else if ($j('#gr-checkbox').val()=='N')
- $j('label[for*="step5-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#fourth_step').slideUp();
- $j('#fifth_step').slideDown();
-
-});
-
-$j('#p_submit_fifth').click(function(){
- current_step='#fourth_step';
+ // http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-an…
+ $.fn.labelOver = function(overClass) {
+ return this.each(function()
+ {
+ var label = $j(this);
+ var f = label.attr('for');
+ if (f) {
+ var input = $j('#' + f);
- //update progress bar
- $j('#progress_text').html('60% Complete');
- $j('#progress').css('width','204px');
-
- if($j('#rc-checkbox').val()=='S')
- $j('label[for*="step4-yes"]').addClass('ui-state-active');
- else if ($j('#rc-checkbox').val()=='N')
- $j('label[for*="step4-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#fifth_step').slideUp();
- $j('#fourth_step').slideDown();
-});
-
-$j('#submit_fifth').click(function(){
-
- if($j('#gr-checkbox').val()=='A'){
- $j('#step5question').effect("shake", { times:3 }, 50);
- return;
- }
+ this.hide = function() {
+ label.css({ textIndent: -10000 });
+ };
- current_step='#sixth_step';
+ this.show = function() {
+ if (input.val() == '') label.css({ textIndent: 0 });
+ };
+
+ // handlers
+ input.focus(this.hide);
+ input.blur(this.show);
+ label.addClass(overClass).click(function(){ input.focus(); });
+
+ if (input.val() != '') this.hide();
+ }
+ });
+ };
+
+
+ $j('#submit_first').click(function(){
+ //remove classes
+ $j('#first_step input').removeClass('error').removeClass('valid');
+
+ //ckeck if inputs aren't empty
+ var fields = $j('#first_step input[type=text], #first_step input[type=password]');
+ var error = 0;
+ fields.each(function(){
+ var value = $j.trim($j(this).val());
+ if( value=="" || value==field_values[$j(this).attr('id')] ) {
+ $j(this).addClass('error');
+ $j(this).effect("shake", { times:3 }, 50);
+ error++;
+ } else {
+ /*if($j(this).attr('id')=='url'){
+ if(!(/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value))){
+ $j(this).addClass('error');
+ $j(this).effect("shake", { times:3 }, 50);
+ error++;
+ }
+ }
+ else*/
+ $j(this).addClass('valid');
+ }
+ });
+
+ if(!error) {
- if(!step_six_reached){
- $j('#step1_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
- $j('#step2_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
- $j('#step3_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
- $j('#step4_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
- $j('#step5_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
- imageMapUnBind();
- imageMapInit();
- step_six_reached=true;
- }
+ current_step='#second_step';
+
+ if(!step_two_reached){
+ $j('#step1_image_map').append('<area href="#" step="#second_step" shape="circle" coords="122,12,12"><!--2-->');
+ imageMapUnBind();
+ imageMapInit();
+ step_two_reached=true;
+ }
+
+ //update progress bar
+ $j('#progress_text').html('20% Complete');
+ $j('#progress').css('width','68px');
+
+ //slide steps
+ $j('#first_step').slideUp();
+ $j('#second_step').slideDown();
+
+ if($j('#np-checkbox').val()=='S')
+ $j('label[for*="step2-yes"]').addClass('ui-state-active');
+ else if ($j('#np-checkbox').val()=='N')
+ $j('label[for*="step2-no"]').addClass('ui-state-active');
+ } else return false;
+ });
- $j('#progress_text').html('100% Complete');
- $j('#progress').css('width','339px');
+ $j('#p_submit_second').click(function(){
+
+ current_step='#first_step';
+
+ //update progress bar
+ $j('#progress').css('width','0');
+ $j('#progress_text').html('0% Complete');
+
+ //slide steps
+ $j('#second_step').slideUp();
+ $j('#first_step').slideDown();
+ });
- $j('#fifth_step').slideUp();
- $j('#sixth_step').slideDown();
-
-});
-
-$j('#p_submit_sixth').click(function(){
- current_step='#fifth_step';
+ $j('#submit_second').click(function(){
+
+ var error=false;
+
+ if($j('#np-checkbox').val()=='A'){
+ $j('#step2question').effect("shake", { times:3 }, 50);
+ return;
+ }
+
+ if($j("#registered-non-profit").attr("checked"))
+ if($j.trim($j('#non-profit-website').val())==""){
+ $j('#non-profit-website').addClass('error');
+ $j('#non-profit-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#non-profit-website').addClass('valid');
+
+ if($j("#open-accounting").attr("checked"))
+ if($j.trim($j('#open-accounting-website').val())==""){
+ $j('#open-accounting-website').addClass('error');
+ $j('#open-accounting-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#open-accounting-website').addClass('valid');
+
+ if($j("#accept-donations").attr("checked"))
+ if($j.trim($j('#donation-website').val())==""){
+ $j('#donation-website').addClass('error');
+ $j('#donation-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#accept-donations').addClass('valid');
+
+ if(error)
+ return;
+
+ current_step='#third_step';
+
+ if(!step_three_reached){
+ $j('#step1_image_map').append('<area href="#" step="#third_step" shape="circle" coords="214,12,12"><!--3-->');
+ $j('#step2_image_map').append('<area href="#" step="#third_step" shape="circle" coords="214,12,12"><!--3-->');
+ imageMapUnBind();
+ imageMapInit();
+ step_three_reached=true;
+ }
+
+ //update progress bar
+ $j('#progress_text').html('40% Complete');
+ $j('#progress').css('width','136px');
+
+ if($j('#rp-checkbox').val()=='S')
+ $j('label[for*="step3-yes"]').addClass('ui-state-active');
+ else if ($j('#rp-checkbox').val()=='N')
+ $j('label[for*="step3-no"]').addClass('ui-state-active');
+
+ //slide steps
+ $j('#second_step').slideUp();
+ $j('#third_step').slideDown();
- //update progress bar
- $j('#progress_text').html('80% Complete');
- $j('#progress').css('width','272px');
-
- if($j('#gr-checkbox').val()=='S')
- $j('label[for*="step5-yes"]').addClass('ui-state-active');
- else if ($j('#gr-checkbox').val()=='N')
- $j('label[for*="step5-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#sixth_step').slideUp();
- $j('#fifth_step').slideDown();
-});
+ });
+
+ $j('#p_submit_third').click(function(){
+
+ current_step='#second_step';
+
+ //update progress bar
+ $j('#progress_text').html('20% Complete');
+ $j('#progress').css('width','68px');
+
+ if($j('#np-checkbox').val()=='S')
+ $j('label[for*="step2-yes"]').addClass('ui-state-active');
+ else if ($j('#np-checkbox').val()=='N')
+ $j('label[for*="step2-no"]').addClass('ui-state-active');
+
+ //slide steps
+ $j('#third_step').slideUp();
+ $j('#second_step').slideDown();
+ });
+
+
+ $j('#submit_third').click(function(){
+
+ var error=false;
+
+ if($j('#rp-checkbox').val()=='A'){
+ $j('#step3question').effect("shake", { times:3 }, 50);
+ return;
+ }
+
+ if($j("#terms-of-use").attr("checked"))
+ if($j.trim($j('#terms-of-use-website').val())==""){
+ $j('#terms-of-use-website').addClass('error');
+ $j('#terms-of-use-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#terms-of-use-website').addClass('valid');
+
+ if($j("#creative-commons").attr("checked"))
+ if($j.trim($j('#creative-commons-website').val())==""){
+ $j('#creative-commons-website').addClass('error');
+ $j('#creative-commons-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#creative-commons-website').addClass('valid');
+
+ if($j("#other-license").attr("checked"))
+ if($j.trim($j('#other-license-website').val())==""){
+ $j('#other-license-website').addClass('error');
+ $j('#other-license-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#other-license-website').addClass('valid');
+
+ if(error)
+ return;
+
+ current_step='#fourth_step';
+
+ if(!step_four_reached){
+ $j('#step1_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
+ $j('#step2_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
+ $j('#step3_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
+ imageMapUnBind();
+ imageMapInit();
+ step_four_reached=true;
+ }
+
+ //update progress bar
+ $j('#progress_text').html('60% Complete');
+ $j('#progress').css('width','204px');
+
+ if($j('#rc-checkbox').val()=='S')
+ $j('label[for*="step4-yes"]').addClass('ui-state-active');
+ else if ($j('#rc-checkbox').val()=='N')
+ $j('label[for*="step4-no"]').addClass('ui-state-active');
+
+ //slide steps
+ $j('#third_step').slideUp();
+ $j('#fourth_step').slideDown();
+ });
+
+ $j('#p_submit_fourth').click(function(){
+
+ current_step='#third_step';
+
+ //update progress bar
+ $j('#progress_text').html('40% Complete');
+ $j('#progress').css('width','136px');
+
+ if($j('#rp-checkbox').val()=='S')
+ $j('label[for*="step3-yes"]').addClass('ui-state-active');
+ else if ($j('#rp-checkbox').val()=='N')
+ $j('label[for*="step3-no"]').addClass('ui-state-active');
+
+ //slide steps
+ $j('#fourth_step').slideUp();
+ $j('#third_step').slideDown();
+ });
+
+ $j('#submit_fourth').click(function(){
+
+ if($j('#rc-checkbox').val()=='A'){
+ $j('#step4question').effect("shake", { times:3 }, 50);
+ return;
+ }
+
+
+ if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rc60.png' && $j('#rc-checkbox').val()=='S'){
+ $j('#mc-form-optional-reinforcing').effect("shake", { times:3 }, 50);
+ return;
+ }
+
+ current_step='#fifth_step';
+
+ if(!step_five_reached){
+ $j('#step1_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
+ $j('#step2_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
+ $j('#step3_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
+ $j('#step4_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
+ imageMapUnBind();
+ imageMapInit();
+ step_five_reached=true;
+ }
+
+ //update progress bar
+ $j('#progress_text').html('80% Complete');
+ $j('#progress').css('width','272px');
+
+ if($j('#gr-checkbox').val()=='S')
+ $j('label[for*="step5-yes"]').addClass('ui-state-active');
+ else if ($j('#gr-checkbox').val()=='N')
+ $j('label[for*="step5-no"]').addClass('ui-state-active');
+
+ //slide steps
+ $j('#fourth_step').slideUp();
+ $j('#fifth_step').slideDown();
+
+ });
+
+ $j('#p_submit_fifth').click(function(){
+
+ current_step='#fourth_step';
+
+ //update progress bar
+ $j('#progress_text').html('60% Complete');
+ $j('#progress').css('width','204px');
+
+ if($j('#rc-checkbox').val()=='S')
+ $j('label[for*="step4-yes"]').addClass('ui-state-active');
+ else if ($j('#rc-checkbox').val()=='N')
+ $j('label[for*="step4-no"]').addClass('ui-state-active');
+
+ //slide steps
+ $j('#fifth_step').slideUp();
+ $j('#fourth_step').slideDown();
+ });
+
+ $j('#submit_fifth').click(function(){
+
+ if($j('#gr-checkbox').val()=='A'){
+ $j('#step5question').effect("shake", { times:3 }, 50);
+ return;
+ }
+
+ current_step='#sixth_step';
+
+ if(!step_six_reached){
+ $j('#step1_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
+ $j('#step2_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
+ $j('#step3_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
+ $j('#step4_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
+ $j('#step5_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
+ imageMapUnBind();
+ imageMapInit();
+ step_six_reached=true;
+ }
+
+ $j('#progress_text').html('100% Complete');
+ $j('#progress').css('width','339px');
+
+ $j('#fifth_step').slideUp();
+ $j('#sixth_step').slideDown();
+
+ });
+
+ $j('#p_submit_sixth').click(function(){
+
+ current_step='#fifth_step';
+
+ //update progress bar
+ $j('#progress_text').html('80% Complete');
+ $j('#progress').css('width','272px');
+
+ if($j('#gr-checkbox').val()=='S')
+ $j('label[for*="step5-yes"]').addClass('ui-state-active');
+ else if ($j('#gr-checkbox').val()=='N')
+ $j('label[for*="step5-no"]').addClass('ui-state-active');
+
+ //slide steps
+ $j('#sixth_step').slideUp();
+ $j('#fifth_step').slideDown();
+ });
+
+ $j('#non-profit-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+ });
+
+ $j('#open-accounting-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+ });
+
+ $j('#donation-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+ });
+
+ $j('#terms-of-use-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+ });
+
+ $j('#creative-commons-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+ });
+
+ $j('#other-license-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+ });
+
+
+ $j("#registered-non-profit").click(function(){
+ if($j("#registered-non-profit").attr("checked")){
+ $j('#non-profit-website').show();
+ $j('#infield-non-profit-website').show();
+ }
+ else{
+ $j('#non-profit-website').hide();
+ $j('#infield-non-profit-website').hide();
+ }
+ });
+
+
+ $j("#open-accounting").click(function(){
+ if($j("#open-accounting").attr("checked")){
+ $j('#open-accounting-website').show();
+ $j('#infield-open-accounting-website').show();
+ }
+ else{
+ $j('#open-accounting-website').hide();
+ $j('#infield-open-accounting-website').hide();
+ }
+ });
+
+ $j("#accept-donations").click(function(){
+ if($j("#accept-donations").attr("checked")){
+ $j('#donation-website').show();
+ $j('#infield-donation-website').show();
+ }
+ else{
+ $j('#donation-website').hide();
+ $j('#infield-donation-website').hide();
+ }
+ });
+
+ $j("#terms-of-use").click(function(){
+ if($j("#terms-of-use").attr("checked")){
+ $j('#terms-of-use-website').show();
+ $j('#infield-terms-of-use-website').show();
+ }
+ else{
+ $j('#terms-of-use-website').hide();
+ $j('#infield-terms-of-use-website').hide();
+ }
+ });
+
+
+ $j("#creative-commons").click(function(){
+ if($j("#creative-commons").attr("checked")){
+ $j('#creative-commons-website').show();
+ $j('#infield-creative-commons-website').show();
+ }
+ else{
+ $j('#creative-commons-website').hide();
+ $j('#infield-creative-commons-website').hide();
+ }
+ });
+
+ $j("#other-license").click(function(){
+ if($j("#other-license").attr("checked")){
+ $j('#other-license-website').show();
+ $j('#infield-other-license-website').show();
+ }
+ else{
+ $j('#other-license-website').hide();
+ $j('#infield-other-license-website').hide();
+ }
+ });
+
+ $j("#step2-yes").click(function(){clickCheckBox('np','yes');});
+ $j("#step2-no").click(function(){clickCheckBox('np','no');});
+
+ $j("#step3-yes").click(function(){clickCheckBox('rp','yes');});
+ $j("#step3-no").click(function(){clickCheckBox('rp','no');});
+
+ $j("#step4-yes").click(function(){clickCheckBox('rc','yes');});
+ $j("#step4-no").click(function(){clickCheckBox('rc','no');});
+
+ $j("#step5-yes").click(function(){clickCheckBox('gr','yes');});
+ $j("#step5-no").click(function(){clickCheckBox('gr','no');});
+
+ select_area("ec");
+ select_area("bo");
+ select_area("to");
+ select_area("di");
+ conf_click_continue();
+ $j(window).load(function () { doadjustwithsleep(0); });
+ $j('input#ininame').inputfocus({ value: field_values['ininame'] });
+ $j('input#url').inputfocus({ value: field_values['url'] });
+ $j('input#languages').inputfocus({ value: field_values['languages'] });
+ $j('input#keywords').inputfocus({ value: field_values['keywords'] });
+ $j('input#location').inputfocus({ value: field_values['location'] });
+ //$('input#email').inputfocus({ value: field_values['email'] });
+});
-$j('#non-profit-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
-});
-
-$j('#open-accounting-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
-});
-
-$j('#donation-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
-});
-
-$j('#terms-of-use-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
-});
-
-$j('#creative-commons-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
-});
-
-$j('#other-license-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
-});
-
-
-$j("#registered-non-profit").click(function(){
- if($j("#registered-non-profit").attr("checked")){
- $j('#non-profit-website').show();
- $j('#infield-non-profit-website').show();
- }
- else{
- $j('#non-profit-website').hide();
- $j('#infield-non-profit-website').hide();
- }
-});
-
-
-$j("#open-accounting").click(function(){
- if($j("#open-accounting").attr("checked")){
- $j('#open-accounting-website').show();
- $j('#infield-open-accounting-website').show();
- }
- else{
- $j('#open-accounting-website').hide();
- $j('#infield-open-accounting-website').hide();
- }
-});
-
-$j("#accept-donations").click(function(){
- if($j("#accept-donations").attr("checked")){
- $j('#donation-website').show();
- $j('#infield-donation-website').show();
- }
- else{
- $j('#donation-website').hide();
- $j('#infield-donation-website').hide();
- }
-});
-
-$j("#terms-of-use").click(function(){
- if($j("#terms-of-use").attr("checked")){
- $j('#terms-of-use-website').show();
- $j('#infield-terms-of-use-website').show();
- }
- else{
- $j('#terms-of-use-website').hide();
- $j('#infield-terms-of-use-website').hide();
- }
-});
-
-
-$j("#creative-commons").click(function(){
- if($j("#creative-commons").attr("checked")){
- $j('#creative-commons-website').show();
- $j('#infield-creative-commons-website').show();
- }
- else{
- $j('#creative-commons-website').hide();
- $j('#infield-creative-commons-website').hide();
- }
-});
-
-$j("#other-license").click(function(){
- if($j("#other-license").attr("checked")){
- $j('#other-license-website').show();
- $j('#infield-other-license-website').show();
- }
- else{
- $j('#other-license-website').hide();
- $j('#infield-other-license-website').hide();
- }
-});
-
-$j("#step2-yes").click(function(){clickCheckBox('np','yes');}
-$j("#step2-no").click(function(){clickCheckBox('np','no');}
-
-$j("#step3-yes").click(function(){clickCheckBox('rp','yes');}
-$j("#step3-no").click(function(){clickCheckBox('rp','no');}
-
-$j("#step4-yes").click(function(){clickCheckBox('rc','yes');}
-$j("#step4-no").click(function(){clickCheckBox('rc','no');}
-
-$j("#step5-yes").click(function(){clickCheckBox('gr','yes');}
-$j("#step5-no").click(function(){clickCheckBox('gr','no');}
-
-select_area("ec");
-select_area("bo");
-select_area("to");
-select_area("di");
-conf_click_continue();
-$j(window).load(function () { doadjustwithsleep(0); });
-$j('input#ininame').inputfocus({ value: field_values['ininame'] });
-$j('input#url').inputfocus({ value: field_values['url'] });
-$j('input#languages').inputfocus({ value: field_values['languages'] });
-$j('input#keywords').inputfocus({ value: field_values['keywords'] });
-$j('input#location').inputfocus({ value: field_values['location'] });
-//$('input#email').inputfocus({ value: field_values['email'] });
-
-
-
-
-
1
0
Author: shevek
Date: 2012-11-05 18:16:59 +0100 (Mon, 05 Nov 2012)
New Revision: 580
Modified:
trunk/src/donate-es.php
trunk/src/donate-fr.php
trunk/src/donate.php
Log:
10#/month => 5#/month in $ and in all languages
Modified: trunk/src/donate-es.php
===================================================================
--- trunk/src/donate-es.php 2012-11-05 17:03:25 UTC (rev 579)
+++ trunk/src/donate-es.php 2012-11-05 17:16:59 UTC (rev 580)
@@ -31,14 +31,14 @@
<div class="mc-btn mc-btn-line">
<ul class="blue">
<li><a href="
+ https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
+Dona a movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
+" class="current"><span>5 €/mes </span></a></li>
+ <li><a href="
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Dona a movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
" class="current"><span>10 €/mes </span></a></li>
<li><a href="
- https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
-Dona a movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
-" class="current"><span>15 €/mes </span></a></li>
- <li><a href="
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Dona a movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
" class="current"><span>20 €/mes </span></a></li>
@@ -50,14 +50,14 @@
<div class="mc-btn mc-btn-line">
<ul class="blue">
<li><a href="
- https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
+ https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Dona a movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
-" class="current"><span>10
+" class="current"><span>5
$/mes </span></a></li>
<li><a href="
- https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
+ https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Dona a movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
-" class="current"><span>15
+" class="current"><span>10
$/mes </span></a></li>
<li><a href="
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Modified: trunk/src/donate-fr.php
===================================================================
--- trunk/src/donate-fr.php 2012-11-05 17:03:25 UTC (rev 579)
+++ trunk/src/donate-fr.php 2012-11-05 17:16:59 UTC (rev 580)
@@ -31,14 +31,14 @@
<div class="mc-btn mc-btn-line">
<ul class="blue">
<li><a href="
+ https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
+Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
+" class="current"><span>5 €/mois </span></a></li>
+ <li><a href="
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
" class="current"><span>10 €/mois </span></a></li>
<li><a href="
- https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
-Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
-" class="current"><span>15 €/mois </span></a></li>
- <li><a href="
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
" class="current"><span>20 €/mois </span></a></li>
@@ -50,14 +50,14 @@
<div class="mc-btn mc-btn-line">
<ul class="blue">
<li><a href="
- https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
+ https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
-" class="current"><span>10
+" class="current"><span>5
$/mois </span></a></li>
<li><a href="
- https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
+ https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
-" class="current"><span>15
+" class="current"><span>10
$/mois </span></a></li>
<li><a href="
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Modified: trunk/src/donate.php
===================================================================
--- trunk/src/donate.php 2012-11-05 17:03:25 UTC (rev 579)
+++ trunk/src/donate.php 2012-11-05 17:16:59 UTC (rev 580)
@@ -50,14 +50,14 @@
<div class="mc-btn mc-btn-line">
<ul class="blue">
<li><a href="
- https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
+ https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
-" class="current"><span>10
+" class="current"><span>5
$/month </span></a></li>
<li><a href="
- https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
+ https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
-" class="current"><span>15
+" class="current"><span>10
$/month </span></a></li>
<li><a href="
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
1
0
Author: shevek
Date: 2012-11-05 18:03:25 +0100 (Mon, 05 Nov 2012)
New Revision: 579
Modified:
trunk/src/donate.php
Log:
Changed 10?\226?\130?\172/m => 5?\226?\130?\172/m. Reason: no one chooses 10?\226?\130?\172/m and imitating Mozilla
Modified: trunk/src/donate.php
===================================================================
--- trunk/src/donate.php 2012-11-05 14:47:49 UTC (rev 578)
+++ trunk/src/donate.php 2012-11-05 17:03:25 UTC (rev 579)
@@ -31,14 +31,14 @@
<div class="mc-btn mc-btn-line">
<ul class="blue">
<li><a href="
+ https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
+Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
+" class="current"><span>5 €/month </span></a></li>
+ <li><a href="
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
" class="current"><span>10 €/month </span></a></li>
<li><a href="
- https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
-Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
-" class="current"><span>15 €/month </span></a></li>
- <li><a href="
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick-subscriptions&business=do…
Donate to movecommons.org&image_url=http://movecommons.org/mc/0.1/images/logo-pp.png
" class="current"><span>20 €/month </span></a></li>
1
0
Author: mgallegos
Date: 2012-11-05 15:47:49 +0100 (Mon, 05 Nov 2012)
New Revision: 578
Modified:
trunk/src/mc-dia-form2.css
trunk/src/mc-dia-form2.js
trunk/wp-theme/mc2-form.php
Log:
Modified: trunk/src/mc-dia-form2.css
===================================================================
--- trunk/src/mc-dia-form2.css 2012-11-04 22:44:57 UTC (rev 577)
+++ trunk/src/mc-dia-form2.css 2012-11-05 14:47:49 UTC (rev 578)
@@ -31,7 +31,7 @@
position: relative;*/
}
#containerSlides #first_step, #second_step, #third_step, #fourth_step, #fifth_step, #sixth_step { display: none; }
- #containerSlides #first_step { display: block; width: 754px;padding-top:25px;position: relative;margin: 0 auto;}
+ #containerSlides #first_step { display: block; width: 754px;position: relative;margin: 0 auto;}
#containerSlides .form { margin: 20px 72px 0 72px; }
@@ -167,7 +167,10 @@
.progressLine {
width: 520px;
- margin: 0 auto;
+ margin-right:auto;
+ margin-left: auto;
+ margin-top: 25px;
+ margin-bottom: 0px;
height: 32px;
background: url('/mc/0.1/images/progressLine.png');
position: relative;
Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js 2012-11-04 22:44:57 UTC (rev 577)
+++ trunk/src/mc-dia-form2.js 2012-11-05 14:47:49 UTC (rev 578)
@@ -1,928 +1,938 @@
var $j = jQuery.noConflict();
-$j(function(){
-
- var current_step='#first_step';
-
- var step_two_reached=step_three_reached=step_four_reached=step_five_reached=step_six_reached=false;
-
- var field_values = {'ininame' : 'Name of your initiative','url' : 'Web address','languages' : 'Language(s)','keywords' : 'Keywords','location' : 'Location','email' : 'email address' };
-
- var mc_np = "0",mc_rp = "0",mc_rc = "0",mc_gr = "0",mc_category = "",nameIni = "", urlIni = "",keywordsIni = "";
-
- function clickCheckBox(id,answer){
- if(answer=='yes'){
- if ($j("#mc-form-" + id).is('.mc-form-descbox-selected')) return;
- $j('#'+id+'-checkbox').val('S');
- $j("#mc-form-" + id).addClass("mc-form-descbox-selected");
- $j("#mc-cat-selected-"+ id).slideDown();
- if(id=='np'){
- $("#registered-non-profit").removeAttr("disabled");
- $("#open-accounting").removeAttr("disabled");
- $("#accept-donations").removeAttr("disabled");
- $j("#mc-form-optional-non-profit").effect("shake", { times:1 }, 200);
- }
- if(id=='rp'){
- $("#terms-of-use").removeAttr("disabled");
- $("#creative-commons").removeAttr("disabled");
- $("#other-license").removeAttr("disabled");
- $("#organization-structure").removeAttr("disabled");
- $("#projects-and-results").removeAttr("disabled");
- $("#methods-procedures").removeAttr("disabled");
- $("#documentation").removeAttr("disabled");
- $j("#mc-form-optional-reproducible").effect("shake", { times:1 }, 200);
- }
- if(id=='gr'){
- $("#decisions-general-assemblies").removeAttr("disabled");
- $("#decisions-consensus").removeAttr("disabled");
- $("#representatives-democratically").removeAttr("disabled");
- $("#meetings-transparent").removeAttr("disabled");
- $("#decisions-voting").removeAttr("disabled");
- $j("#mc-form-optional-grassroots").effect("shake", { times:1 }, 200);
- }
- if(id=='rc')
- $j("#mc-form-optional-reinforcing").effect("shake", { times:1 }, 200);
- }
- else{
- $j('#'+id+'-checkbox').val('N');
- $j("#mc-form-" + id).removeClass("mc-form-descbox-selected");
- $j("#mc-cat-selected-"+ id).slideUp();
- if(id=='np'){
- $("#registered-non-profit").attr("disabled", "disabled");
- $('#registered-non-profit').attr('checked', false);
- $("#open-accounting").attr("disabled", "disabled");
- $('#open-accounting').attr('checked', false);
- $("#accept-donations").attr("disabled", "disabled");
- $('#accept-donations').attr('checked', false);
- $j('#non-profit-website').hide();
- $j('#infield-non-profit-website').hide();
- $j('#open-accounting-website').hide();
- $j('#infield-open-accounting-website').hide();
- $j('#donation-website').hide();
- $j('#infield-donation-website').hide();
- $j('#submit_second').click();
- }
- if(id=='rp'){
- $("#terms-of-use").attr("disabled", "disabled");
- $('#terms-of-use').attr('checked', false);
- $("#creative-commons").attr("disabled", "disabled");
- $('#creative-commons').attr('checked', false);
- $("#other-license").attr("disabled", "disabled");
- $('#other-license').attr('checked', false);
- $("#organization-structure").attr("disabled", "disabled");
- $('#organization-structure').attr('checked', false);
- $("#projects-and-results").attr("disabled", "disabled");
- $('#projects-and-results').attr('checked', false);
- $("#methods-procedures").attr("disabled", "disabled");
- $('#methods-procedures').attr('checked', false);
- $("#documentation").attr("disabled", "disabled");
- $('#documentation').attr('checked', false);
- $j('#terms-of-use-website').hide();
- $j('#infield-terms-of-use-website').hide();
- $j('#creative-commons-website').hide();
- $j('#infield-creative-commons-website').hide();
- $j('#other-license-website').hide();
- $j('#infield-other-license-website').hide();
- $j('#submit_third').click();
- }
- if(id=='rc'){
- reset_areas();
- $j('#submit_fourth').click();
- }
- if(id=='gr'){
- $("#decisions-general-assemblies").attr("disabled", "disabled");
- $('#decisions-general-assemblies').attr('checked', false);
- $("#decisions-consensus").attr("disabled", "disabled");
- $('#decisions-consensus').attr('checked', false);
- $("#representatives-democratically").attr("disabled", "disabled");
- $('#representatives-democratically').attr('checked', false);
- $("#meetings-transparent").attr("disabled", "disabled");
- $('#meetings-transparent').attr('checked', false);
- $("#decisions-voting").attr("disabled", "disabled");
- $('#decisions-voting').attr('checked', false);
- $j('#submit_fifth').click();
- }
-
- }
- }
+var current_step='#first_step';
- function imageMapInit(){
- $j('.map').mapster({
- fillColor: 'EA8F5F',
- fillOpacity: 0.8,
- isSelectable: false,
- mapKey: 'step',
- onClick: function (e) {
- onClickImageMap(e);
- }
- });
- }
-
- function imageMapUnBind(){
- $j('.map').mapster('unbind');
- $j('#firstStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step1_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 19px;margin-top: 0"><div class="marker"></div>');
- $j('#secondStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step2_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 111px;margin-top: 0"><div class="marker"></div>');
- $j('#thirdStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step3_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 203px;margin-top: 0"><div class="marker"></div>');
- $j('#fourthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step4_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 295px;margin-top: 0"><div class="marker"></div>');
- $j('#fifthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 386px;margin-top: 0"><div class="marker"></div>');
- $j('#sixthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 478px;margin-top: 0"><div class="marker"></div>');
- }
+var step_two_reached=step_three_reached=step_four_reached=step_five_reached=step_six_reached=false;
- function onClickImageMap(e){
- if (e.key=='#first_step'){
- $j('#progress_text').html('0% Complete');
- $j('#progress').css('width','0');
- }
- else if (e.key=='#second_step'){
- $j('#progress_text').html('20% Complete');
- $j('#progress').css('width','68px');
- if($j('#np-checkbox').val()=='S')
- $j('label[for*="step2-yes"]').addClass('ui-state-active');
- else if ($j('#np-checkbox').val()=='N')
- $j('label[for*="step2-no"]').addClass('ui-state-active');
- }
- else if (e.key=='#third_step'){
- $j('#progress_text').html('40% Complete');
- $j('#progress').css('width','136px');
- if($j('#rp-checkbox').val()=='S')
- $j('label[for*="step3-yes"]').addClass('ui-state-active');
- else if ($j('#rp-checkbox').val()=='N')
- $j('label[for*="step3-no"]').addClass('ui-state-active');
- }
- else if (e.key=='#fourth_step'){
- $j('#progress_text').html('60% Complete');
- $j('#progress').css('width','204px');
- if($j('#rc-checkbox').val()=='S')
- $j('label[for*="step4-yes"]').addClass('ui-state-active');
- else if ($j('#rc-checkbox').val()=='N')
- $j('label[for*="step4-no"]').addClass('ui-state-active');
- }
- else if (e.key=='#fifth_step'){
- $j('#progress_text').html('60% Complete');
- $j('#progress').css('width','204px');
- if($j('#gr-checkbox').val()=='S')
- $j('label[for*="step5-yes"]').addClass('ui-state-active');
- else if ($j('#gr-checkbox').val()=='N')
- $j('label[for*="step5-no"]').addClass('ui-state-active');
- }
- 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();
- }
+var field_values = {'ininame' : 'Name of your initiative','url' : 'Web address','languages' : 'Language(s)','keywords' : 'Keywords','location' : 'Location','email' : 'email address' };
- function select_cat($id, $id2) {
- var cat_id = "#mc-form-" + $id;
- $j(cat_id + ",#mc-form-icon-" + $id).click(
- function ()
- {/*
- // if ($id != "rc") {
- $j(cat_id).addClass("mc-form-descbox-selected");
- $j("#mc-cat-selected-"+ $id).slideDown();
- //}
- $j("#mc-form-" + $id2).removeClass("mc-form-descbox-selected");
- $j("#mc-cat-selected-"+ $id2).slideUp();
- // $j("#mc-form-more-link-" + $id2).show('slow');
- $j("#mc-form-less-link-" + $id2).hide();
- // $j("#mc-form-" + $id).removeAttr("title");
- // $j("#mc-form-" + $id2).attr("title", click_to_select);
- $j("#mc-form-more-text-" + $id2).slideUp(function() {adjustHeights();});*/
- if (cat_id == "#mc-form-rc") {
- //$j("#mc-cat-rc-options").slideDown(function() {adjustHeights();});
- mc_rc="0";
- update_logo($id);
- //$j('div.blockMe3').unblock();
- //$('#mc-form-optional-reinforcing').show();
- } else if (cat_id == "#mc-form-nrc") {
- //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
- reset_areas();
- update_logo($id);
- } else if (cat_id == "#mc-form-np") {
- //$j('div.blockMe1').unblock();
- //$('#mc-form-optional-non-profit').show();
- } else if (cat_id == "#mc-form-rp") {
- //$j('div.blockMe2').unblock();
- //$('#mc-form-optional-reproducible').show();
- } else if (cat_id == "#mc-form-gr") {
- //$j('div.blockMe4').unblock();
- //$('#mc-form-optional-grassroots').show();
- } else {
- update_logo($id);
- //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
- }
- });
- };
+var mc_np = "0",mc_rp = "0",mc_rc = "0",mc_gr = "0",mc_category = "",nameIni = "", urlIni = "",keywordsIni = "";
- function hover_cat($id) {
- var cat_id = "#mc-form-" + $id;
- $j(cat_id + ",#mc-form-icon-" + $id).hover(
- function ()
- {
- $j(cat_id).addClass("mc-form-descbox-high");
- //if ($j('#mc-form-less-link-'+$id).is(':hidden'))
- // $j("#mc-form-more-link-"+$id).show();
- }, function () {
- $j(cat_id).removeClass("mc-form-descbox-high");
- //if ($j('#mc-form-less-link-'+$id).is(':hidden'))
- // $j("#mc-form-more-link-"+$id).hide();
- });
- };
+function clickCheckBox(id,answer){
+ if(answer=='yes'){
+ if ($j("#mc-form-" + id).is('.mc-form-descbox-selected')) return;
+ $j('#'+id+'-checkbox').val('S');
+ $j("#mc-form-" + id).addClass("mc-form-descbox-selected");
+ $j("#mc-cat-selected-"+ id).slideDown();
+ if(id=='np'){
+ $("#registered-non-profit").removeAttr("disabled");
+ $("#open-accounting").removeAttr("disabled");
+ $("#accept-donations").removeAttr("disabled");
+ $j("#mc-form-optional-non-profit").effect("shake", { times:1 }, 200);
+ }
+ if(id=='rp'){
+ $("#terms-of-use").removeAttr("disabled");
+ $("#creative-commons").removeAttr("disabled");
+ $("#other-license").removeAttr("disabled");
+ $("#organization-structure").removeAttr("disabled");
+ $("#projects-and-results").removeAttr("disabled");
+ $("#methods-procedures").removeAttr("disabled");
+ $("#documentation").removeAttr("disabled");
+ $j("#mc-form-optional-reproducible").effect("shake", { times:1 }, 200);
+ }
+ if(id=='gr'){
+ $("#decisions-general-assemblies").removeAttr("disabled");
+ $("#decisions-consensus").removeAttr("disabled");
+ $("#representatives-democratically").removeAttr("disabled");
+ $("#meetings-transparent").removeAttr("disabled");
+ $("#decisions-voting").removeAttr("disabled");
+ $j("#mc-form-optional-grassroots").effect("shake", { times:1 }, 200);
+ }
+ if(id=='rc')
+ $j("#mc-form-optional-reinforcing").effect("shake", { times:1 }, 200);
+ }
+ else{
+ $j('#'+id+'-checkbox').val('N');
+ $j("#mc-form-" + id).removeClass("mc-form-descbox-selected");
+ $j("#mc-cat-selected-"+ id).slideUp();
+ if(id=='np'){
+ $("#registered-non-profit").attr("disabled", "disabled");
+ $('#registered-non-profit').attr('checked', false);
+ $("#open-accounting").attr("disabled", "disabled");
+ $('#open-accounting').attr('checked', false);
+ $("#accept-donations").attr("disabled", "disabled");
+ $('#accept-donations').attr('checked', false);
+ $j('#non-profit-website').hide();
+ $j('#infield-non-profit-website').hide();
+ $j('#open-accounting-website').hide();
+ $j('#infield-open-accounting-website').hide();
+ $j('#donation-website').hide();
+ $j('#infield-donation-website').hide();
+ $j('#submit_second').click();
+ }
+ if(id=='rp'){
+ $("#terms-of-use").attr("disabled", "disabled");
+ $('#terms-of-use').attr('checked', false);
+ $("#creative-commons").attr("disabled", "disabled");
+ $('#creative-commons').attr('checked', false);
+ $("#other-license").attr("disabled", "disabled");
+ $('#other-license').attr('checked', false);
+ $("#organization-structure").attr("disabled", "disabled");
+ $('#organization-structure').attr('checked', false);
+ $("#projects-and-results").attr("disabled", "disabled");
+ $('#projects-and-results').attr('checked', false);
+ $("#methods-procedures").attr("disabled", "disabled");
+ $('#methods-procedures').attr('checked', false);
+ $("#documentation").attr("disabled", "disabled");
+ $('#documentation').attr('checked', false);
+ $j('#terms-of-use-website').hide();
+ $j('#infield-terms-of-use-website').hide();
+ $j('#creative-commons-website').hide();
+ $j('#infield-creative-commons-website').hide();
+ $j('#other-license-website').hide();
+ $j('#infield-other-license-website').hide();
+ $j('#submit_third').click();
+ }
+ if(id=='rc'){
+ reset_areas();
+ $j('#submit_fourth').click();
+ }
+ if(id=='gr'){
+ $("#decisions-general-assemblies").attr("disabled", "disabled");
+ $('#decisions-general-assemblies').attr('checked', false);
+ $("#decisions-consensus").attr("disabled", "disabled");
+ $('#decisions-consensus').attr('checked', false);
+ $("#representatives-democratically").attr("disabled", "disabled");
+ $('#representatives-democratically').attr('checked', false);
+ $("#meetings-transparent").attr("disabled", "disabled");
+ $('#meetings-transparent').attr('checked', false);
+ $("#decisions-voting").attr("disabled", "disabled");
+ $('#decisions-voting').attr('checked', false);
+ $j('#submit_fifth').click();
+ }
+
+ }
+}
- // More links
+function imageMapInit(){
+ $j('.map').mapster({
+ fillColor: 'EA8F5F',
+ fillOpacity: 0.8,
+ isSelectable: false,
+ mapKey: 'step',
+ onClick: function (e) {
+ onClickImageMap(e);
+ }
+ });
+}
- function click_more_link($id) {
- $j("#mc-form-more-link-" + $id).click(
- function (event) {
- event.stopPropagation();
- $j(this).hide();
- /*if ($id == "rc") {
- $j("#mc-cat-rc-options").slideDown();
- }*/
- $j("#mc-form-less-link-" + $id).show('slow');
- $j("#mc-form-more-text-" + $id).show('slow',function() {adjustHeights();});
+function imageMapUnBind(){
+ $j('.map').mapster('unbind');
+ $j('#firstStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step1_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 19px;margin-top: 0"><div class="marker"></div>');
+ $j('#secondStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step2_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 111px;margin-top: 0"><div class="marker"></div>');
+ $j('#thirdStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step3_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 203px;margin-top: 0"><div class="marker"></div>');
+ $j('#fourthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step4_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 295px;margin-top: 0"><div class="marker"></div>');
+ $j('#fifthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 386px;margin-top: 0"><div class="marker"></div>');
+ $j('#sixthStepProgressLine').html('<img src="/mc/0.1/images/progressTransparentLine.png" usemap="#step5_image_map" class="map" style="border: 0px;float: left;"><div class="complete" style="width: 478px;margin-top: 0"><div class="marker"></div>');
+}
- });
- };
+function onClickImageMap(e){
+ if (e.key=='#first_step'){
+ $j('#progress_text').html('0% Complete');
+ $j('#progress').css('width','0');
+ }
+ else if (e.key=='#second_step'){
+ $j('#progress_text').html('20% Complete');
+ $j('#progress').css('width','68px');
+ if($j('#np-checkbox').val()=='S')
+ $j('label[for*="step2-yes"]').addClass('ui-state-active');
+ else if ($j('#np-checkbox').val()=='N')
+ $j('label[for*="step2-no"]').addClass('ui-state-active');
+ }
+ else if (e.key=='#third_step'){
+ $j('#progress_text').html('40% Complete');
+ $j('#progress').css('width','136px');
+ if($j('#rp-checkbox').val()=='S')
+ $j('label[for*="step3-yes"]').addClass('ui-state-active');
+ else if ($j('#rp-checkbox').val()=='N')
+ $j('label[for*="step3-no"]').addClass('ui-state-active');
+ }
+ else if (e.key=='#fourth_step'){
+ $j('#progress_text').html('60% Complete');
+ $j('#progress').css('width','204px');
+ if($j('#rc-checkbox').val()=='S')
+ $j('label[for*="step4-yes"]').addClass('ui-state-active');
+ else if ($j('#rc-checkbox').val()=='N')
+ $j('label[for*="step4-no"]').addClass('ui-state-active');
+ }
+ else if (e.key=='#fifth_step'){
+ $j('#progress_text').html('60% Complete');
+ $j('#progress').css('width','204px');
+ if($j('#gr-checkbox').val()=='S')
+ $j('label[for*="step5-yes"]').addClass('ui-state-active');
+ else if ($j('#gr-checkbox').val()=='N')
+ $j('label[for*="step5-no"]').addClass('ui-state-active');
+ }
+ 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();
+}
- function click_less_link($id) {
- $j("#mc-form-less-link-" + $id).click(
- function (event) {
- event.stopPropagation();
- $j(this).hide();
- /*if ($id == "rc") {
- $j("#mc-cat-rc-options").slideUp();
- }*/
- $j("#mc-form-more-link-" + $id).show('slow');
- $j("#mc-form-more-text-" + $id).slideUp(function() {adjustHeights();});
- //if ($id == "rc") { $j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});}
- });
- };
+function select_cat($id, $id2) {
+ var cat_id = "#mc-form-" + $id;
+ $j(cat_id + ",#mc-form-icon-" + $id).click(
+ function ()
+ {/*
+ // if ($id != "rc") {
+ $j(cat_id).addClass("mc-form-descbox-selected");
+ $j("#mc-cat-selected-"+ $id).slideDown();
+ //}
+ $j("#mc-form-" + $id2).removeClass("mc-form-descbox-selected");
+ $j("#mc-cat-selected-"+ $id2).slideUp();
+ // $j("#mc-form-more-link-" + $id2).show('slow');
+ $j("#mc-form-less-link-" + $id2).hide();
+ // $j("#mc-form-" + $id).removeAttr("title");
+ // $j("#mc-form-" + $id2).attr("title", click_to_select);
+ $j("#mc-form-more-text-" + $id2).slideUp(function() {adjustHeights();});*/
+ if (cat_id == "#mc-form-rc") {
+ //$j("#mc-cat-rc-options").slideDown(function() {adjustHeights();});
+ mc_rc="0";
+ update_logo($id);
+ //$j('div.blockMe3').unblock();
+ //$('#mc-form-optional-reinforcing').show();
+ } else if (cat_id == "#mc-form-nrc") {
+ //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
+ reset_areas();
+ update_logo($id);
+ } else if (cat_id == "#mc-form-np") {
+ //$j('div.blockMe1').unblock();
+ //$('#mc-form-optional-non-profit').show();
+ } else if (cat_id == "#mc-form-rp") {
+ //$j('div.blockMe2').unblock();
+ //$('#mc-form-optional-reproducible').show();
+ } else if (cat_id == "#mc-form-gr") {
+ //$j('div.blockMe4').unblock();
+ //$('#mc-form-optional-grassroots').show();
+ } else {
+ update_logo($id);
+ //$j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});
+ }
+ });
+};
- function hover_more_link($id) {
- $j("#mc-form-more-link-" + $id).hover(
- function () {
- $j(this).addClass("mc-form-link-high");
- }, function () {
- $j(this).removeClass("mc-form-link-high");
- });
- };
+function hover_cat($id) {
+ var cat_id = "#mc-form-" + $id;
+ $j(cat_id + ",#mc-form-icon-" + $id).hover(
+ function ()
+ {
+ $j(cat_id).addClass("mc-form-descbox-high");
+ //if ($j('#mc-form-less-link-'+$id).is(':hidden'))
+ // $j("#mc-form-more-link-"+$id).show();
+ }, function () {
+ $j(cat_id).removeClass("mc-form-descbox-high");
+ //if ($j('#mc-form-less-link-'+$id).is(':hidden'))
+ // $j("#mc-form-more-link-"+$id).hide();
+ });
+};
- function hover_less_link($id) {
- $j("#mc-form-less-link-" + $id).hover(
- function () {
- $j(this).addClass("mc-form-link-high");
- }, function () {
- $j(this).removeClass("mc-form-link-high");
- });
- };
+// More links
- function hide_initial($id) {
- $j("#mc-form-more-link-" + $id).hide();
- //$j("#mc-form-more-text-" + $id).hide();
- $j("#mc-form-less-link-" + $id).hide();
- };
+function click_more_link($id) {
+ $j("#mc-form-more-link-" + $id).click(
+ function (event) {
+ event.stopPropagation();
+ $j(this).hide();
+ /*if ($id == "rc") {
+ $j("#mc-cat-rc-options").slideDown();
+ }*/
+ $j("#mc-form-less-link-" + $id).show('slow');
+ $j("#mc-form-more-text-" + $id).show('slow',function() {adjustHeights();});
- function dclick_toggle($id) {
- $j("#mc-form-" + $id).dblclick(
- function () {
- var id_text = "#mc-form-more-text-" + $id;
- var id_link = "#mc-form-more-link-" + $id;
- if ($j(id_text).is(':visible')) { $j(id_text).slideUp(); $j(id_link).slideDown(); }
- else { $j(id_text).slideDown(); $j(id_link).slideUp(); };
- });};
+ });
+};
- function reset_areas() {
- mc_rc="0";
- $j("#mc-cat-rc-option-box-ec").removeClass("mc-cat-rc-option-box-selected");
- $j("#mc-cat-rc-option-box-bo").removeClass("mc-cat-rc-option-box-selected");
- $j("#mc-cat-rc-option-box-to").removeClass("mc-cat-rc-option-box-selected");
- $j("#mc-cat-rc-option-box-di").removeClass("mc-cat-rc-option-box-selected");
- $j("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc60.png"});
- $j("#mc-cat-selected-rc").slideUp();
- }
+function click_less_link($id) {
+ $j("#mc-form-less-link-" + $id).click(
+ function (event) {
+ event.stopPropagation();
+ $j(this).hide();
+ /*if ($id == "rc") {
+ $j("#mc-cat-rc-options").slideUp();
+ }*/
+ $j("#mc-form-more-link-" + $id).show('slow');
+ $j("#mc-form-more-text-" + $id).slideUp(function() {adjustHeights();});
+ //if ($id == "rc") { $j("#mc-cat-rc-options").slideUp(function() {adjustHeights();});}
+ });
+};
- function select_area($id) {
- var cat_id = "#mc-cat-rc-option-box-" + $id;
- $j(cat_id + ",#mc-cat-rc-option-icon-" + $id).click(
- function (event) {
- if($j('#rc-checkbox').val()=='N')
- return;
- event.stopPropagation();
- reset_areas();
- $j("#mc-form-rc").addClass("mc-form-descbox-selected");
- $j("#mc-cat-selected-rc").slideDown();
- $j(cat_id).addClass("mc-cat-rc-option-box-selected");
- $j("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc" + $id + "60.png"});
- update_logo($id);
- });
- };
+function hover_more_link($id) {
+ $j("#mc-form-more-link-" + $id).hover(
+ function () {
+ $j(this).addClass("mc-form-link-high");
+ }, function () {
+ $j(this).removeClass("mc-form-link-high");
+ });
+};
- // Inspired in:
- // http://stackoverflow.com/questions/803688/how-do-i-keep-multiple-divs-the-s…
+function hover_less_link($id) {
+ $j("#mc-form-less-link-" + $id).hover(
+ function () {
+ $j(this).addClass("mc-form-link-high");
+ }, function () {
+ $j(this).removeClass("mc-form-link-high");
+ });
+};
- function adjustPairHeights($id1, $id2) {
- var maxHeight = 0;
- var idcat1 = "#mc-form-category-group-" + $id1;
- var idcat2 = "#mc-form-category-group-" + $id2;
- var ids = idcat1 + "," + idcat2;
- $j(ids).each(function(){
- $j(this).height('auto');
- if (maxHeight < $j(this).height()) {maxHeight = $j(this).height();}
- });
- if($j(idcat1).height() < maxHeight) { $j(idcat1).height(maxHeight); };
- if($j(idcat2).height() < maxHeight) { $j(idcat2).height(maxHeight); };
- }
+function hide_initial($id) {
+ $j("#mc-form-more-link-" + $id).hide();
+ //$j("#mc-form-more-text-" + $id).hide();
+ $j("#mc-form-less-link-" + $id).hide();
+};
- function adjustHeights() {
- adjustPairHeights("aa", "ab");
- adjustPairHeights("bb", "ba");
- }
+function dclick_toggle($id) {
+ $j("#mc-form-" + $id).dblclick(
+ function () {
+ var id_text = "#mc-form-more-text-" + $id;
+ var id_link = "#mc-form-more-link-" + $id;
+ if ($j(id_text).is(':visible')) { $j(id_text).slideUp(); $j(id_link).slideDown(); }
+ else { $j(id_text).slideDown(); $j(id_link).slideUp(); };
+ });};
- function update_logo($cat) {
- if ($cat == "np" ) mc_np="np-";
- if ($cat == "nnp") mc_np="fp-";
- if ($cat == "rp" ) mc_rp="rp-";
- if ($cat == "nrp") mc_rp="ex-";
- if ($cat == "gr" ) mc_gr="gr-";
- if ($cat == "ngr") mc_gr="rs-";
- if ($cat == "ec" || $cat == "bo" ||
- $cat == "to" || $cat == "di") mc_rc="rc." + $cat + "-";
- if ($cat == "nrc") mc_rc="ro-";
+function reset_areas() {
+ mc_rc="0";
+ $j("#mc-cat-rc-option-box-ec").removeClass("mc-cat-rc-option-box-selected");
+ $j("#mc-cat-rc-option-box-bo").removeClass("mc-cat-rc-option-box-selected");
+ $j("#mc-cat-rc-option-box-to").removeClass("mc-cat-rc-option-box-selected");
+ $j("#mc-cat-rc-option-box-di").removeClass("mc-cat-rc-option-box-selected");
+ $j("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc60.png"});
+ $j("#mc-cat-selected-rc").slideUp();
+}
- mc_category = "";
- var icon_url = "";
+function select_area($id) {
+ var cat_id = "#mc-cat-rc-option-box-" + $id;
+ $j(cat_id + ",#mc-cat-rc-option-icon-" + $id).click(
+ function (event) {
+ if($j('#rc-checkbox').val()=='N')
+ return;
+ event.stopPropagation();
+ reset_areas();
+ $j("#mc-form-rc").addClass("mc-form-descbox-selected");
+ $j("#mc-cat-selected-rc").slideDown();
+ $j(cat_id).addClass("mc-cat-rc-option-box-selected");
+ $j("#mc-form-icon-rc").attr({src : "/mc/0.1/images/rc" + $id + "60.png"});
+ update_logo($id);
+ });
+};
- if (mc_np != "0" && mc_rp != "0" && mc_rc != "0" && mc_gr != "0") {
- if (mc_np!="") { mc_category += mc_np; }
- if (mc_rp!="") { mc_category += mc_rp; }
- if (mc_rc!="") { mc_category += mc_rc; }
- if (mc_gr!="") { mc_category += mc_gr; }
- // /lang/mc-0-1-np-rp-sc-dc/
- mc_category = mc_category.replace(/-$/, "");
- icon_url = "/mc/0.1/images/" + mc_category + "-120x90-0.1.png";
- }
- if (icon_url != "") {
- $j("#mc-form-icon-result").attr({src : icon_url});
- $j("#mc-form-icon-result").show('fast');
- } else {
- $j("#mc-form-icon-result").hide();
- }
- checkIfFormReady();
- }
+// Inspired in:
+// http://stackoverflow.com/questions/803688/how-do-i-keep-multiple-divs-the-s…
- function checkIfFormReady() {
- urlIni = $j('#url').val();
- nameIni = $j('#ininame').val();
- keywordsIni = $j('#keywords').val();
- if (mc_category != "" && nameIni.length > 0 && urlIni.length > 0) {
- $j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-enabled");
- $j("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-disabled");
- $j("#mc-dia-continue-btn").effect("highlight", {}, 2000);
- } else {
- $j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-disabled");
- $j("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-enabled");
- }
- }
+function adjustPairHeights($id1, $id2) {
+ var maxHeight = 0;
+ var idcat1 = "#mc-form-category-group-" + $id1;
+ var idcat2 = "#mc-form-category-group-" + $id2;
+ var ids = idcat1 + "," + idcat2;
+ $j(ids).each(function(){
+ $j(this).height('auto');
+ if (maxHeight < $j(this).height()) {maxHeight = $j(this).height();}
+ });
+ if($j(idcat1).height() < maxHeight) { $j(idcat1).height(maxHeight); };
+ if($j(idcat2).height() < maxHeight) { $j(idcat2).height(maxHeight); };
+}
- function confInputValidation($id) {
- $j($id).bind("change keyup", function(event) {
- checkIfFormReady();
- });
- }
+function adjustHeights() {
+ adjustPairHeights("aa", "ab");
+ adjustPairHeights("bb", "ba");
+}
- // adapted from:
- // http://stackoverflow.com/questions/1277070/is-there-an-equivalent-javascrip…
- function doadjustwithsleep( part ) {
- if( part == 0 ) {
- setTimeout( function() { doadjustwithsleep( 1 ); }, 1000 );
- } else if( part == 1 ) {
- adjustHeights();
- }
- }
+function update_logo($cat) {
+ if ($cat == "np" ) mc_np="np-";
+ if ($cat == "nnp") mc_np="fp-";
+ if ($cat == "rp" ) mc_rp="rp-";
+ if ($cat == "nrp") mc_rp="ex-";
+ if ($cat == "gr" ) mc_gr="gr-";
+ if ($cat == "ngr") mc_gr="rs-";
+ if ($cat == "ec" || $cat == "bo" ||
+ $cat == "to" || $cat == "di") mc_rc="rc." + $cat + "-";
+ if ($cat == "nrc") mc_rc="ro-";
- function conf_link($id) {
- var nid = "n" + $id;
- select_cat($id, nid);
- select_cat(nid, $id);
- };
+ mc_category = "";
+ var icon_url = "";
- function conf_click_continue() {
- $j("#mc-dia-continue-btn").click(
- function (event) {
- event.stopPropagation();
- if (mc_category != "" && urlIni.length > 0 && nameIni.length > 0) {
- var currentUrl = window.location.pathname.split('/');
- var langCode = "";
- if (currentUrl[1] == 'preview') { langCode = 'en'; }
- else { langCode = currentUrl[1]; };
- window.location.href="/" + langCode + "/" + mc_category + "-html/0.1/?ini_name=" + nameIni +
- "&ini_url=" + urlIni + "&ini_keywords=" + keywordsIni;
- }
- });
- };
+ if (mc_np != "0" && mc_rp != "0" && mc_rc != "0" && mc_gr != "0") {
+ if (mc_np!="") { mc_category += mc_np; }
+ if (mc_rp!="") { mc_category += mc_rp; }
+ if (mc_rc!="") { mc_category += mc_rc; }
+ if (mc_gr!="") { mc_category += mc_gr; }
+ // /lang/mc-0-1-np-rp-sc-dc/
+ mc_category = mc_category.replace(/-$/, "");
+ icon_url = "/mc/0.1/images/" + mc_category + "-120x90-0.1.png";
+ }
+ if (icon_url != "") {
+ $j("#mc-form-icon-result").attr({src : icon_url});
+ $j("#mc-form-icon-result").show('fast');
+ } else {
+ $j("#mc-form-icon-result").hide();
+ }
+ checkIfFormReady();
+}
+function checkIfFormReady() {
+ urlIni = $j('#url').val();
+ nameIni = $j('#ininame').val();
+ keywordsIni = $j('#keywords').val();
+ if (mc_category != "" && nameIni.length > 0 && urlIni.length > 0) {
+ $j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-enabled");
+ $j("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-disabled");
+ $j("#mc-dia-continue-btn").effect("highlight", {}, 2000);
+ } else {
+ $j("#mc-dia-continue-btn").addClass("mc-dia-continue-btn-disabled");
+ $j("#mc-dia-continue-btn").removeClass("mc-dia-continue-btn-enabled");
+ }
+}
- // http://www.richreuter.com/2008/08/01/UsingJQueryToResizeTextBoxesToMaxLengt…
- function max_textsize() {
- $j('input[type=text]').each(function() {
- var max_length = $j(this).attr('maxlength');
- var multiplier = (max_length > 10) ? 7.3 : 8;
- var w = (max_length * multiplier) + "px";
- $j(this).width(w);
- });
+function confInputValidation($id) {
+ $j($id).bind("change keyup", function(event) {
+ checkIfFormReady();
+ });
+}
+// adapted from:
+// http://stackoverflow.com/questions/1277070/is-there-an-equivalent-javascrip…
+function doadjustwithsleep( part ) {
+ if( part == 0 ) {
+ setTimeout( function() { doadjustwithsleep( 1 ); }, 1000 );
+ } else if( part == 1 ) {
+ adjustHeights();
}
+}
- // http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-an…
- $.fn.labelOver = function(overClass) {
- return this.each(function()
- {
- var label = $j(this);
- var f = label.attr('for');
- if (f) {
- var input = $j('#' + f);
+function conf_link($id) {
+ var nid = "n" + $id;
+ select_cat($id, nid);
+ select_cat(nid, $id);
+};
- this.hide = function() {
- label.css({ textIndent: -10000 });
- };
+function conf_click_continue() {
+ $j("#mc-dia-continue-btn").click(
+ function (event) {
+ event.stopPropagation();
+ if (mc_category != "" && urlIni.length > 0 && nameIni.length > 0) {
+ var currentUrl = window.location.pathname.split('/');
+ var langCode = "";
+ if (currentUrl[1] == 'preview') { langCode = 'en'; }
+ else { langCode = currentUrl[1]; };
+ window.location.href="/" + langCode + "/" + mc_category + "-html/0.1/?ini_name=" + nameIni +
+ "&ini_url=" + urlIni + "&ini_keywords=" + keywordsIni;
+ }
+ });
+};
- this.show = function() {
- if (input.val() == '') label.css({ textIndent: 0 });
- };
- // handlers
- input.focus(this.hide);
- input.blur(this.show);
- label.addClass(overClass).click(function(){ input.focus(); });
+// http://www.richreuter.com/2008/08/01/UsingJQueryToResizeTextBoxesToMaxLengt…
+function max_textsize() {
+ $j('input[type=text]').each(function() {
+ var max_length = $j(this).attr('maxlength');
+ var multiplier = (max_length > 10) ? 7.3 : 8;
+ var w = (max_length * multiplier) + "px";
+ $j(this).width(w);
+});
- if (input.val() != '') this.hide();
+}
+
+// http://remysharp.com/2007/03/19/a-few-more-jquery-plugins-crop-labelover-an…
+$.fn.labelOver = function(overClass) {
+ return this.each(function()
+ {
+ var label = $j(this);
+ var f = label.attr('for');
+ if (f) {
+ var input = $j('#' + f);
+
+ this.hide = function() {
+ label.css({ textIndent: -10000 });
+ };
+
+ this.show = function() {
+ if (input.val() == '') label.css({ textIndent: 0 });
+ };
+
+ // handlers
+ input.focus(this.hide);
+ input.blur(this.show);
+ label.addClass(overClass).click(function(){ input.focus(); });
+
+ if (input.val() != '') this.hide();
}
});
};
$j('#submit_first').click(function(){
- //remove classes
- $j('#first_step input').removeClass('error').removeClass('valid');
+ //remove classes
+ $j('#first_step input').removeClass('error').removeClass('valid');
- //ckeck if inputs aren't empty
- var fields = $j('#first_step input[type=text], #first_step input[type=password]');
- var error = 0;
- fields.each(function(){
- var value = $j.trim($j(this).val());
- if( value=="" || value==field_values[$j(this).attr('id')] ) {
- $j(this).addClass('error');
- $j(this).effect("shake", { times:3 }, 50);
- error++;
- } else {
- /*if($j(this).attr('id')=='url'){
- if(!(/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value))){
- $j(this).addClass('error');
- $j(this).effect("shake", { times:3 }, 50);
- error++;
- }
- }
- else*/
- $j(this).addClass('valid');
- }
- });
-
- if(!error) {
-
- current_step='#second_step';
-
- if(!step_two_reached){
- $j('#step1_image_map').append('<area href="#" step="#second_step" shape="circle" coords="122,12,12"><!--2-->');
- imageMapUnBind();
- imageMapInit();
- step_two_reached=true;
+ //ckeck if inputs aren't empty
+ var fields = $j('#first_step input[type=text], #first_step input[type=password]');
+ var error = 0;
+ fields.each(function(){
+ var value = $j.trim($j(this).val());
+ if( value=="" || value==field_values[$j(this).attr('id')] ) {
+ $j(this).addClass('error');
+ $j(this).effect("shake", { times:3 }, 50);
+ error++;
+ } else {
+ /*if($j(this).attr('id')=='url'){
+ if(!(/^([a-z]([a-z]|\d|\+|-|\.)*):(\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?((\[(|(v[\da-f]{1,}\.(([a-z]|\d|-|\.|_|~)|[!\$&'\(\)\*\+,;=]|:)+))\])|((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=])*)(:\d*)?)(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*|(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)|((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)){0})(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(value))){
+ $j(this).addClass('error');
+ $j(this).effect("shake", { times:3 }, 50);
+ error++;
+ }
}
-
- //update progress bar
- $j('#progress_text').html('20% Complete');
- $j('#progress').css('width','68px');
-
- //slide steps
- $j('#first_step').slideUp();
- $j('#second_step').slideDown();
-
- if($j('#np-checkbox').val()=='S')
- $j('label[for*="step2-yes"]').addClass('ui-state-active');
- else if ($j('#np-checkbox').val()=='N')
- $j('label[for*="step2-no"]').addClass('ui-state-active');
- } else return false;
- });
+ else*/
+ $j(this).addClass('valid');
+ }
+ });
- $j('#p_submit_second').click(function(){
+ if(!error) {
- current_step='#first_step';
-
- //update progress bar
- $j('#progress').css('width','0');
- $j('#progress_text').html('0% Complete');
-
- //slide steps
- $j('#second_step').slideUp();
- $j('#first_step').slideDown();
- });
-
-
- $j('#submit_second').click(function(){
-
- var error=false;
-
- if($j('#np-checkbox').val()=='A'){
- $j('#step2question').effect("shake", { times:3 }, 50);
- return;
- }
-
- if($j("#registered-non-profit").attr("checked"))
- if($j.trim($j('#non-profit-website').val())==""){
- $j('#non-profit-website').addClass('error');
- $j('#non-profit-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#non-profit-website').addClass('valid');
-
- if($j("#open-accounting").attr("checked"))
- if($j.trim($j('#open-accounting-website').val())==""){
- $j('#open-accounting-website').addClass('error');
- $j('#open-accounting-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#open-accounting-website').addClass('valid');
-
- if($j("#accept-donations").attr("checked"))
- if($j.trim($j('#donation-website').val())==""){
- $j('#donation-website').addClass('error');
- $j('#donation-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#accept-donations').addClass('valid');
-
- if(error)
- return;
-
- current_step='#third_step';
-
- if(!step_three_reached){
- $j('#step1_image_map').append('<area href="#" step="#third_step" shape="circle" coords="214,12,12"><!--3-->');
- $j('#step2_image_map').append('<area href="#" step="#third_step" shape="circle" coords="214,12,12"><!--3-->');
+ current_step='#second_step';
+
+ if(!step_two_reached){
+ $j('#step1_image_map').append('<area href="#" step="#second_step" shape="circle" coords="122,12,12"><!--2-->');
imageMapUnBind();
imageMapInit();
- step_three_reached=true;
+ step_two_reached=true;
}
-
- //update progress bar
- $j('#progress_text').html('40% Complete');
- $j('#progress').css('width','136px');
-
- if($j('#rp-checkbox').val()=='S')
- $j('label[for*="step3-yes"]').addClass('ui-state-active');
- else if ($j('#rp-checkbox').val()=='N')
- $j('label[for*="step3-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#second_step').slideUp();
- $j('#third_step').slideDown();
-
- });
-
- $j('#p_submit_third').click(function(){
-
- current_step='#second_step';
-
+
//update progress bar
- $j('#progress_text').html('20% Complete');
+ $j('#progress_text').html('20% Complete');
$j('#progress').css('width','68px');
+ //slide steps
+ $j('#first_step').slideUp();
+ $j('#second_step').slideDown();
+
if($j('#np-checkbox').val()=='S')
$j('label[for*="step2-yes"]').addClass('ui-state-active');
else if ($j('#np-checkbox').val()=='N')
- $j('label[for*="step2-no"]').addClass('ui-state-active');
+ $j('label[for*="step2-no"]').addClass('ui-state-active');
+ } else return false;
+});
+
+$j('#p_submit_second').click(function(){
+
+ current_step='#first_step';
+
+ //update progress bar
+ $j('#progress').css('width','0');
+ $j('#progress_text').html('0% Complete');
//slide steps
- $j('#third_step').slideUp();
- $j('#second_step').slideDown();
- });
+ $j('#second_step').slideUp();
+ $j('#first_step').slideDown();
+});
- $j('#submit_third').click(function(){
-
- var error=false;
-
- if($j('#rp-checkbox').val()=='A'){
- $j('#step3question').effect("shake", { times:3 }, 50);
- return;
- }
-
- if($j("#terms-of-use").attr("checked"))
- if($j.trim($j('#terms-of-use-website').val())==""){
- $j('#terms-of-use-website').addClass('error');
- $j('#terms-of-use-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#terms-of-use-website').addClass('valid');
-
- if($j("#creative-commons").attr("checked"))
- if($j.trim($j('#creative-commons-website').val())==""){
- $j('#creative-commons-website').addClass('error');
- $j('#creative-commons-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#creative-commons-website').addClass('valid');
-
- if($j("#other-license").attr("checked"))
- if($j.trim($j('#other-license-website').val())==""){
- $j('#other-license-website').addClass('error');
- $j('#other-license-website').effect("shake", { times:3 }, 50);
- error=true;
- }
- else
- $j('#other-license-website').addClass('valid');
-
- if(error)
- return;
-
- current_step='#fourth_step';
-
- if(!step_four_reached){
- $j('#step1_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
- $j('#step2_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
- $j('#step3_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
- imageMapUnBind();
- imageMapInit();
- step_four_reached=true;
- }
-
- //update progress bar
- $j('#progress_text').html('60% Complete');
- $j('#progress').css('width','204px');
-
- if($j('#rc-checkbox').val()=='S')
- $j('label[for*="step4-yes"]').addClass('ui-state-active');
- else if ($j('#rc-checkbox').val()=='N')
- $j('label[for*="step4-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#third_step').slideUp();
- $j('#fourth_step').slideDown();
- });
+$j('#submit_second').click(function(){
+
+ var error=false;
+
+ if($j('#np-checkbox').val()=='A'){
+ $j('#step2question').effect("shake", { times:3 }, 50);
+ return;
+ }
+
+ if($j("#registered-non-profit").attr("checked"))
+ if($j.trim($j('#non-profit-website').val())==""){
+ $j('#non-profit-website').addClass('error');
+ $j('#non-profit-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#non-profit-website').addClass('valid');
+
+ if($j("#open-accounting").attr("checked"))
+ if($j.trim($j('#open-accounting-website').val())==""){
+ $j('#open-accounting-website').addClass('error');
+ $j('#open-accounting-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#open-accounting-website').addClass('valid');
+
+ if($j("#accept-donations").attr("checked"))
+ if($j.trim($j('#donation-website').val())==""){
+ $j('#donation-website').addClass('error');
+ $j('#donation-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#accept-donations').addClass('valid');
+
+ if(error)
+ return;
+
+ current_step='#third_step';
+
+ if(!step_three_reached){
+ $j('#step1_image_map').append('<area href="#" step="#third_step" shape="circle" coords="214,12,12"><!--3-->');
+ $j('#step2_image_map').append('<area href="#" step="#third_step" shape="circle" coords="214,12,12"><!--3-->');
+ imageMapUnBind();
+ imageMapInit();
+ step_three_reached=true;
+ }
+
+ //update progress bar
+ $j('#progress_text').html('40% Complete');
+ $j('#progress').css('width','136px');
+
+ if($j('#rp-checkbox').val()=='S')
+ $j('label[for*="step3-yes"]').addClass('ui-state-active');
+ else if ($j('#rp-checkbox').val()=='N')
+ $j('label[for*="step3-no"]').addClass('ui-state-active');
+
+ //slide steps
+ $j('#second_step').slideUp();
+ $j('#third_step').slideDown();
- $j('#p_submit_fourth').click(function(){
-
- current_step='#third_step';
-
- //update progress bar
- $j('#progress_text').html('40% Complete');
- $j('#progress').css('width','136px');
-
- if($j('#rp-checkbox').val()=='S')
- $j('label[for*="step3-yes"]').addClass('ui-state-active');
- else if ($j('#rp-checkbox').val()=='N')
- $j('label[for*="step3-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#fourth_step').slideUp();
- $j('#third_step').slideDown();
- });
+});
- $j('#submit_fourth').click(function(){
-
- if($j('#rc-checkbox').val()=='A'){
- $j('#step4question').effect("shake", { times:3 }, 50);
- return;
- }
-
-
- if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rc60.png' && $j('#rc-checkbox').val()=='S'){
- $j('#mc-form-optional-reinforcing').effect("shake", { times:3 }, 50);
- return;
- }
-
- current_step='#fifth_step';
-
- if(!step_five_reached){
- $j('#step1_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
- $j('#step2_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
- $j('#step3_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
- $j('#step4_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
- imageMapUnBind();
- imageMapInit();
- step_five_reached=true;
- }
-
- //update progress bar
- $j('#progress_text').html('80% Complete');
- $j('#progress').css('width','272px');
-
- if($j('#gr-checkbox').val()=='S')
- $j('label[for*="step5-yes"]').addClass('ui-state-active');
- else if ($j('#gr-checkbox').val()=='N')
- $j('label[for*="step5-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#fourth_step').slideUp();
- $j('#fifth_step').slideDown();
-
- });
+$j('#p_submit_third').click(function(){
+
+ current_step='#second_step';
+
+ //update progress bar
+ $j('#progress_text').html('20% Complete');
+ $j('#progress').css('width','68px');
- $j('#p_submit_fifth').click(function(){
-
- current_step='#fourth_step';
-
- //update progress bar
- $j('#progress_text').html('60% Complete');
- $j('#progress').css('width','204px');
-
- if($j('#rc-checkbox').val()=='S')
- $j('label[for*="step4-yes"]').addClass('ui-state-active');
- else if ($j('#rc-checkbox').val()=='N')
- $j('label[for*="step4-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#fifth_step').slideUp();
- $j('#fourth_step').slideDown();
- });
+ if($j('#np-checkbox').val()=='S')
+ $j('label[for*="step2-yes"]').addClass('ui-state-active');
+ else if ($j('#np-checkbox').val()=='N')
+ $j('label[for*="step2-no"]').addClass('ui-state-active');
- $j('#submit_fifth').click(function(){
-
- if($j('#gr-checkbox').val()=='A'){
- $j('#step5question').effect("shake", { times:3 }, 50);
- return;
- }
-
- current_step='#sixth_step';
-
- if(!step_six_reached){
- $j('#step1_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
- $j('#step2_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
- $j('#step3_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
- $j('#step4_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
- $j('#step5_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
- imageMapUnBind();
- imageMapInit();
- step_six_reached=true;
- }
-
- $j('#progress_text').html('100% Complete');
- $j('#progress').css('width','339px');
-
- $j('#fifth_step').slideUp();
- $j('#sixth_step').slideDown();
+ //slide steps
+ $j('#third_step').slideUp();
+ $j('#second_step').slideDown();
+});
- });
+
+$j('#submit_third').click(function(){
+
+ var error=false;
+
+ if($j('#rp-checkbox').val()=='A'){
+ $j('#step3question').effect("shake", { times:3 }, 50);
+ return;
+ }
+
+ if($j("#terms-of-use").attr("checked"))
+ if($j.trim($j('#terms-of-use-website').val())==""){
+ $j('#terms-of-use-website').addClass('error');
+ $j('#terms-of-use-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#terms-of-use-website').addClass('valid');
+
+ if($j("#creative-commons").attr("checked"))
+ if($j.trim($j('#creative-commons-website').val())==""){
+ $j('#creative-commons-website').addClass('error');
+ $j('#creative-commons-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#creative-commons-website').addClass('valid');
+
+ if($j("#other-license").attr("checked"))
+ if($j.trim($j('#other-license-website').val())==""){
+ $j('#other-license-website').addClass('error');
+ $j('#other-license-website').effect("shake", { times:3 }, 50);
+ error=true;
+ }
+ else
+ $j('#other-license-website').addClass('valid');
+
+ if(error)
+ return;
+
+ current_step='#fourth_step';
+
+ if(!step_four_reached){
+ $j('#step1_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
+ $j('#step2_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
+ $j('#step3_image_map').append('<area href="#" step="#fourth_step" shape="circle" coords="306,12,12"><!--4-->');
+ imageMapUnBind();
+ imageMapInit();
+ step_four_reached=true;
+ }
+
+ //update progress bar
+ $j('#progress_text').html('60% Complete');
+ $j('#progress').css('width','204px');
- $j('#p_submit_sixth').click(function(){
-
- current_step='#fifth_step';
-
- //update progress bar
- $j('#progress_text').html('80% Complete');
- $j('#progress').css('width','272px');
-
- if($j('#gr-checkbox').val()=='S')
- $j('label[for*="step5-yes"]').addClass('ui-state-active');
- else if ($j('#gr-checkbox').val()=='N')
- $j('label[for*="step5-no"]').addClass('ui-state-active');
-
- //slide steps
- $j('#sixth_step').slideUp();
- $j('#fifth_step').slideDown();
- });
+ if($j('#rc-checkbox').val()=='S')
+ $j('label[for*="step4-yes"]').addClass('ui-state-active');
+ else if ($j('#rc-checkbox').val()=='N')
+ $j('label[for*="step4-no"]').addClass('ui-state-active');
- $j('#non-profit-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
- });
+ //slide steps
+ $j('#third_step').slideUp();
+ $j('#fourth_step').slideDown();
+});
+
+$j('#p_submit_fourth').click(function(){
+
+ current_step='#third_step';
+
+ //update progress bar
+ $j('#progress_text').html('40% Complete');
+ $j('#progress').css('width','136px');
- $j('#open-accounting-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
- });
+ if($j('#rp-checkbox').val()=='S')
+ $j('label[for*="step3-yes"]').addClass('ui-state-active');
+ else if ($j('#rp-checkbox').val()=='N')
+ $j('label[for*="step3-no"]').addClass('ui-state-active');
- $j('#donation-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
- });
+ //slide steps
+ $j('#fourth_step').slideUp();
+ $j('#third_step').slideDown();
+});
+
+$j('#submit_fourth').click(function(){
+
+ if($j('#rc-checkbox').val()=='A'){
+ $j('#step4question').effect("shake", { times:3 }, 50);
+ return;
+ }
+
+
+ if($j('#mc-form-icon-rc').attr('src')=='/mc/0.1/images/rc60.png' && $j('#rc-checkbox').val()=='S'){
+ $j('#mc-form-optional-reinforcing').effect("shake", { times:3 }, 50);
+ return;
+ }
+
+ current_step='#fifth_step';
+
+ if(!step_five_reached){
+ $j('#step1_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
+ $j('#step2_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
+ $j('#step3_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
+ $j('#step4_image_map').append('<area href="#" step="#fifth_step" shape="circle" coords="398,12,12"><!--5-->');
+ imageMapUnBind();
+ imageMapInit();
+ step_five_reached=true;
+ }
+
+ //update progress bar
+ $j('#progress_text').html('80% Complete');
+ $j('#progress').css('width','272px');
- $j('#terms-of-use-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
- });
+ if($j('#gr-checkbox').val()=='S')
+ $j('label[for*="step5-yes"]').addClass('ui-state-active');
+ else if ($j('#gr-checkbox').val()=='N')
+ $j('label[for*="step5-no"]').addClass('ui-state-active');
- $j('#creative-commons-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
- });
+ //slide steps
+ $j('#fourth_step').slideUp();
+ $j('#fifth_step').slideDown();
- $j('#other-license-website').click(function(){
- if($j(this).val()==''){
- $j(this).val($j('#url').val());
- $j(this).trigger('keydown');
- }
- });
+});
+
+$j('#p_submit_fifth').click(function(){
+
+ current_step='#fourth_step';
+
+ //update progress bar
+ $j('#progress_text').html('60% Complete');
+ $j('#progress').css('width','204px');
+ if($j('#rc-checkbox').val()=='S')
+ $j('label[for*="step4-yes"]').addClass('ui-state-active');
+ else if ($j('#rc-checkbox').val()=='N')
+ $j('label[for*="step4-no"]').addClass('ui-state-active');
+
+ //slide steps
+ $j('#fifth_step').slideUp();
+ $j('#fourth_step').slideDown();
+});
- $j("#registered-non-profit").click(function(){
- if($j("#registered-non-profit").attr("checked")){
- $j('#non-profit-website').show();
- $j('#infield-non-profit-website').show();
- }
- else{
- $j('#non-profit-website').hide();
- $j('#infield-non-profit-website').hide();
- }
- });
+$j('#submit_fifth').click(function(){
+
+ if($j('#gr-checkbox').val()=='A'){
+ $j('#step5question').effect("shake", { times:3 }, 50);
+ return;
+ }
+
+ current_step='#sixth_step';
+
+ if(!step_six_reached){
+ $j('#step1_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
+ $j('#step2_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
+ $j('#step3_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
+ $j('#step4_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
+ $j('#step5_image_map').append('<area href="#" step="#sixth_step" shape="circle" coords="490,12,12"><!--6-->');
+ imageMapUnBind();
+ imageMapInit();
+ step_six_reached=true;
+ }
+
+ $j('#progress_text').html('100% Complete');
+ $j('#progress').css('width','339px');
+
+ $j('#fifth_step').slideUp();
+ $j('#sixth_step').slideDown();
+});
- $j("#open-accounting").click(function(){
- if($j("#open-accounting").attr("checked")){
- $j('#open-accounting-website').show();
- $j('#infield-open-accounting-website').show();
- }
- else{
- $j('#open-accounting-website').hide();
- $j('#infield-open-accounting-website').hide();
- }
- });
+$j('#p_submit_sixth').click(function(){
+
+ current_step='#fifth_step';
+
+ //update progress bar
+ $j('#progress_text').html('80% Complete');
+ $j('#progress').css('width','272px');
+
+ if($j('#gr-checkbox').val()=='S')
+ $j('label[for*="step5-yes"]').addClass('ui-state-active');
+ else if ($j('#gr-checkbox').val()=='N')
+ $j('label[for*="step5-no"]').addClass('ui-state-active');
+
+ //slide steps
+ $j('#sixth_step').slideUp();
+ $j('#fifth_step').slideDown();
+});
- $j("#accept-donations").click(function(){
- if($j("#accept-donations").attr("checked")){
- $j('#donation-website').show();
- $j('#infield-donation-website').show();
- }
- else{
- $j('#donation-website').hide();
- $j('#infield-donation-website').hide();
- }
- });
+$j('#non-profit-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+});
- $j("#terms-of-use").click(function(){
- if($j("#terms-of-use").attr("checked")){
- $j('#terms-of-use-website').show();
- $j('#infield-terms-of-use-website').show();
- }
- else{
- $j('#terms-of-use-website').hide();
- $j('#infield-terms-of-use-website').hide();
- }
- });
+$j('#open-accounting-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+});
+$j('#donation-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+});
- $j("#creative-commons").click(function(){
- if($j("#creative-commons").attr("checked")){
- $j('#creative-commons-website').show();
- $j('#infield-creative-commons-website').show();
- }
- else{
- $j('#creative-commons-website').hide();
- $j('#infield-creative-commons-website').hide();
- }
- });
+$j('#terms-of-use-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+});
- $j("#other-license").click(function(){
- if($j("#other-license").attr("checked")){
- $j('#other-license-website').show();
- $j('#infield-other-license-website').show();
- }
- else{
- $j('#other-license-website').hide();
- $j('#infield-other-license-website').hide();
- }
- });
-
- select_area("ec");
- select_area("bo");
- select_area("to");
- select_area("di");
- conf_click_continue();
- imageMapInit();
- $j(window).load(function () { doadjustwithsleep(0); });
- $j('input#ininame').inputfocus({ value: field_values['ininame'] });
- $j('input#url').inputfocus({ value: field_values['url'] });
- $j('input#languages').inputfocus({ value: field_values['languages'] });
- $j('input#keywords').inputfocus({ value: field_values['keywords'] });
- $j('input#location').inputfocus({ value: field_values['location'] });
- //$('input#email').inputfocus({ value: field_values['email'] });
-
+$j('#creative-commons-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
});
+$j('#other-license-website').click(function(){
+ if($j(this).val()==''){
+ $j(this).val($j('#url').val());
+ $j(this).trigger('keydown');
+ }
+});
+
+$j("#registered-non-profit").click(function(){
+ if($j("#registered-non-profit").attr("checked")){
+ $j('#non-profit-website').show();
+ $j('#infield-non-profit-website').show();
+ }
+ else{
+ $j('#non-profit-website').hide();
+ $j('#infield-non-profit-website').hide();
+ }
+});
+
+
+$j("#open-accounting").click(function(){
+ if($j("#open-accounting").attr("checked")){
+ $j('#open-accounting-website').show();
+ $j('#infield-open-accounting-website').show();
+ }
+ else{
+ $j('#open-accounting-website').hide();
+ $j('#infield-open-accounting-website').hide();
+ }
+});
+
+$j("#accept-donations").click(function(){
+ if($j("#accept-donations").attr("checked")){
+ $j('#donation-website').show();
+ $j('#infield-donation-website').show();
+ }
+ else{
+ $j('#donation-website').hide();
+ $j('#infield-donation-website').hide();
+ }
+});
+
+$j("#terms-of-use").click(function(){
+ if($j("#terms-of-use").attr("checked")){
+ $j('#terms-of-use-website').show();
+ $j('#infield-terms-of-use-website').show();
+ }
+ else{
+ $j('#terms-of-use-website').hide();
+ $j('#infield-terms-of-use-website').hide();
+ }
+});
+
+
+$j("#creative-commons").click(function(){
+ if($j("#creative-commons").attr("checked")){
+ $j('#creative-commons-website').show();
+ $j('#infield-creative-commons-website').show();
+ }
+ else{
+ $j('#creative-commons-website').hide();
+ $j('#infield-creative-commons-website').hide();
+ }
+});
+
+$j("#other-license").click(function(){
+ if($j("#other-license").attr("checked")){
+ $j('#other-license-website').show();
+ $j('#infield-other-license-website').show();
+ }
+ else{
+ $j('#other-license-website').hide();
+ $j('#infield-other-license-website').hide();
+ }
+});
+
+$j("#step2-yes").click(function(){clickCheckBox('np','yes');}
+$j("#step2-no").click(function(){clickCheckBox('np','no');}
+
+$j("#step3-yes").click(function(){clickCheckBox('rp','yes');}
+$j("#step3-no").click(function(){clickCheckBox('rp','no');}
+
+$j("#step4-yes").click(function(){clickCheckBox('rc','yes');}
+$j("#step4-no").click(function(){clickCheckBox('rc','no');}
+
+$j("#step5-yes").click(function(){clickCheckBox('gr','yes');}
+$j("#step5-no").click(function(){clickCheckBox('gr','no');}
+
+select_area("ec");
+select_area("bo");
+select_area("to");
+select_area("di");
+conf_click_continue();
+$j(window).load(function () { doadjustwithsleep(0); });
+$j('input#ininame').inputfocus({ value: field_values['ininame'] });
+$j('input#url').inputfocus({ value: field_values['url'] });
+$j('input#languages').inputfocus({ value: field_values['languages'] });
+$j('input#keywords').inputfocus({ value: field_values['keywords'] });
+$j('input#location').inputfocus({ value: field_values['location'] });
+//$('input#email').inputfocus({ value: field_values['email'] });
+
+
+
+
+
Modified: trunk/wp-theme/mc2-form.php
===================================================================
--- trunk/wp-theme/mc2-form.php 2012-11-04 22:44:57 UTC (rev 577)
+++ trunk/wp-theme/mc2-form.php 2012-11-05 14:47:49 UTC (rev 578)
@@ -74,8 +74,8 @@
<div id="step2question" style="width: 100%;float: left;margin-bottom: 20px;">
<div class="label2" style="margin-left: 185px;float: left;"><?php _e("2. Is your initiative Non-Profit?", "mc"); ?></div>
<div id="step2-radio" style="float: left;margin-left: 10px;margin-top: 10px;">
- <input type="radio" id="step2-yes" name="radio" onclick="clickCheckBox('np','yes');"/><label for="step2-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
- <input type="radio" id="step2-no" name="radio" onclick="clickCheckBox('np','no');"/><label for="step2-no" style="font-size: 14px;color: #FFFFFF;">No</label>
+ <input type="radio" id="step2-yes" name="radio"/><label for="step2-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
+ <input type="radio" id="step2-no" name="radio"/><label for="step2-no" style="font-size: 14px;color: #FFFFFF;">No</label>
</div>
</div>
<div class="mc-form-rounded mc-form-category-group-v2 float-left" id="mc-form-category-group-a">
@@ -148,8 +148,8 @@
<div id="step3question" style="width: 100%;float: left;margin-bottom: 20px;">
<div class="label2" style="margin-left: 185px;float: left;"><?php _e("3. Is your initiative Reproducible?", "mc"); ?></div>
<div id="step3-radio" style="float: left;margin-left: 10px;margin-top: 10px;">
- <input type="radio" id="step3-yes" name="radio" onclick="clickCheckBox('rp','yes');"/><label for="step3-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
- <input type="radio" id="step3-no" name="radio" onclick="clickCheckBox('rp','no');"/><label for="step3-no" style="font-size: 14px;color: #FFFFFF;">No</label>
+ <input type="radio" id="step3-yes" name="radio" /><label for="step3-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
+ <input type="radio" id="step3-no" name="radio" /><label for="step3-no" style="font-size: 14px;color: #FFFFFF;">No</label>
</div>
</div>
<div class="mc-form-rounded mc-form-category-group-v2 float-left" id="mc-form-category-group-b">
@@ -243,8 +243,8 @@
<div id="step4question" style="width: 100%;float: left;margin-bottom: 20px;">
<div class="label2" style="margin-left: 170px;float: left;"><?php _e("4. Does your initiative Reinforce the Commons?", "mc"); ?></div>
<div id="step4-radio" style="float: left;margin-left: 10px;margin-top: 10px;">
- <input type="radio" id="step4-yes" name="radio" onclick="clickCheckBox('rc','yes');"/><label for="step4-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
- <input type="radio" id="step4-no" name="radio" onclick="clickCheckBox('rc','no');"/><label for="step4-no" style="font-size: 14px;color: #FFFFFF;">No</label>
+ <input type="radio" id="step4-yes" name="radio"/><label for="step4-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
+ <input type="radio" id="step4-no" name="radio"/><label for="step4-no" style="font-size: 14px;color: #FFFFFF;">No</label>
</div>
</div>
<div class="mc-form-rounded mc-form-category-group-v2 float-left" style="padding-top: 35px;" id="mc-form-category-group-c">
@@ -309,8 +309,8 @@
<div style="width: 100%;float: left;margin-bottom: 20px;">
<div id="step5question" class="label2" style="margin-left: 125px;float: left;"><?php _e("5. Is your initiative driven by horizontal collective decisions?", "mc"); ?></div>
<div id="step5-radio" style="float: left;margin-left: 10px;margin-top: 10px;">
- <input type="radio" id="step5-yes" name="radio" onclick="clickCheckBox('gr','yes');"/><label for="step5-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
- <input type="radio" id="step5-no" name="radio" onclick="clickCheckBox('gr','no');"/><label for="step5-no" style="font-size: 14px;color: #FFFFFF;">No</label>
+ <input type="radio" id="step5-yes" name="radio"/><label for="step5-yes" style="font-size: 14px;color: #FFFFFF;">Yes</label>
+ <input type="radio" id="step5-no" name="radio"/><label for="step5-no" style="font-size: 14px;color: #FFFFFF;">No</label>
</div>
</div>
<div class="mc-form-rounded mc-form-category-group-v2 float-left" id="mc-form-category-group-d">
1
0