← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8550: Add progam information into completed programs tab if to click on Complete program button.

 

------------------------------------------------------------
revno: 8550
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-10-17 14:23:27 +0700
message:
  Add progam information into completed programs tab if to click on Complete program button.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
  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/patient.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm
  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/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/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-10-17 03:44:58 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-10-17 07:23:27 +0000
@@ -426,7 +426,6 @@
 show_hide_more = Show/Hide more ...
 reschedule_and_set_status = Reschedule and set status
 tracking_history = Tracking history
-reschedule_due_date = Re-schedule due date
 status = Status
 skipped = Skipped
 unknown = Unknown

=== 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-10-17 05:06:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-10-17 07:23:27 +0000
@@ -885,9 +885,7 @@
 					jQuery('#arrow_' + programStageInstanceId).remove();
 					jQuery('#org_' + programStageInstanceId).remove();
 					resetActiveEvent( programInstanceId );
-					reloadOneRecord( programInstanceId );
 					showSuccessMessage( i18n_delete_success );
-					resize();
     	    	}
     	    	else if ( json.response == "error" )
     	    	{ 
@@ -1239,12 +1237,12 @@
 							+ " <td id='td_" + programInstanceId + "'>"
 							+ " <a href='javascript:loadActiveProgramStageRecords(" + programInstanceId + "," + programStageInstanceId + ")'>"
 							+ "<span id='infor_" + programInstanceId + "' class='selected bold'>" 
-							+ programName + "(" + enrollmentDate + ")</span></a></td>"
+							+ programName + " (" + enrollmentDate + ")</span></a></td>"
 							+ "</tr>";
 			
 			activedRow += "<tr id='tr2_" + programInstanceId +"'"+
 						+ " onclick='javascript:loadActiveProgramStageRecords(" + programInstanceId + "," + programStageInstanceId + ")' style='cursor:pointer;'>"
-						+ "<td colspan='2'><a>&#8226; " + programStageName + "(" + dueDate + ")</a></td></tr>";
+						+ "<td colspan='2'><a>&#8226; " + programStageName + " (" + dueDate + ")</a></td></tr>";
 
 			jQuery('#activeTB' ).prepend(activedRow);
 			jQuery('#enrollmentDiv').dialog("close");
@@ -1342,10 +1340,18 @@
 		data: "programInstanceId=" + programInstanceId,
 		success: function( json ) 
 		{
-			jQuery('#completedList' ).append('<option value="' +  programInstanceId + '">' + getInnerHTML('infor_' + programInstanceId ) + '</option>');
-			hideById('tr1_' + programInstanceId );
-			hideById('tr2_' + programInstanceId );
-			setInnerHTML('programEnrollmentDiv','');
+			var completed  = "<tr onclick='javascript:loadActiveProgramStageRecords(" + programInstanceId + ");' >";
+				completed += "<td><a><span id='infor_" + programInstanceId + "'>" + jQuery('#tr1_' + programInstanceId + " span" ).html() + "</span></a></td></tr>";
+			jQuery('#completedTB' ).prepend( completed );
+			jQuery('#tr1_' + programInstanceId ).remove();
+			jQuery('#tr2_' + programInstanceId ).remove();
+			
+			jQuery("[id=tab-2] :input").prop('disabled', true);
+			jQuery("[id=tab-3] :input").prop('disabled', true);
+			jQuery("[id=tab-4] :input").prop('disabled', true);
+			jQuery("[id=tab-5] :input").prop('disabled', true);
+			jQuery("[id=tab-3] :input").datepicker("destroy");
+			
 			showSuccessMessage( i18n_unenrol_success );
 		}
     });

=== 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-11 04:30:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-10-17 07:23:27 +0000
@@ -243,9 +243,3 @@
 			$(window).scrollTop(200);
 		} );
 }
-
-// ----------------------------------------------------------------
-// Cosmetic UI
-// ----------------------------------------------------------------
-
-function reloadOneRecord(){}

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2012-10-17 03:44:58 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2012-10-17 07:23:27 +0000
@@ -91,7 +91,7 @@
 			&#8226; <a href='javascript:showProgramEnrollmentForm( "$patient.id" )'>$i18n.getString("enroll")</a>
 		</p>
 		<div class="contentProviderTable">
-			<table width="100%" id='activeTB' name='activeTB'>
+			<table id='activeTB' name='activeTB'>
 				#foreach( $programInstance in $activeProgramInstances )
 					#set($programStageInstanceId = '')
 					#if($programInstance.program.type==2)
