← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5194: Several minor fixes.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5194 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-11-22 15:05:54 +0100
message:
  Several minor fixes.
removed:
  dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportExcelAction.java
added:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/openlayers-2.11/img/drag-rectangle-on.png
modified:
  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/export/SVGUtils.java
  dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-mapping/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js
  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/css/style.css
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/images/png.png
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html


--
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
=== removed 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	2011-11-16 19:37:51 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportExcelAction.java	1970-01-01 00:00:00 +0000
@@ -1,335 +0,0 @@
-package org.hisp.dhis.mapping.action;
-
-/*
- * Copyright (c) 2004-2010, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.io.OutputStream;
-
-import jxl.CellView;
-import jxl.Workbook;
-import jxl.format.Alignment;
-import jxl.format.Border;
-import jxl.format.BorderLineStyle;
-import jxl.format.Colour;
-import jxl.write.Label;
-import jxl.write.Number;
-import jxl.write.WritableCellFormat;
-import jxl.write.WritableImage;
-import jxl.write.WritableSheet;
-import jxl.write.WritableWorkbook;
-import net.sf.json.JSONArray;
-import net.sf.json.JSONObject;
-import net.sf.json.JSONSerializer;
-
-import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.mapping.export.SVGDocument;
-import org.hisp.dhis.mapping.export.SVGUtils;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.util.ContextUtils;
-import org.hisp.dhis.util.StreamActionSupport;
-
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * @author Tran Thanh Tri
- * @version $Id$
- */
-public class ExportExcelAction
-    extends StreamActionSupport
-{
-    private static final Log log = LogFactory.getLog( ExportExcelAction.class );
-    
-    // -------------------------------------------------------------------------
-    // Map position in excel
-    // -------------------------------------------------------------------------
-
-    int titlePositionCol = 1;
-
-    int titlePositionRow = 1;
-
-    int mapPositionCol = 1;
-
-    int mapPositionCRow = 5;
-
-    int legendPositionCol = 9;
-
-    int legendPositionRow = 5;
-
-    int orgunitPositionCol = 9;
-
-    int orgunitPositionRow = 5;
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-
-    protected I18nFormat format;
-
-    public void setFormat( I18nFormat format )
-    {
-        this.format = format;
-    }
-
-    private I18n i18n;
-
-    public void setI18n( I18n i18n )
-    {
-        this.i18n = i18n;
-    }
-
-    // -------------------------------------------
-    // Input
-    // -------------------------------------------
-
-    private String svg;
-
-    public void setSvg( String svg )
-    {
-        this.svg = svg;
-    }
-
-    private String legends;
-
-    public void setLegends( String legends )
-    {
-        this.legends = legends;
-    }
-
-    private String title;
-
-    public void setTitle( String title )
-    {
-        this.title = title;
-    }
-
-    private String indicator;
-
-    public void setIndicator( String indicator )
-    {
-        this.indicator = indicator;
-    }
-
-    private String period;
-
-    public void setPeriod( String period )
-    {
-        this.period = period;
-    }
-
-    private Integer width;
-
-    public void setWidth( Integer width )
-    {
-        this.width = width;
-    }
-
-    private Integer height;
-
-    public void setHeight( Integer height )
-    {
-        this.height = height;
-    }
-
-    private String datavalues;
-
-    public void setDatavalues( String datavalues )
-    {
-        this.datavalues = datavalues;
-    }
-
-    private boolean includeValues;
-
-    public void setIncludeValues( boolean includeValues )
-    {
-        this.includeValues = includeValues;
-    }
-
-    private boolean includeLegends;
-
-    public void setIncludeLegends( boolean includeLegends )
-    {
-        this.includeLegends = includeLegends;
-    }
-
-    // -------------------------------------------
-    // Output
-    // -------------------------------------------
-    
-    @Override
-    protected String execute( HttpServletResponse response, OutputStream out )
-        throws Exception
-    {
-        log.info( "Exporting workbook, width: " + width + ", height: " + height );
-        
-        // ---------------------------------------------------------------------
-        // Write map image to byte array
-        // ---------------------------------------------------------------------
-
-        SVGDocument svgDocument = new SVGDocument();
-
-        svgDocument.setTitle( this.title );
-        svgDocument.setSvg( this.svg );
-        svgDocument.setPeriod( period );
-        svgDocument.setIndicator( indicator );        
-        svgDocument.setLegends( this.legends );        
-        svgDocument.setIncludeLegends( this.includeLegends );        
-
-        ByteArrayOutputStream image = new ByteArrayOutputStream();
-        
-        SVGUtils.convertToPNG( svgDocument.getSVGForExcel(), image, width, height );
-
-        // ---------------------------------------------------------------------
-        // Write workbook
-        // ---------------------------------------------------------------------
-
-        WritableWorkbook outputReportWorkbook = Workbook.createWorkbook( out );
-
-        WritableSheet sheet = outputReportWorkbook.createSheet( indicator, 1 );
-
-        // ---------------------------------------------------------------------
-        // Write map image to workbook
-        // ---------------------------------------------------------------------
-
-        sheet.mergeCells( mapPositionCol, mapPositionCRow, mapPositionCol + 6, mapPositionCRow + 25 );
-        
-        WritableImage map = new WritableImage( mapPositionCol, mapPositionCRow, 7, 26, image.toByteArray() );
-
-        sheet.addImage( map );
-
-        WritableCellFormat map_format = new WritableCellFormat();
-        map_format.setBorder( Border.ALL, BorderLineStyle.THIN );
-        map_format.setAlignment( Alignment.CENTRE );
-
-        sheet.addCell( new Label( mapPositionCol, mapPositionCRow, "", map_format ) );
-
-        // ---------------------------------------------------------------------
-        // Write title to workbook
-        // ---------------------------------------------------------------------
-
-        WritableCellFormat header = new WritableCellFormat();
-        header.setBackground( Colour.GREY_25_PERCENT );
-        header.setBorder( Border.ALL, BorderLineStyle.THIN );
-        
-        WritableCellFormat headerContent = new WritableCellFormat();
-        headerContent.setBorder( Border.ALL, BorderLineStyle.THIN );
-        
-        sheet.mergeCells( titlePositionCol, titlePositionRow, titlePositionCol + 1, titlePositionRow );
-        sheet.mergeCells( titlePositionCol + 2, titlePositionRow, titlePositionCol + 6, titlePositionRow );
-        sheet.mergeCells( titlePositionCol, titlePositionRow + 1, titlePositionCol + 1, titlePositionRow + 1 );
-        sheet.mergeCells( titlePositionCol + 2, titlePositionRow + 1, titlePositionCol + 6, titlePositionRow + 1 );
-        sheet.mergeCells( titlePositionCol, titlePositionRow + 2, titlePositionCol + 1, titlePositionRow + 2 );
-        sheet.mergeCells( titlePositionCol + 2, titlePositionRow + 2, titlePositionCol + 6, titlePositionRow + 2 );
-        
-        sheet.addCell( new Label( titlePositionCol, titlePositionRow, i18n.getString( "Title" ), header ) );
-        sheet.addCell( new Label( titlePositionCol + 2, titlePositionRow, this.title, headerContent ) );
-        sheet.addCell( new Label( titlePositionCol, titlePositionRow + 1, i18n.getString( "Indicator" ), header ) );
-        sheet.addCell( new Label( titlePositionCol + 2, titlePositionRow + 1, indicator, headerContent ) );
-        sheet.addCell( new Label( titlePositionCol, titlePositionRow + 2, i18n.getString( "Period" ), header ) );
-        sheet.addCell( new Label( titlePositionCol + 2, titlePositionRow + 2, period, headerContent ) );
-
-        // ---------------------------------------------------------------------
-        // Write data values to workbook
-        // ---------------------------------------------------------------------
-
-        if ( includeValues )
-        {
-            WritableCellFormat datavalueHeader = new WritableCellFormat();
-            datavalueHeader.setBorder( Border.ALL, BorderLineStyle.THIN );
-            datavalueHeader.setAlignment( Alignment.CENTRE );
-            datavalueHeader.setBackground( Colour.GREY_25_PERCENT );
-
-            sheet.addCell( new Label( orgunitPositionCol, orgunitPositionRow, i18n.getString( "Name" ), datavalueHeader ) );
-
-            sheet.addCell( new Label( orgunitPositionCol + 1, orgunitPositionRow, i18n.getString( "Value" ), datavalueHeader ) );
-
-            WritableCellFormat valCellFormat = new WritableCellFormat();
-            valCellFormat.setAlignment( Alignment.LEFT );
-            valCellFormat.setBorder( Border.ALL, BorderLineStyle.THIN );
-
-            int rowValue = orgunitPositionRow + 1;
-
-            JSONObject datavalue;
-
-            OrganisationUnit organisationUnit;
-
-            JSONObject json = (JSONObject) JSONSerializer.toJSON( datavalues );
-
-            JSONArray jsonDataValues = json.getJSONArray( "datavalues" );
-            
-            CellView cellView = new CellView();
-            
-            cellView.setSize( 7000 );
-
-            for ( int index = 0; index < jsonDataValues.size(); index++ )
-            {
-                datavalue = jsonDataValues.getJSONObject( index );
-
-                organisationUnit = organisationUnitService.getOrganisationUnit( datavalue.getInt( "organisation" ) );
-
-                double value = datavalue.getDouble( "value" );
-
-                sheet.addCell( new Label( orgunitPositionCol, rowValue, organisationUnit.getName(), valCellFormat ) );
-                
-                sheet.setColumnView( orgunitPositionCol, cellView ); 
-
-                sheet.addCell( new Number( orgunitPositionCol + 1, rowValue, value, valCellFormat ) );
-
-                rowValue++;
-            }
-        }
-
-        outputReportWorkbook.write();
-
-        outputReportWorkbook.close();
-
-        return SUCCESS;
-    }
-    
-    @Override
-    protected String getContentType()
-    {
-        return ContextUtils.CONTENT_TYPE_EXCEL;
-    }
-
-    @Override
-    protected String getFilename()
-    {
-        return "DHIS_2_GIS.xls";
-    }
-}
\ No newline at end of file

