← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8045: Display created date-time for comments and messages after adding/sending.

 

------------------------------------------------------------
revno: 8045
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-09-12 14:31:21 +0700
message:
  Display created date-time  for comments and messages after adding/sending.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.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/javascript/smsReminder.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2012-09-12 04:14:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2012-09-12 07:31:21 +0000
@@ -153,7 +153,8 @@
 		{
 			if ( json.response == "success" ) {
 				showSuccessMessage( json.message );
-				jQuery('#commentTB').prepend("<tr><td>" + getFieldValue('currentDate') + "</td>"
+				var currentTime = date.getHours() + ":" + date.getMinutes();
+				jQuery('#commentTB').prepend("<tr><td>" + getFieldValue('currentDate') + " " + currentTime + "</td>"
 					+ "<td>" + getFieldValue('programStageName') + "</td>"
 					+ "<td>" + getFieldValue('currentUsername') + "</td>"
 					+ "<td>" + getFieldValue('smsMessage') + "</td></tr>");
@@ -185,7 +186,8 @@
 		success: function( json ){
 			if ( json.response == "success" ) {
 				var programStageName = getFieldValue('programStageName');
-				jQuery('#commentTB').prepend("<tr><td>" + getFieldValue("currentDate") + "</td>"
+				var currentTime = date.getHours() + ":" + date.getMinutes();
+				jQuery('#commentTB').prepend("<tr><td>" + getFieldValue("currentDate") + " " + currentTime + "</td>"
 						+ "<td>" + programStageName + "</td>"
 						+ "<td>" + getFieldValue( 'smsMessage' ) + "</td></tr>");
 				showSuccessMessage( json.message );
@@ -230,7 +232,9 @@
 			}, function ( json )
 			{
 				var programStageName = jQuery("#box_" + programStageInstanceId).attr('programStageName');
-				jQuery('#commentTB').prepend("<tr><td>" + getFieldValue("currentDate") + "</td>"
+				var date = new Date();
+				var currentTime = date.getHours() + ":" + date.getMinutes();
+				jQuery('#commentTB').prepend("<tr><td>" + getFieldValue("currentDate") + " " + currentTime + "</td>"
 						+ "<td>" + programStageName + "</td>"
 						+ "<td>" + getFieldValue('currentUsername') + "</td>"
 						+ "<td>" + commentText + "</td></tr>");