@@ -157,7 +157,7 @@
 			&#8226; <a href='javascript:showProgramEnrollmentForm( "$patient.id" )'>$i18n.getString("enroll")</a>
 		</p>
 		<div class="contentProviderTable">
-			<table width="100%" id='completedTB' name='completedTB'>
+			<table id='completedTB' name='completedTB'>
 				#foreach($programInstance in $completedProgramInstances)
 					#set($programStageInstanceId = '')
 					#if($programInstance.program.type==2)
@@ -165,10 +165,9 @@
 							#set($programStageInstanceId = $programStageInstance.id)
 						#end
 					#end
-					<tr id='tr1_$programInstance.id' type='$programInstance.program.type'
-						onclick='javascript:loadActiveProgramStageRecords($programInstance.id);' >
+					<tr onclick='javascript:loadActiveProgramStageRecords($programInstance.id);' >
 						<td>
-							<a>$programInstance.program.name ($format.formatDate($programInstance.enrollmentDate))</a>
+							<a><span id='infor_$programInstance.id'>$programInstance.program.name ($format.formatDate($programInstance.enrollmentDate))</span></a>
 						</td>
 					</tr>
 				#end
@@ -183,7 +182,7 @@
 			&#8226; <a href="javascript:showAddRelationshipPatient( '$patient.id', false );">$i18n.getString("add_new_patient")</a>
 		</p>
 		<div class="contentProviderTable">
-			<table width="100%">
+			<table>
 				#foreach( $rel in $relationship )
 					#if($rel.patientA.id==$patient.id)
 						<tr onclick="showPatientDashboardForm($rel.patientB.id)" title='$i18n.getString( "move_to_dashboard_of" ) $rel.patientB.getFullName()'>

=== 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	2012-10-17 03:44:58 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2012-10-17 07:23:27 +0000
@@ -242,17 +242,22 @@
 
 .contentProviderTable
 {
-  height: 100px;
-  width: 100%;
+  height: 140px;
   overflow-y: auto;
   overflow-x:hidden;
 }
 
+.contentProviderTable table
+{
+	width:100%;
+}
+
 .contentProviderTable td
 {
   padding-top:3px;
   padding-bottom:3px;
   border-bottom:1px solid #cad5e5;
+  cursor:pointer;
 }
 
 div.event-dashboard
@@ -395,9 +400,7 @@
 
 div.orgunit-object
 {
-	border-bottom: 5px double #D0D0D0;
-    height: 15px;
-    margin-left: 5px;
+	margin-left: 5px;
     width: 120px;
 }
 

=== 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	2012-10-17 05:06:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm	2012-10-17 07:23:27 +0000
@@ -18,14 +18,14 @@
 		</tr>
 	</table>
 </fieldset>
-
+<br>
 #set($programStageInstances = $programInstance.programStageInstances)
 #if( $programStageInstances.size() > 0 )
 	<table class='mainPageTable listTable' id='progarmStageListDiv' name='progarmStageListDiv' >
 		<colgroup>
 			<col width="10px">
 			<col width="200px">
-			<col width="200px">
+			<col width="150px">
 			<col width="100px">
 			<col>
 			<col width="60px">  
@@ -34,7 +34,7 @@
 		<tr>
 			<th>$i18n.getString( "nr" )</th>
 			<th>$i18n.getString( "program_stage" )</th>                   
-			<th>$i18n.getString( "reschedule_due_date" )</th>       
+			<th>$i18n.getString( "due_date" )</th>       
 			<th>$i18n.getString( "status" )</th>
 			<th colspan='2'>$i18n.getString( "message" )</th>
 			#if( $auth.hasAccess( "dhis-web-caseentry", "removeCurrentEncounter" ) )
@@ -87,7 +87,7 @@
 				</script>
 			</td>
 			<td>
-				<input type='text' id='message_$programStageInstance.id' name='message_$programStageInstance.id' class="{validate:{required:true,maxlength:160}}">
+				<input type='text' id='message_$programStageInstance.id' name='message_$programStageInstance.id' class="{validate:{required:true,maxlength:160}}" style="width:100%">
 			</td>
 			<td>
 				<input type='button' value="+" class='tiny-button' title='$i18n.getString("post_comment")' onclick="addComment(byId('message_$programStageInstance.id'),'$programStageInstance.id')">