dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13016
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4095: implemented "hide subtitle" for charts (for hiding subheading..)
------------------------------------------------------------
revno: 4095
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-07-07 16:29:56 +0300
message:
implemented "hide subtitle" for charts (for hiding subheading..)
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml
dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java
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/addChartForm.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-api/src/main/java/org/hisp/dhis/chart/Chart.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2011-06-07 16:12:23 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/chart/Chart.java 2011-07-07 13:29:56 +0000
@@ -41,7 +41,6 @@
/**
* @author Lars Helge Overland
- * @version $Id$
*/
public class Chart
implements Serializable, ImportableObject
@@ -98,6 +97,8 @@
private Boolean targetLine;
+ private Boolean hideSubtitle;
+
private Double targetLineValue;
private String targetLineLabel;
@@ -394,6 +395,21 @@
return targetLineLabel;
}
+ public void setHideSubtitle( Boolean hideSubtitle )
+ {
+ this.hideSubtitle = hideSubtitle;
+ }
+
+ public Boolean getHideSubtitle()
+ {
+ if ( hideSubtitle == null )
+ {
+ return Boolean.FALSE;
+ }
+
+ return hideSubtitle;
+ }
+
public List<Indicator> getIndicators()
{
return indicators;
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2011-06-07 16:12:23 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/chart/impl/DefaultChartService.java 2011-07-07 13:29:56 +0000
@@ -219,7 +219,7 @@
chart.setFormat( format );
chart.init();
- return getJFreeChart( chart, true );
+ return getJFreeChart( chart, !chart.getHideSubtitle() );
}
public JFreeChart getJFreeChart( List<Indicator> indicators, List<DataElement> dataElements, List<Period> periods,
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml 2011-06-07 16:12:23 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/chart/hibernate/Chart.hbm.xml 2011-07-07 13:29:56 +0000
@@ -22,6 +22,8 @@
<property name="hideLegend" />
+ <property name="hideSubtitle" />
+
<property name="verticalLabels" />
<property name="horizontalPlotOrientation" />
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java 2011-06-07 16:12:23 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/java/org/hisp/dhis/reporting/chart/action/SaveChartAction.java 2011-07-07 13:29:56 +0000
@@ -112,6 +112,13 @@
this.title = title;
}
+ private boolean hideSubtitle;
+
+ public void setHideSubtitle( boolean hideSubtitle )
+ {
+ this.hideSubtitle = hideSubtitle;
+ }
+
private String type;
public void setType( String type )
@@ -297,6 +304,7 @@
Collections.sort( periods, new AscendingPeriodComparator() );
chart.setTitle( title );
+ chart.setHideSubtitle( hideSubtitle );
chart.setType( type );
chart.setSize( size );
chart.setDimension( dimension );
=== 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-07-01 08:11:03 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/org/hisp/dhis/reporting/i18n_module.properties 2011-07-07 13:29:56 +0000
@@ -194,6 +194,7 @@
wide= Wide
tall= Tall
title= Title
+hide_subtitle= Hide subtitle
value_y_available_indicators= Value (Y) - Available indicators
value_y_selected_indicators= Value (Y) - Selected indicators
value_y_available_dataelements= Value (Y) - Available data elements
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartForm.vm 2011-07-06 17:41:37 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartForm.vm 2011-07-07 13:29:56 +0000
@@ -57,6 +57,12 @@
<td><label for="title">$i18n.getString( "title" )</label></td>
<td><input type="text" id="title" name="title" style="width:300px" value="$!chart.title"></td>
</tr>
+
+ <tr>
+ <td><label for="hideSubtitle">$i18n.getString( "hide_subtitle" )</label></td>
+ <td><input type="checkbox" id="hideSubtitle" name="hideSubtitle" value="true"#if( $!chart.hideSubtitle ) checked#end></td>
+ </tr>
+
<tr>
<td><label for="type">$i18n.getString( "chart_type" )</label></td>
<td>