← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9038: Don't update next-visit when to click Complete button in data entry form.

 

------------------------------------------------------------
revno: 9038
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-11-15 11:25:25 +0700
message:
  Don't update next-visit when to click Complete button in data entry form.
modified:
  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/entry.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/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-11-09 14:20:40 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-11-15 04:25:25 +0000
@@ -580,7 +580,7 @@
 				if( dueDate < dueDateInStage && !flag)
 				{	
 					jQuery('<td>'
-						+ '<div class="orgunit-object" id="org_' + programStageInstanceId + '"></div>'
+						+ '<div class="orgunit-object" id="org_' + programStageInstanceId + '">&nbsp;</div>'
 						+ '<input name="programStageBtn" '
 						+ 'pi="' + programInstanceId + '" ' 
 						+ 'id="' + elementId + '" ' 
@@ -600,9 +600,9 @@
 			
 			if( !flag )
 			{
-				jQuery("#programStageIdTR_" + programInstanceId).append('<td><img src="images/rightarrow.png"></td>'
+				jQuery("#programStageIdTR_" + programInstanceId).append('<td id="arrow_' + programStageInstanceId + '"><img src="images/rightarrow.png"></td>'
 					+ '<td>'
-					+ '<div class="orgunit-object" id="org_' + programStageInstanceId + '"></div>'
+					+ '<div class="orgunit-object" id="org_' + programStageInstanceId + '">&nbsp;</div>'
 					+ '<input name="programStageBtn" '
 					+ 'id="' + elementId + '" ' 
 					+ 'psid="' + programStageId + '" '

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2012-11-14 12:52:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2012-11-15 04:25:25 +0000
@@ -518,6 +518,10 @@
 						jQuery('#completedList' ).append('<option value="' +  programInstanceId + '">' + getInnerHTML('infor_' + programInstanceId ) + '</option>');
 					}
 					
+					var eventBox = jQuery('#ps_' + getFieldValue('programStageInstanceId'));
+					eventBox.attr('status',1);
+					resetActiveEvent( eventBox.attr("pi") );
+			
 					hideLoader();
 					hideById('contentDiv');
 					
@@ -542,6 +546,9 @@
 				jQuery(".stage-object-selected").css('border-color', COLOR_LIGHTRED);
 				jQuery(".stage-object-selected").css('background-color', COLOR_LIGHT_LIGHTRED);
 				disableCompletedButton(false);
+				var eventBox = jQuery('#ps_' + getFieldValue('programStageInstanceId'));
+				eventBox.attr('status',2);
+				resetActiveEvent( eventBox.attr("pi") );
 			});
 	}