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/08/15 20:53:02 UTC

svn commit: r1514436 - in /rave/branches/angular/rave-portal-resources/src/main/webapp/static/script: ./ common/ common/directives/ common/resources/ common/services/ portal_old/

Author: erinnp
Date: Thu Aug 15 18:53:01 2013
New Revision: 1514436

URL: http://svn.apache.org/r1514436
Log:
Fixed portal_old so you don't need to run a second instance

Added:
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/Base.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/index.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/Context.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/index.js
Modified:
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/common.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/resources/PagesForRenderResource.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/main.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_display.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_forms.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_layout.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_models.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_person_profile.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_portal.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_store.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_ui.js
    rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/requireConfig.js

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/common.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/common.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/common.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/common.js Thu Aug 15 18:53:01 2013
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-define(['angular', 'angularResource', 'common/resources/index'], function(angular, angularResource, services){
-    var common = angular.module('common', ['common.resources']);
-
-    return common;
-})
+define(['angular', 'common/resources/index', 'common/directives/index'],
+    function (angular) {
+        return angular.module('common', ['common.resources', 'common.directives']);
+    }
+);

Added: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/Base.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/Base.js?rev=1514436&view=auto
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/Base.js (added)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/Base.js Thu Aug 15 18:53:01 2013
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+define(['rave'], function (rave) {
+    return [ 'Context',
+        function(context){
+            return function link(scope, el, attrs) {
+                var href = attrs.href;
+
+                href = href.split('/');
+            }
+        }
+    ];
+});
\ No newline at end of file

