dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19000
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8116: Improve activity plans (WIP).
------------------------------------------------------------
revno: 8116
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-09-18 10:50:06 +0700
message:
Improve activity plans (WIP).
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.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/commons.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css
--
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/activityPlanSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm 2012-09-15 09:55:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm 2012-09-18 03:50:06 +0000
@@ -47,11 +47,13 @@
<td>$i18n.getString('status')</td>
<td>
<select id="statusEvent" name="statusEvent" onchange="statusEventOnChange()">
- <option value='0' selected>$i18n.getString("all")</option>
+ <option value='3_4' selected>$i18n.getString("overdue_scheduled")</option>
+ <option value='3'>$i18n.getString("scheduled_in_future")</option>
<option value='4'>$i18n.getString("overdue")</option>
<option value='2'>$i18n.getString("incomplete")</option>
+ <option value='2_3_4'>$i18n.getString("scheduled_overdue_incomplete")</option>
<option value='1'>$i18n.getString("completed")</option>
- <option value='3'>$i18n.getString("scheduled_in_future")</option>
+ <option value='1_2_3_4'>$i18n.getString("all")</option>
</select>
</td>
</tr>
@@ -93,6 +95,7 @@
<div id='contentDataRecord'></div>
#parse( "dhis-web-commons/loader/loader.vm" )
+
<div class='hidden'>
<input type='text' id='startDueDate' name='startDueDate' >
<input type='text' id='endDueDate' name='endDueDate' >
=== 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-15 09:55:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/activityPlan.js 2012-09-18 03:50:06 +0000
@@ -29,20 +29,11 @@
var searchBySelectedOrgunit = false;
var programId = getFieldValue('programIdAddPatient');
var searchTexts = "stat_" + programId
- + "_" + getFieldValue("statusEvent")
+ "_" + getFieldValue('startDueDate')
- + "_" + getFieldValue('endDueDate');
-
- if( getFieldValue("statusEvent") != '3'
- && getFieldValue("statusEvent") != '4'
- && getFieldValue("statusEvent") != '0' )
- {
- searchTexts += "_" + getFieldValue('orgunitId');
- }
- else
- {
- searchBySelectedOrgunit = true
- }
+ + "_" + getFieldValue('endDueDate')
+ + "_" + getFieldValue('orgunitId')
+ + "_" + getFieldValue('statusEvent');
+
showLoader();
jQuery('#listPatientDiv').load('getActivityPlanRecords.action',
{
@@ -75,6 +66,12 @@
showById("arrow_" + id);
showById("ps_" + id );
}
+
+ jQuery(".table-flow").each( function(){
+ var scheduledEvent = jQuery(this).find("[status='3']:first");
+ scheduledEvent.focus();
+ });
+
resize();
}
@@ -109,7 +106,9 @@
{
var statusEvent = getFieldValue("statusEvent");
- if( statusEvent == '0' ){
+ if( statusEvent == '1_2_3_4'
+ || statusEvent == '3_4'
+ || statusEvent == '2_3_4' ){
enable('showEventSince');
enable('showEventUpTo');
setDateRange();
@@ -163,7 +162,9 @@
}
// check status to get date-range
- if( statusEvent == "0")
+ if( statusEvent == '1_2_3_4'
+ || statusEvent == '3_4'
+ || statusEvent == '2_3_4')
{
startDate = startDateSince;
endDate = endDateUpTo;
@@ -219,7 +220,7 @@
var listAll = getFieldValue('listAll');
var startDate = getFieldValue('startDueDate');
var endDate = getFieldValue('endDueDate');
- var status = getFieldValue('statusEvent');
+ var arrStatus = getFieldValue('statusEvent').split('_');
jQuery("#patientList .stage-object").each( function(){
var id = this.id.split('_')[1];
@@ -227,13 +228,8 @@
var statusEvent = jQuery(this).attr('status');
var programInstanceId = jQuery(this).attr('programInstanceId');
if( dueDate >= startDate && dueDate <= endDate
- && (( status!='0' && statusEvent == status ) || status=='0' ))
+ && jQuery.inArray(statusEvent, arrStatus) > -1)
{
- if( jQuery("#tb_" + programInstanceId + " .searched").length > 0 ){
- jQuery("#ps_" + id ).addClass("stage-object-selected searched");
- hideById("ps_" + id )
- hideById('arrow_' + id );
- }
jQuery("#ps_" + id ).addClass("stage-object-selected searched");
}
else
@@ -242,5 +238,13 @@
hideById('ps_' + id );
}
});
+
+ jQuery(".table-flow").each( function(){
+ var scheduledEvent = jQuery(this).find("[status='3']:first");
+ scheduledEvent.addClass("stage-scheduled");
+ scheduledEvent.css('border-color', MARKED_VISIT_COLOR);
+ scheduledEvent.focus();
+ });
+
resize();
}
\ 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 2012-09-13 08:45:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-09-18 03:50:06 +0000
@@ -7,6 +7,7 @@
var COLOR_LIGHT_YELLOW = "#ffff99";
var COLOR_LIGHT_GREEN = "#ccffcc";
var COLOR_LIGHT_LIGHTRED = "#ff99ff";
+var MARKED_VISIT_COLOR = '#000000';
var SUCCESS_COLOR = '#ccffcc';
var ERROR_COLOR = '#ccccff';
var SAVING_COLOR = '#ffffcc';
@@ -235,7 +236,7 @@
var startDueDate = getFieldValue('startDueDate');
var endDueDate = getFieldValue('endDueDate');
params += '&searchTexts=stat_' + getFieldValue('programIdAddPatient')
- + '_' + statusEvent + '_' + startDueDate + '_' + endDueDate;
+ + '_' + startDueDate + '_' + endDueDate + '_' + statusEvent;
if( statusEvent != '3' && statusEvent != '4' && statusEvent != '0' )
{
params += "_" + getFieldValue('orgunitId');
@@ -870,4 +871,4 @@
jQuery(this).find('td').attr("width", "10px");
jQuery(this).find('td:last').removeAttr("width");
});
-}
\ No newline at end of file
+}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-09-13 08:45:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-09-18 03:50:06 +0000
@@ -388,6 +388,11 @@
border: 5px solid;
}
+input .stage-scheduled[type="button"]
+{
+ border: 5px solid;
+}
+
input.patient-object[type="button"]
{
width: 130px;