[Movecommons-commits] r471 - trunk/src

Mario Gallegos mgallegos at ourproject.org
Tue Jun 5 20:18:52 CEST 2012


Author: mgallegos
Date: 2012-06-05 20:18:52 +0200 (Tue, 05 Jun 2012)
New Revision: 471

Modified:
   trunk/src/mc-dia-form2.js
Log:


Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js	2012-06-05 18:04:40 UTC (rev 470)
+++ trunk/src/mc-dia-form2.js	2012-06-05 18:18:52 UTC (rev 471)
@@ -2,9 +2,10 @@
 
 // categories selection
 
-function clickCheckBox(id){
+function clickCheckBox(id,answer){
 	if($j('#'+id+'-checkbox').val()=='N'){
-		$('#'+id+'-checkbox').val('S');
+		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'){
@@ -30,7 +31,8 @@
 		}
 	} 		 
 	else{
-		$('#'+id+'-checkbox').val('N');
+		if (!$j("#mc-form-" + id).is('.mc-form-descbox-selected')) return;
+		$j('#'+id+'-checkbox').val('N');
 		$j("#mc-form-" + id).removeClass("mc-form-descbox-selected");
 		$j("#mc-cat-selected-"+ id).slideUp();
 		if(id=='np'){




More information about the Movecommons-commits mailing list