← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9950: Fix bug - Don't save due-date in program tracking.

 

------------------------------------------------------------
revno: 9950
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-03-02 22:09:06 +0700
message:
  Fix bug - Don't save due-date in program tracking.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.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/javascript/commons.js
  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/programEnrollmentForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportDataEntryForm.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css


--
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/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm	2013-03-02 06:07:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm	2013-03-02 15:09:06 +0000
@@ -1,5 +1,5 @@
 CACHE MANIFEST
-# 2.11-SNAPSHOT V23
+# 2.11-SNAPSHOT V25
 NETWORK:
 *
 CACHE:

=== 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	2013-03-02 06:07:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2013-03-02 15:09:06 +0000
@@ -32,7 +32,7 @@
 
 <div id='entryForm' #if($!programStageInstance.executionDate) class='visible' #else class='hidden' #end>					
 	#if($programStageInstance.programStage.captureCoordinates=='true')
-		<table style="width:740px;margin-top:-9px" class="listTable">
+		<table style="width:600px;margin-top:-9px" class="listTable">
 			<tr>
 				<th class='coordinates1'><label for="longitude">$i18n.getString( "longitude" )</label></th>
 				<th class='coordinates2'><input type="text" class='criteria' id="longitude" name="longitude" value="$!{longitude}" class="{validate:{number:true,min:-180,max:180}}" placeholder='$i18n.getString("enter_a_number")' ></th>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-03-02 06:07:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-03-02 15:09:06 +0000
