dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18969
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8090: Improve program tracking function; Remove Add person menu below Person header.
------------------------------------------------------------
revno: 8090
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-09-15 11:18:54 +0700
message:
Improve program tracking function; Remove Add person menu below Person header.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/SetEventStatusAction.java
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/struts.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm
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/index.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js
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/menu.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientProgramTracking.vm
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/programTrackingRecords.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/registrationMenu.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/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java 2012-09-11 07:31:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java 2012-09-15 04:18:54 +0000
@@ -94,19 +94,7 @@
{
return healthWorkers;
}
-
- private Boolean addNewForm;
-
- public Boolean getAddNewForm()
- {
- return addNewForm;
- }
-
- public void setAddNewForm( Boolean addNewForm )
- {
- this.addNewForm = addNewForm;
- }
-
+
private Collection<PatientAttribute> noGroupAttributes = new HashSet<PatientAttribute>();
public Collection<PatientAttribute> getNoGroupAttributes()
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/SetEventStatusAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/SetEventStatusAction.java 2012-09-07 07:57:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/SetEventStatusAction.java 2012-09-15 04:18:54 +0000
@@ -99,8 +99,6 @@
}
else if ( ProgramStageInstance.SKIPPED_STATUS == status.intValue() )
{
- programStageInstance.setExecutionDate( new Date() );
- programStageInstance.setCompleted( true );
programStageInstance.setStatus( status );
}
=== 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 2012-09-13 03:48:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-09-15 04:18:54 +0000
@@ -109,7 +109,6 @@
generate_patient_chart=Generate patient chart
patient_chart_management=Patient chart management
intro_find_and_add_person=Create, modify and search for persons. Any type of data can be registered for a person through attributes.
-intro_add_person=Add new person. Any type of data can be registered for a person through attributes.
registration=Registration
select_relationship=Select relationship
please_select_a_representative=Please select a representative
@@ -427,7 +426,6 @@
show_hide_content = Show/Hide content
completed_date = Completed date
find_and_add_person = Find/Add Person
-add_person = Add Person
identifiers_and_attributes = Identifiers/Attributes
at = at
on_date = on
@@ -451,4 +449,5 @@
one_day = 1 day
three_days = 3 days
one_week = 1 week
-one_month = 1 month
\ No newline at end of file
+one_month = 1 month
+remove_this_event = Remove this event
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-09-13 09:25:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-09-15 04:18:54 +0000
@@ -422,24 +422,6 @@
<param name="requiredAuthorities">F_PATIENT_MANAGEMENT</param>
</action>
- <action name="showAddPatientFormFormMenu"
- class="org.hisp.dhis.caseentry.action.patient.ShowAddPatientFormAction">
- <interceptor-ref name="organisationUnitTreeStack" />
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">/dhis-web-caseentry/addPatientForm.vm</param>
- <param name="menu">/dhis-web-caseentry/registrationMenu.vm</param>
- <param name="javascripts">
- ../dhis-web-commons/ouwt/ouwt.js
- ,javascript/commons.js
- ,javascript/patient.js
- ,javascript/entry.js
- ,javascript/relationshipPatient.js
- </param>
- <param name="stylesheets">style/style.css</param>
- <param name="requiredAuthorities">F_PATIENT_ADD</param>
- </action>
-
-
<action name="searchRegistrationPatient"
class="org.hisp.dhis.caseentry.action.patient.SearchPatientAction">
<result name="success" type="velocity">/content.vm</result>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm 2012-09-05 01:41:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm 2012-09-15 04:18:54 +0000
@@ -41,18 +41,13 @@
<form id="patientForm" name="patientForm" method="post" >
<input type="hidden" id="representativeId" name="representativeId"/>
<input type="hidden" id="relationshipTypeId" name="relationshipTypeId"/>
-<input type="hidden" id="addNewForm" name="addNewForm" value="$!addNewForm"/>
<table>
#parse( "/dhis-web-caseentry/patientForm.vm" )
<tr>
<td></td>
<td>
<input type="submit" class="button" value="$i18n.getString( 'add' )"/>
- #if( $addNewForm == "true")
- <input type="button" class="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='index.action'"/>
- #else
- <input type="button" class="button" value="$i18n.getString( 'back_to_registration' )" onclick="loadPatientList();"/>
- #end
+ <input type="button" class="button" value="$i18n.getString( 'back_to_registration' )" onclick="loadPatientList();"/>
</td>
</tr>
</table>
=== 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-09-12 05:44:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/eventMessage.vm 2012-09-15 04:18:54 +0000
@@ -11,7 +11,7 @@
<tbody id='commentTB'>
#set($index = 0)
- #set( $mark = false )
+ #set($count = 0)
#foreach($programStageInstance in $programStageInstances)
#foreach( $comment in $programStageInstance.patientComments )
#if( $index < 5 )
@@ -21,9 +21,9 @@
<td>$comment.creator</td>
<td>$comment.commentText</td>
#set($index = $index + 1)
- #set( $mark = !$mark)
</tr>
#end
+ #set($count = $count + 1)
#end
#end
#foreach($programStageInstance in $programStageInstances)
@@ -34,7 +34,6 @@
<td> $programStageInstance.programStage.name</td>
<td>$sms.sender</td>
<td>$sms.message</td>
- #set( $mark = !$mark)
</tr>
#end
#end
@@ -47,9 +46,9 @@
<td>$programStageInstance.programStage.name</td>
<td>$comment.creator</td>
<td>$comment.commentText</td>
- #set( $mark = !$mark)
</tr>
#end
+ #set($count = $count + 1)
#end
#end
@@ -61,15 +60,12 @@
<td>$programStageInstance.programStage.name</td>
<td>$sms.sender</td>
<td>$sms.message</td>
- #set( $mark = !$mark)
</tr>
#end
#end
#end
</tbody>
</table>
-
<br>
-#set($count = $programStageInstance.patientComments.size() + $programStageInstance.outboundSms.size() )
<input type='button' id="showCommentBtn" name="showCommentBtn" value='$i18n.getString("show_hide_more")' #if($count && $count<=5) class='hidden' #end onclick='commentDivToggle(false);'>
<input type='button' id="hideCommentBtn" name="hideCommentBtn" value='$i18n.getString("show_hide_more")' class='hidden' onclick='commentDivToggle(true);'>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/index.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/index.vm 2012-09-12 09:03:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/index.vm 2012-09-15 04:18:54 +0000
@@ -3,7 +3,6 @@
<ul class="introList">
#introListImgItem( "patient.action" "find_and_add_person" "patient" )
- #introListImgItem( "showAddPatientFormFormMenu.action?addNewForm=true" "add_person" "add_patient" )
#introListImgItem( "multipledataEntrySelect.action" "multiple_individual_records" "dataentry" )
#introListImgItem( "singleEventSelect.action" "single_event_with_registration" "dataentry" )
#introListImgItem( "anonymousRegistration.action" "anonymous_events" "dataentry" )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js 2012-09-13 13:49:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js 2012-09-15 04:18:54 +0000
@@ -134,7 +134,7 @@
var d = date.getDate();
var m = date.getMonth();
var y= date.getFullYear();
-
+
var startDateSince = "";
var endDateSince = "";
var startDateUpTo = "";
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2012-09-12 13:36:55 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2012-09-15 04:18:54 +0000
@@ -286,21 +286,9 @@
var systemIdentifierId = json.message.split('_')[1];
jQuery('#advSearchBox0 [id="searchText"]').val( systemIdentifierId );
statusSearching = 1;
- if( getFieldValue("addNewForm")=="true")
- {
- $("#patientForm :input").attr("disabled", false);
- $("#patientForm :input").each(function(){
- if( this.type!='button' || this.type!='submit' ){
- this.value = "";
- }
- });
- showSuccessMessage(i18n_add_person_successfully);
- }
- else
- {
- showPatientDashboardForm( patientId );
- jQuery('#resultSearchDiv').dialog('close');
- }
+
+ showPatientDashboardForm( patientId );
+ jQuery('#resultSearchDiv').dialog('close');
}
});
return false;
@@ -466,6 +454,7 @@
hideById('newEncounterBtn_' + programInstanceId);
}
jQuery('#loaderDiv').hide();
+ resize();
});
}
=== 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-13 13:49:39 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2012-09-15 04:18:54 +0000
@@ -37,8 +37,7 @@
var endDate = jQuery.datepicker.formatDate( dateFormat, new Date(y2, m, d) );
var programId = getFieldValue('programIdAddPatient');
- var searchTexts = "stat_" + programId + "_4_" + startDate + "_" + endDate
- + "_" + getFieldValue('orgunitId');
+ var searchTexts = "stat_" + programId + "_4_" + startDate + "_" + endDate;
showLoader();
jQuery('#listPatientDiv').load('getSMSPatientRecords.action',
@@ -269,7 +268,7 @@
jQuery("#tb_" + programInstanceId + " .stage-object").each( function(){
var programStageInstance = this.id.split('_')[1];
jQuery('#arrow_' + programStageInstance ).toggle();
- jQuery('#td_' + programStageInstance ).toggle();
+ jQuery('#box_' + programStageInstance ).toggle();
jQuery(this).removeClass("stage-object-selected");
});
@@ -277,7 +276,7 @@
{
var id = jQuery("#tb_" + programInstanceId + " .searched").attr('id').split('_')[1];
showById("arrow_" + id);
- showById("td_" + id );
+ showById("box_" + id );
}
resize();
}
@@ -315,7 +314,7 @@
} );
}
-function removeEvent( programStageId )
+function removeEvent( programStageInstanceId, isEvent )
{
var result = window.confirm( i18n_comfirm_delete_event );
@@ -324,13 +323,13 @@
$.postJSON(
"removeCurrentEncounter.action",
{
- "id": programStageId
+ "id": programStageInstanceId
},
function( json )
{
if ( json.response == "success" )
{
- jQuery( "tr#tr" + programStageId ).remove();
+ jQuery( "tr#tr" + programStageInstanceId ).remove();
jQuery( "table.listTable tbody tr" ).removeClass( "listRow listAlternateRow" );
jQuery( "table.listTable tbody tr:odd" ).addClass( "listAlternateRow" );
@@ -338,7 +337,15 @@
jQuery( "table.listTable tbody" ).trigger("update");
hideById('smsManagementDiv');
-
+ if(isEvent)
+ {
+ showById('searchDiv');
+ showById('listPatientDiv');
+ }
+ var programInstanceId = jQuery('#box_' + programStageInstanceId).attr('programInstanceId');
+ jQuery('#box_' + programStageInstanceId).remove();
+ jQuery('#arrow_' + programStageInstanceId).remove();
+ reloadOneRecord( programInstanceId );
showSuccessMessage( i18n_delete_success );
}
else if ( json.response == "error" )
@@ -382,3 +389,61 @@
hideById('smsManagementDiv');
hideById('patientProgramTrackingDiv');
}
+
+function reloadRecordList()
+{
+ var listAll = getFieldValue('listAll');
+ var startDate = getFieldValue('startDueDate');
+ var endDate = getFieldValue('endDueDate');
+ var status = getFieldValue('statusEvent');
+ if( listAll )
+ {
+ var date = new Date();
+ var d = date.getDate() - 1;
+ var m = date.getMonth();
+ var y1 = date.getFullYear() - 100;
+ var y2 = date.getFullYear();
+ startDate = jQuery.datepicker.formatDate( dateFormat, new Date(y1, m, d) );
+ endDate = jQuery.datepicker.formatDate( dateFormat, new Date(y2, m, d) );
+ status = 4;
+ }
+
+ jQuery("#patientList .stage-object").each( function(){
+ var id = this.id.split('_')[1];
+ var dueDate = jQuery(this).attr('dueDate');
+ var statusEvent = jQuery(this).attr('status');
+ var programInstanceId = jQuery(this).attr('programInstanceId');
+ if( dueDate >= startDate && dueDate <= endDate && statusEvent == status )
+ {
+ if( jQuery("#tb_" + programInstanceId + " .searched").length > 0 ){
+ jQuery("#box_" + id ).addClass("stage-object-selected searched");
+ hideById("box_" + id )
+ hideById('arrow_' + id );
+ }
+ jQuery("#box_" + id ).addClass("stage-object-selected searched");
+ }
+ else
+ {
+ hideById('arrow_' + id );
+ hideById('box_' + id );
+ }
+ });
+ jQuery(".arrow-left").hide();
+ jQuery(".arrow-right").hide();
+}
+
+function reloadOneRecord( programInstanceId )
+{
+ if(jQuery("#tb_" + programInstanceId + " .searched").length == 0 ){
+ var total = eval(getInnerHTML('totalTd')) - 1;
+ setInnerHTML('totalTd', total)
+ hideById("event_" + programInstanceId );
+ }
+ else
+ {
+ var firstSearched = jQuery("#tb_" + programInstanceId + " .searched:first");
+ firstSearched.show();
+ showById('arrow_' + firstSearched.attr(programStageInstanceId) );
+ }
+}
+
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/menu.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/menu.vm 2012-09-13 03:48:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/menu.vm 2012-09-15 04:18:54 +0000
@@ -2,7 +2,6 @@
<h2>$i18n.getString( "patient" ) </h2>
<ul>
<li><a href="patient.action">$i18n.getString( "find_and_add_person" )</a></li>
- <li><a href="showAddPatientFormFormMenu.action?addNewForm=true">$i18n.getString( "add_person" )</a></li>
</ul>
<h2>$i18n.getString( "data_entry" ) </h2>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientProgramTracking.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientProgramTracking.vm 2012-09-12 05:44:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientProgramTracking.vm 2012-09-15 04:18:54 +0000
@@ -103,7 +103,7 @@
<col width="10px">
<col width="200px">
<col width="180px">
- <col width="100px">
+ <col width="150px">
<col/>
<col width='60px'/>
<tr>
@@ -134,25 +134,31 @@
</script>
</td>
<td>
- <select id="stat_$programStageInstance.id" name="status_$programStageInstance.id" style='width:120px;' onchange="setEventStatus(this, $programStageInstance.id)">
- <option value='5'>$i18n.getString("unknown")</option>
- <option value='1'>$i18n.getString("completed")</option>
- <option value='2'>$i18n.getString("incompleted")</option>
- <option value='6'>$i18n.getString("skipped")</option>
+ #set($status = $statusMap.get( $programStageInstance.id ))
+ <select id="stat_$programStageInstance.id" name="status_$programStageInstance.id" style='width:150px;' onchange="setEventStatus(this, $programStageInstance.id)">
+ #if($status==4)
+ <option value='4' selected>$i18n.getString("overdue")</option>
+ <option value='6'>$i18n.getString("skipped")</option>
+ #elseif($status==3)
+ <option value='3' selected>$i18n.getString("scheduled_in_future")</option>
+ <option value='6'>$i18n.getString("skipped")</option>
+ #else
+ <option value='1'>$i18n.getString("completed")</option>
+ <option value='2'>$i18n.getString("incompleted")</option>
+ #end
</select>
<script>
- var status = $statusMap.get( $programStageInstance.id );
- setFieldValue("stat_$programStageInstance.id", status);
+ setFieldValue("stat_$programStageInstance.id", $status);
</script>
</td>
<td>
- <input type='text' id='commentText' name='commentText' style="width:380px;" onkeypress="keypress(event,this,'$programStageInstance.id')">
+ <input type='text' id='commentText' name='commentText' style="width:355px;" onkeypress="keypress(event,this,'$programStageInstance.id')">
<input type='button' value="+" class='tiny-button' title='$i18n.getString("post_comment")' onclick="addComment(this,'$programStageInstance.id')">
</td>
<td>
<a href="javascript:setFieldValue('sendToList', false);showSendSmsForm('$programStageInstance.programStage.name',$programStageInstance.id)" title='$i18n.getString( "send_sms" )'><img src="images/sms.png" alt='$i18n.getString( "send_sms" )'></a>
- #if($programStageInstance.programStage.irregular=='true')
- <a href="javascript:removeEvent($programStageInstance.id)" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
+ #if($programStageInstance.programStage.irregular=='true' && ($status==3 || $status==4))
+ <a href="javascript:removeEvent($programStageInstance.id, false)" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
#end
</td>
</tr>
=== 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 2012-09-12 04:24:09 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm 2012-09-15 04:18:54 +0000
@@ -51,8 +51,13 @@
</tr>
<tr>
<td>
- <br><input type='button' value='$i18n.getString("back")' onclick='onClickBackBtn();'>
+ <br>
+ <input type='button' value='$i18n.getString("back")' onclick='onClickBackBtn();'>
<input type='button' value='$i18n.getString("patient_dashboard")' onclick='javascript:showPatientProgramTracking( "$programStageInstance.programInstance.id" );'>
+ #set($status = $programStageInstance.getEventStatus())
+ #if( $programStageInstance.irregular!='true' && ($status==3 || $status==4) )
+ <input type="button" value="$i18n.getString('remove_this_event')" onclick="javascript:removeEvent($programStageInstance.id, true)" title='$i18n.getString( "remove_this_event" )'></a>
+ #end
</td>
</tr>
</table>
@@ -66,10 +71,6 @@
<div id="tab-1">
<table class='mainPageTable' id='progarmStageListDiv' name='progarmStageListDiv' >
- <tr>
- <th></th>
- <th>$i18n.getString( "operation" )</th>
- </tr>
<tr>
<td>$i18n.getString( "reschedule_due_date" )</td>
#set( $duedateId = "value_" + $programStageInstance.id + "_date" )
@@ -86,14 +87,19 @@
<td>$i18n.getString( "status" )</td>
<td>
<select id="stat_$programStageInstance.id" name="status_$programStageInstance.id" onchange="setEventStatus(this, $programStageInstance.id)">
- <option value='5'>$i18n.getString("unknown")</option>
- <option value='1'>$i18n.getString("completed")</option>
- <option value='2'>$i18n.getString("incompleted")</option>
- <option value='6'>$i18n.getString("skipped")</option>
+ #if($status==4)
+ <option value='4' selected>$i18n.getString("overdue")</option>
+ <option value='6'>$i18n.getString("skipped")</option>
+ #elseif($status==3)
+ <option value='3' selected>$i18n.getString("scheduled_in_future")</option>
+ <option value='6'>$i18n.getString("skipped")</option>
+ #else
+ <option value='1'>$i18n.getString("completed")</option>
+ <option value='2'>$i18n.getString("incompleted")</option>
+ #end
</select>
<script>
- var status = $programStageInstance.getEventStatus();
- setFieldValue("stat_$programStageInstance.id", status);
+ setFieldValue("stat_$programStageInstance.id", $status);
</script>
</td>
</tr>
@@ -104,14 +110,6 @@
<input type='button' value="+" class='tiny-button' title='$i18n.getString("post_comment")' onclick="addComment(this,'$programStageInstance.id')">
</td>
</tr>
-
- #if($programStageInstance.irregular!='true')
- <tr>
- <td>
- <input type="hidden" value="$i18n.getString('remove_this_event')" onclick="javascript:removeEvent($programStageInstance.id)" title='$i18n.getString( "remove_this_event" )'></a>
- </td>
- </tr>
- #end
</table>
</div>
@@ -177,7 +175,7 @@
</table>
<br>
#set($count = $comments.size() + $outboundSms.size() )
- <input type='button' id="showCommentBtn" name="showCommentBtn" value='$i18n.getString("show_hide_more")' #if($count<=5) class='hidden' #end onclick='commentDivToggle(false);'>
+ <input type='button' id="showCommentBtn" name="showCommentBtn" value='$i18n.getString("show_hide_more")' #if($count && $count<=5) class='hidden' #end onclick='commentDivToggle(false);'>
<input type='button' id="hideCommentBtn" name="hideCommentBtn" value='$i18n.getString("show_hide_more")' class='hidden' onclick='commentDivToggle(true);'>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm 2012-09-13 08:45:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm 2012-09-15 04:18:54 +0000
@@ -17,19 +17,19 @@
<td class='text-column'>$i18n.getString( "total_result" ):</td>
<td> </td>
<td> </td>
- <td>$!total</td>
+ <td id='totalTd'>$!total</td>
</tr>
</table>
#if( $patients && $patients.size()>0 )
<p>#parse( "/dhis-web-caseentry/colorHelp.vm" )</p>
- <table class="listTable" id="patientList">
+ <table id="patientList">
#set( $mark = false )
#foreach( $patient in $patients )
#set( $programInstance = '')
#set( $programInstance = $programInstanceMap.get( $patient ) )
- <tr #alternate( $mark )>
+ <tr #alternate( $mark ) id='event_$programInstance.id'>
<td>
#set( $value="")
#foreach( $identifierType in $programInstance.program.patientIdentifierTypes )
@@ -82,8 +82,10 @@
programStageInstanceId='$programStageInstance.id'
programStageName='$programStageInstance.programStage.name'
programStageId='$programStageInstance.programStage.id'
- status="$statusMap.get( $programStageInstance.id )"
- class='stage-object'
+ programInstanceId='$programInstance.id'
+ dueDate='$format.formatDate( $programStageInstance.dueDate )'
+ status='$statusMap.get( $programStageInstance.id )'
+ class='stage-object'
value='$programStageInstance.programStage.name $format.formatDate( $programStageInstance.dueDate )'
title="$title" onclick='javascript:getOutboundSmsList( $programStageInstance.id, false );'>
<script>
@@ -121,24 +123,7 @@
#end
<script>
- #if( $programStageInstanceIds && $programStageInstanceIds.size() > 0 )
- jQuery("#patientList .stage-object").each( function(){
- var programStageInstance = this.id.split('_')[1];
- hideById('arrow_' + programStageInstance );
- hideById('td_' + programStageInstance );
- });
-
- jQuery(".arrow-left").addClass("hidden");
- jQuery(".arrow-right").addClass("hidden");
- #foreach( $id in $programStageInstanceIds )
- showById('arrow_$id');
- showById('td_$id');
- jQuery("#box_$id").addClass("stage-object-selected searched");
- #end
- #end
-
- resize();
-
+ reloadRecordList();
$(window).bind('resize', function(e){
resize();
});
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm 2012-09-12 09:03:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm 2012-09-15 04:18:54 +0000
@@ -59,4 +59,14 @@
var i18n_update = '$encoder.jsEscape( $i18n.getString( "update" ) , "'")';
var i18n_comfirm_delete_event = '$encoder.jsEscape( $i18n.getString( "comfirm_delete_event" ) , "'")';
var i18n_please_select_criteria = '[' + '$encoder.jsEscape( $i18n.getString( "please_select_criteria" ) , "'")' + ']';
+
+ var date = new Date();
+ var d = date.getDate();
+ var m = date.getMonth();
+ var y= date.getFullYear();
+
+ var newDate = jQuery.datepicker.formatDate( dateFormat, new Date(y-100, m, d) ) ;
+ jQuery('#startDueDate').datepicker('setDate', newDate);
+ newDate = jQuery.datepicker.formatDate( dateFormat, new Date(y, m, d-1) ) ;
+ jQuery('#endDueDate').datepicker('setDate', newDate);
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/registrationMenu.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/registrationMenu.vm 2012-09-05 01:41:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/registrationMenu.vm 2012-09-15 04:18:54 +0000
@@ -3,7 +3,6 @@
<ul>
<li><a href="patient.action">$i18n.getString( "find_and_add_person" )</a></li>
- <li><a href="showAddPatientFormFormMenu.action?addNewForm=true">$i18n.getString( "add_person" )</a></li>
</ul>
<br>