Author: erinnp
Date: Fri Jun 21 16:01:57 2013
New Revision: 1495487
URL: http://svn.apache.org/r1495487
Log:
working on require paths
Added:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_log.js
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_openajax_hub.js
Modified:
rave/branches/require/rave-portal-resources/pom.xml
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/app.js
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/main.js
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_ajax.js
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_api.js
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_opensocial.js
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_providers.js
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_view_manager.js
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_widget.js
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_wookie.js
Modified: rave/branches/require/rave-portal-resources/pom.xml
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/pom.xml?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
--- rave/branches/require/rave-portal-resources/pom.xml (original)
+++ rave/branches/require/rave-portal-resources/pom.xml Fri Jun 21 16:01:57 2013
@@ -172,40 +172,40 @@
</configuration>
</plugin>
<!-- requirejs optimizer -->
- <plugin>
- <groupId>com.github.mcheely</groupId>
- <artifactId>requirejs-maven-plugin</artifactId>
- <version>2.0.0</version>
- <executions>
- <execution>
- <goals>
- <goal>optimize</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <!-- path to optimizer json config file -->
- <configFile>
- ${basedir}/src/main/config/buildconfig.js
- </configFile>
- <!-- optional path to optimizer executable -->
- <optimizerFile>
- ${basedir}/src/main/scripts/r.js
- </optimizerFile>
- <!--
- Whether or not to process configFile with maven filters.
- If you use this option, some options in your configFile
- must resolve to absolute paths (see below)
- -->
- <filterConfig>
- true
- </filterConfig>
- <!-- Skip requirejs optimization if true -->
- <skip>
- false
- </skip>
- </configuration>
- </plugin>
+ <!--<plugin>-->
+ <!--<groupId>com.github.mcheely</groupId>-->
+ <!--<artifactId>requirejs-maven-plugin</artifactId>-->
+ <!--<version>2.0.0</version>-->
+ <!--<executions>-->
+ <!--<execution>-->
+ <!--<goals>-->
+ <!--<goal>optimize</goal>-->
+ <!--</goals>-->
+ <!--</execution>-->
+ <!--</executions>-->
+ <!--<configuration>-->
+ <!--<!– path to optimizer json config file
–>-->
+ <!--<configFile>-->
+ <!--${basedir}/src/main/config/buildconfig.js-->
+ <!--</configFile>-->
+ <!--<!– optional path to optimizer executable
–>-->
+ <!--<optimizerFile>-->
+ <!--${basedir}/src/main/scripts/r.js-->
+ <!--</optimizerFile>-->
+ <!--<!–-->
+ <!--Whether or not to process configFile with maven
filters.-->
+ <!--If you use this option, some options in your
configFile-->
+ <!--must resolve to absolute paths (see below)-->
+ <!--–>-->
+ <!--<filterConfig>-->
+ <!--true-->
+ <!--</filterConfig>-->
+ <!--<!– Skip requirejs optimization if true
–>-->
+ <!--<skip>-->
+ <!--false-->
+ <!--</skip>-->
+ <!--</configuration>-->
+ <!--</plugin>-->
</plugins>
</build>
<profiles>
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=1495487&r1=1495486&r2=1495487&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 Jun 21 16:01:57 2013
@@ -390,22 +390,20 @@
<portal:register-init-script location="${'AFTER_RAVE'}">
<script>
- require(["core/rave_core", "core/rave_widget", "portal/rave_portal",
"portal/rave_layout", "portal/rave_models", "portal/rave_event_bindings",
"jquery"], function(raveCore, raveRegionWidget, ravePortal, raveLayout,
raveModels, raveEventBindings, $){
- raveCore.init();
- raveRegionWidget.defaultView = 'home';
+ require(["rave", "core/rave_widget", "portal/rave_portal",
"portal/rave_layout", "portal/rave_models", "portal/rave_event_bindings",
"jquery"], function(rave, raveRegionWidget, ravePortal, raveLayout, raveModels,
raveEventBindings, $){
+ rave.init();
+ rave.RegionWidget.defaultView = 'home';
$(function() {
ravePortal.initPageEditorStatus(<c:out
value="${pageUser.editor}"/>);
raveLayout.init(${applicationProperties['portal.export.ui.enable']});
- raveCore.renderWidgets('home');
+ rave.renderWidgets('home');
raveEventBindings.bindEvents('page.jsp');
});
raveModels.currentPage.set({id: ${page.id}, ownerId: ${page.ownerId},
viewerId: <sec:authentication property="principal.id" />}, {silent:true})
-
-
- })
+ });
</script>
<c:forEach var="members" items="${page.members}">
Modified:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/app.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/app.js?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/app.js
(original)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/app.js
Fri Jun 21 16:01:57 2013
@@ -19,39 +19,37 @@
requirejs.config({
"paths":{
- "core": "./core",
- "portal": "./portal",
+
"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',
+ "rave": "./core/main",
"event_bindings": "./portal",
- "jquery": "//ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.2.min",
- "underscore":
"//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min",
"handlebars":"//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.rc.2/handlebars.min",
-
"backbone":"//cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.10/backbone-min",
-
"osapi":"/gadgets/js/container:pubsub-2:open-views.js?c=1&container=default&debug=1",
+ "jquery": "//ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.2.min",
"jqueryUi":"//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/jquery-ui.min",
"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',
- "bootstrap":
'//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.0.3/bootstrap.min'
+
"osapi":"/gadgets/js/container:pubsub-2:open-views.js?c=1&container=default&debug=1",
+ "portal": "./portal",
+ "underscore":
"//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min"
},
shim: {
- 'jquery':{
- exports:'$'
- },
- 'backbone': {
- //These script dependencies should be loaded before loading
- //backbone.js
+ backbone: {
deps: ['underscore', 'jquery'],
//Once loaded, use the global 'Backbone' as the
//module value.
exports: 'Backbone'
},
- 'underscore': {
- exports: '_'
+ bootstrap:{
+ deps:['jquery']
},
- 'handlebars':{
+ handlebars:{
exports:'Handlebars'
},
- 'jqueryUi':{
+ jquery:{
+ exports:'$'
+ },
+ jqueryUi:{
deps: ['jquery']
},
jqueryValidate:{
@@ -63,14 +61,8 @@ requirejs.config({
jqueryTouchPouch:{
deps:['jquery']
},
- bootstrap:{
- deps:['jquery']
- },
- osapi:{
- expots:'osapi'
+ underscore: {
+ exports: '_'
}
}
-
-})
-
-requirejs(["core/main"]);
+});
\ No newline at end of file
Modified:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/main.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/main.js?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/main.js
(original)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/main.js
Fri Jun 21 16:01:57 2013
@@ -17,9 +17,14 @@
* under the License.
*/
-define(["./rave_wookie", "./rave_opensocial", "./rave_ajax", "./rave_api",
"./rave_core", "./rave_view_manager", "./rave_widget",
- "portal/rave_admin", "portal/rave_backbone", "portal/rave_context",
"portal/rave_display", "portal/rave_forms", "portal/rave_layout",
"portal/rave_models", "portal/rave_person_profile", "portal/rave_portal",
"portal/rave_store", "portal/rave_templates", "portal/rave_ui"],
- function(wookie, os, raveAjax, raveApi, raveCore, raveViewManager,
raveRegionWidget,
- raveAdmin, raveBackbone, raveContext, raveDisplay, raveForms,
raveLayout, raveModels, ravePersonProfile, ravePortal, raveStore,
raveTemplates, raveUi){
+define(['underscore', './rave_core', './rave_api', './rave_widget',
'./rave_log', './rave_view_manager'],
+ function (_, rave, api, RegionWidget, log, viewManager) {
-})
+ rave.api = api;
+ rave.RegionWidget = RegionWidget;
+ rave.log = log;
+ _.extend(rave, viewManager);
+
+ return rave;
+ }
+)
Modified:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_ajax.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_ajax.js?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_ajax.js
(original)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_ajax.js
Fri Jun 21 16:01:57 2013
@@ -4,19 +4,19 @@
* 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
+ * '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
+ * '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(["jquery"], function($){
+define(['jquery'], function($){
return $.ajax;
})
Modified:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_api.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_api.js?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_api.js
(original)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_api.js
Fri Jun 21 16:01:57 2013
@@ -17,7 +17,8 @@
* under the License.
*/
-define(["./rave_ajax", "underscore", "jquery"], function(ajax, _, $){
+//TODO: jquery dependency should not be here.
+define(['underscore', 'jquery', './rave_ajax'], function(_, $, ajax){
//stores virtual host context of application execution
var context = "";
Modified:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js
(original)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js
Fri Jun 21 16:01:57 2013
@@ -17,10 +17,8 @@
* under the License.
*/
-define(["./rave_widget", "underscore"], function(regionWidget, _){
+define([ 'underscore', './rave_widget'], function(_, regionWidget){
var INITIALIZED = false,
- //providers - opensocial, wookie...
- providers = {},
//hash of widgets by regionWidgetId
regionWidgets = {},
//event handlers to fire on rave init
@@ -28,21 +26,10 @@ define(["./rave_widget", "underscore"],
//oajaxhub to support pubsub. only initialized if needed
openAjaxHub;
- var exports = {};
-
-/*
- exports.registerProvider = function (name, provider) {
- raveProviders[name.toLowerCase()] = provider;
- return provider;
- }
-
- exports.getProvider = function (name) {
- return raveProviders[name.toLowerCase()];
- }
-*/
+ var rave = {};
//TODO: regionId isn't really needed, but the script text is hard coded
and I don't want to mess with it yet
- exports.registerWidget = function (regionId, definition) {
+ rave.registerWidget = function (regionId, definition) {
//make regionId optional
if (!definition) {
definition = regionId;
@@ -58,23 +45,23 @@ define(["./rave_widget", "underscore"],
}
//uregister a regionwidget, identified by a RegionWidget object, a widget
definition, or just an id
- exports.unregisterWidget = function (widget) {
+ rave.unregisterWidget = function (widget) {
var regionWidgetId = widget.regionWidgetId || widget;
delete regionWidgets[regionWidgetId];
}
//convenience method to render all registered widgets
- exports.renderWidgets = function(el, opts) {
- _.invoke(exports.getWidgets(), 'render', el, opts);
+ rave.renderWidgets = function(el, opts) {
+ _.invoke(rave.getWidgets(), 'render', el, opts);
}
//get registered widget by regionWidgetId
- exports.getWidget = function (regionWidgetId) {
+ rave.getWidget = function (regionWidgetId) {
return regionWidgets[regionWidgetId];
}
- exports.getWidgets = function (filter) {
+ rave.getWidgets = function (filter) {
var widgets = _.toArray(regionWidgets);
if(filter) {
widgets = _.where(widgets, filter);
@@ -82,33 +69,9 @@ define(["./rave_widget", "underscore"],
return widgets;
}
- exports.getManagedHub = function () {
- if (!openAjaxHub) {
- if (_.isUndefined(OpenAjax)) {
- throw new Error("No implementation of OpenAjax found. " +
- "Please ensure that an implementation has been included in
the page.");
- }
- openAjaxHub = new OpenAjax.hub.ManagedHub({
- onSubscribe:function (topic, container) {
- //TODO:ask erin about changing rave to exports
- exports.log((container == null ? "Container" :
container.getClientID()) + " subscribes to this topic '" + topic + "'");
- return true;
- },
- onUnsubscribe:function (topic, container) {
- //TODO:ask erin about changing rave to exports
- exports.log((container == null ? "Container" :
container.getClientID()) + " unsubscribes from this topic '" + topic + "'");
- return true;
- },
- onPublish:function (topic, data, pcont, scont) {
- exports.log((pcont == null ? "Container" :
pcont.getClientID()) + " publishes '" + data + "' to topic '" + topic + "'
subscribed by " + (scont == null ? "Container" : scont.getClientID()));
- return true;
- }
- });
- }
- return openAjaxHub;
- }
- exports.registerOnInitHandler = function (handler) {
+
+ rave.registerOnInitHandler = function (handler) {
if (!(_.isFunction(handler))) {
throw new Error('Init event handler must be a function');
}
@@ -118,7 +81,7 @@ define(["./rave_widget", "underscore"],
initHandlers.push(handler);
}
- exports.init = function () {
+ rave.init = function () {
INITIALIZED = true;
_.each(regionWidgets, function (definition) {
regionWidgets[definition.regionWidgetId] = new
regionWidget(definition)
@@ -128,15 +91,8 @@ define(["./rave_widget", "underscore"],
});
}
- //wrap a safe version of console.log
- exports.log = function(msg){
- if (console && console.log) {
- console.log(msg);
- }
- }
-
//reset internal data - used for testing cleanup
- exports.reset = function () {
+ rave.reset = function () {
INITIALIZED = false;
providers = {};
regionWidgets = {};
@@ -144,5 +100,5 @@ define(["./rave_widget", "underscore"],
openAjaxHub;
}
- return exports;
+ return rave;
})
Added:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_log.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_log.js?rev=1495487&view=auto
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_log.js
(added)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_log.js
Fri Jun 21 16:01:57 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([], function(){
+ return function(msg){
+ if (console && console.log) {
+ console.log(msg);
+ }
+ }
+})
Added:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_openajax_hub.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_openajax_hub.js?rev=1495487&view=auto
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_openajax_hub.js
(added)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_openajax_hub.js
Fri Jun 21 16:01:57 2013
@@ -0,0 +1,47 @@
+/*
+ * 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(['underscore', './rave_log', 'osapi'], function(_, log){
+ var openAjaxHub;
+
+ if (!openAjaxHub) {
+ if (_.isUndefined(OpenAjax)) {
+ throw new Error("No implementation of OpenAjax found. " +
+ "Please ensure that an implementation has been included in the
page.");
+ }
+ openAjaxHub = new OpenAjax.hub.ManagedHub({
+ onSubscribe:function (topic, container) {
+ //TODO:ask erin about changing rave to exports
+ log((container == null ? "Container" :
container.getClientID()) + " subscribes to this topic '" + topic + "'");
+ return true;
+ },
+ onUnsubscribe:function (topic, container) {
+ //TODO:ask erin about changing rave to exports
+ log((container == null ? "Container" :
container.getClientID()) + " unsubscribes from this topic '" + topic + "'");
+ return true;
+ },
+ onPublish:function (topic, data, pcont, scont) {
+ log((pcont == null ? "Container" : pcont.getClientID()) + "
publishes '" + data + "' to topic '" + topic + "' subscribed by " + (scont ==
null ? "Container" : scont.getClientID()));
+ return true;
+ }
+ });
+ }
+
+ return openAjaxHub;
+})
\ No newline at end of file
Modified:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_opensocial.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_opensocial.js?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_opensocial.js
(original)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_opensocial.js
Fri Jun 21 16:01:57 2013
@@ -18,8 +18,8 @@
*/
//TODO: Remove dependency on rave_ui when moving to angular
-define(["./rave_core", "./rave_view_manager", "./rave_widget", "./rave_api",
"portal/rave_ui"],
- function(core, viewManager, regionWidget, api, raveUi){
+define(['underscore', './rave_view_manager', './rave_widget', './rave_api',
'portal/rave_ui', './rave_openajax_hub', './rave_log', 'osapi'],
+ function(_, viewManager, regionWidget, api, raveUi, managedHub, log){
var exports = {};
var container;
@@ -31,7 +31,7 @@ define(["./rave_core", "./rave_view_mana
container = new osapi.container.Container(containerConfig);
gadgets.pubsub2router.init({
- hub:core.getManagedHub()
+ hub:managedHub
});
rpcRegister();
@@ -108,7 +108,7 @@ define(["./rave_core", "./rave_view_mana
function renderEE(data) {
if (data.error) {
- return core.log(data.error.message)
+ return log(data.error.message)
}
var gadget = {
"widgetUrl": widgetUrl,
Modified:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_providers.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_providers.js?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_providers.js
(original)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_providers.js
Fri Jun 21 16:01:57 2013
@@ -17,9 +17,9 @@
* under the License.
*/
-define(["./rave_wookie", "./rave_opensocial"], function(wookie, os){
+define(['./rave_wookie', './rave_opensocial'], function(wookie, os){
return{
- wookie:wookie,
+ w3c:wookie,
opensocial:os
}
})
Modified:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_view_manager.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_view_manager.js?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_view_manager.js
(original)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_view_manager.js
Fri Jun 21 16:01:57 2013
@@ -17,7 +17,7 @@
* under the License.
*/
-define(["underscore"], function(_){
+define(['underscore'], function(_){
//hash of registered views by name
var registeredViews = {}
//hash of registered views that have been rendered by a generated uid
Modified:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_widget.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_widget.js?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_widget.js
(original)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_widget.js
Fri Jun 21 16:01:57 2013
@@ -17,7 +17,12 @@
* under the License.
*/
-define(["./rave_api", "underscore"], function(api, _){
+define(['underscore', './rave_api', './rave_providers'], function(_, api,
providers){
+
+ function getProvider(name) {
+ return providers[name.toLowerCase()];
+ }
+
/*
rave widget constructor
*/
@@ -26,7 +31,7 @@ define(["./rave_api", "underscore"], fun
_.extend(this, definition);
- this._provider = rave.getProvider(provider);
+ this._provider = getProvider(provider);
if (!this._provider) {
throw new Error('Cannot render widget ' + definition.widgetUrl +
'. ' +
Modified:
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_wookie.js
URL:
http://svn.apache.org/viewvc/rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_wookie.js?rev=1495487&r1=1495486&r2=1495487&view=diff
==============================================================================
---
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_wookie.js
(original)
+++
rave/branches/require/rave-portal-resources/src/main/webapp/static/script/core/rave_wookie.js
Fri Jun 21 16:01:57 2013
@@ -17,7 +17,7 @@
* under the License.
*/
-define(["./rave_widget", "./rave_core"], function(regionWidget, core){
+define(['./rave_widget', './rave_openajax_hub'], function(regionWidget,
managedHub){
var exports = {}
exports.initWidget = function(widget){}
@@ -27,7 +27,7 @@ define(["./rave_widget", "./rave_core"],
window.document.getElementById(widget.regionWidgetId).style.visibility="visible";
};
- new OpenAjax.hub.IframeContainer(core.getManagedHub() ,
""+widget.regionWidgetId,
+ new OpenAjax.hub.IframeContainer(managedHub ,
""+widget.regionWidgetId,
{
Container: {
onSecurityAlert: onClientSecurityAlert,