dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15701
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5758: (DV) Domain/range axis label options implemented.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5758 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-01-19 15:29:04 +0100
message:
(DV) Domain/range axis label options implemented.
modified:
dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/AddOrUpdateChartAction.java
dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.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-visualizer/src/main/java/org/hisp/dhis/visualizer/action/AddOrUpdateChartAction.java'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/AddOrUpdateChartAction.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/AddOrUpdateChartAction.java 2012-01-19 14:21:19 +0000
@@ -246,18 +246,18 @@
this.userOrganisationUnit = userOrganisationUnit;
}
- private String xAxisLabel;
+ private String domainAxisLabel;
- public void setXAxisLabel( String xAxisLabel )
+ public void setDomainAxisLabel( String domainAxisLabel )
{
- this.xAxisLabel = xAxisLabel;
+ this.domainAxisLabel = domainAxisLabel;
}
- private String yAxisLabel;
+ private String rangeAxisLabel;
- public void setYAxisLabel( String yAxisLabel )
+ public void setRangeAxisLabel( String rangeAxisLabel )
{
- this.yAxisLabel = yAxisLabel;
+ this.rangeAxisLabel = rangeAxisLabel;
}
private Double targetLineValue;
@@ -374,14 +374,14 @@
chart.setUserOrganisationUnit( userOrganisationUnit );
}
- if ( xAxisLabel != null )
+ if ( domainAxisLabel != null )
{
- chart.setDomainAxisLabel( xAxisLabel );
+ chart.setDomainAxisLabel( domainAxisLabel );
}
- if ( yAxisLabel != null )
+ if ( rangeAxisLabel != null )
{
- chart.setRangeAxisLabel( yAxisLabel );
+ chart.setRangeAxisLabel( rangeAxisLabel );
}
if ( targetLineValue != null )
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties 2012-01-18 15:07:21 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties 2012-01-19 14:21:19 +0000
@@ -45,10 +45,10 @@
hide_subtitle=Hide subtitle
hide_legend=Hide legend
user_orgunit=User orgunit
-x_axis_label=X axis label
-y_axis_label=Y axis label
+domain_axis_label=Domain axis label
+range_axis_label=Range axis label
target_line_value=Target line value
-target_line_label=Target line labels
+target_line_label=Target line label
show_hide_chart_settings=Show/hide chart settings
update=Update
data_table=Data table
@@ -69,7 +69,7 @@
save=Save
example_chart_cannot_be_saved=* The example chart cannot be saved
overwrite=Overwrite
-download_as=Download as
+download_as=Download..
alert_browser_download=Please use Chrome, Firefox, Opera or Safari to export images.
no_svg_format=No SVG format
image_png=Image (PNG)
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-01-19 13:00:43 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-01-19 14:21:19 +0000
@@ -730,11 +730,11 @@
params.hideSubtitle = DV.cmp.favorite.hidesubtitle.getValue();
params.hideLegend = DV.cmp.favorite.hidelegend.getValue();
params.userOrganisationUnit = DV.cmp.favorite.userorganisationunit.getValue();
- if (DV.cmp.favorite.xaxislabel.getValue()) {
- params.xAxisLabel = DV.cmp.favorite.xaxislabel.getValue();
+ if (DV.cmp.favorite.domainaxislabel.getValue()) {
+ params.domainAxisLabel = DV.cmp.favorite.domainaxislabel.getValue();
}
- if (DV.cmp.favorite.yaxislabel.getValue()) {
- params.yAxisLabel = DV.cmp.favorite.yaxislabel.getValue();
+ if (DV.cmp.favorite.rangeaxislabel.getValue()) {
+ params.rangeAxisLabel = DV.cmp.favorite.rangeaxislabel.getValue();
}
if (DV.cmp.favorite.targetlinevalue.getValue()) {
params.targetLineValue = DV.cmp.favorite.targetlinevalue.getValue();
@@ -992,6 +992,8 @@
relativePeriods: {},
organisationunitIds: [],
hideLegend: false,
+ domainAxisLabel: null,
+ rangeAxisLabel: null,
isRendered: false,
getState: function(exe) {
this.resetState();
@@ -1026,6 +1028,8 @@
this.organisationunitIds = DV.util.dimension.organisationunit.getIds();
this.hideLegend = DV.cmp.favorite.hidelegend.getValue();
+ this.domainAxisLabel = DV.cmp.favorite.domainaxislabel.getValue();
+ this.rangeAxisLabel = DV.cmp.favorite.rangeaxislabel.getValue();
this.isRendered = true;
@@ -1133,8 +1137,10 @@
this.hideLegend = f.hideLegend;
DV.cmp.favorite.hidelegend.setValue(f.hideLegend);
DV.cmp.favorite.userorganisationunit.setValue(f.userOrganisationUnit);
- DV.cmp.favorite.xaxislabel.setValue(f.domainAxisLabel);
- DV.cmp.favorite.yaxislabel.setValue(f.rangeAxisLabel);
+ this.domainAxisLabel = f.domainAxisLabel;
+ DV.cmp.favorite.domainaxislabel.setValue(f.domainAxisLabel);
+ this.rangeAxisLabel = f.rangeAxisLabel;
+ DV.cmp.favorite.rangeaxislabel.setValue(f.rangeAxisLabel);
DV.cmp.favorite.targetlinevalue.setValue(f.targetLineValue);
DV.cmp.favorite.targetlinelabel.xable();
DV.cmp.favorite.targetlinelabel.setValue(f.targetLineLabel);
@@ -1160,6 +1166,7 @@
this.dataelementIds = [];
this.relativePeriods = {};
this.organisationunitIds = [];
+ this.hideLegend = false;
}
};
@@ -1265,6 +1272,7 @@
{
type: 'Numeric',
position: 'left',
+ title: DV.state.rangeAxisLabel || false,
minimum: 0,
fields: DV.store.chart.left,
label: DV.util.chart.label.getNumericLabel(),
@@ -1275,6 +1283,7 @@
{
type: 'Category',
position: 'bottom',
+ title: DV.state.domainAxisLabel || false,
fields: DV.store.chart.bottom,
label: DV.util.chart.label.getCategoryLabel()
}
@@ -1308,12 +1317,14 @@
{
type: 'Category',
position: 'left',
+ title: DV.state.domainAxisLabel || false,
fields: DV.store.chart.left,
label: DV.util.chart.bar.getCategoryLabel()
},
{
type: 'Numeric',
position: 'bottom',
+ title: DV.state.rangeAxisLabel || false,
minimum: 0,
fields: DV.store.chart.bottom,
label: DV.util.chart.label.getNumericLabel(),
@@ -1351,6 +1362,7 @@
{
type: 'Numeric',
position: 'left',
+ title: DV.state.rangeAxisLabel || false,
minimum: 0,
fields: DV.store.chart.left,
label: DV.util.chart.label.getNumericLabel(),
@@ -1361,6 +1373,7 @@
{
type: 'Category',
position: 'bottom',
+ title: DV.state.domainAxisLabel || false,
fields: DV.store.chart.bottom,
label: DV.util.chart.label.getCategoryLabel()
}
@@ -1380,6 +1393,7 @@
{
type: 'Numeric',
position: 'left',
+ title: DV.state.rangeAxisLabel || false,
minimum: 0,
fields: DV.store.chart.left,
label: DV.util.chart.label.getNumericLabel(),
@@ -1390,6 +1404,7 @@
{
type: 'Category',
position: 'bottom',
+ title: DV.state.domainAxisLabel || false,
fields: DV.store.chart.bottom,
label: DV.util.chart.label.getCategoryLabel()
}
@@ -2310,7 +2325,7 @@
{
xtype: 'checkbox',
cls: 'dv-checkbox-alt1',
- style: 'margin-right:26px',
+ style: 'margin-right:25px',
boxLabel: DV.i18n.trend_line,
labelWidth: DV.conf.layout.form_label_width,
listeners: {
@@ -2322,7 +2337,7 @@
{
xtype: 'checkbox',
cls: 'dv-checkbox-alt1',
- style: 'margin-right:26px',
+ style: 'margin-right:24px',
boxLabel: DV.i18n.hide_subtitle,
labelWidth: DV.conf.layout.form_label_width,
listeners: {
@@ -2334,7 +2349,7 @@
{
xtype: 'checkbox',
cls: 'dv-checkbox-alt1',
- style: 'margin-right:26px',
+ style: 'margin-right:25px',
boxLabel: DV.i18n.hide_legend,
labelWidth: DV.conf.layout.form_label_width,
listeners: {
@@ -2365,7 +2380,7 @@
xtype: 'textfield',
cls: 'dv-textfield-alt1',
style: 'margin-right:4px',
- fieldLabel: DV.i18n.x_axis_label,
+ fieldLabel: DV.i18n.domain_axis_label,
labelAlign: 'top',
labelSeparator: '',
maxLength: 100,
@@ -2374,14 +2389,14 @@
width: 188,
listeners: {
added: function() {
- DV.cmp.favorite.xaxislabel = this;
+ DV.cmp.favorite.domainaxislabel = this;
}
}
},
{
xtype: 'textfield',
cls: 'dv-textfield-alt1',
- fieldLabel: DV.i18n.y_axis_label,
+ fieldLabel: DV.i18n.range_axis_label,
labelAlign: 'top',
labelSeparator: '',
maxLength: 100,
@@ -2390,7 +2405,7 @@
width: 187,
listeners: {
added: function() {
- DV.cmp.favorite.yaxislabel = this;
+ DV.cmp.favorite.rangeaxislabel = this;
}
}
}
@@ -2519,23 +2534,6 @@
{
xtype: 'button',
cls: 'dv-toolbar-btn-2',
- text: DV.i18n.data_table,
- handler: function() {
- var p = DV.cmp.region.east;
- if (p.collapsed && p.items.length) {
- p.expand();
- DV.cmp.toolbar.resizeeast.show();
- DV.exe.datatable(true);
- }
- else {
- p.collapse();
- DV.cmp.toolbar.resizeeast.hide();
- }
- }
- },
- {
- xtype: 'button',
- cls: 'dv-toolbar-btn-2',
text: DV.i18n.favorites,
listeners: {
afterrender: function(b) {
@@ -3129,6 +3127,23 @@
}
}
},
+ {
+ xtype: 'button',
+ cls: 'dv-toolbar-btn-2',
+ text: DV.i18n.data_table,
+ handler: function() {
+ var p = DV.cmp.region.east;
+ if (p.collapsed && p.items.length) {
+ p.expand();
+ DV.cmp.toolbar.resizeeast.show();
+ DV.exe.datatable(true);
+ }
+ else {
+ p.collapse();
+ DV.cmp.toolbar.resizeeast.hide();
+ }
+ }
+ },
'->',
{
xtype: 'button',
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm 2012-01-18 15:07:21 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm 2012-01-19 13:56:59 +0000
@@ -46,8 +46,8 @@
hide_subtitle:'$encoder.jsEscape($i18n.getString( 'hide_subtitle' ) , "'")',
hide_legend:'$encoder.jsEscape($i18n.getString( 'hide_legend' ) , "'")',
user_orgunit:'$encoder.jsEscape($i18n.getString( 'user_orgunit' ) , "'")',
-x_axis_label:'$encoder.jsEscape($i18n.getString( 'x_axis_label' ) , "'")',
-y_axis_label:'$encoder.jsEscape($i18n.getString( 'y_axis_label' ) , "'")',
+domain_axis_label:'$encoder.jsEscape($i18n.getString( 'domain_axis_label' ) , "'")',
+range_axis_label:'$encoder.jsEscape($i18n.getString( 'range_axis_label' ) , "'")',
target_line_value:'$encoder.jsEscape($i18n.getString( 'target_line_value' ) , "'")',
target_line_label:'$encoder.jsEscape($i18n.getString( 'target_line_label' ) , "'")',
show_hide_chart_settings:'$encoder.jsEscape($i18n.getString( 'show_hide_chart_settings' ) , "'")',