← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3823: switched from using button to create a new chart, to using a select (in preparation for adding 3 ...

 

------------------------------------------------------------
revno: 3823
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-06-01 13:39:43 +0200
message:
  switched from using button to create a new chart, to using a select (in preparation for adding 3 new charts related to data elements)
modified:
  dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.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-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2011-05-29 19:53:48 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties	2011-06-01 11:39:43 +0000
@@ -21,6 +21,7 @@
 dataset_report= Dataset Report
 add_selected= Add selected
 add_all= Add all
+add = Add
 create_report_table= Create report table
 manage_report_table= Manage report table
 available_indicators= Available indicators
@@ -163,6 +164,10 @@
 chart_dimension= Chart dimension
 add_period_chart= Add period chart
 add_organisation_unit_chart= Add organisation unit chart
+add_indicator_chart = Add indicator chart
+period_by_indicator_chart = Period by indicator chart
+indicator_by_period_chart= Indicator by period chart
+indicator_by_organisation_unit_chart= Indicator by organisation unit chart
 create_indicator_by_period_chart= Create indicator by period chart
 create_indicator_by_organisation_unit_chart= Create indicator by organisation unit chart
 dimension= Dimension
@@ -294,7 +299,6 @@
 intro_data_completeness = Browse the submission rates of data sets by organisation unit and period based in various criteria for completeness.
 intro_orgunit_distribution_report = Browse the organisation unit distribution report based on the organisation unit group sets and its groups.
 orgunit_distribution_report = Organisation Unit Distribution Report
-add_indicator_chart = Add indicator chart
 create_period_by_indicator_chart = Create period by indicator chart
 value_x_selected_indicators = Value (X) - Selected indicators
 value_x_available_indicators = Value (X) - Available indicators

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm	2011-05-29 19:39:28 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewChartForm.vm	2011-06-01 11:39:43 +0000
@@ -1,6 +1,11 @@
 <script type="text/javascript">
 	jQuery(document).ready(function(){		
 		tableSorter( 'listTable' );	
+		
+		jQuery('#add_chart').bind('click', function() {
+			var optionValue = jQuery('#chart_type').find(":selected").attr('value');
+			window.location.href = 'displayAddChartForm.action?dimension=' + optionValue;
+		});
 	});
 
 	var i18n_please_wait = '$encoder.jsEscape( $i18n.getString( "please_wait" ), "'")';
@@ -18,9 +23,12 @@
 				  <tr>
 				  	<td>#filterDiv( "displayViewChartForm" )</td>
                     <td align="right">
-                    	<input type="button" value="$i18n.getString( 'add_period_chart' )" style="width:200px" onclick="window.location.href='displayAddChartForm.action?dimension=period'"><br>
-                    	<input type="button" value="$i18n.getString( 'add_organisation_unit_chart' )" style="width:200px" onclick="window.location.href='displayAddChartForm.action?dimension=organisationUnit'"><br>
-						<input type="button" value="$i18n.getString( 'add_indicator_chart' )" style="width:200px" onclick="window.location.href='displayAddChartForm.action?dimension=indicator'">
+                    	<select id="chart_type">
+                    		<option value='period'>$i18n.getString( 'period_by_indicator_chart' )</option>
+                    		<option value='organisationUnit'>$i18n.getString( 'indicator_by_organisation_unit_chart' )</option>
+                    		<option value='indicator'>$i18n.getString( 'indicator_by_period_chart' )</option>
+                    	</select>
+                    	<button type="button" id="add_chart">$i18n.getString( 'add' )</button>
                     </td>
                 </tr>
 			</table>