]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #2516 + "borders"
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 30 Jan 2009 09:03:23 +0000 (09:03 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 30 Jan 2009 09:03:23 +0000 (09:03 +0000)
svn changeset:6680/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IView.java

index 1614c43ea4d691502d827a9669a0b14ea65282de..5d4e8c86d977cad8e9f7a37d7a0559481a0e5179 100644 (file)
@@ -174,8 +174,28 @@ public class IView extends SimplePanel implements Container,
                 onWindowClosed();
                 goTo(url);
             } else {
-                // TODO width & height
-                Window.open(url, target != null ? target : null, "");
+                String options;
+                if (open.hasAttribute("border")) {
+                    if (open.getStringAttribute("border").equals("minimal")) {
+                        options = "menubar=yes,location=no,status=no";
+                    } else {
+                        options = "menubar=no,location=no,status=no";
+                    }
+
+                } else {
+                    options = "resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes";
+                }
+
+                if (open.hasAttribute("width")) {
+                    int w = open.getIntAttribute("width");
+                    options += ",width=" + w;
+                }
+                if (open.hasAttribute("height")) {
+                    int h = open.getIntAttribute("height");
+                    options += ",height=" + h;
+                }
+
+                Window.open(url, target, options);
             }
             childIndex++;
         }