← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3071: js cleanup in dhis-web-caseentry

 

------------------------------------------------------------
revno: 3071
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-03-18 13:26:31 +0100
message:
  js cleanup in dhis-web-caseentry
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.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-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm	2011-01-05 01:13:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm	2011-03-18 12:26:31 +0000
@@ -1,6 +1,6 @@
-
-<script>
+<script type="text/javascript">
 	var isSubmit = true;
+
 	jQuery(document).ready(	function(){
 			validation( 'caseAggregationForm', function(form){
 				if(isSubmit) form.submit();
@@ -17,6 +17,8 @@
 				}
 			})
 	}); 
+
+	var i18n_please_select = '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'" )';
 </script>
 
 <h1> $i18n.getString( "case_aggregation_form" )</h1>
@@ -91,7 +93,3 @@
 		</tr>
 	</table>
 </form>
-
-<script>
-	var i18n_please_select = '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'" )';
-</script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2011-01-21 03:41:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2011-03-18 12:26:31 +0000
@@ -1,3 +1,20 @@
+<script type="text/javascript">  
+    var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
+	var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
+	var i18n_value_must_positive_number = '$encoder.jsEscape( $i18n.getString( "value_must_positive_number" ) , "'")';
+	var i18n_value_must_negative_number = '$encoder.jsEscape( $i18n.getString( "value_must_negative_number" ) , "'")';
+    var i18n_invalid_date =   '$encoder.jsEscape( $i18n.getString( "invalid_date" ) , "'")' + ".\n " 
+							+ '$encoder.jsEscape( $i18n.getString( "format_date" ) , "'")' + " '" 
+							+ dateFormat.replace('yy', 'yyyy') + " '" ; 
+    var i18n_saving_value_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';
+    var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
+    var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
+    var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
+    var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
+	var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
+	var i18n_date_less_incident_date = '$encoder.jsEscape( $i18n.getString( "date_less_incident_date" ) , "'")';
+</script>
+
 #parse( "/dhis-web-caseentry/dataRecordingSelect.vm" )
 
 <div id="dragDiv">
@@ -119,23 +136,3 @@
 </form>
 </div>
 </div>
-
-<script type="text/javascript">  
-  
-    var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
-	var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
-	var i18n_value_must_positive_number = '$encoder.jsEscape( $i18n.getString( "value_must_positive_number" ) , "'")';
-	var i18n_value_must_negative_number = '$encoder.jsEscape( $i18n.getString( "value_must_negative_number" ) , "'")';
-    var i18n_invalid_date =   '$encoder.jsEscape( $i18n.getString( "invalid_date" ) , "'")' + ".\n " 
-							+ '$encoder.jsEscape( $i18n.getString( "format_date" ) , "'")' + " '" 
-							+ dateFormat.replace('yy', 'yyyy') + " '" ; 
-    var i18n_saving_value_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';
-    var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
-    var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
-    var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
-    var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
-	var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
-	var i18n_date_less_incident_date = '$encoder.jsEscape( $i18n.getString( "date_less_incident_date" ) , "'")';
-
-</script>
-

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm	2011-03-01 08:15:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataentryRecords.vm	2011-03-18 12:26:31 +0000
@@ -1,3 +1,13 @@
+<script type="text/javascript">
+	var i18n_id = '$encoder.jsEscape( $i18n.getString( "id" ), "'")';
+	var i18n_full_name = '$encoder.jsEscape( $i18n.getString( "full_name" ), "'")';
+	var i18n_gender = '$encoder.jsEscape( $i18n.getString( "gender" ), "'")';
+	var i18n_dob_type = '$encoder.jsEscape( $i18n.getString( "dob_type" ), "'")';
+	var i18n_date_of_birth = '$encoder.jsEscape( $i18n.getString( "date_of_birth" ), "'")';
+	var i18n_blood_group = '$encoder.jsEscape( $i18n.getString( "blood_group" ), "'")';
+	var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
+</script>
+
 #parse( "/dhis-web-caseentry/multiDataEntrySelect.vm" )
 
 <table class="mainPageTable">
