changeset 578:fe825061b83e

Set file-extension for histogram exports according to mime-type. gnv/trunk@715 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 01 Mar 2010 11:05:09 +0000
parents 60caaa265e2b
children dc548655a66e
files gnv/ChangeLog gnv/src/main/java/de/intevation/gnv/action/DoExportAction.java
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/ChangeLog	Fri Feb 26 13:54:47 2010 +0000
+++ b/gnv/ChangeLog	Mon Mar 01 11:05:09 2010 +0000
@@ -1,3 +1,8 @@
+2010-03-01  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	* src/main/java/de/intevation/gnv/action/DoExportAction.java: Set
+	  file-extension according to mime type for histogram exports.
+
 2010-02-26  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	* src/main/webapp/WEB-INF/config/templates/describe-ui.xsl: Render a matrix
--- a/gnv/src/main/java/de/intevation/gnv/action/DoExportAction.java	Fri Feb 26 13:54:47 2010 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/action/DoExportAction.java	Mon Mar 01 11:05:09 2010 +0000
@@ -178,6 +178,10 @@
                 fileName = fileName
                            + mimeType.substring(mimeType.indexOf("/") + 1);
             } 
+            if (target.equals("histogram")) {
+                fileName = fileName
+                           + mimeType.substring(mimeType.indexOf("/") + 1);
+            }
             else if (target.equals("pdf")) {
                 fileName = fileName + "pdf";
             } else if (target.equals("svg")) {

http://dive4elements.wald.intevation.org