diff options
Diffstat (limited to 'WebContent/VAADIN')
-rw-r--r-- | WebContent/VAADIN/vaadinBootstrap.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/WebContent/VAADIN/vaadinBootstrap.js b/WebContent/VAADIN/vaadinBootstrap.js index 64a1a00111..9e012ae987 100644 --- a/WebContent/VAADIN/vaadinBootstrap.js +++ b/WebContent/VAADIN/vaadinBootstrap.js @@ -29,25 +29,23 @@ themesLoaded[url] = true; } }; - + var isWidgetsetLoaded = function(widgetset) { var className = widgetset.replace(/\./g, "_"); return (typeof window[className]) != "undefined"; }; - var loadWidgetset = function(basePath, widgetset) { + var loadWidgetset = function(url, widgetset) { if (widgetsets[widgetset]) { return; } - log("load widgetset", basePath, widgetset); + log("load widgetset", url, widgetset); setTimeout(function() { if (!isWidgetsetLoaded(widgetset)) { alert("Failed to load the widgetset: " + url); } }, 15000); - - var url = basePath + widgetset + "/" + widgetset + ".nocache.js?" + new Date().getTime(); - + var scriptTag = document.createElement('script'); scriptTag.setAttribute('type', 'text/javascript'); scriptTag.setAttribute('src', url); @@ -57,7 +55,7 @@ pendingApps: [] }; }; - + window.vaadin = window.vaadin || { initApplication: function(appId, config) { if (apps[appId]) { @@ -159,7 +157,11 @@ loadTheme(themeUri); var widgetset = getConfig('widgetset'); - loadWidgetset(vaadinDir + 'widgetsets/', widgetset); + var widgetsetUrl = getConfig('widgetsetUrl'); + if (!widgetsetUrl) { + widgetsetUrl = vaadinDir + 'widgetsets/' + widgetset + "/" + widgetset + ".nocache.js?" + new Date().getTime(); + } + loadWidgetset(widgetsetUrl, widgetset); if (getConfig('uidl') === undefined) { if (mayDefer) { |