Author: [email protected]
Date: Fri Jan  6 11:06:10 2012
New Revision: 1888

Log:
[AMDATUOPENSOCIAL-170] Fixed permission denied error

Modified:
   
trunk/amdatu-opensocial/opensocial-dashboard/src/main/resources/jsp/dashboard.js.jsp

Modified: 
trunk/amdatu-opensocial/opensocial-dashboard/src/main/resources/jsp/dashboard.js.jsp
==============================================================================
--- 
trunk/amdatu-opensocial/opensocial-dashboard/src/main/resources/jsp/dashboard.js.jsp
        (original)
+++ 
trunk/amdatu-opensocial/opensocial-dashboard/src/main/resources/jsp/dashboard.js.jsp
        Fri Jan  6 11:06:10 2012
@@ -37,16 +37,18 @@
   });
 
   function setCSS(iframe, cssLink) {
-    if 
(iframe.contentDocument.getElementsByTagName("head")[0].getElementsByClassName("ui-theme").length
 > 0) {
-          
iframe.contentDocument.getElementsByTagName("head")[0].getElementsByClassName("ui-theme")[0].setAttribute("href",cssLink);
-        }
-        else {
-          var link = iframe.contentDocument.createElement("link");
-          link.setAttribute("class","ui-theme");
-          link.setAttribute("rel","stylesheet");
-          link.setAttribute("href",cssLink);
-          
iframe.contentDocument.getElementsByTagName("head")[0].appendChild(link);
-        }
+    var heads = document.getElementsByTagName("head");
+    var uithemes = heads[0].getElementsByClassName("ui-theme");
+    if (uithemes.length > 0) {
+      uithemes[0].setAttribute("href",cssLink);
+    }
+    else {
+      var link = iframe.contentDocument.createElement("link");
+      link.setAttribute("class","ui-theme");
+      link.setAttribute("rel","stylesheet");
+      link.setAttribute("href",cssLink);
+      iframe.contentDocument.getElementsByTagName("head")[0].appendChild(link);
+    }
   }
 
   function initDashboard() {
_______________________________________________
Amdatu-commits mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-commits

Reply via email to