You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2013/06/24 18:03:37 UTC
svn commit: r1496108 - in
/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script:
tobago-popup.js tobago.js
Author: weber
Date: Mon Jun 24 16:03:36 2013
New Revision: 1496108
URL: http://svn.apache.org/r1496108
Log:
TOBAGO-1278 - Popup did not open when added on server
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-popup.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-popup.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-popup.js?rev=1496108&r1=1496107&r2=1496108&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-popup.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-popup.js Mon Jun 24 16:03:36 2013
@@ -217,13 +217,7 @@ Tobago.Popup.unlockBehind = function (po
};
Tobago.Popup.openWithAction = function (source, popupId, actionId, options) {
-
- // If there is no div, create one.
- var div = jQuery(Tobago.Utils.escapeClientId(popupId));
- if (div.size() == 0) {
- jQuery('form').append("<div id='" + popupId + "' />");
- }
-
+ // div creation moved to onComplete
Tobago.reloadComponent(source, popupId, actionId, options);
};
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1496108&r1=1496107&r2=1496108&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Mon Jun 24 16:03:36 2013
@@ -2328,6 +2328,10 @@ Tobago.Updater = {
// if there is html data, we replace the ajax element with the new data
if (data.html.length > 0) {
var newElement = jQuery(data.html);
+ if (element.size() == 0 && newElement.hasClass("tobago-popup")) {
+ element = jQuery("<div id='" + data.ajaxId + "' />");
+ jQuery('form').append(element);
+ }
element.replaceWith(newElement);
}
try {