← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11959: Small change UI of Re-schedule and set-status in Person Dashboard.

 

------------------------------------------------------------
revno: 11959
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2013-09-07 19:32:55 +0700
message:
  Small change UI of Re-schedule and set-status in Person Dashboard.
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/commons.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/visitSchedule.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/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	2013-09-06 15:53:07 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2013-09-07 12:32:55 +0000
@@ -627,8 +627,8 @@
 mark_risk = Mark risk
 save_comment = Save comment
 program_enrollment = Program enrollment
-stored_by = Stored by
-stored_date = Stored date
+updated_by = Updated by
+updated_date = Updated date
 marked = Marked
 user_name = User name
 program_stage_completeness = Program Stage Completeness
@@ -678,4 +678,6 @@
 show_data = Show data
 name_in_use = Name is in use
 incomplete_confirm_message = Are you sure this event is incompleted?
-non_value = No value
\ No newline at end of file
+non_value = No value
+update_comment = Update comment
+update_success = Update successfully
\ No newline at end of file

=== 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-09-06 09:06:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2013-09-07 12:32:55 +0000
@@ -2239,7 +2239,15 @@
 		}, 
 		function( json ) 
 		{   
-			 $( '#comment' ).css( 'background-color', SUCCESS_COLOR );
+			$( '#comment' ).css( 'background-color', SUCCESS_COLOR );
+			if(getFieldValue('comment')!=''){
+				setFieldValue('updateCommentBtn',i18n_update_comment);
+				showSuccessMessage(i18n_update_success);
+			}
+			else{
+				setFieldValue('updateCommentBtn',i18n_save_comment);
+				showSuccessMessage(i18n_save_success);
+			}
 		});
 }
 

=== 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-09-06 09:06:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientDashboard.vm	2013-09-07 12:32:55 +0000
@@ -319,4 +319,9 @@
 	var i18n_this_field_is_required = '$encoder.jsEscape( $i18n.getString( "this_field_is_required" ) , "'" )';
 	var i18n_comment = '$encoder.jsEscape( $i18n.getString( "comment" ) , "'")';
 	var i18n_message = '$encoder.jsEscape( $i18n.getString( "message" ) , "'")';
+	var i18n_save_success = '$encoder.jsEscape( $i18n.getString( "save_success" ) , "'")';
+	var i18n_update_comment = '$encoder.jsEscape( $i18n.getString( "update_comment" ) , "'")';
+	var i18n_save_comment = '$encoder.jsEscape( $i18n.getString( "save_comment" ) , "'")';
+	var i18n_update_success = '$encoder.jsEscape( $i18n.getString( "update_success" ) , "'")';
+	var i18n_save_success = '$encoder.jsEscape( $i18n.getString( "save_success" ) , "'")';
 </script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm	2013-08-05 07:30:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/visitSchedule.vm	2013-09-07 12:32:55 +0000
@@ -23,9 +23,11 @@
             <div class="commentHeader">$encoder.htmlEncode( $i18n.getString( "program_enrollment" ) )</div>
         </td>
 		<!-- Comment -->
-		<td style="height:24px" valign="bottom" colspan='3'>
+		<td style="height:24px" valign="bottom" >
             <div class="commentHeader">$i18n.getString( "comment" )</div>
 		</td>
+		<td colspan='2' style="background-color: #e0e0e0; height:26px;">$i18n.getString( "updated_by" ): $!encoder.htmlEncode( $programInstance.patientComment.creator )</td>
+		<td colspan='2' style="background-color: #e0e0e0; height:26px;">$i18n.getString( "updated_date" ): $!format.formatDate( $programInstance.patientComment.createdDate )</td>
     </tr>
    
    <tr>
@@ -71,7 +73,7 @@
 			#foreach( $programStageInstance in $programStageInstances )
 				#if( $!programStageInstance.executionDate 
 					|| $!programStageInstance.outboundSms.size() > 0 
-					|| $!programStageInstance.patientComments.size() > 0 )
+					|| $!programStageInstance.patientComment )
 					
 					#set($allowRemove = 'false')
 				#end
@@ -87,12 +89,8 @@
 		</td>
 		
 		<td valign="top">
-			<input type="button" value="$i18n.getString( 'save_comment' )" style="width:130px" onclick="saveComment($programInstance.id);">
+			<input type="button" id='updateCommentBtn' name='updateCommentBtn' #if($!programStageInstance.patientComment) value="$i18n.getString( 'update_comment' )" #else value="$i18n.getString( 'save_comment' )" #end style="width:130px" onclick="saveComment($programInstance.id);">
 		</td>
-		<td style="background-color: #e0e0e0; height:26px;">$i18n.getString( "stored_by" ):</td>
-		<td>$!encoder.htmlEncode( $programInstance.patientComment.creator )</td>
-		<td style="background-color: #e0e0e0; height:26px;">$i18n.getString( "stored_date" ):</td>
-		<td>$!format.formatDate( $programInstance.patientComment.createdDate )</td>
 	</tr>
 
 </table>