diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-01-12 11:28:55 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-01-12 11:28:55 +0200 |
commit | 2286f9871f7f77dea6139d0cd1dfc6754b1946d5 (patch) | |
tree | c8a978d77dff74788b5a290f6c7928e39932b8a5 /WebContent/VAADIN/vaadinBootstrap.js | |
parent | 35d91245de3218283c8f4c733a3aa72ea395fb1c (diff) | |
parent | 3f27e02f121c0a39b217532afcf9530bfd2caba7 (diff) | |
download | vaadin-framework-2286f9871f7f77dea6139d0cd1dfc6754b1946d5.tar.gz vaadin-framework-2286f9871f7f77dea6139d0cd1dfc6754b1946d5.zip |
Merge remote-tracking branch 'origin/master' into grid
Change-Id: Ic6b667ea6ceff43a609ce2037f656c6274871fb7
Diffstat (limited to 'WebContent/VAADIN/vaadinBootstrap.js')
-rw-r--r-- | WebContent/VAADIN/vaadinBootstrap.js | 16 |
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'); |