Author: rbaxter85
Date: Tue Mar 5 16:45:04 2013
New Revision: 1452888
URL: http://svn.apache.org/r1452888
Log:
SHINDIG-1909
Pubsub gadgets were throwing an error in the on redner event in the container
Modified:
shindig/trunk/extras/src/main/javascript/features-extras/org.openajax.hub-2.0.7/iframe.js
shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_holder.js
Modified:
shindig/trunk/extras/src/main/javascript/features-extras/org.openajax.hub-2.0.7/iframe.js
URL:
http://svn.apache.org/viewvc/shindig/trunk/extras/src/main/javascript/features-extras/org.openajax.hub-2.0.7/iframe.js?rev=1452888&r1=1452887&r2=1452888&view=diff
==============================================================================
---
shindig/trunk/extras/src/main/javascript/features-extras/org.openajax.hub-2.0.7/iframe.js
(original)
+++
shindig/trunk/extras/src/main/javascript/features-extras/org.openajax.hub-2.0.7/iframe.js
Tue Mar 5 16:45:04 2013
@@ -397,11 +397,9 @@ OpenAjax.hub.IframeContainer = function(
var iframe = document.getElementById( internalID );
if(iframe.attachEvent) {
//Works for IE
- iframe.attachEvent('onload', function(){
- window[params.IframeContainer.onGadgetLoad]();
- });
+ iframe.attachEvent('onload', params.IframeContainer.onGadgetLoad);
} else {
- iframe.onload =
function(){window[params.IframeContainer.onGadgetLoad]();};
+ iframe.onload = params.IframeContainer.onGadgetLoad;
}
var uri = params.IframeContainer.uri;
Modified:
shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_holder.js
URL:
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_holder.js?rev=1452888&r1=1452887&r2=1452888&view=diff
==============================================================================
---
shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_holder.js
(original)
+++
shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_holder.js
Tue Mar 5 16:45:04 2013
@@ -181,6 +181,7 @@ osapi.container.GadgetHolder.prototype.d
osapi.container.GadgetHolder.prototype.doOaaIframeHtml_ = function() {
//Remove any prior container for the iframe id from the OpenAjax hub prior
to registering the new one
this.removeOaaContainer_(this.iframeId_);
+ var self = this;
new OpenAjax.hub.IframeContainer(
gadgets.pubsub2router.hub,
this.iframeId_,
@@ -202,7 +203,11 @@ osapi.container.GadgetHolder.prototype.d
// .resolve(shindig.uri(window.location.href)),
tunnelURI:
shindig.uri(this.relayPath_).resolve(shindig.uri(window.location.href)),
iframeAttrs: this.createIframeAttributeMap(this.getIframeUrl_(),
{title:this.site_.getTitle()}),
- onGadgetLoad: this.onLoad_
+ onGadgetLoad: function() {
+ if(self.onLoad_) {
+ window[self.onLoad_](self.getUrl(), self.site_.getId());
+ }
+ }
}
}
);