← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4831: Add filter textbox for patient-attribute and program-atttribute list forms.

 

------------------------------------------------------------
revno: 4831
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-10-05 14:27:10 +0700
message:
  Add filter textbox for patient-attribute and program-atttribute list forms.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggDataElementsAction.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/patientAttribute.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAttributeList.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/caseaggregation/GetAggDataElementsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggDataElementsAction.java	2011-03-31 01:42:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/caseaggregation/GetAggDataElementsAction.java	2011-10-05 07:27:10 +0000
@@ -95,9 +95,15 @@
 
         optionComboIds = new ArrayList<String>();
 
-        dataElementList = new ArrayList<DataElement>( dataElementService.getDataElementGroup( dataElementGroupId )
-            .getMembers() );
-
+        if ( dataElementGroupId == 0 )
+        {
+            dataElementList = new ArrayList<DataElement>( dataElementService.getDataElementsWithoutGroups() );
+        }
+        else
+        {
+            dataElementList = new ArrayList<DataElement>( dataElementService.getDataElementGroup( dataElementGroupId )
+                .getMembers() );
+        }
         Iterator<DataElement> deIterator = dataElementList.iterator();
 
         while ( deIterator.hasNext() )

=== 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-10-04 08:53:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties	2011-10-05 07:27:10 +0000
@@ -378,4 +378,5 @@
 alphabet = Alphabet
 verified = Verified
 declared = Declared
-approximated = Approximated
\ No newline at end of file
+approximated = Approximated
+others = Others
\ 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/patientAttribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm	2011-10-04 07:27:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm	2011-10-05 07:27:10 +0000
@@ -4,22 +4,27 @@
 <table class="mainPageTable">
   <tr>
     <td style="vertical-align:top">
-    
-      <table class="listTable">
-          <col>          
-          <col width="20">
-          <col width="20">
-          <col width="20">          		  
-		  <tr>
-		  	<td></td>
-			<td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddPatientAttributeForm.action'" style="width:70px"></td>
-		  </tr>
-          <tr>
-            <th>$i18n.getString( "name" )</th>
-            <th colspan="3">$i18n.getString( "operations" )</th>
-          </tr>
-
-          <tbody id="list">
+		<table width="100%">
+			<tr>
+				<td>
+					$i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 1)" style="width:250px"/>
+				</td>
+				<td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddPatientAttributeForm.action'" style="width:70px"></td>
+			</tr>
+		</table>
+			
+		<table class="listTable">
+			<col>          
+			<col width="20">
+			<col width="20">
+			<col width="20">          		  
+			<thead>
+			  <tr>
+				<th>$i18n.getString( "name" )</th>
+				<th colspan="3">$i18n.getString( "operations" )</th>
+			  </tr>
+			</thead>
+			<tbody id="list">
             #foreach( $patientAttribute in $patientAttributes )
               <tr id="tr${patientAttribute.id}">
               

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAttributeList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAttributeList.vm	2011-09-30 08:37:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAttributeList.vm	2011-10-05 07:27:10 +0000
@@ -2,21 +2,26 @@
 <table class="mainPageTable">
 	<tr>
 		<td style="vertical-align:top">
-			<table class="listTable">
-			  <col>          
-			  <col width="20">
-			  <col width="20">
-			  <col width="20">     
+			<table width="100%">
 			  <tr>
-				<td></td>
+				<td>
+					$i18n.getString( "filter_by_name" ): <input type="text" onkeyup="filterValues( this.value , 1)" style="width:250px"/>
+				</td>
 				<td colspan="4" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddProgramAttributeForm.action'" style="width:70px"></td>
 			  </tr>
-			  <tr>            
-				<th>$i18n.getString( "name" )</th>
-				<th colspan="4">$i18n.getString( "operations" )</th>
-			  </tr>
-
-			  <tbody id="list">
+			</table>
+			 <table class="listTable">
+				<col>          
+				<col width="20">
+				<col width="20">
+				<col width="20"> 
+				<thead>	
+					<tr>            
+						<th>$i18n.getString( "name" )</th>
+						<th colspan="4">$i18n.getString( "operations" )</th>
+					</tr>
+				</thead>	
+				<tbody id="list">
 				#foreach( $programAttribute in $programAttributes )
 				  <tr id="tr${programAttribute.id}">