Author: erinnp
Date: Fri Jul  5 16:24:42 2013
New Revision: 1500059

URL: http://svn.apache.org/r1500059
Log:
updated opensocial environment to be compatible with requirejs

Modified:
    
rave/branches/require/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp
    
rave/branches/require/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag
    
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/requireConfig.js
    
rave/branches/require/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/config/OpenSocialEnvironment.java

Modified: 
rave/branches/require/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp
URL: 
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp?rev=1500059&r1=1500058&r2=1500059&view=diff
==============================================================================
--- 
rave/branches/require/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp
 (original)
+++ 
rave/branches/require/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp
 Fri Jul  5 16:24:42 2013
@@ -1,4 +1,3 @@
-w
 <%@ taglib prefix="portal" uri="http://www.apache.org/rave/tags"; %>
 <%--
   Licensed to the Apache Software Foundation (ASF) under one

Modified: 
rave/branches/require/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag
URL: 
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag?rev=1500059&r1=1500058&r2=1500059&view=diff
==============================================================================
--- 
rave/branches/require/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag
 (original)
+++ 
rave/branches/require/rave-portal-resources/src/main/webapp/WEB-INF/tags/rave_js.tag
 Fri Jul  5 16:24:42 2013
@@ -21,11 +21,6 @@
 <portal:render-script location="${'BEFORE_LIB'}"/>
 <rave:third_party_js/>
 <portal:render-script location="${'AFTER_LIB'}"/>
-<%-- local rave scripts --%>
-<portal:render-script location="${'BEFORE_RAVE'}"/>
-<%-- get the javaScriptDebugMode portal preference value --%>
-<c:set var="jsDebugMode"><portal:render-js-debug-mode/></c:set>
-<%-- check to see if the javaScriptDebugMode is on, if so render the 
individual JS files, otherwise render the minified single file --%>
 <c:choose>
     <c:when test="${jsDebugMode == '1'}">
         <script src="<spring:url 
value="/static/script/requireConfig.js"/>"></script>
@@ -40,6 +35,13 @@
         </script>
     </c:otherwise>
 </c:choose>
+
+<%-- local rave scripts --%>
+<portal:render-script location="${'BEFORE_RAVE'}"/>
+<%-- get the javaScriptDebugMode portal preference value --%>
+<c:set var="jsDebugMode"><portal:render-js-debug-mode/></c:set>
+<%-- check to see if the javaScriptDebugMode is on, if so render the 
individual JS files, otherwise render the minified single file --%>
+
 <script>
     require(["rave", "jquery"], function (rave, $) {
         <%-- set the web application context --%>

Modified: 
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/requireConfig.js
URL: 
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/requireConfig.js?rev=1500059&r1=1500058&r2=1500059&view=diff
==============================================================================
--- 
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/requireConfig.js
 (original)
+++ 
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/requireConfig.js
 Fri Jul  5 16:24:42 2013
@@ -30,7 +30,7 @@ requirejs.config({
         
"jqueryValidate":"//ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min",
         
"jqueryHashChange":'//cdnjs.cloudflare.com/ajax/libs/jquery-hashchange/v1.3/jquery.ba-hashchange.min',
         "jqueryTouchPouch": 
'//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.2/jquery.ui.touch-punch.min',
-        
"osapi":"/gadgets/js/container:pubsub-2:open-views.js?c=1&container=default&debug=1",
+        "osapi":"//placeholder.url.will.be.replaced.by.opensocial.environment",
         "rave": "core/main",
         "ui": "portal/main",
         "underscore": 
"//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min"

Modified: 
rave/branches/require/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/config/OpenSocialEnvironment.java
URL: 
http://svn.apache.org/viewvc/rave/branches/require/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/config/OpenSocialEnvironment.java?rev=1500059&r1=1500058&r2=1500059&view=diff
==============================================================================
--- 
rave/branches/require/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/config/OpenSocialEnvironment.java
 (original)
+++ 
rave/branches/require/rave-providers/rave-opensocial-provider/rave-opensocial-client/src/main/java/org/apache/rave/provider/opensocial/config/OpenSocialEnvironment.java
 Fri Jul  5 16:24:42 2013
@@ -45,7 +45,7 @@ public class OpenSocialEnvironment imple
 
     private static final String CONTAINER_JS_KEY = "containerJs";
     private static final String SCRIPT_RENDER_DEBUG_ON = "1";
-    private final static String SCRIPT_TEMPLATE = "<script 
src=\"%1$s://%2$s%3$s/js/%4$s.js?c=1&amp;container=default&amp;debug=%5$s\"></script>";
+    private final static String SCRIPT_TEMPLATE = 
"<script>requirejs.config({paths: 
{\"osapi\":\"%1$s://%2$s%3$s/js/%4$s.js?c=1&amp;container=default&amp;debug=%5$s\"}});</script>";
 
     private String currentDebugMode;
 


Reply via email to