=== added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetProgramStageInstanceByIdAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetProgramStageInstanceByIdAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetProgramStageInstanceByIdAction.java 2013-08-07 08:46:28 +0000 @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2004-2013, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.hisp.dhis.caseentry.action.reminder; + +import org.hisp.dhis.program.ProgramStageInstance; +import org.hisp.dhis.program.ProgramStageInstanceService; + +import com.opensymphony.xwork2.Action; + +/** + * @author Chau Thu Tran + * + * @version $ GetProgramStageInstanceByIdAction.java Aug 7, 2013 3:10:01 PM $ + */ +public class GetProgramStageInstanceByIdAction + implements Action +{ + // ------------------------------------------------------------------------- + // Dependency + // ------------------------------------------------------------------------- + + private ProgramStageInstanceService programStageInstanceService; + + public void setProgramStageInstanceService( ProgramStageInstanceService programStageInstanceService ) + { + this.programStageInstanceService = programStageInstanceService; + } + + // ------------------------------------------------------------------------- + // Getter && Setter + // ------------------------------------------------------------------------- + + private Integer programStageInstanceId; + + public void setProgramStageInstanceId( Integer programStageInstanceId ) + { + this.programStageInstanceId = programStageInstanceId; + } + + private ProgramStageInstance programStageInstance; + + public ProgramStageInstance getProgramStageInstance() + { + return programStageInstance; + } + + // ------------------------------------------------------------------------- + // Action Implementation + // ------------------------------------------------------------------------- + + @Override + public String execute() + throws Exception + { + programStageInstance = programStageInstanceService.getProgramStageInstance( programStageInstanceId ); + + return SUCCESS; + } + +} === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-08-07 04:10:58 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-08-07 08:46:28 +0000 @@ -1168,6 +1168,12 @@ ref="org.hisp.dhis.sms.outbound.OutboundSmsService" /> + + + + /dhis-web-commons/ajax/jsonResponseError.vm F_PROGRAM_ENROLLMENT + + + /content.vm + /dhis-web-caseentry/trackingEventMessage.vm + style/style.css + === 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-08-07 06:24:22 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-08-07 08:46:28 +0000 @@ -1843,6 +1843,7 @@ + "" + getFieldValue('programStageName') + "" + "" + getFieldValue('currentUsername') + "" + "" + i18n_message + "" + + "" + field.value + ""+ + "" + field.value + ""); field.style.backgroundColor = SUCCESS_COLOR; @@ -1906,7 +1907,6 @@ content += "" + i18n_comment + ""; content += "" + commentText + ""; jQuery('#commentTB').prepend(content); - field.value=""; showSuccessMessage( i18n_comment_added ); field.style.backgroundColor = SUCCESS_COLOR; === 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-08-02 04:53:58 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2013-08-07 08:46:28 +0000 @@ -316,3 +316,10 @@ }); } +function getProgramStageInstanceById(programStageInstanceId) +{ + $('#tab-2').load("getProgramStageInstanceById.action", + { + programStageInstanceId:programStageInstanceId + }); +} === 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-08-07 06:24:22 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm 2013-08-07 08:46:28 +0000 @@ -75,12 +75,12 @@
-
+
@@ -183,56 +183,11 @@
$i18n.getString( "due_date" )
-
- - - - - - - - - - - - - - - - - #set( $mark = false ) - #foreach( $comment in $comments ) - - - - - - - - - #set( $mark = !$mark ) - #end - #foreach( $sms in $outboundSms ) - - - - - - - - - #set( $mark = !$mark ) - #end - -
$i18n.getString( "date" )$i18n.getString( "program_stage" )$i18n.getString( "sender" )$i18n.getString( "type" )$i18n.getString( "message" )$i18n.getString( "operation" )
$format.formatDateTime($comment.createdDate)$encoder.htmlEncode($programStageInstance.programStage.displayName)$encoder.htmlEncode($comment.creator)$i18n.getString('comment')$encoder.htmlEncode($comment.commentText) - $i18n.getString( 'remove' ) -
$format.formatDateTime($!sms.date)$encoder.htmlEncode($programStageInstance.programStage.displayName)$encoder.htmlEncode($sms.sender)$i18n.getString('message')$encoder.htmlEncode($sms.message) - $i18n.getString( 'remove' ) -
- -
-
+ #parse( "/dhis-web-caseentry/trackingEventMessage.vm" ) +
+ +

@@ -251,6 +206,9 @@ $( "#tabs-tracking" ).bind( "tabsselect", function(event, ui) { if( ui.tab.hash == '#tab-2' ){ + getProgramStageInstanceById($!programStageInstance.id); + } + else if( ui.tab.hash == '#tab-3' ){ programReports(getFieldValue('programInstanceId')); } }); === added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackingEventMessage.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackingEventMessage.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/trackingEventMessage.vm 2013-08-07 08:46:28 +0000 @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + #set( $mark = false ) + #foreach( $comment in $programStageInstance.patientComments ) + + + + + + + + + #set( $mark = !$mark ) + #end + #foreach( $sms in $programStageInstance.outboundSms ) + + + + + + + + + #set( $mark = !$mark ) + #end + +
$i18n.getString( "date" )$i18n.getString( "program_stage" )$i18n.getString( "sender" )$i18n.getString( "type" )$i18n.getString( "message" )$i18n.getString( "operation" )
$format.formatDateTime($comment.createdDate)$encoder.htmlEncode($programStageInstance.programStage.displayName)$encoder.htmlEncode($comment.creator)$i18n.getString('comment')$encoder.htmlEncode($comment.commentText) + $i18n.getString( 'remove' ) +
$format.formatDateTime($!sms.date)$encoder.htmlEncode($programStageInstance.programStage.displayName)$encoder.htmlEncode($sms.sender)$i18n.getString('message')$encoder.htmlEncode($sms.message) + $i18n.getString( 'remove' ) +
\ No newline at end of file