← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8629: Donnot save report-date and load data entry form in dashboard of program-tracking.

 

------------------------------------------------------------
revno: 8629
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-10-22 13:49:19 +0700
message:
  Donnot save report-date and load data entry form in dashboard of program-tracking.
modified:
  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/patient.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js


--
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/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2012-10-18 04:24:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2012-10-22 06:49:19 +0000
@@ -34,7 +34,7 @@
 	#end
 </div>
 
-<div id='inputCriteriaDiv' class="page inputCriteria hidden" style="width:490px;height:29px;">	
+<div id='inputCriteriaDiv' class="page inputCriteria #if($programStageInstance.executionDate) #else hidden #end " style="width:490px;height:29px;">	
 	<input type="button" class='button' id="completeBtn" value="$i18n.getString('complete')" onClick="doComplete()" disabled="disabled">
 	<input type="button" id="uncompleteBtn" value="$i18n.getString('incomplete')" onclick="doUnComplete()" disabled="disabled">
 	<input type="button" class='button' id="validationBtn" value="$i18n.getString('run_validation')" onClick="javascript: runValidation();" disabled="disabled">

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-10-18 04:24:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-10-22 06:49:19 +0000
@@ -197,7 +197,6 @@
 	setInnerHTML('dataEntryFormDiv', '');
 	showById('dataEntryFormDiv');
 	showById('executionDateTB');
-	showById('inputCriteriaDiv');
 	setFieldValue( 'dueDate', '' );
 	setFieldValue( 'executionDate', '' );
 	disable('validationBtn');
@@ -232,14 +231,12 @@
 				disable('validationBtn');
 			}
 			else if( executionDate != ''){
-				showById('inputCriteriaDiv');
 				if ( completed == 'false' )
 				{
 					disableCompletedButton(false);
 				}
 				else if( completed == 'true' )
 				{
-					showById('inputCriteriaDiv');
 					disableCompletedButton(true);
 				}
 			}

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2012-10-22 06:00:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2012-10-22 06:49:19 +0000
@@ -217,13 +217,17 @@
 	setInnerHTML('dataEntryFormDiv', '');
 	showById('dataEntryFormDiv');
 	showById('executionDateTB');
-	showById('inputCriteriaDiv');
 	setFieldValue( 'dueDate', '' );
 	setFieldValue( 'executionDate', '' );
 	disable('validationBtn');
 	disableCompletedButton(true);
 	disable('uncompleteBtn');
 	
+	$('#executionDate').unbind("change");
+	$('#executionDate').change(function() {
+		saveExecutionDate( getFieldValue('programId'), programStageInstanceId, byId('executionDate') );
+	});
+	
 	jQuery(".stage-object-selected").removeClass('stage-object-selected');
 	var selectedProgramStageInstance = jQuery( '#' + prefixId + programStageInstanceId );
 	selectedProgramStageInstance.addClass('stage-object-selected');