@@ -69,13 +79,3 @@
 	<p><label>$i18n.getString( "attributes" ):</label><br><span id="attributeField"></span></p>
 	<p><label>$i18n.getString( "enrolled_in_program" ):</label><br><span id="programField"></span></p>
 </div>
-
-<script>
-	var i18n_id = '$encoder.jsEscape( $i18n.getString( "id" ), "'")';
-	var i18n_full_name = '$encoder.jsEscape( $i18n.getString( "full_name" ), "'")';
-	var i18n_gender = '$encoder.jsEscape( $i18n.getString( "gender" ), "'")';
-	var i18n_dob_type = '$encoder.jsEscape( $i18n.getString( "dob_type" ), "'")';
-	var i18n_date_of_birth = '$encoder.jsEscape( $i18n.getString( "date_of_birth" ), "'")';
-	var i18n_blood_group = '$encoder.jsEscape( $i18n.getString( "blood_group" ), "'")';
-	var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
-</script>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm	2011-01-20 06:06:45 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm	2011-03-18 12:26:31 +0000
@@ -1,3 +1,13 @@
+<script type="text/javascript">
+	var i18n_id = '$encoder.jsEscape( $i18n.getString( "id" ), "'")';
+	var i18n_full_name = '$encoder.jsEscape( $i18n.getString( "full_name" ), "'")';
+	var i18n_gender = '$encoder.jsEscape( $i18n.getString( "gender" ), "'")';
+	var i18n_dob_type = '$encoder.jsEscape( $i18n.getString( "dob_type" ), "'")';
+	var i18n_date_of_birth = '$encoder.jsEscape( $i18n.getString( "date_of_birth" ), "'")';
+	var i18n_blood_group = '$encoder.jsEscape( $i18n.getString( "blood_group" ), "'")';
+	var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
+</script>
+
 #parse( "/dhis-web-caseentry/search.vm" )
 
 <table>
@@ -10,7 +20,6 @@
 </table>
  
 <table class="mainPageTable">
-  	
   <tr>
     <td style="vertical-align:top">    
       <table class="listTable">                   
@@ -97,13 +106,3 @@
 </table>
    
 <span id="message"></span>
-
-<script>
-	var i18n_id = '$encoder.jsEscape( $i18n.getString( "id" ), "'")';
-	var i18n_full_name = '$encoder.jsEscape( $i18n.getString( "full_name" ), "'")';
-	var i18n_gender = '$encoder.jsEscape( $i18n.getString( "gender" ), "'")';
-	var i18n_dob_type = '$encoder.jsEscape( $i18n.getString( "dob_type" ), "'")';
-	var i18n_date_of_birth = '$encoder.jsEscape( $i18n.getString( "date_of_birth" ), "'")';
-	var i18n_blood_group = '$encoder.jsEscape( $i18n.getString( "blood_group" ), "'")';
-	var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
-</script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm	2010-08-05 12:32:20 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm	2011-03-18 12:26:31 +0000
@@ -1,12 +1,30 @@
-<script>
-	
+<script type="text/javascript">
+	jQuery(document).ready(function() {
+		selection.setListenerFunction( organisationUnitSelected );
+	});
+
 	function organisationUnitSelected( orgUnits )
 	{
 		window.location.href = 'multipledataEntrySelect.action';
 	}
 
-	selection.setListenerFunction( organisationUnitSelected );
-	
+	function selectProgram()
+	{
+		var programLB = document.getElementById('programId');
+		var selPrgroamId = programLB.options[programLB.selectedIndex].value;
+		window.location.href='getDataRecords.action?programId='+selPrgroamId;
+	}
+	
+    function selectPatientAttribute()
+    {
+	    var programLB = document.getElementById('programId');
+        var selPrgroamId = programLB.options[programLB.selectedIndex].value;
+	
+        var patientAttributeLB = document.getElementById('patientAttributeId');
+        var patientAttributeId = patientAttributeLB.options[patientAttributeLB.selectedIndex].value;
+    
+	    window.location.href='getDataRecords.action?programId='+selPrgroamId+'&sortPatientAttributeId='+patientAttributeId;
+    }
 </script>
 
 <h3>$i18n.getString( "" )</h3>
