]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix for #2087: the same loading indicator is show at application start that is used...
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 6 Oct 2008 13:20:48 +0000 (13:20 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Mon, 6 Oct 2008 13:20:48 +0000 (13:20 +0000)
svn changeset:5598/svn branch:trunk

WebContent/ITMILL/themes/default/common/common.css
WebContent/ITMILL/themes/default/styles.css
src/com/itmill/toolkit/terminal/gwt/client/ui/IView.java
src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java

index f5b95ee2ff846e915af41c09bbb5ef1afbb9fa49..e88eca18d699d98a283413297bdc979f4a9d9d56 100644 (file)
@@ -7,6 +7,7 @@
        margin:0;
        overflow:hidden;
 }
+
 .i-app {
        background: #e9eced;
        font-family: "Trebuchet MS", geneva, helvetica, arial, tahoma, verdana, sans-serif;
        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%;
index 7d0a8b6857b4b4b194b0238349544da9e192d438..212bf2d23793dde3d38b41f8aab45ba7df2ff87d 100644 (file)
        margin:0;
        overflow:hidden;
 }
+
 .i-app {
        background: #e9eced;
        font-family: "Trebuchet MS", geneva, helvetica, arial, tahoma, verdana, sans-serif;
        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%;
index 0e8874b4b73f631daae1a70520aacdf2446efb16..d41062b10c58ddb2427613c2ed1529ed06ff0766 100644 (file)
@@ -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()) {
index 9d768952aca96cad96ef02e1e73cda868a9b3f7e..e8165f3ff98dd0bab03e135a08a33be520a626dc 100644 (file)
@@ -954,7 +954,7 @@ public class ApplicationServlet extends HttpServlet {
         if (reqParam != null) {
             style = "style=\"" + reqParam + "\"";
         }
-        page.write("<div id=\"" + appId + "\" class=\"i-app\" "
+        page.write("<div id=\"" + appId + "\" class=\"i-app i-app-loading\" "
                 + (style != null ? style : "") + "></div>\n");
 
         if (!fragment) {