=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportExcelAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportExcelAction.java 2010-09-03 09:19:46 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportExcelAction.java 2010-09-03 14:54:54 +0000
@@ -164,9 +164,9 @@
this.indicator = indicator;
}
- private Integer period;
+ private String period;
- public void setPeriod( Integer period )
+ public void setPeriod( String period )
{
this.period = period;
}
@@ -216,10 +216,6 @@
{
log.info( "Exporting workbook, width: " + width + ", height: " + height );
- Period p = periodService.getPeriod( period );
-
- p.setName( format.formatPeriod( p ) );
-
Indicator i = indicatorService.getIndicator( indicator );
// ---------------------------------------------------------------------
@@ -230,7 +226,7 @@
svgDocument.setTitle( this.title );
svgDocument.setSvg( this.svg );
- svgDocument.setPeriod( p );
+ svgDocument.setPeriod( period );
svgDocument.setIndicator( i );
svgDocument.setLegends( this.legends );
svgDocument.setIncludeLegends( this.includeLegends );
@@ -286,7 +282,7 @@
sheet.addCell( new Label( titlePositionCol, titlePositionRow + 1, i18n.getString( "Indicator" ), header ) );
sheet.addCell( new Label( titlePositionCol + 2, titlePositionRow + 1, i.getName(), headerContent ) );
sheet.addCell( new Label( titlePositionCol, titlePositionRow + 2, i18n.getString( "Period" ), header ) );
- sheet.addCell( new Label( titlePositionCol + 2, titlePositionRow + 2, p.getName(), headerContent ) );
+ sheet.addCell( new Label( titlePositionCol + 2, titlePositionRow + 2, period, headerContent ) );
// ---------------------------------------------------------------------
// Write data values to workbook
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportImageAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportImageAction.java 2010-09-03 11:09:50 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportImageAction.java 2010-09-03 14:54:54 +0000
@@ -72,13 +72,6 @@
this.indicatorService = indicatorService;
}
- protected I18nFormat format;
-
- public void setFormat( I18nFormat format )
- {
- this.format = format;
- }
-
// -------------------------------------------------------------------------
// Output & input
// -------------------------------------------------------------------------
@@ -104,9 +97,9 @@
this.indicator = indicator;
}
- private Integer period;
+ private String period;
- public void setPeriod( Integer period )
+ public void setPeriod( String period )
{
this.period = period;
}
@@ -159,10 +152,6 @@
{
log.info( "Export map from request" );
- Period _period = periodService.getPeriod( period );
-
- _period.setName( format.formatPeriod( _period ) );
-
Indicator _indicator = indicatorService.getIndicator( indicator );
svgDocument = new SVGDocument();
@@ -170,7 +159,7 @@
svgDocument.setTitle( title );
svgDocument.setSvg( svg );
svgDocument.setIndicator( _indicator );
- svgDocument.setPeriod( _period );
+ svgDocument.setPeriod( period );
svgDocument.setLegends( legends );
svgDocument.setIncludeLegends( includeLegends );
svgDocument.setWidth( width );
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/export/SVGDocument.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/export/SVGDocument.java 2010-09-03 09:19:46 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/export/SVGDocument.java 2010-09-03 14:54:54 +0000
@@ -51,7 +51,7 @@
private String legends;
- private Period period;
+ private String period;
private Indicator indicator;
@@ -74,7 +74,7 @@
+ this.indicator.getName() + "";
String period_ = ""
- + this.period.getName() + "";
+ + this.period + "";
String svg_ = doctype + this.svg;
@@ -233,12 +233,12 @@
this.legends = legends;
}
- public Period getPeriod()
+ public String getPeriod()
{
return period;
}
- public void setPeriod( Period period )
+ public void setPeriod( String period )
{
this.period = period;
}
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-09-03 12:26:57 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-09-03 14:54:54 +0000
@@ -90,12 +90,10 @@
function toggleFeatureLabelsPoints(layer) {
function activateLabels() {
layer.styleMap = getActivatedOpenLayersStyleMap(MAPDATA[thematicMap2].nameColumn);
- layer.refresh();
LABELS[thematicMap2] = true;
}
function deactivateLabels() {
layer.styleMap = getDeactivatedOpenLayersStyleMap();
- layer.refresh();
LABELS[thematicMap2] = false;
}
@@ -112,12 +110,10 @@
function toggleFeatureLabelsAssignment(classify, layer) {
function activateLabels() {
layer.styleMap = getActivatedOpenLayersStyleMap(MAPDATA[organisationUnitAssignment].nameColumn);
- layer.refresh();
LABELS[organisationUnitAssignment] = true;
}
function deactivateLabels() {
layer.styleMap = getDeactivatedOpenLayersStyleMap();
- layer.refresh();
LABELS[organisationUnitAssignment] = false;
}
@@ -143,18 +139,17 @@
function getExportDataValueJSON(mapvalues){var json='{';json+='"datavalues":';json+='[';mapvalues.sort(sortByValue);for(var i=0;i