← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11599: Small change ui of lost-to-follow-up form.

 

------------------------------------------------------------
revno: 11599
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-08-07 13:24:22 +0700
message:
  Small change ui of lost-to-follow-up form.
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/programTrackingList.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-08-06 04:04:59 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-08-07 06:24:22 +0000
@@ -1822,7 +1822,6 @@
 
 function sendSmsOnePatient( field, programStageInstanceId )
 {
-	setInnerHTML('smsError', '');
 	if(field.value==""){
 		field.style.backgroundColor = ERROR_COLOR;
 		jQuery('#' + field.id).attr("placeholder", i18n_this_field_is_required);
@@ -1838,8 +1837,6 @@
 		}, function ( json )
 		{
 			if ( json.response == "success" ) {
-				jQuery('#smsError').css("color", "green");
-				setInnerHTML('smsError', json.message);
 				var date = new Date();
 				var currentTime = date.getHours() + ":" + date.getMinutes();
 				jQuery('[name=commentTB]').prepend("<tr><td>" + getFieldValue('currentDate') + " " + currentTime + "</td>"
@@ -1847,7 +1844,6 @@
 					+ "<td>" + getFieldValue('currentUsername') + "</td>"
 					+ "<td>" + i18n_message + "</td>"
 					+ "<td>" + field.value + "</td></tr>");
-				field.value="";
 				field.style.backgroundColor = SUCCESS_COLOR;
 				
 				jQuery('#enrollmentDate').width('325');
@@ -1856,8 +1852,6 @@
 			}
 			else {
 				showSuccessMessage( json.message );
-				jQuery('#smsError').css("color", "red");
-				setInnerHTML('smsError', json.message);
 				field.style.backgroundColor = ERROR_COLOR;
 			}
 			

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm	2013-08-07 05:39:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm	2013-08-07 06:24:22 +0000
@@ -9,185 +9,180 @@
 <input type='hidden' id='ps_$programStageInstance.id' name='ps_$programStageInstance.id' programStageName='$programStageInstance.programStage.displayName' >
 
 #set($programInstance = $programStageInstance.programInstance)
-<div class='dashboard-area'>
+
 	#set($status = $programStageInstance.getEventStatus())
 	#if( $auth.hasAccess( "dhis-web-caseentry", "accessPatientAttributes" ) )
-	<div class="link-area" style="height:220px">
-		<p class='header'>$i18n.getString("demographics")</p>
-		<div class="contentProviderTable" style="height:220px">
-			<table>
-				<tr> 
-					#set($patient=$programStageInstance.programInstance.patient)
-					#set($title="")
-					#set($value="")
-					#foreach( $identifier in $patient.identifiers)
-						#if($!identifier.identifierType)
-							#set($value=$identifier.identifier)
-							#set($title=$identifier.identifierType.displayName)
-						#else
-							#set($systemId=$identifier.identifier)
-						#end
-					#end
-					#if($value=="")
-						#set($value=$!patient.getFullName())
-						#set($title= $encoder.htmlEncode($i18n.getString( "full_name" )))
-					#end
-					#if($value=="")
-						#set($value=$systemId)
-						#set($title=$encoder.htmlEncode($i18n.getString( "system_identifier" )))
-					#end
-					<td class="bold">$title</td>
-					<td>$value</td>
-				</tr>
-				<tr>
-					<td class="bold">$i18n.getString("gender")</td>
-					<td>#if($patient.gender=='F')
-							<img src='images/female_small.png'>
-						#else
-							<img src='images/male_small.png'>
-						#end
-					</td>
-				</tr>
-				<tr>
-					<td class="bold">$i18n.getString( "date_of_birth" ):</td>
-					<td>$format.formatDate( $programStageInstance.programInstance.patient.birthDate ) ( $programStageInstance.programInstance.patient.getAge() )</td>
-				</tr>
-				<tr>
-					<td class="bold">$i18n.getString("phone_number")</td>
-					<td>
-						#if($!programStageInstance.programInstance.patient.phoneNumber && $!programStageInstance.programInstance.patient.phoneNumber!='')
-							$!programStageInstance.programInstance.patient.phoneNumber
-						#else
-							[$i18n.getString('none')]
-						#end
-					</td>
-				</tr>
-				<tr>
-					<td class="bold">$i18n.getString("health_worker")</td>
-					<td>
-						#if($!programStageInstance.programInstance.patient.healthWorker )
-							$encoder.htmlEncode($!programStageInstance.programInstance.patient.healthWorker.name)
-						#else
-							[$i18n.getString('none')]
-						#end
-					</td>
-				</tr>
-			</table>
-		</div>
-	</div>
+		<table>
+			<tr> 
+				#set($patient=$programStageInstance.programInstance.patient)
+				#set($title="")
+				#set($value="")
+				#foreach( $identifier in $patient.identifiers)
+					#if($!identifier.identifierType)
+						#set($value=$identifier.identifier)
+						#set($title=$identifier.identifierType.displayName)
+					#else
+						#set($systemId=$identifier.identifier)
+					#end
+				#end
+				#if($value=="")
+					#set($value=$!patient.getFullName())
+					#set($title= $encoder.htmlEncode($i18n.getString( "full_name" )))
+				#end
+				#if($value=="")
+					#set($value=$systemId)
+					#set($title=$encoder.htmlEncode($i18n.getString( "system_identifier" )))
+				#end
+				<td>$title:</td>
+				<td>$value</td>
+			</tr>
+			<tr>
+				<td>$i18n.getString("gender"):</td>
+				<td>#if($patient.gender=='F')
+						<img src='images/female_small.png'>
+					#else
+						<img src='images/male_small.png'>
+					#end
+				</td>
+			</tr>
+			<tr>
+				<td>$i18n.getString( "date_of_birth" ):</td>
+				<td>$format.formatDate( $programStageInstance.programInstance.patient.birthDate ) ( $programStageInstance.programInstance.patient.getAge() )</td>
+			</tr>
+			<tr>
+				<td>$i18n.getString("phone_number"):</td>
+				<td>
+					#if($!programStageInstance.programInstance.patient.phoneNumber && $!programStageInstance.programInstance.patient.phoneNumber!='')
+						$!programStageInstance.programInstance.patient.phoneNumber
+					#else
+						[$i18n.getString('none')]
+					#end
+				</td>
+			</tr>
+			<tr>
+				<td>$i18n.getString("health_worker"):</td>
+				<td>
+					#if($!programStageInstance.programInstance.patient.healthWorker )
+						$encoder.htmlEncode($!programStageInstance.programInstance.patient.healthWorker.name)
+					#else
+						[$i18n.getString('none')]
+					#end
+				</td>
+			</tr>
+		</table>
 	#end
-		
-	<div class="link-area-tracking" style="height:220px">
-		<p class='header'>
-			$i18n.getString("reschedule_and_set_status")
-			#if( $auth.hasAccess( "dhis-web-caseentry", "removeCurrentEncounter" ) || ( $status==1 ) )
-				&#8226; <a href="javascript:removeEvent($programStageInstance.id, true)" title='$i18n.getString( "remove_this_event" )'> $i18n.getString('remove_this_event') </a>
-			#end
-			</p>
-		<div class="contentProviderTable" style="height:220px">
-			<table id='progarmStageListDiv' name='progarmStageListDiv' >
-				<tr>
-					<td>$i18n.getString( "due_date" )</td>        
-					#set( $duedateId = "value_" + $programStageInstance.id + "_date" )        
-					<td>        
-						<input type="text" id="$duedateId" value="$!format.formatDate( $programStageInstance.dueDate )" onchange="saveDueDate( $programStageInstance.programInstance.id, $programStageInstance.id, '$encoder.jsEncode( $programStageInstance.programStage.displayName )' )" />
-						<input type="hidden" name="enrollmentDate" id="enrollmentDate" value="$!format.formatDate( $programInstance.enrollmentDate )">
-						<input type="hidden" name="dateOfIncident" id="dateOfIncident" value="$!format.formatDate( $programInstance.dateOfIncident )">
-						<script type="text/javascript">
-							#if($status==1 || $status==2 || $status==5 )
-								disable('$duedateId');
-							#else
-								datePicker( '$duedateId' );
-							#end
-						</script> 
-					</td> 
-				</tr>
-				<tr>
-					<td>$i18n.getString( "status" )</td>
-					<td>
-						<select id="stat_$programStageInstance.id" name="status_$programStageInstance.id" onchange="setEventStatus(this, $programStageInstance.id)">
-							#if($status==4)
-								<option value='4'>$i18n.getString("overdue")</option>
-								<option value='5'>$i18n.getString("skipped")</option>
-							#elseif($status==3)
-								<option value='3'>$i18n.getString("scheduled_in_future")</option>
-								<option value='5'>$i18n.getString("skipped")</option>
-							#elseif($status==5)
-								<option value='4'>$i18n.getString("overdue")</option>
-								<option value='3'>$i18n.getString("scheduled_in_future")</option>
-								<option value='5'>$i18n.getString("skipped")</option>
-							#else
-								<option value='1'>$i18n.getString("completed")</option>
-								<option value='2'>$i18n.getString("incompleted")</option>
-							#end
-						</select>
-						<script>
-							setFieldValue("stat_$programStageInstance.id", $status);
-						</script>
-					</td>
-				</tr>
-				<tr>
-					<td>$i18n.getString( "post_comment" )</td>
-					<td>
-						<input type='text' id='commentText' name='commentText' onkeypress="keypressOnComment(event,this,'$programStageInstance.id');">
-						<input type='button' value="+" class='tiny-button' title='$i18n.getString("post_comment")' onclick="addComment( byId('commentText'),'$programStageInstance.id');">
-					</td>
-				</tr>
-				<tr>
-					<td colspan='2' class='bold'>$i18n.getString( "send_message" )</td>
-				</tr>	
-				<tr>
-					<td>$i18n.getString( "recipients" )</td>
-					<td>
-						#set($patient=$!programInstance.patient)
-						
-						<select id='sendTo' name='sendTo' style='width:260px;'>
-						#if($!patient.phoneNumber)
-						<option value='1'>$i18n.getString('patient')</option>
-						#end
-						
-						#if($!patient.healthWorker.phoneNumber)
-						<option value='2'>$i18n.getString('health_worker')</option>
-						#end
-						
-						#if($!patient.healthWorker.organisationUnit.phoneNumber)
-						<option value='3'>$i18n.getString('orgunit_registered')</option>
-						#end
-						
-						#set($hasUsers = false)
-						#foreach($user in $!patient.healthWorker.organisationUnit.users)
-							#if($!user.phoneNumber!='') 
-								#set($hasUsers = true)
-							#end
-						#end
-						#if($hasUsers)
-						<option value='4'>$i18n.getString('users_in_orgunit_registered')</option>
-						#end
-					</select>
-					</td>
-				</tr>
-				<tr>
-					<td>$i18n.getString( "message" )</td>
-					<td>
-						<input type="text" id="smsMessage" name="smsMessage" class="{validate:{required:true,maxlength:160}}" onkeypress="keypressOnMessage(event, this,'$programStageInstance.id');"></input>
-						<input type="button" value="&raquo;" class='tiny-button' onclick="sendSmsOnePatient( byId('smsMessage'),'$programStageInstance.id' );"/>
-					</td>
-				</tr>
-				<tr>
-					<td></td>
-					<td id="smsError" style="color:red;"></td>
-				</tr>
-			</table>
-		</div>
-	</div>
 </div>			
 
 <div id='tabs-tracking'>
 	<ul>
+		<li><a href="#tab-3">$i18n.getString("reschedule_and_set_status")</a></li>
 		<li><a href="#tab-1">$i18n.getString("comments_and_sms_message")</a></li>
 		<li><a href="#tab-2">$i18n.getString("program_report")</a></li>
 	</ul>
 	
+	<div id='tab-3'>
+		<table id='progarmStageListDiv' name='progarmStageListDiv' >
+			<tr>
+				<td>$i18n.getString( "due_date" )</td>        
+				#set( $duedateId = "value_" + $programStageInstance.id + "_date" )        
+				<td>        
+					<input type="text" id="$duedateId" value="$!format.formatDate( $programStageInstance.dueDate )" onchange="saveDueDate( $programStageInstance.programInstance.id, $programStageInstance.id, '$encoder.jsEncode( $programStageInstance.programStage.displayName )' )" />
+					<input type="hidden" name="enrollmentDate" id="enrollmentDate" value="$!format.formatDate( $programInstance.enrollmentDate )">
+					<input type="hidden" name="dateOfIncident" id="dateOfIncident" value="$!format.formatDate( $programInstance.dateOfIncident )">
+					<script type="text/javascript">
+						#if($status==1 || $status==2 || $status==5 )
+							disable('$duedateId');
+						#else
+							datePicker( '$duedateId' );
+						#end
+					</script> 
+				</td> 
+			</tr>
+			<tr>
+				<td>$i18n.getString( "status" )</td>
+				<td>
+					<select id="stat_$programStageInstance.id" name="status_$programStageInstance.id" onchange="setEventStatus(this, $programStageInstance.id)">
+						#if($status==4)
+							<option value='4'>$i18n.getString("overdue")</option>
+							<option value='5'>$i18n.getString("skipped")</option>
+						#elseif($status==3)
+							<option value='3'>$i18n.getString("scheduled_in_future")</option>
+							<option value='5'>$i18n.getString("skipped")</option>
+						#elseif($status==5)
+							<option value='4'>$i18n.getString("overdue")</option>
+							<option value='3'>$i18n.getString("scheduled_in_future")</option>
+							<option value='5'>$i18n.getString("skipped")</option>
+						#else
+							<option value='1'>$i18n.getString("completed")</option>
+							<option value='2'>$i18n.getString("incompleted")</option>
+						#end
+					</select>
+					<script>
+						setFieldValue("stat_$programStageInstance.id", $status);
+					</script>
+				</td>
+			</tr>
+			<tr>
+				<td>$i18n.getString( "post_comment" )</td>
+				<td>
+					<input type='text' id='commentText' name='commentText' onkeypress="keypressOnComment(event,this,'$programStageInstance.id');" >
+					<input type='button' value="+" class='tiny-button' title='$i18n.getString("post_comment")' onclick="addComment( byId('commentText'),'$programStageInstance.id');" >
+				</td>
+			</tr>
+			
+			<tr>
+				<td colspan='3'><hr/></td>
+			</tr>
+			
+			<tr>
+				<td colspan='2' class='bold'></td>
+			</tr>	
+			<tr>
+				<td>$i18n.getString( "recipients" )</td>
+				<td>
+					#set($patient=$!programInstance.patient)
+					
+					<select id='sendTo' name='sendTo' style='width:260px;'>
+					#if($!patient.phoneNumber)
+					<option value='1'>$i18n.getString('patient')</option>
+					#end
+					
+					#if($!patient.healthWorker.phoneNumber)
+					<option value='2'>$i18n.getString('health_worker')</option>
+					#end
+					
+					#if($!patient.healthWorker.organisationUnit.phoneNumber)
+					<option value='3'>$i18n.getString('orgunit_registered')</option>
+					#end
+					
+					#set($hasUsers = false)
+					#foreach($user in $!patient.healthWorker.organisationUnit.users)
+						#if($!user.phoneNumber!='') 
+							#set($hasUsers = true)
+						#end
+					#end
+					#if($hasUsers)
+					<option value='4'>$i18n.getString('users_in_orgunit_registered')</option>
+					#end
+				</select>
+				</td>
+			</tr>
+			<tr>
+				<td>$i18n.getString( "message" )</td>
+				<td>
+					<input type="text" id="smsMessage" name="smsMessage" class="{validate:{required:true,maxlength:160}}" onkeypress="keypressOnMessage(event, this,'$programStageInstance.id');" style='height:50px;'></input>
+				</td>
+				<td id="smsError" style="color:red;"></td>
+			</tr>
+			<tr>
+				<td></td>
+				<td>
+					<input type="button" value="$i18n.getString('send_message')" onclick="sendSmsOnePatient( byId('smsMessage'),'$programStageInstance.id' );"/>
+				</td>
+			</tr>
+		</table>
+	</div>
+	
 	<div id='tab-1'>
 		<table class="mainPageTable" id='messageList'>
 			<colgroup>