[Movecommons-commits] r620 - in trunk: src src/images wp-theme

Mario Gallegos mgallegos at ourproject.org
Wed Mar 20 23:32:36 CET 2013


Author: mgallegos
Date: 2013-03-20 23:32:36 +0100 (Wed, 20 Mar 2013)
New Revision: 620

Added:
   trunk/src/images/spinner.gif
Modified:
   trunk/src/mc-dia-form2.js
   trunk/wp-theme/mc2-form-controller.php
   trunk/wp-theme/mc2-form.php
Log:
IN PROGRESS - Enhancement #488:Save registrations in CSV or similar

Added: trunk/src/images/spinner.gif
===================================================================
(Binary files differ)


Property changes on: trunk/src/images/spinner.gif
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/src/mc-dia-form2.js
===================================================================
--- trunk/src/mc-dia-form2.js	2013-03-20 21:57:26 UTC (rev 619)
+++ trunk/src/mc-dia-form2.js	2013-03-20 22:32:36 UTC (rev 620)
@@ -581,11 +581,12 @@
 			processData: false,
 			contentType: "text/xml",
 			beforeSend: function(){
-				//$('#loader').show();					 		 				
+				$('#loader').show();					 		 				
 	 		},  	
 			data: $j.createXML(xmlDoc),			
 			success: function(xmlData) {				
-				alert("Dev msg: Your data has been successfully saved!!");
+				$('#loader').hide();
+				alert("Dev msg: Your data has been successfully saved!!");				
 			}
 		});
 		

Modified: trunk/wp-theme/mc2-form-controller.php
===================================================================
--- trunk/wp-theme/mc2-form-controller.php	2013-03-20 21:57:26 UTC (rev 619)
+++ trunk/wp-theme/mc2-form-controller.php	2013-03-20 22:32:36 UTC (rev 620)
@@ -23,7 +23,7 @@
 	$data .= $SimpleXMLElement->WE_TAKE_DECISIONS_THROUGH.",";
 	$data .= $SimpleXMLElement->INITIATIVE_REINFORCE_THE_COMMONS.",";
 	$data .= $SimpleXMLElement->MAIN_FOCUS_OF_THE_INITIATIVE."\n";
-	$fp = fopen('initiatives.txt', 'w');
+	$fp = fopen('initiatives.txt', 'a');
 	fwrite($fp, $data);
 	fclose($fp);
 ?>
\ No newline at end of file

Modified: trunk/wp-theme/mc2-form.php
===================================================================
--- trunk/wp-theme/mc2-form.php	2013-03-20 21:57:26 UTC (rev 619)
+++ trunk/wp-theme/mc2-form.php	2013-03-20 22:32:36 UTC (rev 620)
@@ -414,7 +414,9 @@
 	<div id="progress_text">0% Complete</div>
 </div>
 
+<img id="loader" src="/mc/0.1/images/spinner.gif" style="display: none;"/>
 
+
 <map id="step1_image_map" name="step1_image_map">	
                 
 </map>
@@ -485,5 +487,13 @@
 	$j("ul.qtrans_language_chooser").css("margin-left", "226px");	    
     $j('#progress').css('width','0');
     $j('#progress_text').html('0% Complete');
+    windowWidth = document.documentElement.clientWidth;
+	windowHeight = document.documentElement.clientHeight;
+	ajaxHeight = 50;
+	ajaxWidth = 50;
+	$("#loader").css({		
+		"top": windowHeight/2-ajaxHeight/2,
+		"left": windowWidth/2-ajaxWidth/2		
+	});
 });    		    	
 </script>




More information about the Movecommons-commits mailing list