← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4248: Minor fix for searching patients function (Patient module).

 

------------------------------------------------------------
revno: 4248
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-08-03 11:48:50 +0700
message:
  Minor fix for searching patients function (Patient module).
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.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-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java	2011-08-02 09:12:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java	2011-08-03 04:48:50 +0000
@@ -135,6 +135,11 @@
         this.listAll = listAll;
     }
 
+    public Boolean getListAll()
+    {
+        return listAll;
+    }
+
     public void setSearchingAttributeId( List<Integer> searchingAttributeId )
     {
         this.searchingAttributeId = searchingAttributeId;

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2011-08-03 02:51:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2011-08-03 04:48:50 +0000
@@ -480,4 +480,5 @@
 add_more_option_to_search = Add more option to search
 duplicated_patient_list = Duplicated patient list
 specfiy_birth_date_or_age = Specfiy birth date or age
-update_this_patient = Update this beneficiary
\ No newline at end of file
+update_this_patient = Update this beneficiary
+search_patients_by_attributes = Search beneficiaries by attributes
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js	2011-08-03 02:51:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patient.js	2011-08-03 04:48:50 +0000
@@ -122,15 +122,18 @@
 {
 	hideById( 'listPatientDiv' );
 	var searchTextFields = jQuery('[name=searchText]');
+	var flag = true;
 	$( searchTextFields ).each( function( i, item )
     {
 		if( jQuery( item ).val() == '' )
 		{
 			showWarningMessage( i18n_specify_search_criteria );
-			return;
+			flag = false;
 		}
 	});
 	
+	if(!flag) return;
+	
 	contentDiv = 'listPatientDiv';
 	$( "#loaderDiv" ).show();
 	$.ajax({

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm	2011-08-02 09:12:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatient.vm	2011-08-03 04:48:50 +0000
@@ -1,19 +1,19 @@
 
 <table>
+	
 	<tr>
 		<td>$i18n.getString( "search_result_matching_the_search_criteria" )</td>
 		<td>&nbsp;</td>
 		<td>&nbsp;</td>
 		<td>
-		    #if($!program)
-				$i18n.getString( "list_patients_by_program") '$program.name'
-			#elseif($!searchText && $searchText!='') 
-				$searchText
-			#else 
-				$i18n.getString( "list_all_patients" )
-			#end
+		#if($!listAll)
+			$i18n.getString( "list_all_patients" )
+		#else
+			$i18n.getString( "search_patients_by_attributes" )
+		#end
 		</td>
 	</tr>	
+	
 	<tr>
 		<td>$i18n.getString( "total_result" )</td>
 		<td>&nbsp;</td>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm	2011-08-03 02:51:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/selectPatient.vm	2011-08-03 04:48:50 +0000
@@ -38,10 +38,12 @@
 				</td>		
 				<td>
 					<input type="text" id="searchText" name="searchText" maxlength="30" style="width:20em" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );'>
-					<input type="button" value='+' onclick='addAttributeOption();'>
+					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 				</td>	
 				<td></td>
-				<td><input type="button" value='$i18n.getString( "search" )' onclick='searchPatients();'></td>
+				<td><input type="button" value='+' onclick='addAttributeOption();'>
+					<input type="button" value='$i18n.getString( "search" )' onclick='searchPatients();'>
+				</td>
 				<td>&nbsp;</td>
 				<td><input type="button" value='$i18n.getString( "add_new" )' onclick="showAddPatientForm();"></td>
 			</tr>