← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9314: Add table style for patient list tables.

 

------------------------------------------------------------
revno: 9314
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-12-14 15:10:09 +0700
message:
  Add table style for patient list tables.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/htmlGrid.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.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/htmlGrid.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/htmlGrid.vm	2012-12-07 13:55:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/htmlGrid.vm	2012-12-14 08:10:09 +0000
@@ -8,25 +8,21 @@
 </style>
 
 <h3>$!encoder.htmlEncode( $grid.title )</h3>
-
 <h5>$!encoder.htmlEncode( $grid.subtitle )</h5>
 
 <table class="listTable gridTable">
-
 	<thead>
-	<tr>
-		<th>#</th>
-		#foreach( $header in $grid.getVisibleHeaders() )
-			<th #if( $header.meta )style="text-align:left"#end>$!encoder.htmlEncode( $header.name )</th>
-		#end
-	</tr>
+		<tr>
+			<th>#</th>
+			#foreach( $header in $grid.getVisibleHeaders() )
+				<th #if( $header.meta )style="text-align:left"#end>$!encoder.htmlEncode( $header.name )</th>
+			#end
+		</tr>
 	</thead>
-
 	<tbody>
-		#set( $mark = false )
 		#set( $i = 1 )
 		#foreach( $row in $grid.getVisibleRows() )
-			<tr #alternate($mark)>
+			<tr>
 				<td>$i</td>
 			#foreach( $col in $row )
 				#set( $index = ( $velocityCount - 1 ) )
@@ -41,9 +37,13 @@
 				#end
 			#end
 			</tr>
-			#set( $mark = !$mark)
 			#set( $i = $i + 1 )
 		#end
 	</tbody>
+</table>
 
