Author: erinnp
Date: Thu Aug 15 19:19:38 2013
New Revision: 1514446
URL: http://svn.apache.org/r1514446
Log:
fixed require baseUrl
Modified:
rave/branches/angular/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/angular.jsp
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/resources/index.js
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/index.js
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/main.js
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/portal.js
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/routes.js
Modified:
rave/branches/angular/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/angular.jsp
URL:
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/angular.jsp?rev=1514446&r1=1514445&r2=1514446&view=diff
==============================================================================
---
rave/branches/angular/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/angular.jsp
(original)
+++
rave/branches/angular/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/angular.jsp
Thu Aug 15 19:19:38 2013
@@ -36,15 +36,18 @@
--%>
<c:choose>
<c:when test="${jsDebugMode == '1'}">
- <script data-main="<spring:url
value="/static/script/${context}/main.js"/>"
-
src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.5/require.min.js"></script>
+ <script>
+ require = { baseUrl: '<spring:url value="/static/script/"/>' };
+ </script>
</c:when>
<c:otherwise>
- <script data-main="<spring:url
value="/static/script-built/${context}/main.js"/>"
-
src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.5/require.min.js"></script>
- </c:otherwise>
-</c:choose>
-
+ <script>
+ require = { baseUrl: '<spring:url
value="/static/script-built/"/>' };
+ </script>
+ </c:otherwise>
+ </c:choose>
+ <script data-main="${context}/main.js"
+
src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.5/require.min.js"></script>
</head>
<body>
<div class="wrapper" ng-include="'/portal/static/html/${context}/index.html'"
ng-cloak>
Modified:
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=1514446&r1=1514445&r2=1514446&view=diff
==============================================================================
---
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/Base.js
(original)
+++
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/directives/Base.js
Thu Aug 15 19:19:38 2013
@@ -23,7 +23,7 @@ define(['rave'], function (rave) {
return function link(scope, el, attrs) {
var href = attrs.href;
- href = href.split('/');
+ context.setContext(href);
}
}
];
Modified:
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/resources/index.js
URL:
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/resources/index.js?rev=1514446&r1=1514445&r2=1514446&view=diff
==============================================================================
---
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/resources/index.js
(original)
+++
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/resources/index.js
Thu Aug 15 19:19:38 2013
@@ -19,10 +19,10 @@
define(['angular', './CategoriesResource', './PagesResource',
'./PagesForRenderResource',
'./PeopleResource', './RegionsResource', './RegionWidgetsResource',
'./UsersResource',
- 'underscore', 'angularResource'],
+ '../services/index', 'underscore', 'angularResource'],
function (angular, categories, pages, pagesForRender, people, regions,
regionWidgets, users, _) {
- var resources = angular.module('common.resources', ['ngResource'])
+ var resources = angular.module('common.resources', ['ngResource',
'common.services'])
resources.config(['$httpProvider', function ($httpProvider) {
$httpProvider.defaults.transformResponse.push(function (data,
headers) {
Modified:
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=1514446&r1=1514445&r2=1514446&view=diff
==============================================================================
---
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/index.js
(original)
+++
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/common/services/index.js
Thu Aug 15 19:19:38 2013
@@ -17,8 +17,8 @@
* under the License.
*/
-define(['angular', './Context'], function (angular, context) {
- var services = angular.module('common.services', []);
+define(['angular', './Context', '../directives/index'], function (angular,
context) {
+ var services = angular.module('common.services', ['common.directives']);
services.service('Context', context);
Modified:
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/main.js
URL:
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/main.js?rev=1514446&r1=1514445&r2=1514446&view=diff
==============================================================================
---
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/main.js
(original)
+++
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/main.js
Thu Aug 15 19:19:38 2013
@@ -73,6 +73,6 @@ requirejs.config({
}
});
-require(['angular', './portal'], function(angular, app){
+require(['angular', 'portal/portal'], function(angular, app){
angular.bootstrap(document, [app.name]);
});
\ No newline at end of file
Modified:
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/portal.js
URL:
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/portal.js?rev=1514446&r1=1514445&r2=1514446&view=diff
==============================================================================
---
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/portal.js
(original)
+++
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/portal.js
Thu Aug 15 19:19:38 2013
@@ -17,6 +17,6 @@
* under the License.
*/
-define(['angular', './routes', './controllers/index'], function (angular) {
+define(['angular', 'portal/routes', 'portal/controllers/index'], function
(angular) {
return angular.module('portal', ['portal.routes', 'portal.controllers']);
});
\ No newline at end of file
Modified:
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/routes.js
URL:
http://svn.apache.org/viewvc/rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/routes.js?rev=1514446&r1=1514445&r2=1514446&view=diff
==============================================================================
---
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/routes.js
(original)
+++
rave/branches/angular/rave-portal-resources/src/main/webapp/static/script/portal/routes.js
Thu Aug 15 19:19:38 2013
@@ -17,7 +17,7 @@
* under the License.
*/
-define(['angular', '../common/resources/index'], function (angular) {
+define(['angular', 'common/resources/index'], function (angular) {
var router = angular.module('portal.routes', ['common.resources']);
router.config(['$routeProvider', '$locationProvider', '$httpProvider',