← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8227: Auto scroll to Dataentry form tab when clicking on a stage in Dashboard.

 

------------------------------------------------------------
revno: 8227
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-09-24 17:15:21 +0700
message:
  Auto scroll to Dataentry form tab when clicking on a stage 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/javascript/patient.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	2012-09-24 09:08:49 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-09-24 10:15:21 +0000
@@ -507,18 +507,6 @@
 }
 
 // ----------------------------------------------------------------------------
-// Move stage-flow
-// ----------------------------------------------------------------------------
-
-function moveLeft( programInstanceFlowDiv ){
-	jQuery("#" + programInstanceFlowDiv).animate({scrollLeft: "-=200"}, 'fast');
-}
-
-function moveRight(programInstanceFlowDiv){
-	jQuery("#" + programInstanceFlowDiv).animate({scrollLeft: "+=200"}, 'fast');
-}
-
-// ----------------------------------------------------------------------------
 // Create New Event
 // ----------------------------------------------------------------------------
 
@@ -784,6 +772,14 @@
 	});
 }
 
+function moveLeft( programInstanceFlowDiv ){
+	jQuery("#" + programInstanceFlowDiv).animate({scrollLeft: "-=200"}, 'fast');
+}
+
+function moveRight(programInstanceFlowDiv){
+	jQuery("#" + programInstanceFlowDiv).animate({scrollLeft: "+=200"}, 'fast');
+}
+
 function setEventStatus( field, programStageInstanceId )
 {	
 	var status = field.value;
@@ -910,7 +906,6 @@
     }
 }
 
-
 // -----------------------------------------------------------------------------
 // Show relationship with new patient
 // -----------------------------------------------------------------------------
@@ -1296,6 +1291,7 @@
 			}
 			jQuery('#loaderDiv').hide();
 			resize();
+			$(window).scrollTop(200);
 		});
 }
 

=== 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-09-24 05:50:08 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-09-24 10:15:21 +0000
@@ -232,8 +232,8 @@
 			}
 			resize();
 			hideLoader();
-			hideById('contentDiv'); 
-			jQuery('#dueDate').focus();
+			hideById('contentDiv');
+			$(window).scrollTop(200);
 		} );
 }
 

=== 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-09-24 06:41:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm	2012-09-24 10:15:21 +0000
@@ -3,12 +3,19 @@
 	<table>
 		<tr>
 			<td class='text-column'>$programInstance.program.dateOfEnrollmentDescription:</td>
-			<td><input name="enrollmentDate" id="enrollmentDate" readonly value="$!format.formatDate( $programInstance.enrollmentDate )"></td>
+			<td><input name="enrollmentDate" id="enrollmentDate" readonly value="$!format.formatDate( $programInstance.enrollmentDate )" style="width:256px;"></td>
 		</tr>
 		<tr>
 			<td class='text-column'>$programInstance.program.dateOfIncidentDescription:</td>
-			<td><input name="dateOfIncident" id="dateOfIncident" readonly value="$!format.formatDate( $programInstance.dateOfIncident )"></td>
-		</tr>				
+			<td><input name="dateOfIncident" id="dateOfIncident" readonly value="$!format.formatDate( $programInstance.dateOfIncident )" style="width:256px;"></td>
+		</tr>
+		<tr>
+			<td></td>
+			<td>
+				<input type="button" class='button' value="$i18n.getString( 'update' )" onclick='updateEnrollment($programInstance.patient.id, $programInstance.program.id, $programInstance.id, "$programInstance.program.name")'/>
+				<input type="button" class='button' value="$i18n.getString( 'unenroll' )" onclick='unenrollmentForm($programInstance.id)'/>
+			</td>
+		</tr>
 	</table>
 </fieldset>
 <br>