← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7888: Small changes in SMS reminder.

 

------------------------------------------------------------
revno: 7888
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-08-09 21:21:01 +0700
message:
  Small changes in SMS reminder.
renamed:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms.gif => dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms.png
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/smsReminder.js
  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/smsReminderList.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/images/sms.png


--
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-08-09 08:57:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-08-09 14:21:01 +0000
@@ -390,6 +390,7 @@
 add_and_continue = Add and continue
 sms = SMS
 sms_reminder = SMS Reminder
+sms_reminder_list = SMS reminder list
 patient_did_not_register_a_phone_number = The patient did not register a phone number
 sms_message_management = SMS message management
 date = Date

=== renamed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms.gif' => 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms.png'
Binary files dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms.gif	2012-08-09 10:47:22 +0000 and dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/images/sms.png	2012-08-09 14:21:01 +0000 differ
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2012-08-09 10:57:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2012-08-09 14:21:01 +0000
@@ -56,11 +56,19 @@
 	});
 }
 
-function getOutboundSmsList( programStageInstanceId ) 
+function getOutboundSmsList( programStageInstanceId, isSendSMS ) 
 {
 	$('#smsManagementDiv' ).load("getOutboundSmsList.action",
 		{
 			programStageInstanceId: programStageInstanceId
+		}
+		, function(){
+			if(isSendSMS){
+				$('#tabs').tabs({ selected: 0 }); 
+			}
+			else{
+				$('#tabs').tabs({ selected: 1 });
+			}
 		}).dialog(
 		{
 			title:i18n_sms_message_management,
@@ -69,7 +77,7 @@
 			modal:false,
 			overlay:{background:'#000000', opacity:0.1},
 			width:800,
-			height:400
+			height:500
 		});
 }
 

=== 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 10:47:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.vm	2012-08-09 14:21:01 +0000
@@ -41,7 +41,7 @@
 							<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 );'></td>
+										<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);
@@ -49,7 +49,7 @@
 									</tr>
 									<tr>
 										<td>
-											<img src='images/sms.gif' style="width:24px" />
+											<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>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderList.vm	2012-08-09 10:57:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsReminderList.vm	2012-08-09 14:21:01 +0000
@@ -9,7 +9,7 @@
 
 <h4>$i18n.getString( "sms_message_management" )</h4>
 
-<table class="mainPageTable"> 
+<table> 
 	<tr>            
 		<td class="bold">$i18n.getString( "full_name" ):</td>
 		<td>$encoder.htmlEncode( $programStageInstance.programInstance.patient.getFullName() )<td>
@@ -26,40 +26,16 @@
 
 <div id="tabs">
 	<ul>
-		<li><a href="#tab-1">$i18n.getString("data_entry_screen")</a></li>
-		<li><a href="#tab-2">$i18n.getString("identifier_and_attribute")</a></li>
+		<li><a href="#tab-1">$i18n.getString("send_sms")</a></li>
+		<li><a href="#tab-2">$i18n.getString("sms_reminder_list")</a></li>
 	</ul>
-	
 	<div id="tab-1">
-		<table class="mainPageTable">
-			<tr>
-				<th>$i18n.getString( "date" )</th>
-				<th>$i18n.getString( "message" )</th>
-			</tr>
-			<tbody id='smsManagementList'>	
-				  #set( $mark = false )
-				  #foreach( $sms in $outboundSms )
-					<tr id="tr${sms.id}" #alternate($mark) >
-						<td>$format.formatDate($!sms.date)</td>
-						<td>$sms.message</td>
-					</tr>
-					#set( $mark = !$mark)
-				#end
-			</tbody>
-		</table>
-	</div>
-	
-	<div id="tab-2">
 		#if ( $!gatewayMap && $!gatewayMap.size() > 0 )
 		<form id="sendSMSForm" name="sendSMSForm" action="sendSMS.action">
-			<table id="detailsList">
-				<col width="300px"/>
-				<col width="80px"/>
+			<table>
 				<tbody>
 					<tr>
-						<th>$i18n.getString( "gateway_type" )</th>
-					</tr>
-					<tr>
+						<td>$i18n.getString( "gateway_type" )</td>
 						<td>
 							#set( $keys = $!gatewayMap.keySet() )
 							<select id="gatewayId" name="gatewayId">
@@ -70,10 +46,13 @@
 						</td>
 					</tr>
 					
-					<tr><th>$i18n.getString( "message" )</th></tr>
-					<tr><td><textarea id="smsMessage" name="smsMessage" class="{validate:{required:true}}"></textarea></td></tr>
+					<tr>
+						<td>$i18n.getString( "message" )</td>
+						<td><textarea id="smsMessage" name="smsMessage" style="width:260px;height:100px;" class="{validate:{required:true}}"></textarea></td>
+					</tr>
 				
 					<tr>
+						<td></td>
 						<td><input type="submit" name="send" value="$i18n.getString( 'send_sms' )"/></td>
 					</tr>
 					
@@ -86,11 +65,33 @@
 				datePickerValid( 'currentDate', true );
 			</script>
 		</div>
-	</div>
 	#else
 	<p>No Sms service available</p>
 	#end
 	</div>
+	
+	<div id="tab-2">
+		<table class="mainPageTable">
+			<col width="160px"/>
+			<col/>
+			<tr>
+				<th>$i18n.getString( "date" )</th>
+				<th>$i18n.getString( "message" )</th>
+			</tr>
+			<tbody id='smsManagementList'>	
+				  #set( $mark = false )
+				  #foreach( $sms in $outboundSms )
+					<tr id="tr${sms.id}" #alternate($mark) >
+						<td>$format.formatDate($!sms.date)</td>
+						<td>$sms.message</td>
+					</tr>
+					#set( $mark = !$mark)
+				#end
+			</tbody>
+		</table>
+	</div>
+	
+	
 </div>
 
 <script type="text/javascript">

=== 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-08-09 08:57:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2012-08-09 14:21:01 +0000
@@ -212,12 +212,10 @@
 	height: 32px;
 }
 
-
 table.stage-object
 {
 	white-space: normal;
-	border: 2px solid; 
-	cursor: pointer;
+	border: 2px solid;
 	opacity: 1.0;
 	border: 1px solid;
 	margin: 5px;