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);
}
private static final String STYLENAME = "i-Notification";\r
private static final int mouseMoveThreshold = 7;\r
private static final int Z_INDEX_BASE = 20000;\r
+ public static final String STYLE_SYSTEM = "system";\r
\r
private int startOpacity = 90;\r
private int fadeMsec = 400;\r
public boolean onEventPreview(Event event) {\r
int type = DOM.eventGetType(event);\r
// "modal"\r
- if (delayMsec == -1) {\r
- if (type == Event.ONCLICK\r
- && DOM\r
- .isOrHasChild(getElement(), DOM\r
- .eventGetTarget(event))) {\r
- fade();\r
+ if (delayMsec == -1 || temporaryStyle == STYLE_SYSTEM) {\r
+ if (type == Event.ONCLICK) {\r
+ if (DOM.isOrHasChild(getElement(), DOM.eventGetTarget(event))) {\r
+ fade();\r
+ return false;\r
+ }\r
+ }\r
+ if (temporaryStyle == STYLE_SYSTEM) {\r
+ return true;\r
+ } else {\r
+ return false;\r
}\r
- return false;\r
}\r
// default\r
switch (type) {\r