You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by er...@apache.org on 2013/07/03 23:47:40 UTC

svn commit: r1499569 - in /rave/branches/require/rave-portal-resources/src/main/webapp: WEB-INF/jsp/views/page.jsp static/script/requireConfig.js

Author: erinnp
Date: Wed Jul  3 21:47:40 2013
New Revision: 1499569

URL: http://svn.apache.org/r1499569
Log:
mongodb error fix, make messagebundle url relative

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/static/script/requireConfig.js

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=1499569&r1=1499568&r2=1499569&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 Wed Jul  3 21:47:40 2013
@@ -1,3 +1,4 @@
+w
 <%@ taglib prefix="portal" uri="http://www.apache.org/rave/tags" %>
 <%--
   Licensed to the Apache Software Foundation (ASF) under one
@@ -434,20 +435,20 @@
 <portal:register-init-script location="${'AFTER_RAVE'}">
     <script>
         require(["rave", "ui", 'jquery'], function (rave, ui, $) {
-            rave.registerOnInitHandler(function(){
-                $('#acceptShareLink').click(function(){
+            rave.registerOnInitHandler(function () {
+                $('#acceptShareLink').click(function () {
                     ui.models.currentPage.acceptShare();
                 });
 
-                $('#declineShareLink').click(function(){
+                $('#declineShareLink').click(function () {
                     ui.models.currentPage.declineShare();
                 });
 
-                $('#movePageButton').click(function(){
+                $('#movePageButton').click(function () {
                     ui.models.movePage();
                 })
 
-                $('#moveWidgetToPageButton').click(function(){
+                $('#moveWidgetToPageButton').click(function () {
                     ui.layout.moveWidgetToPage($('#moveWidgetModal').data('regionWidgetId'));
                 })
 
@@ -457,13 +458,17 @@
             rave.setDefaultView('home');
             rave.setPage({
                 id: "${page.id}",
-                ownerId: "${page.ownerId}", viewerId:
-                "<sec:authentication property="principal.id" />"
+                ownerId: "${page.ownerId}",
+                viewerId: "<sec:authentication property="principal.id" />"
             });
             rave.getViewer().editor =<c:out value="${pageUser.editor}"/>;
             rave.setExportEnabled(${applicationProperties['portal.export.ui.enable']});
 
-            ui.models.currentPage.set({id: ${page.id}, ownerId: ${page.ownerId}, viewerId: <sec:authentication property="principal.id" />}, {silent: true})
+            ui.models.currentPage.set({
+                id: "${page.id}",
+                ownerId: "${page.ownerId}",
+                viewerId: "<sec:authentication property="principal.id" />"
+            }, {silent: true})
 
             <c:forEach var="members" items="${page.members}">
             <portal:person id="${members.userId}" var="member"/>

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=1499569&r1=1499568&r2=1499569&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 Wed Jul  3 21:47:40 2013
@@ -21,7 +21,9 @@ requirejs.config({
     "paths":{
         "backbone":"//cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.10/backbone-min",
         "bootstrap": '//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.3/bootstrap.min',
-        "clientMessages": "/portal/app/messagebundle/rave_client_messages.js?a=b",
+        //The qs param ?a=b is a hack to force r.js optimizer to treat this as a network script, so it
+        //won't try to bundle the resource
+        "clientMessages": "../../app/messagebundle/rave_client_messages.js?a=b",
         "handlebars":"//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.rc.2/handlebars.min",
         "jquery": "//ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.2.min",
         "jqueryUi":"//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/jquery-ui.min",
@@ -36,8 +38,6 @@ requirejs.config({
     shim: {
         backbone: {
             deps: ['underscore', 'jquery'],
-            //Once loaded, use the global 'Backbone' as the
-            //module value.
             exports: 'Backbone'
         },
         bootstrap:{