← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7901: Add scroll buttons for program-stage-events div for SMS reminder.

 

------------------------------------------------------------
revno: 7901
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-08-13 13:36:23 +0700
message:
  Add scroll buttons for program-stage-events div for SMS reminder.
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/programStageInstanceFlow.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.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-08-13 05:15:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-08-13 06:36:23 +0000
@@ -447,10 +447,10 @@
 // Move stage-flow
 // ----------------------------------------------------------------------------
 
-function moveLeft(){
-	jQuery("#programInstanceFlowDiv").animate({scrollLeft: "-=200"}, 'fast');
+function moveLeft( programInstanceFlowDiv ){
+	jQuery("#" + programInstanceFlowDiv).animate({scrollLeft: "-=200"}, 'fast');
 }
 
-function moveRight(){
-	jQuery("#programInstanceFlowDiv").animate({scrollLeft: "+=200"}, 'fast');
+function moveRight(programInstanceFlowDiv){
+	jQuery("#" + programInstanceFlowDiv).animate({scrollLeft: "+=200"}, 'fast');
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm	2012-08-13 05:15:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstanceFlow.vm	2012-08-13 06:36:23 +0000
@@ -1,10 +1,10 @@
 <table id='programStageIdTB' style="width:850px;height:125px;">
 	<tr>
 		<td>
-			<div class="arrow-left" onclick="moveLeft()">&nbsp;</div>
+			<div class="arrow-left" onclick="moveLeft('flow_$programInstance.id')">&nbsp;</div>
 		</td>
 		<td>
-			<div id='programInstanceFlowDiv' class="stage-flow">
+			<div id='flow_$programInstance.id' class="stage-flow">
 				<table class="stage-flow">											
 					<tr id='programStageIdTR'>
 						#foreach( $programStageInstance in $programStageInstances )
@@ -24,7 +24,7 @@
 			</div>
 		</td>
 		<td>
-			<div class="arrow-right" onclick="moveRight()">&nbsp;</div>
+			<div class="arrow-right" onclick="moveRight('flow_$programInstance.id')">&nbsp;</div>
 		</td>
 	</tr>					
 </table>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.vm	2012-08-09 14:21:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.vm	2012-08-13 06:36:23 +0000
@@ -34,28 +34,47 @@
 					</td>
 					#if($!programStageInstanceMap.get($programInstance))
 						#set($programStageInstances = $programStageInstanceMap.get($programInstance) )
-						#foreach( $programStageInstance in $programStageInstances )
-							<td>
-								<img src='images/rightarrow.png'>
-							</td>
-							<td>
-								<table class='stage-object'>
-									<tr>
-										<td><input type='button' id='ps_$programStageInstance.id' name='programStageBtn' class='stage-object' value='$programStageInstance.programStage.name $format.formatDate( $programStageInstance.dueDate )' onclick='javascript:getOutboundSmsList( $programStageInstance.id, false );'></td>
-										<script>	
-											var status = $statusMap.get( $programStageInstance.id ); 
-											setEventColorStatus( 'ps_' + $programStageInstance.id ,status);
-										</script>
-									</tr>
-									<tr>
-										<td>
-											<img src='images/sms.png' title="$i18n.getString('send_sms')" onclick="getOutboundSmsList( $programStageInstance.id, true );" style='cursor:pointer;'/>
-											<span id='noMessageDiv_$programStageInstance.id'>$programStageInstance.outboundSms.size()</span> $i18n.getString('messages')
-										</td>
-									</tr>
-								</table>
-							</td>
-						#end
+					<td>
+						<table class="stage-container">	
+							<tr>
+								<td>
+									<div class="arrow-left" onclick="moveLeft('flow_$programInstance.id')">&nbsp;</div>
+								</td>
+								<td class='stage-flow'>
+									<div id='flow_$programInstance.id' class='stage-flow'><table class="stage-flow">
+										<tr>
+										#foreach( $programStageInstance in $programStageInstances )
+											<td>
+												<img src='images/rightarrow.png'>
+											</td>
+											<td>
+												<table class='stage-object'>
+													<tr>
+														<td><input type='button' id='ps_$programStageInstance.id' name='programStageBtn' class='stage-object' value='$programStageInstance.programStage.name $format.formatDate( $programStageInstance.dueDate )' onclick='javascript:getOutboundSmsList( $programStageInstance.id, false );'></td>
+														<script>	
+															var status = $statusMap.get( $programStageInstance.id ); 
+															setEventColorStatus( 'ps_' + $programStageInstance.id ,status);
+														</script>
+													</tr>
+													<tr>
+														<td>
+															<img src='images/sms.png' title="$i18n.getString('send_sms')" onclick="getOutboundSmsList( $programStageInstance.id, true );" style='cursor:pointer;'/>
+															<span id='noMessageDiv_$programStageInstance.id'>$programStageInstance.outboundSms.size()</span> $i18n.getString('messages')
+														</td>
+													</tr>
+												</table>
+											</td>
+										#end
+										</tr>
+									</table></div>
+								</td>
+								
+								<td>
+									<div class="arrow-right" onclick="moveRight('flow_$programInstance.id')">&nbsp;</div>
+								</td>
+							</tr>
+						</table>
+					</td>
 					#end
 				</tr>
 			#if( $mark )
@@ -65,6 +84,7 @@
 			#end 
 		#end
 	</table>
+	
 	<div class="paging-container">
 		#parse( "/dhis-web-commons/paging/paging.vm" )
 	</div>