dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30832
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15677: Minor fix.
------------------------------------------------------------
revno: 15677
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-06-14 15:52:04 +0800
message:
Minor fix.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.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/trackedEntityInstance.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.js 2014-06-14 07:44:15 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.js 2014-06-14 07:52:04 +0000
@@ -616,19 +616,30 @@
if( getFieldValue('searchPatientByAttributes')==''){
return;
}
-
- jQuery('#listEntityInstanceDiv').load(
- 'searchTrackedEntityInstance.action', {
- orgunitId: getFieldValue('orgunitId'),
- attributeValue: getFieldValue('searchPatientByAttributes'),
- programId: getFieldValue('program')
- }, function() {
- setInnerHTML('orgunitInfor', getFieldValue('orgunitName'));
- if( getFieldValue('program')!= ''){
- var programName = jQuery('#programIdAddTrackedEntity option:selected').text();
- setInnerHTML('enrollmentInfor', i18n_enrollments_in + " " + programName + " " + i18n_program);
- }
+ var params = "ou=" + getFieldValue("orgunitId");
+ params += "&page=1";
+ if (getFieldValue('program') != '') {
+ params += "&program=" + getFieldValue('program');
+ if( getFieldValue('programStatus')!=""){
+ params += "&programStatus=" + getFieldValue('programStatus');
+ }
+ }
+
+ params += "&query=" + getFieldValue('searchPatientByAttributes');
+
+ $('#attributeIds option').each(function(i, item) {
+ params += "&attribute=" + item.value;
+ });
+
+ $.ajax({
+ url : '../api/trackedEntityInstances.json',
+ type : "GET",
+ data : params,
+ success : function(json) {
+ setInnerHTML('listEntityInstanceDiv', displayTEIList(json, 1));
showById('listEntityInstanceDiv');
jQuery('#loaderDiv').hide();
- });
+ setTableStyles();
+ }
+ });
}