You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2008/08/06 11:27:11 UTC
svn commit: r683193 -
/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Author: bommel
Date: Wed Aug 6 02:27:10 2008
New Revision: 683193
URL: http://svn.apache.org/viewvc?rev=683193&view=rev
Log:
(TOBAGO-691) nonmodal popup blocks the page
Modified:
myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=683193&r1=683192&r2=683193&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Wed Aug 6 02:27:10 2008
@@ -268,11 +268,7 @@
Tobago.startScriptLoaders();
TbgTimer.endScriptLoaders = new Date();
Tobago.pageIsComplete = true;
- if (Tobago.initialPopupId != null) {
- Tobago.lockPopupPage(Tobago.initialPopupId);
- } else {
- Tobago.setFocus();
- }
+ Tobago.setFocus();
TbgTimer.endTotal = new Date();
TbgTimer.log();
},
@@ -942,29 +938,21 @@
}
}
- if (!Tobago.pageIsComplete) {
- // Popup is loaded during page loading
- Tobago.initialPopupId = id;
- } else {
- //LOG.info("setup Popups " + Tobago.openPopups);
- var contains = false;
- for(var i = 0; i < Tobago.openPopups.length; i++) {
- if (Tobago.openPopups[i] == id) {
- contains = true;
- }
- }
- if (!contains) {
- // Popup is loaded by ajax
- Tobago.lockPopupPage(id);
- }
- }
var contains = false;
for(var i = 0; i < Tobago.openPopups.length; i++) {
if (Tobago.openPopups[i] == id) {
contains = true;
}
}
- if (!contains) {
+ if (!contains && modal) {
+ // Popup is loaded by ajax
+ if (Tobago.pageIsComplete) {
+ Tobago.lockPopupPage(id);
+ } else {
+ setTimeout(Tobago.lockPopupPage(id), 100);
+ }
+ }
+ if (!contains && modal) {
Tobago.openPopups.push(id);
}