From fea60eaea2c791766be9f17ff2900739b32bf576 Mon Sep 17 00:00:00 2001 From: AMahdy AbdElAziz Date: Tue, 23 Dec 2014 16:52:22 +0200 Subject: Fix for Wrong background color in a Window in IE8 (#15322) Change-Id: Ie25c7142bc111829be829f4ba98ed639ad1f5126 --- WebContent/VAADIN/themes/chameleon/common/common.scss | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/themes/chameleon/common/common.scss b/WebContent/VAADIN/themes/chameleon/common/common.scss index 7bee2f529c..82e0810bc2 100644 --- a/WebContent/VAADIN/themes/chameleon/common/common.scss +++ b/WebContent/VAADIN/themes/chameleon/common/common.scss @@ -34,7 +34,9 @@ $chameleon-line-height: 1.4; } .v-sa & .v-tooltip { - outline: 1px solid rgba(0,0,0,.2); + outline-color: #000000; /* Fallback for browsers that does not support RGBA such as IE8 */ + outline-color: rgba(0,0,0,.2); + outline: 1px solid; -webkit-border-radius: 0; -moz-border-radius: 0; border: none; @@ -92,6 +94,7 @@ $chameleon-line-height: 1.4; .v-Notification, .v-menubar-submenu { border: 1px solid #adadad; + border-color: #000000; /* Fallback for browsers that does not support RGBA such as IE8 */ border-color: rgba(0,0,0,.4); border-radius: 4px; -webkit-border-radius: 4px; @@ -104,8 +107,10 @@ $chameleon-line-height: 1.4; .v-datefield-popup, .v-contextmenu, .v-menubar-submenu{ - background: rgba(232,232,232,.90) url(../img/grad-light-top.png) repeat-x; - } + background: #e8e8e8; /* Fallback for browsers that does not support RGBA such as IE8 */ + background: rgba(232,232,232,.90); + background-image: url(../img/grad-light-top.png) repeat-x; + } .v-filterselect-suggestpopup, .v-contextmenu, .v-menubar-submenu { -- cgit v1.2.3 From 65904ffbdebc861a45c1b504d244d02a12f4561b Mon Sep 17 00:00:00 2001 From: Fabian Lange Date: Wed, 23 Jul 2014 22:40:35 +0200 Subject: Appending query param with vaadin version to js files (#12210) while #7868 is supposed to solve the overall issue, this solves a big part of the upgrade + cached files issues quickly. When I use vaadin themes, I have control over how they are included, so I can add a vaadin version number to it. For the default JS I cannot. Change-Id: Ica1cddee417946aa32116eb09882a3dc6c2924a6 --- WebContent/VAADIN/vaadinBootstrap.js | 16 ++++++++++++---- .../communication/AtmospherePushConnection.java | 21 ++++++++++++++------- client/src/com/vaadin/client/ui/ui/UIConnector.java | 7 ++++++- server/src/com/vaadin/server/BootstrapHandler.java | 9 +++++++-- 4 files changed, 39 insertions(+), 14 deletions(-) (limited to 'WebContent/VAADIN') diff --git a/WebContent/VAADIN/vaadinBootstrap.js b/WebContent/VAADIN/vaadinBootstrap.js index ced077138f..53b213e110 100644 --- a/WebContent/VAADIN/vaadinBootstrap.js +++ b/WebContent/VAADIN/vaadinBootstrap.js @@ -18,13 +18,19 @@ log = console.log; } - var loadTheme = function(url) { + var loadTheme = function(url, version) { if(!themesLoaded[url]) { - log("loadTheme", url); + log("loadTheme", url, version); + + var href = url + '/styles.css'; + if (version) { + href += '?v=' + version; + } + var stylesheet = document.createElement('link'); stylesheet.setAttribute('rel', 'stylesheet'); stylesheet.setAttribute('type', 'text/css'); - stylesheet.setAttribute('href', url + "/styles.css"); + stylesheet.setAttribute('href', href); document.getElementsByTagName('head')[0].appendChild(stylesheet); themesLoaded[url] = true; } @@ -200,8 +206,10 @@ var bootstrapApp = function(mayDefer) { var vaadinDir = getConfig('vaadinDir'); + var versionInfo = getConfig('versionInfo'); + var themeUri = vaadinDir + 'themes/' + getConfig('theme'); - loadTheme(themeUri); + loadTheme(themeUri, versionInfo && versionInfo['vaadinVersion']); var widgetset = getConfig('widgetset'); var widgetsetUrl = getConfig('widgetsetUrl'); diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java index a2c4dd8323..d10449ccaa 100644 --- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java +++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java @@ -31,6 +31,7 @@ import com.vaadin.client.ResourceLoader.ResourceLoadEvent; import com.vaadin.client.ResourceLoader.ResourceLoadListener; import com.vaadin.client.VConsole; import com.vaadin.shared.ApplicationConstants; +import com.vaadin.shared.Version; import com.vaadin.shared.communication.PushConstants; import com.vaadin.shared.ui.ui.UIConstants; import com.vaadin.shared.ui.ui.UIState.PushConfigurationState; @@ -514,16 +515,10 @@ public class AtmospherePushConnection implements PushConnection { }-*/; private void runWhenAtmosphereLoaded(final Command command) { - if (isAtmosphereLoaded()) { command.execute(); } else { - final String pushJs; - if (ApplicationConfiguration.isProductionMode()) { - pushJs = ApplicationConstants.VAADIN_PUSH_JS; - } else { - pushJs = ApplicationConstants.VAADIN_PUSH_DEBUG_JS; - } + final String pushJs = getVersionedPushJs(); VConsole.log("Loading " + pushJs); ResourceLoader.get().loadScript( @@ -553,6 +548,18 @@ public class AtmospherePushConnection implements PushConnection { } } + private String getVersionedPushJs() { + String pushJs; + if (ApplicationConfiguration.isProductionMode()) { + pushJs = ApplicationConstants.VAADIN_PUSH_JS; + } else { + pushJs = ApplicationConstants.VAADIN_PUSH_DEBUG_JS; + } + // Parameter appended to bypass caches after version upgrade. + pushJs += "?v=" + Version.getFullVersion(); + return pushJs; + } + /* * (non-Javadoc) * diff --git a/client/src/com/vaadin/client/ui/ui/UIConnector.java b/client/src/com/vaadin/client/ui/ui/UIConnector.java index d6f14bf158..9e1da113bf 100644 --- a/client/src/com/vaadin/client/ui/ui/UIConnector.java +++ b/client/src/com/vaadin/client/ui/ui/UIConnector.java @@ -76,6 +76,7 @@ import com.vaadin.client.ui.window.WindowConnector; import com.vaadin.server.Page.Styles; import com.vaadin.shared.ApplicationConstants; import com.vaadin.shared.MouseEventDetails; +import com.vaadin.shared.Version; import com.vaadin.shared.communication.MethodInvocation; import com.vaadin.shared.ui.ComponentStateUtil; import com.vaadin.shared.ui.Connect; @@ -1014,9 +1015,13 @@ public class UIConnector extends AbstractSingleComponentContainerConnector * @return The URL the theme can be loaded from */ private String getThemeUrl(String theme) { - return getConnection().translateVaadinUri( + String themeUrl = getConnection().translateVaadinUri( ApplicationConstants.VAADIN_PROTOCOL_PREFIX + "themes/" + theme + "/styles" + ".css"); + // Parameter appended to bypass caches after version upgrade. + themeUrl += "?v=" + Version.getFullVersion(); + return themeUrl; + } /** diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java index 30e43f48a8..c45e2b70e0 100644 --- a/server/src/com/vaadin/server/BootstrapHandler.java +++ b/server/src/com/vaadin/server/BootstrapHandler.java @@ -414,6 +414,9 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { String vaadinLocation = vaadinService.getStaticFileLocation(request) + "/VAADIN/"; + // Parameter appended to JS to bypass caches after version upgrade. + String versionQueryParam = "?v=" + Version.getFullVersion(); + if (context.getPushMode().isEnabled()) { // Load client-side dependencies for push support String pushJS = vaadinLocation; @@ -424,12 +427,14 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { pushJS += ApplicationConstants.VAADIN_PUSH_DEBUG_JS; } + pushJS += versionQueryParam; + fragmentNodes.add(new Element(Tag.valueOf("script"), "").attr( "type", "text/javascript").attr("src", pushJS)); } String bootstrapLocation = vaadinLocation - + ApplicationConstants.VAADIN_BOOTSTRAP_JS; + + ApplicationConstants.VAADIN_BOOTSTRAP_JS + versionQueryParam; fragmentNodes.add(new Element(Tag.valueOf("script"), "").attr("type", "text/javascript").attr("src", bootstrapLocation)); Element mainScriptTag = new Element(Tag.valueOf("script"), "").attr( @@ -613,7 +618,7 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler { } /** - * Don not override. + * Do not override. * * @param context * @return -- cgit v1.2.3