-</table>
\ No newline at end of file
+<script type="text/javascript">
+	jQuery(document).ready(function(){
+		setTableStyles();	
+	});
+</script>	
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-12-07 13:55:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js	2012-12-14 08:10:09 +0000
@@ -36,6 +36,7 @@
 			listAll:true
 		},
 		function(){
+			setTableStyles();
 			statusSearching = 0;
 			showById('listPatientDiv');
 			jQuery('#loaderDiv').hide();
@@ -50,6 +51,7 @@
 		type:"POST",
 		data: params,
 		success: function( html ){
+				setTableStyles();
 				statusSearching = 1;
 				setInnerHTML( 'listPatientDiv', html );
 				showById('listPatientDiv');

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm	2012-12-07 13:55:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/listPatient.vm	2012-12-14 08:10:09 +0000
@@ -21,113 +21,103 @@
 	</tr>
 </table>
 
-<br>
-<table class="entryScreen">
-  <tr>
-    <td>    
-      <table class="listTable">                   
-          <col width="40"/>
-          #foreach( $identifierType in $identifierTypes)
-			<col/>
-		  #end
-		  #if( $identifierTypes.size()==0 )
-			<col/>       
-		  #end
-          <col width="60"/>
-          <col width="110"/>
-          <col width="60"/>
-		  #if($mapPatientOrgunit.size()!=0)
-		  <col/>
-		  #end
-		  <col/>
-		  <col width="80"/>
-          <tr>
-			<th>#</th>
-            #foreach( $identifierType in $identifierTypes)
-				<th>
-					$encoder.htmlEncode($identifierType.name)
-				</th>
-			#end
-			#if( $identifierTypes.size()==0 )
-				<th>$i18n.getString( "full_name" )</th>          
-			#end       
-            <th>$i18n.getString( "gender" )</th>
-            <th>$i18n.getString( "date_of_birth" )</th>
-            <th>$i18n.getString( "age" )</th> 
-			<th class="{sorter: false}">$i18n.getString( "phone_number" )</th>  
-			#if($mapPatientOrgunit.size()!=0)
+<br> 
+<table>
+<tr><td>
+<table class="listTable">  
+	<colgroup>
+		<col width="40"/>
+		#foreach( $identifierType in $identifierTypes) <col/> #end
+		#if( $identifierTypes.size()==0 ) <col/> #end
+		<col width="60"/>
+		<col width="110"/>
+		<col width="60"/>
+		#if($mapPatientOrgunit.size()!=0) <col/> #end
+		<col/>
+		<col width="80"/>
+	</colgroup>	  
+	
+	<thead>
+	  <tr>
+		<th>#</th>
+		#foreach( $identifierType in $identifierTypes)
+			<th>$encoder.htmlEncode($identifierType.name)</th>
+		#end
+		#if( $identifierTypes.size()==0 )
+			<th>$i18n.getString( "full_name" )</th>          
+		#end       
+		<th>$i18n.getString( "gender" )</th>
+		<th>$i18n.getString( "date_of_birth" )</th>
+		<th>$i18n.getString( "age" )</th> 
+		<th class="{sorter: false}">$i18n.getString( "phone_number" )</th>  
+		#if($mapPatientOrgunit.size()!=0)
 			<th>$i18n.getString( "hierachy_orgunit" )</th>
-			#end			
-            <th>$i18n.getString( "operations" )</th>
-          </tr>
-          
-          <tbody id="list">	
-          #set( $mark = false )
-          
-          #foreach( $patient in $patients )
-          	<tr #alternate( $mark )>
-				<td>
-					#set( $nr = ( ( $paging.getCurrentPage() - 1  ) * $paging.pageSize ) + $velocityCount )
-					$nr
-                </td>
-				#set($value="")
-				#foreach( $identifierType in $identifierTypes)
-					#foreach( $identifier in $patient.identifiers)
-						#if($identifier.identifierType.id==$identifierType.id)
-							#set($value=$identifier.identifier)
-						#end
+		#end			
+		<th>$i18n.getString( "operations" )</th>
+	  </tr>
+	</thead>
+          
+	<tbody id="list">	
+	  #foreach( $patient in $patients )
+		<tr>
+			<td>
+				#set( $nr = ( ( $paging.getCurrentPage() - 1  ) * $paging.pageSize ) + $velocityCount )
+				$nr
+			</td>
+			#set($value="")
+			#foreach( $identifierType in $identifierTypes)
+				#foreach( $identifier in $patient.identifiers)
+					#if($identifier.identifierType.id==$identifierType.id)
+						#set($value=$identifier.identifier)
 					#end
 				#end
-				#if($value=="")
-					#set($value=$patient.getFullName())
-				#end
-				<td style='cursor:pointer;' onclick="javascript:">
-					<a>$encoder.htmlEncode($value)</a>
-				</td>
-				<td>			
-					$i18n.getString( $patient.gender )
-				</td>
-				<td>			
-					$format.formatDate( $patient.birthDate )
-				</td>
-				<td>            
-                    $encoder.htmlEncode( $patient.getAge() )
-                </td>
-				<td>$!patient.phoneNumber</td>				
-				#if($mapPatientOrgunit.size()!=0)
-				<td>$!mapPatientOrgunit.get($patient.id)</td>
-				#end
-				<td>
-					<a href="javascript:showUpdatePatientForm('$patient.id');" title="$i18n.getString( 'data_entry' )"><img src="images/data_entry.png" alt="$i18n.getString( 'data_entry' )"></a>   
-					<a href="javascript:showPatientHistory('$patient.id')" title='$i18n.getString( "patient_details_and_history" )'><img src="../images/information.png" alt='$i18n.getString( "patient_details_and_history" )'></a>
-                </td>               				
-			</tr>
-			#if( $mark )
-				#set( $mark = false )
-			#else
-				#set( $mark = true )
-			#end
-    	#end
-    	</tbody>
-		<tr>
-		<td colspan="7">
+			#end
+			#if($value=="")
+				#set($value=$patient.getFullName())
+			#end
+			<td style='cursor:pointer;' onclick="javascript:">
+				<a>$encoder.htmlEncode($value)</a>
+			</td>
+			<td>			
+				$i18n.getString( $patient.gender )
+			</td>
+			<td>			
+				$format.formatDate( $patient.birthDate )
+			</td>
+			<td>            
+				$encoder.htmlEncode( $patient.getAge() )
+			</td>
+			<td>$!patient.phoneNumber</td>				
+			#if($mapPatientOrgunit.size()!=0)
+			<td>$!mapPatientOrgunit.get($patient.id)</td>
+			#end
+			<td>
+				<a href="javascript:showUpdatePatientForm('$patient.id');" title="$i18n.getString( 'data_entry' )"><img src="images/data_entry.png" alt="$i18n.getString( 'data_entry' )"></a>   
+				<a href="javascript:showPatientHistory('$patient.id')" title='$i18n.getString( "patient_details_and_history" )'><img src="../images/information.png" alt='$i18n.getString( "patient_details_and_history" )'></a>
+			</td>               				
+		</tr>
+	#end
+    </tbody>
+</table>
+</td></tr>
+<tr><td colspan="6">
 			<p></p>
 			<div class="paging-container">
 				#parse( "/dhis-web-commons/paging/paging.vm" )
 			</div>
 		</td>
 		<td></td>
-	  </tr>
-	  </table>
-    </td>
-  </tr>
+	</tr>
 </table>
 
 	<div id="detailsInfo"></div>
 	<span id="message"></span>
 </div>
 
-<script>
+<script type="text/javascript">
+	jQuery(document).ready(function(){
+		setTableStyles();	
+	});
 	var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ) , "'" )';
 	var i18n_list_all_patients = '$encoder.jsEscape( $i18n.getString( "list_all_patients" ) , "'" )';
 	var i18n_search_patients = '$encoder.jsEscape( $i18n.getString( "search_patients" ) , "'" )';

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2012-12-07 13:55:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm	2012-12-14 08:10:09 +0000
@@ -71,9 +71,8 @@
           </thead>
 		  
           <tbody id="list">	