@@ -45,25 +63,3 @@
 </form>
 
 <hr style="clear:both">
-
-<script>
-	
-	function selectProgram()
-	{
-		var programLB = document.getElementById('programId');
-		var selPrgroamId = programLB.options[programLB.selectedIndex].value;
-		window.location.href='getDataRecords.action?programId='+selPrgroamId;
-	}
-	
-    function selectPatientAttribute()
-    {
-	    var programLB = document.getElementById('programId');
-        var selPrgroamId = programLB.options[programLB.selectedIndex].value;
-	
-        var patientAttributeLB = document.getElementById('patientAttributeId');
-        var patientAttributeId = patientAttributeLB.options[patientAttributeLB.selectedIndex].value;
-    
-	    window.location.href='getDataRecords.action?programId='+selPrgroamId+'&sortPatientAttributeId='+patientAttributeId;
-    }
-	
-</script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm	2011-01-21 03:41:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageDataEntryForm.vm	2011-03-18 12:26:31 +0000
@@ -1,4 +1,18 @@
-<SCRIPT src="javascript/dataEntry.js" type="text/javascript"></SCRIPT>
+<script type="text/javascript" src="javascript/dataEntry.js"></script>
+<script type="text/javascript">    
+    var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
+	var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
+	var i18n_value_must_positive_number = '$encoder.jsEscape( $i18n.getString( "value_must_positive_number" ) , "'")';
+	var i18n_value_must_negative_number = '$encoder.jsEscape( $i18n.getString( "value_must_negative_number" ) , "'")';
+    var i18n_invalid_date = '$encoder.jsEscape( $i18n.getString( "invalid_date" ) , "'")'; 
+    var i18n_saving_value_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';
+    var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
+    var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
+    var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
+    var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
+    var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
+	var i18n_date_less_incident_date = '$encoder.jsEscape( $i18n.getString( "date_less_incident_date" ) , "'")';
+</script>
 
 <form id="selectRecordingForm" name="selectRecordingForm" method="post" action="selectDataRecording.action">
 
@@ -185,21 +199,3 @@
 </form>
 </div>
 </div>
-
-
-<script type="text/javascript">    
-    var i18n_value_must_integer = '$encoder.jsEscape( $i18n.getString( "value_must_integer" ) , "'")';
-	var i18n_value_must_number = '$encoder.jsEscape( $i18n.getString( "value_must_number" ) , "'")';
-	var i18n_value_must_positive_number = '$encoder.jsEscape( $i18n.getString( "value_must_positive_number" ) , "'")';
-	var i18n_value_must_negative_number = '$encoder.jsEscape( $i18n.getString( "value_must_negative_number" ) , "'")';
-    var i18n_invalid_date = '$encoder.jsEscape( $i18n.getString( "invalid_date" ) , "'")'; 
-    var i18n_saving_value_failed_status_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_status_code" ) , "'")';
-    var i18n_saving_value_failed_error_code = '$encoder.jsEscape( $i18n.getString( "saving_value_failed_error_code" ) , "'")';
-    var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")';
-    var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';
-    var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
-    var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
-	var i18n_date_less_incident_date = '$encoder.jsEscape( $i18n.getString( "date_less_incident_date" ) , "'")';
-
-</script>
-

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.vm	2010-08-25 05:51:43 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.vm	2011-03-18 12:26:31 +0000
@@ -1,3 +1,7 @@
+<script type="text/javascript">   
+    var i18n_report_generation_failed = '$encoder.jsEscape( $i18n.getString( "report_generation_failed" ), "'")';    
+</script>   
+
 <h3>$i18n.getString( "report_management" )</h3>
 
 <form id="reportForm" name="reportForm" method="post" action="reportSelect.action">
@@ -50,8 +54,3 @@
 <hr style="clear:both">
 
 <span id="message"></span>
-
-<script type="text/javascript">   
-    var i18n_report_generation_failed = '$encoder.jsEscape( $i18n.getString( "report_generation_failed" ), "'")';    
-</script>   
-