You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by hs...@apache.org on 2012/06/05 19:35:35 UTC

svn commit: r1346486 - /shindig/trunk/features/src/main/javascript/features/open-views.ee/open-views-ee-container.js

Author: hsaputra
Date: Tue Jun  5 17:35:34 2012
New Revision: 1346486

URL: http://svn.apache.org/viewvc?rev=1346486&view=rev
Log:
SHINDIG-1789 Set the container context outside the callback in the open-views/open-views-ee-cotainer.js.

Modified:
    shindig/trunk/features/src/main/javascript/features/open-views.ee/open-views-ee-container.js

Modified: shindig/trunk/features/src/main/javascript/features/open-views.ee/open-views-ee-container.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/open-views.ee/open-views-ee-container.js?rev=1346486&r1=1346485&r2=1346486&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/open-views.ee/open-views-ee-container.js (original)
+++ shindig/trunk/features/src/main/javascript/features/open-views.ee/open-views-ee-container.js Tue Jun  5 17:35:34 2012
@@ -76,7 +76,9 @@ osapi.container.Container.addMixin('view
       var orig_site = container.getGadgetSiteByIframeId_(siteOwnerId),
           rel = orig_site.getActiveSiteHolder().getIframeElement();
 
-      function callback(element, opt_containerContext) {
+      var opt_containerContext = self.getContainerAssociatedContext(dataModel, opt_metadata);
+
+      function callback(element) {
         var gadgetRenderParams = {};
         gadgetRenderParams[osapi.container.RenderParam.VIEW] =
             osapi.container.ee.RenderParam.EMBEDDED;
@@ -110,9 +112,8 @@ osapi.container.Container.addMixin('view
         rel, opt_metadata, viewTarget, coordinates, orig_site, callback
       );
 
-      var containerContext = self.getContainerAssociatedContext(dataModel, opt_metadata);
       if (element) {
-        callback(element, containerContext);
+        callback(element);
       }
     };
 
@@ -176,8 +177,7 @@ osapi.container.Container.addMixin('view
    * @return {Object} Additional context need to be passed by container.
    */
   this.getContainerAssociatedContext = function(dataModel, opt_gadgetInfo) {
-    console.log('container needs to define getContainerAssociatedContext function');
-    return {};
+    return null;
   }
 
 });
\ No newline at end of file