=== 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	2011-11-16 19:37:51 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/ExportImageAction.java	2011-11-22 13:58:34 +0000
@@ -133,27 +133,13 @@
         this.includeLegends = includeLegends;
     }
 
-    private Integer width;
-
-    public void setWidth( Integer width )
-    {
-        this.width = width;
-    }
-
-    private Integer height;
-
-    public void setHeight( Integer height )
-    {
-        this.height = height;
-    }
-
     private SVGDocument svgDocument;
 
     @Override
     protected String execute( HttpServletResponse response, OutputStream out )
         throws Exception
     {
-        if ( svg == null || title == null || indicator == null || period == null || width == null || height == null )
+        if ( svg == null || title == null || indicator == null || period == null )
         {
             log.info( "Export map from session" );
 
@@ -172,8 +158,6 @@
             svgDocument.setPeriod( this.period );
             svgDocument.setLegends( this.legends );
             svgDocument.setIncludeLegends( this.includeLegends );
-            svgDocument.setWidth( this.width );
-            svgDocument.setHeight( this.height );
             
             if ( this.layer == 3 )
             {
@@ -186,7 +170,7 @@
             SessionUtils.setSessionVar( SVGDOCUMENT, svgDocument );
         }
         
-        SVGUtils.convertToPNG( svgDocument.getSVGForImage(), out, this.width, this.height );
+        SVGUtils.convertToPNG( svgDocument.getSVGForImage(), out );
 
         return SUCCESS;
     }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/export/SVGUtils.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/export/SVGUtils.java	2011-11-17 16:55:09 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/export/SVGUtils.java	2011-11-22 13:58:34 +0000
@@ -35,32 +35,18 @@
 import org.apache.batik.transcoder.TranscoderException;
 import org.apache.batik.transcoder.TranscoderInput;
 import org.apache.batik.transcoder.TranscoderOutput;
-import org.apache.batik.transcoder.image.JPEGTranscoder;
 import org.apache.batik.transcoder.image.PNGTranscoder;
-import org.apache.fop.svg.PDFTranscoder;
 
 /**
  * @author Tran Thanh Tri
  */
 public class SVGUtils
 {
-    public static void convertToPNG( StringBuffer buffer, OutputStream out, Integer width, Integer height )
+    public static void convertToPNG( StringBuffer buffer, OutputStream out )
         throws TranscoderException, IOException
     {
-        if ( width == null || width < 10 )
-        {
-            width = 1190;
-        }
-
-        if ( height == null || height < 10 )
-        {
-            height = 880;
-        }
-
         PNGTranscoder t = new PNGTranscoder();
-
-        t.addTranscodingHint( PNGTranscoder.KEY_HEIGHT, new Float( height ) );
-        t.addTranscodingHint( PNGTranscoder.KEY_WIDTH, new Float( width ) );
+        
         t.addTranscodingHint( PNGTranscoder.KEY_BACKGROUND_COLOR, Color.WHITE );
 
         TranscoderInput input = new TranscoderInput( new StringReader( buffer.toString() ) );
@@ -69,42 +55,4 @@
 
         t.transcode( input, output );
     }
-
-    public static void convertToJPG( StringBuffer buffer, OutputStream out, Integer width, Integer height )
-        throws TranscoderException, IOException
-    {
-        if ( width == null || width < 10 )
-        {
-            width = 1190;
-        }
-
-        if ( height == null || height < 10 )
-        {
-            height = 880;
-        }
-
-        JPEGTranscoder t = new JPEGTranscoder();
-
-        t.addTranscodingHint( JPEGTranscoder.KEY_HEIGHT, new Float( height ) );
-        t.addTranscodingHint( JPEGTranscoder.KEY_WIDTH, new Float( width ) );
-        t.addTranscodingHint( JPEGTranscoder.KEY_BACKGROUND_COLOR, Color.WHITE );
-
-        TranscoderInput input = new TranscoderInput( new StringReader( buffer.toString() ) );
-
-        TranscoderOutput output = new TranscoderOutput( out );
-
-        t.transcode( input, output );
-    }
-    
-    public static void convertToPDF( StringBuffer buffer, OutputStream out, Integer width, Integer height )
-        throws TranscoderException, IOException
-    {
-        PDFTranscoder p = new PDFTranscoder();
-
-        TranscoderInput input = new TranscoderInput( new StringReader( buffer.toString() ) );
-
-        TranscoderOutput output = new TranscoderOutput( out );
-
-        p.transcode( input, output );
-    }
 }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml	2011-11-15 19:22:58 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml	2011-11-22 13:58:34 +0000
@@ -330,10 +330,4 @@
 	<bean id="org.hisp.dhis.mapping.action.ExportImageAction" class="org.hisp.dhis.mapping.action.ExportImageAction"
 		scope="prototype"/>
 
-	<bean id="org.hisp.dhis.mapping.action.ExportExcelAction" class="org.hisp.dhis.mapping.action.ExportExcelAction"
-		scope="prototype">
-		<property name="organisationUnitService"
-			ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
-	</bean>
-
 </beans>

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/struts.xml	2011-11-15 19:22:58 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/struts.xml	2011-11-22 13:58:34 +0000
@@ -356,10 +356,6 @@
 		<action name="exportImage" class="org.hisp.dhis.mapping.action.ExportImageAction">
 			<result name="success" type="outputStreamResult"/>
 		</action>
-
-		<action name="exportExcel" class="org.hisp.dhis.mapping.action.ExportExcelAction">
-            <result name="success" type="outputStreamResult"/>
-		</action>
 		
 		<!-- i18n -->
 		

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js	2011-11-21 13:58:44 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js	2011-11-22 13:58:34 +0000
@@ -113,6 +113,8 @@
     
     defaultLayerOpacity: 0.8,
     
+    wmsLayerOpacity: 0.5,
+    
     defaultLayerZIndex: 10000,
     
     defaultLowRadius: 5,
@@ -435,7 +437,8 @@
         var layer = new OpenLayers.Layer.WMS(name, url, options, {
             isBaseLayer: false,
             buffer: 0,
-            ratio: 1
+            ratio: 1,
+            singleTile: true
         });
         layer.baseUrl = url;
         return layer;
@@ -533,6 +536,9 @@
             if (G.vars.map.layers[i].layerType == type) {
                 G.vars.map.layers[i].setOpacity(opacity);
             }
+            else if (G.vars.map.layers[i].overlayType == type) {
+                G.vars.map.layers[i].setOpacity(opacity);
+            }                
         }
     },
     

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2011-11-21 13:58:44 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2011-11-22 13:58:34 +0000
@@ -2961,6 +2961,7 @@
         listeners: {
             'afterrender': function() {
                 G.util.setOpacityByLayerType(G.conf.map_layer_type_overlay, G.conf.defaultLayerOpacity);
+                G.util.setOpacityByLayerType(G.conf.map_overlay_type_wms, G.conf.wmsLayerOpacity);                
                 G.util.setOpacityByLayerType(G.conf.map_layer_type_thematic, G.conf.defaultLayerOpacity);
                 symbolLayer.setOpacity(1);
                 centroidLayer.setOpacity(1);
@@ -2971,6 +2972,7 @@
                     polygonLayer.svgId = svg[0].id;
                     pointLayer.svgId = svg[1].id;
                     symbolLayer.svgId = svg[2].id;
+                    centroidLayer.svgId = svg[3].id;
                 }
                 
                 for (var i = 0, j = 3; i < G.vars.map.layers.length; i++) {

=== added file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/openlayers-2.11/img/drag-rectangle-on.png'
Binary files dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/openlayers-2.11/img/drag-rectangle-on.png	1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/openlayers-2.11/img/drag-rectangle-on.png	2011-11-22 13:58:34 +0000 differ
=== 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	2011-11-17 16:13:19 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js	2011-11-22 13:58:34 +0000
@@ -45,6 +45,10 @@
             line: 'line',
             area: 'area',
             pie: 'pie'
+        },
+        image: {
+            png: 'png',
+            pdf: 'pdf'
         }
     },
     chart: {
@@ -1857,18 +1861,18 @@
                                         items: [
                                             {
                                                 text: 'PNG',
-                                                iconCls: 'dv-menu-toolbar-png',
+                                                iconCls: 'dv-menu-toolbar-save-png',
                                                 minWidth: 80,
                                                 handler: function() {
-                                                    b.execute('png');
+                                                    b.execute(DV.conf.finals.image.png);
                                                 }
                                             },
                                             {
                                                 text: 'PDF',
-                                                iconCls: 'dv-menu-toolbar-pdf',
+                                                iconCls: 'dv-menu-toolbar-save-pdf',
                                                 minWidth: 80,
                                                 handler: function() {
-                                                    b.execute('pdf');
+                                                    b.execute(DV.conf.finals.image.pdf);
                                                 }
                                             }
                                         ]                                            

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/css/style.css'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/css/style.css	2011-11-17 14:53:18 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/css/style.css	2011-11-22 13:58:34 +0000
@@ -382,10 +382,10 @@
     color: #444;
 }
 