Added: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/index.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/index.js?rev=1514436&view=auto
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/index.js (added)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/index.js Thu Aug 15 18:53:01 2013
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+define(['./Base'],
+    function (base) {
+        var directives = angular.module('common.directives', []);
+
+        directives.directive('base', base);
+
+        return directives;
+    }
+);
\ No newline at end of file

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/resources/PagesForRenderResource.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/resources/PagesForRenderResource.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/resources/PagesForRenderResource.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/resources/PagesForRenderResource.js Thu Aug 15 18:53:01 2013
@@ -18,9 +18,9 @@
  */
 
 define(['underscore'], function (_) {
-    return ['$resource', 'Pages', 'Regions', 'RegionWidgets',
-        function ($resource, Pages, Regions, RegionWidgets) {
-            var res = $resource('/portal/api/rest/pages/render/:context/:identifier/:id', {},
+    return ['$resource', 'Pages', 'Regions', 'RegionWidgets', 'Context',
+        function ($resource, Pages, Regions, RegionWidgets, Context) {
+            var res = $resource(Context.getContext()+'/api/rest/pages/render/:context/:identifier/:id', {},
                 {
                     _query: { method: 'GET', isArray: true }
                 });

Added: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/Context.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/Context.js?rev=1514436&view=auto
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/Context.js (added)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/Context.js Thu Aug 15 18:53:01 2013
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+define([], function () {
+    return [
+        function Context(){
+            var context = '';
+
+            return {
+                getContext: function(){
+                    return context;
+                },
+                setContext: function(ctx){
+                    context = ctx
+                }
+            }
+
+        }
+    ];
+});
\ No newline at end of file

Added: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/index.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/index.js?rev=1514436&view=auto
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/index.js (added)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/index.js Thu Aug 15 18:53:01 2013
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+define(['angular', './Context'], function (angular, context) {
+    var services = angular.module('common.services', []);
+
+    services.service('Context', context);
+
+    return services;
+});
\ No newline at end of file

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/main.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/main.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/main.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/main.js Thu Aug 15 18:53:01 2013
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-define(['underscore', 'portal/rave_portal', 'portal/rave_models', 'portal/rave_layout', 'portal/rave_ui',
-    'portal/rave_forms', 'portal/rave_display'],
+define(['underscore', 'portal_old/rave_portal', 'portal_old/rave_models', 'portal_old/rave_layout', 'portal_old/rave_ui',
+    'portal_old/rave_forms', 'portal_old/rave_display'],
     function (_, portal, models, layout, ui, forms, display) {
 
         portal.models = models;

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_display.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_display.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_display.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_display.js Thu Aug 15 18:53:01 2013
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-define(["rave", "portal/rave_templates", "jqueryUi"], function (rave, raveTemplates) {
+define(["rave", "portal_old/rave_templates", "jqueryUi"], function (rave, raveTemplates) {
     function displayUsersOfWidget(widgetId) {
         rave.api.rest.getUsersForWidget({widgetId: widgetId, successCallback: function (data) {
 

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_forms.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_forms.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_forms.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_forms.js Thu Aug 15 18:53:01 2013
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-define(["jquery", "portal/rave_portal", "jqueryValidate"], function($, ravePortal){
+define(["jquery", "portal_old/rave_portal", "jqueryValidate"], function($, ravePortal){
     function validateNewAccountForm() {
         $("#newAccountForm").validate({
             rules: {

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_layout.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_layout.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_layout.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_layout.js Thu Aug 15 18:53:01 2013
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-define(["jquery", "rave", "portal/rave_portal", "portal/rave_models", "bootstrap", "jqueryValidate"],
+define(["jquery", "rave", "portal_old/rave_portal", "portal_old/rave_models", "bootstrap", "jqueryValidate"],
     function ($, rave, ravePortal, raveModels) {
         var MOVE_PAGE_DEFAULT_POSITION_IDX = -1;
         var $moveWidgetDialog;

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_models.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_models.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_models.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_models.js Thu Aug 15 18:53:01 2013
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-define(["underscore", "portal/rave_backbone", "portal/rave_portal", "rave"], function(_, raveBackbone, ravePortal, rave){
+define(["underscore", "portal_old/rave_backbone", "portal_old/rave_portal", "rave"], function(_, raveBackbone, ravePortal, rave){
     /*
      User model. Further implementation pending.
      */

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_person_profile.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_person_profile.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_person_profile.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_person_profile.js Thu Aug 15 18:53:01 2013
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-define(["jquery", "portal/rave_portal", "rave", "bootstrap"], function($, ravePortal, rave){
+define(["jquery", "portal_old/rave_portal", "rave", "bootstrap"], function($, ravePortal, rave){
     // map of {subpage name, boolean} tracking whether or not a sub page has been viewed at least once
     var subPagesViewedStatus = {};
     var friends = new Array();

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_portal.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_portal.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_portal.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_portal.js Thu Aug 15 18:53:01 2013
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-define(["underscore", "jquery", "rave", "portal/rave_templates", "clientMessages"],
+define(["underscore", "jquery", "rave", "portal_old/rave_templates", "clientMessages"],
     function (_, $, rave, raveTemplates, clientMessages) {
 
         // JS debug mode is off by default

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_store.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_store.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_store.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_store.js Thu Aug 15 18:53:01 2013
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-define(["jquery", "rave", "portal/rave_portal"], function($, rave, ravePortal){
+define(["jquery", "rave", "portal_old/rave_portal"], function($, rave, ravePortal){
     function initRatings() {
 
         //Adjust width's

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_ui.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_ui.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_ui.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal_old/rave_ui.js Thu Aug 15 18:53:01 2013
@@ -18,7 +18,7 @@
  */
 
 define(["jquery", "underscore", "rave",
-    "portal/rave_portal", "portal/rave_backbone", "portal/rave_models", "portal/rave_templates",
+    "portal_old/rave_portal", "portal_old/rave_backbone", "portal_old/rave_models", "portal_old/rave_templates",
     "jqueryUi"],
     function ($, _, rave, ravePortal, raveBackbone, raveModels, raveTemplates) {
         var exports = {};

Modified: rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/requireConfig.js
URL: http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/requireConfig.js?rev=1514436&r1=1514435&r2=1514436&view=diff
==============================================================================
--- rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/requireConfig.js (original)
+++ rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/requireConfig.js Thu Aug 15 18:53:01 2013
@@ -32,6 +32,8 @@ requirejs.config({
         "angularResource": '//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.5/angular-resource.min',
         "osapi":"//placeholder.url.will.be.replaced.by.opensocial.environment",
         "rave": "core/main",
+        //TODO: This is in support of old portal and should go away eventually
+        "ui":"portal_old/main",
         "underscore": "//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min"
     },
     shim: {