← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3240: Fixed Bug: did not wait for DOM to be ready

 

------------------------------------------------------------
revno: 3240
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-03-31 21:59:19 +0200
message:
  Fixed Bug: did not wait for DOM to be ready
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm	2011-03-18 14:20:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm	2011-03-31 19:59:19 +0000
@@ -1,8 +1,14 @@
 <script type="text/javascript" src="javascript/viewDataEntryForm.js"></script>
 <script type="text/javascript">
-    var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "dataentryform_confirm_delete" ) , "'" )';
-	var i18n_save_success = '$encoder.jsEscape( $i18n.getString( "save_success" ) , "'" )';
-	var i18n_dataelement_is_inserted = '$encoder.jsEscape( $i18n.getString( "dataelement_is_inserted" ) , "'" )';
+	jQuery(document).ready(function() {
+		if('$autoSave' == 'true'){
+			if (!timer_is_on)
+			  {
+				  timer_is_on=1;
+				  timedCount();
+			  }
+		}
+	});
 
     var stat = ('$!dataEntryForm') ? "EDIT" : "ADD";
     var dataEntryFormId = -1;
@@ -13,15 +19,11 @@
 
     #if($!dataEntryForm)
         dataEntryFormId = $dataEntryForm.id;
-    #end    
-  
-	if('$autoSave' == 'true'){
-		if (!timer_is_on)
-		  {
-			  timer_is_on=1;
-			  timedCount();
-		  }
-	}
+    #end
+
+    var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "dataentryform_confirm_delete" ) , "'" )';
+	var i18n_save_success = '$encoder.jsEscape( $i18n.getString( "save_success" ) , "'" )';
+	var i18n_dataelement_is_inserted = '$encoder.jsEscape( $i18n.getString( "dataelement_is_inserted" ) , "'" )';
 </script>
 
 <style type="text/css">