-		  #set( $mark = false )
           #foreach( $patient in $patients )
-          	<tr id="tr${patient.id}" #alternate($mark) >
+          	<tr id="tr${patient.id}">
 				
 				<td>
 					#set( $nr = ( ( $paging.getCurrentPage() - 1  ) * $paging.pageSize ) + $velocityCount )
@@ -132,7 +131,6 @@
 				</td>
 				
 			</tr>
-			#set( $mark = !$mark)
     	#end
     	</tbody>
     
@@ -154,7 +152,8 @@
 
 #end
 <script type="text/javascript">
-	jQuery(document).ready(function(){	
+	jQuery(document).ready(function(){
+		setTableStyles();	
 		tableSorter( 'patientList' );
 	});
 	var i18n_patient_details_and_history = '$encoder.jsEscape( $i18n.getString( "patient_details_and_history" ) , "'" )';	

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm	2012-12-07 13:55:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm	2012-12-14 08:10:09 +0000
@@ -42,7 +42,7 @@
 				<tbody id="list">
 					#foreach( $row in $grid.getRows() )
 						#set($index = 0)
-						<tr id="row" #alternate( $mark )>
+						<tr id="row">
 							<td>
 								#set( $nr = ( ( $paging.getCurrentPage() - 1  ) * $paging.pageSize ) + $velocityCount )
 								$nr
@@ -64,7 +64,6 @@
 								<a href="javascript:showUpdateEvent( $psid )" title='$i18n.getString( "data_entry" )'><img src="images/data_entry.png" alt='$i18n.getString( "data_entry" )'></a>
 								<a href="javascript:removeEvent( $psid )" title='$i18n.getString( "remove" )'><img src="../images/delete.png" alt='$i18n.getString( "remove" )'></a>
 							</td>
-						#set( $mark = !$mark)
 						<script>
 							jQuery('#row').attr('id','tr' + "$psid");
 						</script>
@@ -86,3 +85,9 @@
 	  </tr>
 	</table>
 #end
+
+<script type="text/javascript">
+	jQuery(document).ready(function(){
+		setTableStyles();	
+	});
+</script>