From: Matti Tahvonen Date: Tue, 23 Sep 2008 05:40:37 +0000 (+0000) Subject: fixes #2097 (session expired message and modal window incompatibility) X-Git-Tag: 6.7.0.beta1~4121 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3b4aa5e121d105e0335d8895393b8c207a259c15;p=vaadin-framework.git fixes #2097 (session expired message and modal window incompatibility) svn changeset:5479/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java b/src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java index 9c26bdc063..c06e2b129c 100755 --- a/src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java @@ -585,7 +585,8 @@ public class ApplicationConnection { if (html.length() != 0) { INotification n = new INotification(1000 * 60 * 45); //45min n.addEventListener(new NotificationRedirect(url)); - n.show(html, INotification.CENTERED_TOP, "system"); + n.show(html, INotification.CENTERED_TOP, + INotification.STYLE_SYSTEM); } else { redirect(url); } diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/INotification.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/INotification.java index 52ae8306c0..abb66a2bfa 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/INotification.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/INotification.java @@ -32,6 +32,7 @@ public class INotification extends IToolkitOverlay { private static final String STYLENAME = "i-Notification"; private static final int mouseMoveThreshold = 7; private static final int Z_INDEX_BASE = 20000; + public static final String STYLE_SYSTEM = "system"; private int startOpacity = 90; private int fadeMsec = 400; @@ -223,14 +224,18 @@ public class INotification extends IToolkitOverlay { public boolean onEventPreview(Event event) { int type = DOM.eventGetType(event); // "modal" - if (delayMsec == -1) { - if (type == Event.ONCLICK - && DOM - .isOrHasChild(getElement(), DOM - .eventGetTarget(event))) { - fade(); + if (delayMsec == -1 || temporaryStyle == STYLE_SYSTEM) { + if (type == Event.ONCLICK) { + if (DOM.isOrHasChild(getElement(), DOM.eventGetTarget(event))) { + fade(); + return false; + } + } + if (temporaryStyle == STYLE_SYSTEM) { + return true; + } else { + return false; } - return false; } // default switch (type) {