summaryrefslogtreecommitdiffstats
path: root/WebContent/VAADIN/vaadinBootstrap.js
diff options
context:
space:
mode:
Diffstat (limited to 'WebContent/VAADIN/vaadinBootstrap.js')
-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');