diff options
author | Artur Signell <artur@vaadin.com> | 2013-03-21 08:59:51 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-03-21 08:59:51 +0200 |
commit | bd3bb24a36a0ad02ffb9cee2e46afc445a354191 (patch) | |
tree | 00d9248c84f8b7b60768552c822279c9cf151f45 /WebContent | |
parent | 320b4e3776976e5dad822f01542f338cf76140bb (diff) | |
parent | e4c9eda51082a443822b66864df2fe14be7dc6d7 (diff) | |
download | vaadin-framework-bd3bb24a36a0ad02ffb9cee2e46afc445a354191.tar.gz vaadin-framework-bd3bb24a36a0ad02ffb9cee2e46afc445a354191.zip |
Merge commit 'e4c9eda51082a443822b66864df2fe14be7dc6d7'
Conflicts:
uitest/test.xml
Change-Id: I2c82fa7117b21bddad313abdd2f3f43143317c12
Diffstat (limited to 'WebContent')
-rw-r--r-- | WebContent/VAADIN/vaadinBootstrap.js | 34 | ||||
-rw-r--r-- | WebContent/release-notes.html | 4 |
2 files changed, 32 insertions, 6 deletions
diff --git a/WebContent/VAADIN/vaadinBootstrap.js b/WebContent/VAADIN/vaadinBootstrap.js index f5c00a0b65..40f9ce470f 100644 --- a/WebContent/VAADIN/vaadinBootstrap.js +++ b/WebContent/VAADIN/vaadinBootstrap.js @@ -55,19 +55,45 @@ pendingApps: [] }; }; - + + var isInitializedInDom = function(appId) { + var appDiv = document.getElementById(appId); + if (!appDiv) { + return false; + } + for ( var i = 0; i < appDiv.childElementCount; i++) { + var className = appDiv.childNodes[i].className; + // If the app div contains a child with the class + // "v-app-loading" we have only received the HTML + // but not yet started the widget set + // (UIConnector removes the v-app-loading div). + if (className && className.contains("v-app-loading")) { + return false; + } + } + return true; + }; + window.vaadin = window.vaadin || { initApplication: function(appId, config) { + var testbenchId = appId.replace(/-\d+$/, ''); + if (apps[appId]) { - throw "Application " + appId + " already initialized"; + if (window.vaadin && window.vaadin.clients && window.vaadin.clients[testbenchId] && window.vaadin.clients[testbenchId].initializing) { + throw "Application " + appId + " is already being initialized"; + } + if (isInitializedInDom(appId)) { + throw "Application " + appId + " already initialized"; + } } + log("init application", appId, config); - var testbenchId = appId.replace(/-\d+$/, ''); window.vaadin.clients[testbenchId] = { isActive: function() { return true; - } + }, + initializing: true }; var getConfig = function(name) { diff --git a/WebContent/release-notes.html b/WebContent/release-notes.html index 39b6652532..0f49e819b0 100644 --- a/WebContent/release-notes.html +++ b/WebContent/release-notes.html @@ -658,12 +658,12 @@ </p> <ul> - <li>Mozilla Firefox 18</li> + <li>Mozilla Firefox 18-19</li> <li>Mozilla Firefox 17 ESR</li> <li>Internet Explorer 8-10</li> <li>Safari 6</li> <li>Opera 12</li> - <li>Google Chrome 23</li> + <li>Google Chrome 23-25</li> </ul> <p> |