diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-01-09 13:53:23 +0000 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-01-09 13:53:23 +0000 |
commit | 30f4d3ede40f95919a225a1f7f8bff182a1bf0e2 (patch) | |
tree | 6cbd35abff436c9dbaf132b32465cabdb5693f03 /client | |
parent | 1a20331682f4495509fa79ad54c96fe77de82eed (diff) | |
parent | 058224f31198b2a56fd7fd52e9a767909b58cd79 (diff) | |
download | vaadin-framework-30f4d3ede40f95919a225a1f7f8bff182a1bf0e2.tar.gz vaadin-framework-30f4d3ede40f95919a225a1f7f8bff182a1bf0e2.zip |
Merge "Merge of (#7842) to Vaadin 7."
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/ui/UIConnector.java | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java index 099cd5562e..85e75b943e 100644 --- a/client/src/com/vaadin/client/ui/ui/UIConnector.java +++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java @@ -131,6 +131,11 @@ public class UIConnector extends AbstractSingleComponentContainerConnector }); } + private native void open(String url, String name) + /*-{ + $wnd.open(url, name); + }-*/; + @Override public void updateFromUIDL(final UIDL uidl, ApplicationConnection client) { ConnectorMap paintableMap = ConnectorMap.get(getConnection()); @@ -194,27 +199,35 @@ public class UIConnector extends AbstractSingleComponentContainerConnector VUI.goTo(url); } else { String options; - if (open.hasAttribute("border")) { - if (open.getStringAttribute("border").equals("minimal")) { - options = "menubar=yes,location=no,status=no"; + boolean alwaysAsPopup = true; + if (open.hasAttribute("popup")) { + alwaysAsPopup = open.getBooleanAttribute("popup"); + } + if (alwaysAsPopup) { + 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 = "menubar=no,location=no,status=no"; + options = "resizable=yes,menubar=yes,toolbar=yes,directories=yes,location=yes,scrollbars=yes,status=yes"; } - } 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; + } - 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); + } else { + open(url, target); } - - Window.open(url, target, options); } childIndex++; } |