← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8472: Exception thrown when to search with person criteria in program-stracking.

 

------------------------------------------------------------
revno: 8472
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-10-11 13:45:11 +0700
message:
  Exception thrown when to search with person criteria in program-stracking.
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.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/webapp/dhis-web-caseentry/activityPlanSelect.vm
  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/programTrackingSelect.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm
  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-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java	2012-10-11 05:35:09 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/DefaultCaseAggregationConditionService.java	2012-10-11 06:45:11 +0000
@@ -831,7 +831,7 @@
 
         if ( propertyName.equals( PROPERTY_AGE ) )
         {
-            sql += "DATE('" + endDate + "') - DATE(birthdate) ";
+            sql += "DATE('" + startDate + "') - DATE(birthdate) ";
         }
         else
         {

=== 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-10-09 05:25:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-10-11 06:45:11 +0000
@@ -462,4 +462,4 @@
 some_data_element_not_exist = Some data elements not exist 
 guardian=Guardian/caretaker
 of = of
-failed_to_get_events = Failed to get events. Please generate resource tables before.
\ No newline at end of file
+failed_to_get_events = Failed to get events. Please generate resource tables before.

=== 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-10-11 05:35:09 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/activityPlanSelect.vm	2012-10-11 06:45:11 +0000
@@ -95,7 +95,7 @@
 				<td></td>
 				<td>
 					<input type="submit" class='large-button' id='listPatientBtn' value="$i18n.getString( 'show_activity_list' )" onclick="setFieldValue('export', false);">
-					<input type="submit" class='large-button' value="$i18n.getString( 'export_xls' )" onclick="setFieldValue('export', false);">
+					<input type="submit" class='large-button' value="$i18n.getString( 'export_xls' )" onclick="setFieldValue('export', true);">
 				</td>
 			</tr>
 		</table>

=== 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-10-11 04:30:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js	2012-10-11 06:45:11 +0000
@@ -122,7 +122,7 @@
 
 function getTrueFalseBox()
 {
-	var trueFalseBox  = '<select class="search-field" id="searchText" name="searchText">';
+	var trueFalseBox  = '<select id="searchText" name="searchText">';
 	trueFalseBox += '<option value="true">' + i18n_yes + '</option>';
 	trueFalseBox += '<option value="false">' + i18n_no + '</option>';
 	trueFalseBox += '</select>';
@@ -131,7 +131,7 @@
 	
 function getGenderSelector()
 {
-	var genderSelector = '<select class="search-field" id="searchText" name="searchText">';
+	var genderSelector = '<select id="searchText" name="searchText">';
 		genderSelector += '<option value="M">' + i18n_male + '</option>';
 		genderSelector += '<option value="F">' + i18n_female + '</option>';
 		genderSelector += '<option value="T">' + i18n_transgender + '</option>';
@@ -142,14 +142,14 @@
 function getAgeTextBox( container )
 {
 	var ageField = '<select id="dateOperator" style="width:40px;" name="dateOperator" ><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option><option value=">"> > </option><option value=">="> >= </option></select>';
-	ageField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:145px;">';
+	ageField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:220px;">';
 	return ageField;
 }
 
 function getDateField( container )
 {
 	var dateField = '<select id="dateOperator" name="dateOperator" style="width:40px"><option value=">"> > </option><option value=">="> >= </option><option value="="> = </option><option value="<"> < </option><option value="<="> <= </option></select>';
-	dateField += '<input type="text" id="searchText_' + container + '" name="searchText" maxlength="30" style="width:125px;" onkeyup="searchPatientsOnKeyUp( event );">';
+	dateField += '<input type="text" id="searchText_' + container + '" name="searchText" style="width:200px;" onkeyup="searchPatientsOnKeyUp( event );">';
 	return dateField;
 }
 
@@ -208,7 +208,7 @@
 		var statusEvent = jQuery('#programStageAddPatientTR [id=statusEvent]').val();
 		var startDueDate = getFieldValue('startDueDate');
 		var endDueDate = getFieldValue('endDueDate');
-		params += '&searchTexts=stat_' + getFieldValue('programIdAddPatient') 
+		params = '&searchTexts=stat_' + getFieldValue('programIdAddPatient') 
 			   + '_' + startDueDate + '_' + endDueDate
 			   + "_" + getFieldValue('orgunitId')
 			   + '_false_' + statusEvent;

=== 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-10-05 03:29:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm	2012-10-11 06:45:11 +0000
@@ -11,6 +11,7 @@
 		});
 		
 		jQuery("#searchObjectId [value=prg]").remove();
+		jQuery("#searchObjectId [value=prg]").remove();
 		jQuery("#searchObjectId").prepend('<option value="-100">' + i18n_please_select_criteria + '</option>');
 		jQuery("#searchObjectId [value=]").attr("selected","selected");
 		hideById('addPatientBtn');

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-10-11 04:30:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm	2012-10-11 06:45:11 +0000
@@ -51,6 +51,16 @@
 				<input type='textbox' class='search-field' id='endDueDate' name='endDueDate' style='width:105px;'>
 			</td>
 		</tr>
+		#if( $auth.hasAccess( "dhis-web-caseentry", "searchAllFacilities" ) )
+			<tr id='searchBySelectedUnitTD'>
+				<td align='right'>$i18n.getString('search_in_all_facilities')&nbsp;&nbsp;&nbsp;</td>
+				<td>
+					<input type='checkbox' id='searchInAllFacility' name='searchInAllFacility' />
+				</td>
+			</tr>
+		#else
+			<input type='checkbox' class='hidden' id='searchInAllFacility' name='searchInAllFacility' />
+		#end
 		<tbody id='advancedSearchTB'>
 			<tr id='advSearchBox0'>	       
 				<td id='searchingAttributeIdTD'>
@@ -74,14 +84,6 @@
 				<td>
 					<input type="button" class='small-button' value='+' onclick='addAttributeOption();'>
 				</td>
-				#if( $auth.hasAccess( "dhis-web-caseentry", "searchAllFacilities" ) )
-				<td id='searchBySelectedUnitTD'>
-					$i18n.getString('search_in_all_facilities')
-					<input type='checkbox' id='searchInAllFacility' name='searchInAllFacility' />
-				</td>
-				#else
-					<input type='hidden' id='searchInAllFacility' name='searchInAllFacility' />
-				#end
 				<td>
 					<input type="button" class='large-button' value='$i18n.getString( "search" )' onclick='validateAdvancedSearch();' id='searchPatientBtn'>
 				</td>

=== 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-10-11 04:30:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css	2012-10-11 06:45:11 +0000
@@ -29,21 +29,11 @@
     width: 260px;
 }
 
-input.search-field[type="text"] 
-{
-    width: 185px;
-}
-
 select 
 {
     width: 265px;
 }
 
-select.search-field
-{
-    width: 190px;
-}
-
 textarea 
 {
     width: 265px;
@@ -56,16 +46,6 @@
 	width:100%;
 }
 
-.search-input
-{
-    width:180px;
-}
-
-.search-select 
-{
-    width: 185px;
-}
-
 /*----------------------------------------------------------------------------*/
 /* Table
 /*----------------------------------------------------------------------------*/
@@ -122,7 +102,7 @@
   padding-left: 20px;
   margin-bottom: 15px;
   border-radius: 3px;
-  width:840px;
+  width:940px;
 }
 
 /*----------------------------------------------------------------------------*/