Author: etnu
Date: Fri Oct 24 15:51:02 2008
New Revision: 707773

URL: http://svn.apache.org/viewvc?rev=707773&view=rev
Log:
Applied patch for SHINDIG-654 from Jasvir Nagra. This is one step in improving 
ongoing compatibility with caja. Ideally we will put this extra caja-enabling 
logic into source (say, in CajaContentRewriter).


Modified:
    incubator/shindig/trunk/features/opensocial-current/feature.xml
    incubator/shindig/trunk/features/opensocial-reference/container.js
    incubator/shindig/trunk/pom.xml

Modified: incubator/shindig/trunk/features/opensocial-current/feature.xml
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/opensocial-current/feature.xml?rev=707773&r1=707772&r2=707773&view=diff
==============================================================================
--- incubator/shindig/trunk/features/opensocial-current/feature.xml (original)
+++ incubator/shindig/trunk/features/opensocial-current/feature.xml Fri Oct 24 
15:51:02 2008
@@ -56,7 +56,7 @@
 
           opensocial.Container.setContainer(new ShindigContainer());
 
-          if (window['caja']) {
+          if (configParams.enableCaja) {
             opensocial.Container.get().enableCaja();
           }
       });

Modified: incubator/shindig/trunk/features/opensocial-reference/container.js
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/features/opensocial-reference/container.js?rev=707773&r1=707772&r2=707773&view=diff
==============================================================================
--- incubator/shindig/trunk/features/opensocial-reference/container.js 
(original)
+++ incubator/shindig/trunk/features/opensocial-reference/container.js Fri Oct 
24 15:51:02 2008
@@ -512,7 +512,7 @@
 /**
  * Caja Support.  See features/caja/*.js
  */
-var caja;
+var cajita;
 var ___;
 var attachDocumentStub;
 // See features/caja/domita.js for uriCallback's contract.
@@ -540,15 +540,23 @@
  */
 
 // TODO(doll): As caja evolves this method should get a lot smaller
+var alert=window['alert'] || function () { 1/0};
+alert('cajita=' + cajita);
 opensocial.Container.prototype.enableCaja = function() {
 
   ___ = window["___"];
-  caja = window["caja"];
+  cajita = window["cajita"];
+  valijaMaker = window["valijaMaker"];
   attachDocumentStub = window["attachDocumentStub"];
 
-  var imports = caja.copy(___.sharedImports);
+  alert('cajita=' + cajita);
+  var imports = ___.copy(___.sharedImports);
+  imports.outers = imports;
+  imports.console = console;
+  imports.$v = ___.asSimpleFunc(valijaMaker)(imports);
   ___.getNewModuleHandler().setImports(imports);
 
+  
   attachDocumentStub('-g___', uriCallback, imports);
   var gadgetRoot = document.createElement('div');
   gadgetRoot.className = 'g___';

Modified: incubator/shindig/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/pom.xml?rev=707773&r1=707772&r2=707773&view=diff
==============================================================================
--- incubator/shindig/trunk/pom.xml (original)
+++ incubator/shindig/trunk/pom.xml Fri Oct 24 15:51:02 2008
@@ -902,7 +902,7 @@
       <dependency>
         <groupId>caja</groupId>
         <artifactId>caja</artifactId>
-        <version>r2178</version>
+        <version>r2438</version>
         <scope>compile</scope>
       </dependency>
       <dependency>


Reply via email to