@@ -674,8 +674,14 @@
 
 function saveDueDate( programInstanceId, programStageInstanceId, programStageInstanceName )
 {
-	var field = document.getElementById( 'value_' + programStageInstanceId + '_date' );
+	var field = byId( 'value_' + programStageInstanceId + '_date' );
 	var dateOfIncident = new Date( byId('dateOfIncident').value );
+	
+	if(field.value==''){
+		field.style.backgroundColor = '#FFCC00';
+		alert( i18n_insert_a_due_date );
+		return;
+	}	
 	var dueDate = new Date(field.value);
 	
 	if( dueDate < dateOfIncident )
@@ -693,10 +699,6 @@
 
 function DateDueSaver( programStageInstanceId_, dueDate_, resultColor_ )
 {
-	if(dueDate_='')
-	{
-		alert(i18n_insert_a_due_date);
-	}
 	var programStageInstanceId = programStageInstanceId_;	
 	var dueDate = dueDate_;
 	var resultColor = resultColor_;	

=== 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	2013-03-01 09:15:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm	2013-03-02 15:09:06 +0000
@@ -46,6 +46,7 @@
     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" ) , "'")';
+	var i18n_scheduled_in_future = '$encoder.jsEscape( $i18n.getString( "scheduled_in_future" ) , "'")';
 	
 	var i18n_id = '$encoder.jsEscape( $i18n.getString( "id" ), "'")';
 	var i18n_full_name = '$encoder.jsEscape( $i18n.getString( "full_name" ), "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm	2013-03-02 06:07:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm	2013-03-02 15:09:06 +0000
@@ -30,7 +30,7 @@
 					<div id='programInstanceDiv'>
 						#parse( "/dhis-web-caseentry/programStageInstanceFlow.vm" )
 						<br>		
-						<table style="width:740px;" class="listTable">
+						<table style="width:600px;" class="listTable">
 							<tr id='executionDateTB' name="executionDateTB" class='hidden'>
 								<th class='coordinates1'><span id="reportDateDescriptionField">$i18n.getString( "report_date" )</span> <em title="$i18n.getString( "required" )" class="required">*</em> </th>
 								<th class='coordinates2'><input type="text" id="executionDate" name="executionDate" class='criteria' value="$!format.formatDate( $programStageInstance.executionDate )">

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm	2013-03-01 07:34:20 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm	2013-03-02 15:09:06 +0000
@@ -58,7 +58,7 @@
 					<td>$i18n.getString( "due_date" )</td>        
 					#set( $duedateId = "value_" + $programStageInstance.id + "_date" )        
 					<td>        
-						<input type="text" id="$duedateId" value="$!format.formatDate( $programStageInstance.dueDate )" onchange="saveDueDate( $programInstance.id, $programStageInstance.id, '$encoder.jsEncode( $programStageInstance.programStage.displayName )' )" />
+						<input type="text" id="$duedateId" value="$!format.formatDate( $programStageInstance.dueDate )" onchange="saveDueDate( $programStageInstance.programInstance.id, $programStageInstance.id, '$encoder.jsEncode( $programStageInstance.programStage.displayName )' )" />
 						<input type="hidden" name="enrollmentDate" id="enrollmentDate" value="$!format.formatDate( $programInstance.enrollmentDate )">
 						<input type="hidden" name="dateOfIncident" id="dateOfIncident" value="$!format.formatDate( $programInstance.dateOfIncident )">
 						<script type="text/javascript">

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm	2013-03-01 09:15:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm	2013-03-02 15:09:06 +0000
@@ -103,6 +103,7 @@
     var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")'; 
 	var i18n_date_invalid = '$encoder.jsEscape( $i18n.getString( "date_invalid" ) , "'")';
 	var i18n_date_less_incident = '$encoder.jsEscape( $i18n.getString( "date_less_incident" ) , "'")';
+	var i18n_scheduled_in_future = '$encoder.jsEscape( $i18n.getString( "scheduled_in_future" ) , "'")';
 	var i18n_enroll = '$encoder.jsEscape( $i18n.getString( "enroll" ) , "'")';
 	var i18n_update = '$encoder.jsEscape( $i18n.getString( "update" ) , "'")';
 	var i18n_oucode_must_have_9_digits = '$encoder.jsEscape( $i18n.getString( "oucode_must_be_valid" ) , "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportDataEntryForm.vm	2013-03-02 06:07:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportDataEntryForm.vm	2013-03-02 15:09:06 +0000
@@ -37,7 +37,7 @@
 	#end
 		
 	#if( $programStageInstance )
-	<table style="width:740px;" class="listTable">
+	<table style="width:600px;" class="listTable">
 		<tr>
 			<th class='coordinates1'><label for="executionDate">$programStageInstance.programStage.reportDateDescription <em title="$i18n.getString( "required" )" class="required">*</em> </label></th>
 			<th class='coordinates2'><input type="text" class='criteria' id="executionDate" name="executionDate" value="$!format.formatDate( $programStageInstance.executionDate )" onchange="saveExecutionDate( $programStageInstance.programInstance.program.id, $programStageInstance.id, byId('executionDate') )" > </th>
@@ -56,7 +56,7 @@
 
 <p></p>
 #parse( "dhis-web-commons/loader/loader.vm" )
-<form id='dataEntryFormDiv' name='dataEntryFormDiv' >
+<form id='dataEntryFormDiv' name='dataEntryFormDiv' #if($!programStageInstance.executionDate) #else class='hidden' #end >
 	#parse( "dhis-web-caseentry/dataEntryForm.vm" )
 </form>
 

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2013-03-01 09:15:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm	2013-03-02 15:09:06 +0000
@@ -38,6 +38,7 @@
     var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")'; 
 	var i18n_date_invalid = '$encoder.jsEscape( $i18n.getString( "date_invalid" ) , "'")';
 	var i18n_date_less_incident = '$encoder.jsEscape( $i18n.getString( "date_less_incident" ) , "'")';
+	var i18n_scheduled_in_future = '$encoder.jsEscape( $i18n.getString( "scheduled_in_future" ) , "'")';
 	var i18n_enroll = '$encoder.jsEscape( $i18n.getString( "enroll" ) , "'")';
 	var i18n_update = '$encoder.jsEscape( $i18n.getString( "update" ) , "'")';
 	var i18n_oucode_must_have_9_digits = '$encoder.jsEscape( $i18n.getString( "oucode_must_be_valid" ) , "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm	2013-03-01 09:15:24 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm	2013-03-02 15:09:06 +0000
@@ -68,6 +68,7 @@
 	var i18n_searching_patient_failed = '$encoder.jsEscape( $i18n.getString( "searching_patient_failed" ) , "'")'; 
 	var i18n_date_invalid = '$encoder.jsEscape( $i18n.getString( "date_invalid" ) , "'")';
 	var i18n_date_less_incident = '$encoder.jsEscape( $i18n.getString( "date_less_incident" ) , "'")';
+	var i18n_scheduled_in_future = '$encoder.jsEscape( $i18n.getString( "scheduled_in_future" ) , "'")';
 	var i18n_enroll = '$encoder.jsEscape( $i18n.getString( "enroll" ) , "'")';
 	var i18n_update = '$encoder.jsEscape( $i18n.getString( "update" ) , "'")';
 	var i18n_oucode_must_have_9_digits = '$encoder.jsEscape( $i18n.getString( "oucode_must_be_valid" ) , "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2013-03-02 05:09:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2013-03-02 15:09:06 +0000
@@ -521,9 +521,9 @@
 // -------------------------------------------------------------- */
 
 .coordinates1{
-    width: 120px;
+    width: 100px;
 }
 
 .coordinates2{
-    width: 180px;
+    width: 150px;
 }
\ No newline at end of file