← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11068: Sorted message list in dashboard and tracking program by created-date

 

------------------------------------------------------------
revno: 11068
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-05-29 13:09:10 +0700
message:
  Sorted message list in dashboard and tracking program by created-date
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/eventMessage.vm
  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/patientDashboard.vm
  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/eventMessage.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/eventMessage.vm	2013-05-28 07:09:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/eventMessage.vm	2013-05-29 06:09:10 +0000
@@ -1,5 +1,5 @@
 #set($programStageInstances = $programInstance.programStageInstances)
-<table class="mainPageTable">
+<table class="mainPageTable listTable" id='messageList'>
 	<colgroup>
 		<col width="160px"/>
 		<col width="160px"/>
@@ -8,11 +8,11 @@
 	</colgroup>
 	<thead>
 		<tr>
-			<th>$i18n.getString( "date" )</th>
-			<th>$i18n.getString( "program_stage" )</th>
-			<th>$i18n.getString( "sender" )</th>
-			<th>$i18n.getString( "type" )</th>
-			<th>$i18n.getString( "message" )</th>
+			<th class="{sorter: false}">$i18n.getString( "date" )</th>
+			<th class="{sorter: false}">$i18n.getString( "program_stage" )</th>
+			<th class="{sorter: false}">$i18n.getString( "sender" )</th>
+			<th class="{sorter: false}">$i18n.getString( "type" )</th>
+			<th class="{sorter: false}">$i18n.getString( "message" )</th>
 		</tr>
 	</thead>
 	<tbody id='commentReportTB' name="messageTB">
@@ -22,8 +22,8 @@
 				<tr id="comment_$comment.id" #alternate( $mark )>
 					<td>$format.formatDateTime($comment.createdDate)</td>
 					<td>$programStageInstance.programStage.displayName</td>
+					<td>$comment.creator</td>
 					<td>$i18n.getString('comment')</td>
-					<td>$comment.creator</td>
 					<td>$comment.commentText</td>
 				</tr>
 				#set( $mark = !$mark )
@@ -48,4 +48,7 @@
 <input type='button' id="hideCommentBtn" name="hideCommentBtn" value='$i18n.getString("show_hide_more")' onclick='commentDivToggle(true);'>
 <script>
 	commentDivToggle(true);
+	tableSorter( 'messageList' );
+	var sorting = [[0,1]];
+	$("#messageList").trigger("sorton", [sorting]);
 </script>
\ No newline at end of file

=== 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	2013-05-29 04:50:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2013-05-29 06:09:10 +0000
@@ -132,6 +132,9 @@
 
 function programTrackingList( programStageInstanceId, isSendSMS ) 
 {
+	hideById('listEventDiv');
+	hideById('searchDiv');
+	showLoader();
 	setFieldValue('sendToList', "false");
 	$('#smsManagementDiv' ).load("programTrackingList.action",
 		{
@@ -143,6 +146,7 @@
 			hideById('searchDiv');
 			hideById('listEventDiv');
 			showById('smsManagementDiv');
+			hideLoader();
 		});
 }
 

=== 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	2013-05-29 05:24:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2013-05-29 06:09:10 +0000
@@ -1,11 +1,11 @@
-<div class='dashboard-area'>
 <table>
 	<tr>
-	<td colspan='3'>
-		<h3><a name="mainPagelink" href="javascript:onClickBackBtn();">$i18n.getString( 'patient_management' )</a>
-		&#8226; $i18n.getString( 'patient_dashboard' )</h3>
-	</td>
-	<td><span style="float:right;"><h4><a href="javascript:dashboardHistoryToggle();" >$i18n.getString( 'access_log' )</a></h4></span></td>
+		<td colspan='3'>
+			<h3><a name="mainPagelink" href="javascript:onClickBackBtn();">$i18n.getString( 'patient_management' )</a>
+			&#8226; $i18n.getString( 'patient_dashboard' )</h3>
+		</td>
+		<td><span style="float:right;"><h4><a href="javascript:dashboardHistoryToggle();" >$i18n.getString( 'access_log' )</a></h4></span></td>
+	</tr>
 <tr>
 #if( $auth.hasAccess( "dhis-web-caseentry", "accessPatientAttributes" ) )
 <td>

=== 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-05-28 07:09:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm	2013-05-29 06:09:10 +0000
@@ -127,7 +127,7 @@
 	</ul>
 	
 	<div id='tab-1'>
-		<table class="mainPageTable">
+		<table class="mainPageTable" id='messageList'>
 			<colgroup>
 				<col width="160px"/>
 				<col width="160px"/>
@@ -182,6 +182,9 @@
 		setFieldValue('programStageName', "$programStageInstance.programStage.displayName");
 		setFieldValue( "programStageInstanceId", "$!programStageInstance.id" );
 		$('#tabs').tabs();
+		tableSorter( 'messageList' );
+		var sorting = [[0,1]];
+		$("#messageList").trigger("sorton", [sorting]);
 	});