← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7971: Don't load default data entry.

 

------------------------------------------------------------
revno: 7971
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-08-28 14:59:20 +0700
message:
  Don't load default data entry.
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/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/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2012-08-28 05:48:46 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm	2012-08-28 07:59:20 +0000
@@ -32,7 +32,7 @@
 <div id='entryForm' #if($!programStageInstance.executionDate) class='visible' #else class='hidden' #end>					
 	#if( $customDataEntryFormCode )
 		#parse( "/dhis-web-caseentry/customDataEntryForm.vm" )
-	#elseif( $sections )
+	#elseif( $sections.size() > 0 )
 		#parse( "/dhis-web-caseentry/sectionDataEntryForm.vm" )
 	#else
 		#parse( "/dhis-web-caseentry/defaultDataEntryForm.vm" )

=== 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-08-22 04:49:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js	2012-08-28 07:59:20 +0000
@@ -567,9 +567,9 @@
 
 					disableCompletedButton(true);
 					var irregular = jQuery('#entryFormContainer [name=irregular]').val();
+					var programInstanceId = jQuery('#entryFormContainer [id=programInstanceId]').val();
 					if( irregular == 'true' )
 					{
-						var programInstanceId = jQuery('#entryFormContainer [id=programInstanceId]').val();
 						var programStageId = jQuery(".stage-object-selected").css('psid');
 						showCreateNewEvent( programInstanceId, programStageId );
 					}
@@ -586,6 +586,13 @@
 					hideLoader();
 					hideById('contentDiv');
 					
+					var completedRow = jQuery('#td_' + programInstanceId).html();
+					jQuery('#completedTB' ).prepend("<tr><td>" + completedRow + "</td></tr>");
+					hideById('tr1_' + programInstanceId );
+					hideById('tr2_' + programInstanceId );
+					hideById('programEnrollmentDiv');	
+					jQuery('#img_' + programInstanceId).attr('src','');					
+					
 					if( isCreateEvent )
 					{
 						showAddEventForm();