Author: [email protected]
Date: Mon Aug 15 09:23:46 2011
New Revision: 1315

Log:
[AMDATUOPENSOCIAL-86] Fixed the JS error just by adding a simple check. The 
real problem however was that the default view was set to 'default', which is 
not an existing view. So changed the default view to 'home', which is the view 
that displays multiple gadgets on the dashboard.

Modified:
   
trunk/amdatu-opensocial/opensocial-shindig/src/main/resources/features/shindig.container/shindig-container.js

Modified: 
trunk/amdatu-opensocial/opensocial-shindig/src/main/resources/features/shindig.container/shindig-container.js
==============================================================================
--- 
trunk/amdatu-opensocial/opensocial-shindig/src/main/resources/features/shindig.container/shindig-container.js
       (original)
+++ 
trunk/amdatu-opensocial/opensocial-shindig/src/main/resources/features/shindig.container/shindig-container.js
       Mon Aug 15 09:23:46 2011
@@ -638,7 +638,7 @@
     context: {
       country: 'default',
       language: 'default',
-      view: 'default',
+      view: 'home',
       container: 'default'
     },
     gadgets: [{
@@ -665,10 +665,12 @@
   function handleJSONResponse(obj) {
     var requiresPubSub2 = false;
     var arr = obj.data.gadgets[0].features;
-    for (var i = 0; i < arr.length; i++) {
-      if (arr[i] === 'pubsub-2') {
-        requiresPubSub2 = true;
-        break;
+    if (arr != null && arr != 'undefined') {
+      for (var i = 0; i < arr.length; i++) {
+        if (arr[i] === 'pubsub-2') {
+          requiresPubSub2 = true;
+          break;
+        }
       }
     }
     var subClass = requiresPubSub2 ? shindig.OAAIfrGadget : shindig.IfrGadget;
@@ -804,7 +806,7 @@
   this.parentUrl_ = document.location.href + '://' + document.location.host;
   this.country_ = 'ALL';
   this.language_ = 'ALL';
-  this.view_ = 'default';
+  this.view_ = 'home';
   this.nocache_ = 1;
 
   // signed max int
_______________________________________________
Amdatu-commits mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-commits

Reply via email to