Author: hsaputra
Date: Thu Mar 15 18:25:35 2012
New Revision: 1301129

URL: http://svn.apache.org/viewvc?rev=1301129&view=rev
Log:
Small cleanup. Remove comment about gmodules in rpc relay setup for 
gadgetholder.

Modified:
    
shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_holder.js

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=1301129&r1=1301128&r2=1301129&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
 Thu Mar 15 18:25:35 2012
@@ -23,15 +23,15 @@
 
 
 /**
- * @param {osapi.container.GadgetSite} site The site containing this holder.
+ * @param {osapi.container.GadgetSite} site The site containing this holder.
  * @param {Element} el The element to render gadgets in.
  * @param {string} onLoad The name of an onLoad function to call in window 
scope
- *          to assign as the onload handler of this holder's iframe.
+ *          to assign as the onload handler of this holder's iframe.
  * @constructor
  * @extends {osapi.container.SiteHolder}
  */
-osapi.container.GadgetHolder = function(site, el, onLoad) {
-  osapi.container.SiteHolder.call(this, site, el, onLoad); // call super
+osapi.container.GadgetHolder = function(site, el, onLoad) {
+  osapi.container.SiteHolder.call(this, site, el, onLoad); // call super
   var undef;
 
   /**
@@ -55,8 +55,8 @@ osapi.container.GadgetHolder = function(
    * @type {string}
    * @private
    */
-  this.securityToken_ = undef;
-
+  this.securityToken_ = undef;
+
   this.onConstructed();
 };
 osapi.container.GadgetHolder.prototype = new osapi.container.SiteHolder;
@@ -90,12 +90,12 @@ osapi.container.GadgetHolder.prototype.d
  */
 osapi.container.GadgetHolder.prototype.getUrl = function() {
   return this.gadgetInfo_ && this.gadgetInfo_['url'];
-};
+};
 
 /**
- * @return {string} The view of current gadget. This is the view that was 
actually rendered once
- *         view aliases were applied.
- * @see osapi.container.GadgetSite.prototype.render
+ * @return {string} The view of current gadget. This is the view that was 
actually rendered once
+ *         view aliases were applied.
+ * @see osapi.container.GadgetSite.prototype.render
  */
 osapi.container.GadgetHolder.prototype.getView = function() {
   return this.renderParams_[osapi.container.RenderParam.VIEW];
@@ -104,16 +104,16 @@ osapi.container.GadgetHolder.prototype.g
 
 /**
  * @inheritDoc
- * @see osapi.container.GadgetHolder.prototype.doOaaIframeHtml_ and 
org.openajax.hub-2.0.5/iframe.js:createIframe()
+ * @see osapi.container.GadgetHolder.prototype.doOaaIframeHtml_ and 
org.openajax.hub-2.0.5/iframe.js:createIframe()
  */
 osapi.container.GadgetHolder.prototype.getIframeElement = function() {
-  return this.el_.getElementsByTagName('iframe')[0];
+  return this.el_.getElementsByTagName('iframe')[0];
 };
 
 
 /**
  * @param {string} value The value to set this social/security token to.
- * @return {osapi.container.GadgetHolder} the current GadgetHolder.
+ * @return {osapi.container.GadgetHolder} the current GadgetHolder.
  */
 osapi.container.GadgetHolder.prototype.setSecurityToken = function(value) {
   this.securityToken_ = value;
@@ -132,7 +132,7 @@ osapi.container.GadgetHolder.prototype.s
 osapi.container.GadgetHolder.prototype.render = function(
     gadgetInfo, viewParams, renderParams) {
   this.iframeId_ = osapi.container.GadgetHolder.IFRAME_ID_PREFIX_ +
-      this.site_.getId();
+      this.site_.getId();
   this.gadgetInfo_ = gadgetInfo;
   this.viewParams_ = viewParams;
   this.renderParams_ = renderParams;
@@ -164,13 +164,11 @@ osapi.container.GadgetHolder.prototype.d
   var uri = this.getIframeUrl_();
   this.el_.innerHTML = this.createIframeHtml(uri);
 
-  // Set up RPC channel. RPC relay url is on gmodules, relative to base of the
-  // container. Assumes container has set up forwarding to gmodules at 
/gadgets.
+  // Set up RPC channel.
   var iframeUri = shindig.uri(uri);
   var relayUri = shindig.uri()
       .setSchema(iframeUri.getSchema())
       .setAuthority(iframeUri.getAuthority())
-      //.setPath('/test1/gadgets/files/container/rpc_relay.html');
       .setPath(this.relayPath_);
   gadgets.rpc.setupReceiver(this.iframeId_, relayUri.toString(),
       iframeUri.getFP('rpctoken'));
@@ -201,8 +199,8 @@ osapi.container.GadgetHolder.prototype.d
           //tunnelURI: shindig.uri('/test1/gadgets/' + 
'../container/rpc_relay.html')
           //   .resolve(shindig.uri(window.location.href)),
           tunnelURI: 
shindig.uri(this.relayPath_).resolve(shindig.uri(window.location.href)),
-          iframeAttrs: this.createIframeAttributeMap(this.getIframeUrl_()),
-          onGadgetLoad: this.onLoad_
+          iframeAttrs: this.createIframeAttributeMap(this.getIframeUrl_()),
+          onGadgetLoad: this.onLoad_
         }
       }
   );
@@ -256,7 +254,7 @@ osapi.container.GadgetHolder.prototype.g
   }
 
   // Uniquely identify possibly-same gadgets on a page.
-  uri.setQP('mid', String(this.site_.getModuleId()));
+  uri.setQP('mid', String(this.site_.getModuleId()));
 
   if (!osapi.container.util.isEmptyJson(this.viewParams_)) {
     var gadgetParamText = gadgets.json.stringify(this.viewParams_);
@@ -287,8 +285,8 @@ osapi.container.GadgetHolder.prototype.u
       uri.setExistingP(upKey, upValue);
     }
   }
-};
-
+};
+
 function init(config) {
   if (config['container']) {
     var rpath = config['container']['relayPath'];


Reply via email to