← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9427: Don't show any person-comment and message in Comments and Messages tab in Dashboard.

 

------------------------------------------------------------
revno: 9427
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-01-03 16:50:56 +0700
message:
  Don't show any person-comment and message in Comments and Messages tab in Dashboard.
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/commons.js


--
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	2012-12-10 12:54:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/eventMessage.vm	2013-01-03 09:50:56 +0000
@@ -14,7 +14,7 @@
 			<th>$i18n.getString( "message" )</th>
 		</tr>
 	</thead>
-	<tbody id='commentTB'>
+	<tbody id='commentReportTB' name="commentTB">
 		#set( $mark = false )
 		#foreach($programStageInstance in $programStageInstances)
 			#foreach( $comment in $programStageInstance.patientComments )

=== 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-01-03 09:45:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-01-03 09:50:56 +0000
@@ -1653,10 +1653,7 @@
 				setInnerHTML('smsError', json.message);
 				var date = new Date();
 				var currentTime = date.getHours() + ":" + date.getMinutes();
-				jQuery('#commentEntryTB').prepend("<tr><td>" + getFieldValue('currentDate') + " " + currentTime + "</td>"
-					+ "<td>" + getFieldValue('currentUsername') + "</td>"
-					+ "<td>" + field.value + "</td></tr>");
-				jQuery('#commentTB').prepend("<tr><td>" + getFieldValue('currentDate') + " " + currentTime + "</td>"
+				jQuery('[name=commentTB]').prepend("<tr><td>" + getFieldValue('currentDate') + " " + currentTime + "</td>"
 					+ "<td>" + getFieldValue('programStageName') + "</td>"
 					+ "<td>" + getFieldValue('currentUsername') + "</td>"
 					+ "<td>" + field.value + "</td></tr>");
@@ -1742,8 +1739,8 @@
 
 function commentDivToggle(isHide)
 {
-	jQuery("#commentTB tr").removeClass("hidden");
-	jQuery("#commentTB tr").each( function(index, item){
+	jQuery("#commentReportTB tr").removeClass("hidden");
+	jQuery("#commentReportTB tr").each( function(index, item){
 		if(isHide && index > 4){
 			jQuery(item).addClass("hidden");
 		}
@@ -1753,7 +1750,7 @@
 		index++;
 	});
 	
-	if(jQuery("#commentTB tr").length <= 5 )
+	if(jQuery("#commentReportTB tr").length <= 5 )
 	{
 		hideById('showCommentBtn');
 		hideById('hideCommentBtn');