changeset 5611:17e2324c760e

Renable map print button
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 09 Apr 2013 15:14:15 +0200
parents 98906446eadf
children 4f935415bb20
files flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintPanel.java
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintPanel.java	Tue Apr 09 15:13:42 2013 +0200
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintPanel.java	Tue Apr 09 15:14:15 2013 +0200
@@ -7,11 +7,11 @@
 import com.smartgwt.client.util.SC;
 import com.smartgwt.client.widgets.Canvas;
 import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.TextItem;
 import com.smartgwt.client.widgets.form.fields.ButtonItem;
-import com.smartgwt.client.widgets.form.fields.SelectItem;
-import com.smartgwt.client.widgets.form.fields.TextItem;
 import com.smartgwt.client.widgets.form.fields.events.ClickEvent;
 import com.smartgwt.client.widgets.form.fields.events.ClickHandler;
+import com.smartgwt.client.types.Alignment;
 
 import org.gwtopenmaps.openlayers.client.Bounds;
 import org.gwtopenmaps.openlayers.client.Map;
@@ -119,6 +119,10 @@
         this.pageCreator.setTitle("Ersteller");
         this.pageDatePlace.setTitle("Ort, Datum");
 
+        ButtonItem printButton = createPrintButtonItem();
+
+        printButton.setAlign(Alignment.RIGHT);
+
         DynamicForm df = new DynamicForm();
         df.setFields(
 //               this.pageFormat,
@@ -130,8 +134,7 @@
                this.pageSource,
                this.pageCreator,
                this.pageDatePlace,
-               createPrintButtonItem()
-               );
+               printButton);
         addChild(df);
     }
 
@@ -158,12 +161,11 @@
         GWT.log("Button created");
         btn.addClickHandler(new ClickHandler() {
 
-            @Override
             public void onClick(ClickEvent event) {
                 GWT.log("Print Button Click");
-//                updateCollection();
-                //Window.open(createPrintUrl(), "_blank", "");
-//                parent.destroy();
+                updateCollection();
+                Window.open(createPrintUrl(), "_blank", "");
+                parent.destroy();
             }
         });
         btn.setTitle(MSG.print());

http://dive4elements.wald.intevation.org