summaryrefslogtreecommitdiffstats
path: root/WebContent
diff options
context:
space:
mode:
authorFabian Lange <lange.fabian@gmail.com>2014-07-23 22:40:35 +0200
committerVaadin Code Review <review@vaadin.com>2015-01-11 15:09:51 +0000
commit65904ffbdebc861a45c1b504d244d02a12f4561b (patch)
treec7e57a8f80a5506f3256d2bee73d52031e724932 /WebContent
parent0f71cf690dacbaacd42a8fa586dd127b73addca1 (diff)
downloadvaadin-framework-65904ffbdebc861a45c1b504d244d02a12f4561b.tar.gz
vaadin-framework-65904ffbdebc861a45c1b504d244d02a12f4561b.zip
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
Diffstat (limited to 'WebContent')
-rw-r--r--WebContent/VAADIN/vaadinBootstrap.js16
1 files changed, 12 insertions, 4 deletions
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');