← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15394: Hide the Add filter button in Advanced search of Lost to follow up; add the datapicker for due-da...

 

------------------------------------------------------------
revno: 15394
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2014-05-25 17:27:50 +0800
message:
  Hide the Add filter button in Advanced search of Lost to follow up; add the datapicker for due-date search field in Lost to follow up.
modified:
  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/programTrackingSelect.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.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/webapp/dhis-web-caseentry/javascript/smsReminder.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2014-05-22 08:03:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js	2014-05-25 09:27:50 +0000
@@ -348,15 +348,53 @@
 
 function advancedSearch( params, page )
 {
+	/* setFieldValue('listAll', "false");
+	$('#contentDataRecord').html('');
+	$('#listEventDiv').html('');
+	hideById('listEventDiv');
+	showLoader();
+	
+	$.ajax({
+		url : '../api/events.json',
+		type : "GET",
+		data : params,
+		success : function(json) {
+			setInnerHTML('listEventDiv', displayEvents(json, page));
+			showById('listEventDiv');
+			jQuery('#loaderDiv').hide();
+			setTableStyles();
+		}
+	}); */
+	
 	setFieldValue('listAll', "false");
 	$('#contentDataRecord').html('');
 	$('#listEventDiv').html('');
 	hideById('listEventDiv');
-	showLoader();
+	showLoader()
+	
+	var params = "ou=" + getFieldValue("orgunitId");
+	params += "&ouMode=" + getFieldValue("ouMode");
+	params += "&program=" + getFieldValue('program');
+	params += "&programStatus=ACTIVE";
+	params += "&page=" + page;
+	
+	if( $('#followup').attr('checked')=='checked'){
+		params += "followUp=true";
+	}
+	
+	params += '&eventStatus=' + getFieldValue('status');
+	params += "&eventStartDate=" + getFieldValue('startDate');
+	params += "&eventEndDate=" + getFieldValue('endDate');
+	
+	$('#attributeIds option').each(function(i, item){
+		params += "&attribute=" + item.value;
+	});
+	
 	$.ajax({
-		url : '../api/events.json',
 		type : "GET",
+		url : "../api/trackedEntityInstances.json",
 		data : params,
+		dataType : "json",
 		success : function(json) {
 			setInnerHTML('listEventDiv', displayEvents(json, page));
 			showById('listEventDiv');

=== 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	2014-04-24 16:30:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm	2014-05-25 09:27:50 +0000
@@ -9,6 +9,7 @@
             }
         });
 
+		hideById('addAdvancedSearchBtn');
 		jQuery("#program option[value='']").text(i18n_please_select);
         jQuery("#searchObjectId").prepend('<option value="-100">' + i18n_please_select_criteria + '</option>');
         jQuery("#searchObjectId [value=]").attr("selected", "selected");

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm	2014-04-24 16:30:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm	2014-05-25 09:27:50 +0000
@@ -112,6 +112,9 @@
 			<td>
 				<input type='text' id='startDate' name='startDate' style='width:127px;'>
 				<input type='text' id='endDate' name='endDate' style='width:127px;'>
+				<script>
+					datePickerInRange( 'startDate', 'endDate', true, true );
+				</script>
 			</td>
 		</tr>
 		<tr>
@@ -146,7 +149,7 @@
 		</tbody>
 	</table>
 	<div style="padding: 10px 0 15px 3px">
-		<input type="button" class='large-button' value='$i18n.getString( "add_filter" )' onclick='addAttributeOption();'>
+		<input type="button" id='addAdvancedSearchBtn' class='large-button' value='$i18n.getString( "add_filter" )' onclick='addAttributeOption();'>
         <input type="button" class='large-button' value='$i18n.getString( "search" )' onclick='isAdvancedSearch=true;validateAdvancedSearch(1);' id='searchEntityInstanceBtn'>
     </div>
 </div>