← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6165: (patient) style-css for tabular report.

 

------------------------------------------------------------
revno: 6165
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-03-05 13:07:54 +0700
message:
  (patient) style-css for tabular report.
modified:
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTabularReportResult.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/report.css
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportResult.vm
  dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.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/tabularReport.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js	2012-03-05 05:12:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js	2012-03-05 06:07:54 +0000
@@ -170,17 +170,6 @@
 	isAjax = true;
 	contentDiv = 'contentDiv';
 	
-	/* var dataElementIds = "";
-	var listDataElementIds = jQuery( "select[id=dataElementIds] option:selected" );
-	listDataElementIds.each( function( i, item ){
-		dataElementIds += "dataElementIds=" + item.value;
-		dataElementIds += ( i < listDataElementIds.length - 1 ) ? "&" : "";
-	});
-	
-	var params = dataElementIds + "&" 
-				+ "programStageId=" + getFieldValue('programStageId') + "&" 
-				+ "startDate=" + getFieldValue('startDate') + "&" 
-				+ "endDate=" + getFieldValue('endDate'); */
 	var params = getParams();
 	if( params != '' )
 	{
@@ -199,28 +188,6 @@
 
 function searchTabularReport( event )
 {	
-	/* var dataElementIds = "";
-	var listDataElementIds = jQuery( "select[id=dataElementIds] option:selected" );
-	listDataElementIds.each( function( i, item ){
-		dataElementIds += "dataElementIds=" + item.value;
-		dataElementIds += ( i < listDataElementIds.length - 1 ) ? "&" : "";
-	});
-	
-	var searchingValues = "";
-	var listSeachingValues = jQuery("#gridTable input");
-	listSeachingValues.each( function( i, item ){
-		if( item.value!= '' )
-		{
-			searchingValues += "searchingValues=" + item.id + "_" + htmlEncode( item.value ) + "&";
-		}
-	});
-	
-	
-	var params = searchingValues + dataElementIds + "&" 
-				+ "programStageId=" + getFieldValue('programStageId') + "&" 
-				+ "startDate=" + getFieldValue('startDate') + "&" 
-				+ "endDate=" + getFieldValue('endDate'); */
-	
 	var key = event.keyCode || event.charCode || event.which;
 	
 	if ( key == 13 || key == 1 ) // Enter
@@ -253,28 +220,6 @@
 
 function exportTabularReport( type )
 {
-	/* var dataElementIds = "";
-	var listDataElementIds = jQuery( "select[id=dataElementIds] option:selected" );
-	listDataElementIds.each( function( i, item ){
-		dataElementIds += "dataElementIds=" + item.value;
-		dataElementIds += ( i < listDataElementIds.length - 1 ) ? "&" : "";
-	});
-	
-	var searchingValues = "";
-	var listSeachingValues = jQuery("#gridTable input");
-	listSeachingValues.each( function( i, item ){
-		if( item.value!= '' )
-		{
-			searchingValues += "searchingValues=" + item.id + "_" + htmlEncode( item.value ) + "&";
-		}
-	});
-	
-	var url = "generateTabularReport.action?" + searchingValues + dataElementIds
-				+ "&programStageId=" + getFieldValue('programStageId')
-				+ "&startDate=" + getFieldValue('startDate')
-				+ "&endDate=" + getFieldValue('endDate')
-				+ "&type=" + type; */
-
 	var params = getParams();
 	if( params != '' )
 	{

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTabularReportResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTabularReportResult.vm	2012-03-05 04:22:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTabularReportResult.vm	2012-03-05 06:07:54 +0000
@@ -11,7 +11,7 @@
 			#foreach( $col in $row )
 				#set( $index = ( $velocityCount - 1 ) )
 				#if( $grid.VisibleHeaders().get( $index ).meta )
-					<td style="text-align:left">$!encoder.htmlEncode( $col )</td>
+					<td>$!encoder.htmlEncode( $col )</td>
 				#else
 					<td>$col</td>
 				#end

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/report.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/report.css	2012-03-05 05:12:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/report.css	2012-03-05 06:07:54 +0000
@@ -2,6 +2,26 @@
 /* For GRID form                                                              */
 /*----------------------------------------------------------------------------*/
 
+.button
+{
+	width:140px; 
+}
+
+.inputCriteria input
+{
+	width:350px; 
+}
+
+.inputCriteria select
+{
+	width:355px; 
+}
+
+
+.grid input {
+  width:75%;
+}
+  
 .grid tr {
   background-color:#eee;
   }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportResult.vm	2012-03-05 04:22:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportResult.vm	2012-03-05 06:07:54 +0000
@@ -6,9 +6,9 @@
 
 <h3>$!encoder.htmlEncode( $grid.title )</h3>
 
-<div style="margin-bottom:15px">
-<input type="button" value="$i18n.getString( 'get_report_as_xls' )" onclick="exportTabularReport( 'xls' )" style="width:140px">
-<input type="button" value="$i18n.getString( 'get_report_as_pdf' )" onclick="exportTabularReport( 'pdf' )" style="width:140px">
+<div>
+<input type="button" value="$i18n.getString( 'get_report_as_xls' )" onclick="exportTabularReport( 'xls' )" class="button" >
+<input type="button" value="$i18n.getString( 'get_report_as_pdf' )" onclick="exportTabularReport( 'pdf' )" class="button" >
 </div>
 
 <h5>$!encoder.htmlEncode( $grid.subtitle )</h5>
@@ -26,7 +26,7 @@
 		<td></td>
 		#foreach( $dataElement in $dataElements )
 			<td>
-				<input type='text' id='$dataElement.id' title='$i18n.getString("how_to_search_tabular_report")' onkeypress='searchTabularReport( event );' #if($dataElement.optionSet) options='$dataElement.optionSet.options' style='width:75%' #end />
+				<input type='text' id='$dataElement.id' title='$i18n.getString("how_to_search_tabular_report")' onkeypress='searchTabularReport( event );' #if($dataElement.optionSet) options='$dataElement.optionSet.options' #end />
 			</td>
 		#end
 	</tr>

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.vm	2012-03-05 04:22:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.vm	2012-03-05 06:07:54 +0000
@@ -8,20 +8,20 @@
 
 <h3>$i18n.getString( "tabular_report" )</h3>
 <form id="reportForm" name="reportForm" method="post">
-<p><input type="button" style="width:120px" value="$i18n.getString('data')" onclick="showCriteria();" ></p>
+<p><input type="button" value="$i18n.getString('data')" onclick="showCriteria();" style="width:150px;" ></p>
 
 <div class="inputCriteria" id='criteriaDiv' style="width:530px;height:300px;margin-bottom:20px;">
 
 <table>	
     <tr>
 	  <td><label>$i18n.getString( "reporting_unit" )</label></td>
-	  <td><input type="text" readonly="readonly" id='orgunitname' name='orgunitname' #if($!orgunit) value="$!orgunit.name" #else value="[$i18n.getString( "select" )]" #end style="min-width:350px"></td>
+	  <td><input type="text" readonly="readonly" id='orgunitname' name='orgunitname' #if($!orgunit) value="$!orgunit.name" #else value="[$i18n.getString( 'select' )]" #end ></td>
     </tr>
     
     <tr>
         <td><label for="programId">$i18n.getString( "program" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
         <td>
-            <select id="programId" name="programId" #if($!programs) #else disabled #end style="width:350px" class="{validate:{required:true}}" onchange='loadProgramStages();'>
+            <select id="programId" name="programId" #if($!programs) #else disabled #end class="{validate:{required:true}}" onchange='loadProgramStages();'>
 				<option value=''>[$i18n.getString('please_select')]</option>
 				#foreach( $program in $programs )
 				<option value='$program.id'>$program.name</option>
@@ -50,22 +50,22 @@
         </td>      
     </tr>
 	<tr>
-        <td><label>$i18n.getString( "data_elements" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+        <td><label>$i18n.getString( "program_stage" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
         <td>
-			<select id="programStageId" name="programStageId" style="width:350px" class="{validate:{required:true}}" onchange='loadDataElements();'></select>
+			<select id="programStageId" name="programStageId" class="{validate:{required:true}}" onchange='loadDataElements();'></select>
         </td>      
     </tr>
 	<tr>
-		<td></td>
-        <td>
-			<select id="dataElementIds" name="dataElementIds" multiple size='6' style="width:350px"  class="{validate:{required:true}}" ></select>
+		<td><label>$i18n.getString( "data_elements" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+         <td>
+			<select id="dataElementIds" name="dataElementIds" multiple size='6' class="{validate:{required:true}}" ></select>
         </td>      
     </tr>
     
     <tr>
     	<td></td>
-    	<td><input type="submit" id='generateBtn' name='generateBtn' #if($!programs) #else disabled #end value="$i18n.getString( 'generate' )" style="width:10em" />
-    		<input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='index.action'" style="width:10em"/>
+    	<td><input type="submit" id='generateBtn' name='generateBtn' #if($!programs) #else disabled #end value="$i18n.getString( 'generate' )" style="width:150px;" />
+    		<input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='index.action'" style="width:150px;" />
     	</td>
     </tr>	                		
 </table>
@@ -84,7 +84,6 @@
     var i18n_report_generation_failed = '$encoder.jsEscape( $i18n.getString( "report_generation_failed" ), "'")';    
 	var i18n_please_select_a_program = '[' + '$encoder.jsEscape( $i18n.getString( "please_select_a_program" ), "'")' + ']'; 
 	var i18n_reports = '$encoder.jsEscape( $i18n.getString( "reports" ), "'")';    	
-	var i18n_patient_profile = '$encoder.jsEscape( $i18n.getString( "patient_profile" ), "'")';    	
 	var i18n_please_select = "[" + '$encoder.jsEscape( $i18n.getString( "please_select" ) , "'" )' + "]";
 	var i18n_show_all_items = "[" + '$encoder.jsEscape( $i18n.getString( "show_all_items" ) , "'" )' + "]";
 	var i18n_complete_confirm_message = '$encoder.jsEscape( $i18n.getString( "complete_confirm_message" ) , "'")';