[Dive4elements-commits] [PATCH 2 of 2] Renable map print button

Wald Commits scm-commit at wald.intevation.org
Tue Apr 9 15:16:05 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1365513255 -7200
# Node ID 17e2324c760e23a1224c9a627add203dbedbe436
# Parent  98906446eadf1a36c576252ffe6c79f3bd78c95a
Renable map print button

diff -r 98906446eadf -r 17e2324c760e flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapPrintPanel.java
--- 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());


More information about the Dive4elements-commits mailing list