-.dv-menu-toolbar-png {
+.dv-menu-toolbar-save-png {
     background-image:url('../images/png.png');
 }
 
-.dv-menu-toolbar-pdf {
+.dv-menu-toolbar-save-pdf {
     background-image:url('../images/pdf.png');
 }

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/images/png.png'
Binary files dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/images/png.png	2011-11-17 14:53:18 +0000 and dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/images/png.png	2011-11-22 14:04:40 +0000 differ
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html	2011-11-17 16:13:19 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html	2011-11-22 13:58:34 +0000
@@ -1,22 +1,21 @@
 <html>
 <head>
     <title>DHIS 2 Data Visualizer</title>
-
     <link rel="stylesheet" type="text/css" href="lib/ext/resources/css/ext-all-gray.css" />
-    <link rel="stylesheet" type="text/css" href="css/style.css" />
+    <link rel="stylesheet" type="text/css" href="css/style.css" />    
+</head>
 
-    <script type="text/javascript" src="lib/ext/ext-all.js"></script>
-    <script type="text/javascript" src="app.js"></script>
+<body>
 	
     <form id="exportForm" method="post">
         <input type="hidden" id="titleField" name="title"/>
         <input type="hidden" id="svgField" name="svg"/>
         <input type="hidden" id="typeField" name="type"/>
     </form>
+
+    <script type="text/javascript" src="lib/ext/ext-all.js"></script>
+    <script type="text/javascript" src="app.js"></script>
     
-</head>
-
-<body>
 </body>
 
 </html>