From 8680cbe791ed2686fc47e6eec5f0a72af311bddf Mon Sep 17 00:00:00 2001 From: Jouni Koivuviita Date: Mon, 6 Oct 2008 13:20:48 +0000 Subject: [PATCH] Fix for #2087: the same loading indicator is show at application start that is used for UIDL request indication. This can be overridden in theme. svn changeset:5598/svn branch:trunk --- WebContent/ITMILL/themes/default/common/common.css | 7 +++++++ WebContent/ITMILL/themes/default/styles.css | 7 +++++++ src/com/itmill/toolkit/terminal/gwt/client/ui/IView.java | 3 +++ .../toolkit/terminal/gwt/server/ApplicationServlet.java | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/WebContent/ITMILL/themes/default/common/common.css b/WebContent/ITMILL/themes/default/common/common.css index f5b95ee2ff..e88eca18d6 100644 --- a/WebContent/ITMILL/themes/default/common/common.css +++ b/WebContent/ITMILL/themes/default/common/common.css @@ -7,6 +7,7 @@ margin:0; overflow:hidden; } + .i-app { background: #e9eced; font-family: "Trebuchet MS", geneva, helvetica, arial, tahoma, verdana, sans-serif; @@ -16,6 +17,12 @@ height: 100%; } +.i-app-loading { + background-image: url(img/loading-indicator.gif); + background-repeat: no-repeat; + background-position: 50%; +} + .i-view { height: 100%; width: 100%; diff --git a/WebContent/ITMILL/themes/default/styles.css b/WebContent/ITMILL/themes/default/styles.css index 7d0a8b6857..212bf2d237 100644 --- a/WebContent/ITMILL/themes/default/styles.css +++ b/WebContent/ITMILL/themes/default/styles.css @@ -137,6 +137,7 @@ margin:0; overflow:hidden; } + .i-app { background: #e9eced; font-family: "Trebuchet MS", geneva, helvetica, arial, tahoma, verdana, sans-serif; @@ -146,6 +147,12 @@ height: 100%; } +.i-app-loading { + background-image: url(common/img/loading-indicator.gif); + background-repeat: no-repeat; + background-position: 50%; +} + .i-view { height: 100%; width: 100%; diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/IView.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/IView.java index 0e8874b4b7..d41062b10c 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/IView.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/IView.java @@ -78,6 +78,7 @@ public class IView extends SimplePanel implements Container, DOM.setElementProperty(getElement(), "tabIndex", "1"); RootPanel.get(elementId).add(this); + RootPanel.get(elementId).removeStyleName("i-app-loading"); // set focus to iview element by default to listen possible keyboard // shortcuts @@ -296,6 +297,7 @@ public class IView extends SimplePanel implements Container, .setContentAreaHeight(getElement().getOffsetHeight() - 1); } + @Override public void onBrowserEvent(Event event) { super.onBrowserEvent(event); if (DOM.eventGetType(event) == Event.ONKEYDOWN && actionHandler != null) { @@ -313,6 +315,7 @@ public class IView extends SimplePanel implements Container, */ if (resizeTimer == null) { resizeTimer = new Timer() { + @Override public void run() { boolean changed = false; if (IView.this.width != getOffsetWidth()) { diff --git a/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java b/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java index 9d768952ac..e8165f3ff9 100644 --- a/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java +++ b/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java @@ -954,7 +954,7 @@ public class ApplicationServlet extends HttpServlet { if (reqParam != null) { style = "style=\"" + reqParam + "\""; } - page.write("
\n"); if (!fragment) { -- 2.39.5