← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10234: Enable non-skip event box after to click Re-enroll button in Dashboard.

 

------------------------------------------------------------
revno: 10234
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-03-15 11:20:33 +0700
message:
  Enable non-skip event box after to click Re-enroll button in Dashboard.
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/visitSchedule.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/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-03-15 04:08:40 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-03-15 04:20:33 +0000
@@ -1469,6 +1469,9 @@
 				jQuery('#completedTB [id=tr1_' + programInstanceId + ']').remove();
 				jQuery('#completedTB [id=tr2_' + programInstanceId + ']').remove();
 				
+				jQuery("[id=tab-1] :input").prop('disabled', false);
+				// Disable skipped events
+				jQuery("[id=tab-1] [status=5]").prop('disabled', true);
 				jQuery("[id=tab-2] :input").prop('disabled', false);
 				jQuery("[id=tab-3] :input").prop('disabled', false);
 				jQuery("[id=tab-4] :input").prop('disabled', false);
@@ -1478,7 +1481,7 @@
 				jQuery("[id=tab-3] :input").datepicker("destroy");
 				
 				// enable remove event icons
-				$('[id=tab-3]').find('img').parent().each(function(){
+				jQuery('[id=tab-3]').find('img').parent().each(function(){
 					var e = jQuery(this);
 					e.attr( 'href',e.attr("link") );
 				});

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm	2013-03-15 04:08:40 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm	2013-03-15 04:20:33 +0000
@@ -24,7 +24,7 @@
 #if( $programStageInstances.size() > 0 )
 	<table class='mainPageTable listTable' id='progarmStageListDiv' name='progarmStageListDiv' >
 		<colgroup>
-			<col width="10px">
+			<col width="20px">
 			<col width="200px">
 			<col width="150px">
 			<col width="100px">
@@ -33,7 +33,7 @@
 			<col>  
 		</colgroup>
 		<tr>
-			<th>$i18n.getString( "nr" )</th>
+			<th>$i18n.getString( "#" )</th>
 			<th>$i18n.getString( "program_stage" )</th>                   
 			<th>$i18n.getString( "due_date" )</th>       
 			<th>$i18n.getString( "status" )</th>
@@ -103,5 +103,13 @@
 #end
 
 <script>
+	#if( $programInstance.completed=='false')
+		datePickerInRangeValid( 'dateOfIncident' , 'enrollmentDate' );
+		jQuery("#incompleteProgram").attr('disabled', true);
+	#else
+		jQuery(":input").attr('disabled', true);
+		jQuery("#incompleteProgram").attr('disabled', false);
+		$('[id=tab-3]').find('img').parent().removeAttr("href");
+	#end
 	var i18n_insert_a_due_date = '$encoder.jsEscape( $i18n.getString( "insert_a_due_date" ) , "'")';
 </script>
\ No newline at end of file