You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by mf...@apache.org on 2013/05/07 20:13:15 UTC
svn commit: r1479999 - in /rave/trunk: ./
rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/
rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/conversion/impl/
rave-components/rave-mongodb/src/main/java/org/a...
Author: mfranklin
Date: Tue May 7 18:13:14 2013
New Revision: 1479999
URL: http://svn.apache.org/r1479999
Log:
Merged changes from 0.21.1 branch back to trunk:
Added:
rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/MongoDbActivityStreamsEntry.java
- copied unchanged from r1479991, rave/branches/0.21.1/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/MongoDbActivityStreamsEntry.java
rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/MongoDbActivityStreamsMediaLink.java
- copied unchanged from r1479991, rave/branches/0.21.1/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/MongoDbActivityStreamsMediaLink.java
rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/MongoDbActivityStreamsObject.java
- copied unchanged from r1479991, rave/branches/0.21.1/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/MongoDbActivityStreamsObject.java
Modified:
rave/trunk/ (props changed)
rave/trunk/CHANGELOG
rave/trunk/pom.xml
rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/conversion/impl/MongoDbActivityStreamsEntryConverter.java
rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/repository/impl/MongoDbActivityStreamsRepository.java
rave/trunk/rave-components/rave-mongodb/src/test/java/org/apache/rave/portal/repository/impl/MongoDbActivityStreamsRepositoryTest.java
rave/trunk/rave-demo-gadgets/src/main/webapp/canvas-nav.xml
rave/trunk/rave-portal-resources/src/main/resources/wro.xml
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp
rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js
rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_admin.js
rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_person_profile.js
rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_ui.js
rave/trunk/rave-portal/pom.xml
Propchange: rave/trunk/
------------------------------------------------------------------------------
Merged /rave/tags/0.21:r1463818-1464731
Merged /rave/branches/0.21.1:r1464732-1479991
Modified: rave/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/rave/trunk/CHANGELOG?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/CHANGELOG (original)
+++ rave/trunk/CHANGELOG Tue May 7 18:13:14 2013
@@ -2,6 +2,15 @@ Apache Rave Change Log
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311290 (select the version of release and output as text to create this file)
===========================================================================================================
+Release Notes - Rave - Version 0.21.1
+===========================================================================================================
+** Bug
+ * [RAVE-946] - Rate this widget, comment on this widget, about this widget buttons go to wrong widget
+ * [RAVE-947] - rave.log throws error in google chrome
+ * [RAVE-948] - W3C Widgets can not be loaded
+ * [RAVE-958] - MongoDB profile fails integration tests
+
+===========================================================================================================
Release Notes - Rave - Version 0.21
===========================================================================================================
** Sub-task
Modified: rave/trunk/pom.xml
URL: http://svn.apache.org/viewvc/rave/trunk/pom.xml?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/pom.xml (original)
+++ rave/trunk/pom.xml Tue May 7 18:13:14 2013
@@ -825,6 +825,25 @@
</profile>
<profile>
<id>mongodb</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.github.joelittlejohn.embedmongo</groupId>
+ <artifactId>embedmongo-maven-plugin</artifactId>
+ <version>0.1.5</version>
+ <executions>
+ <execution>
+ <id>start</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ </executions>
+ <inherited>false</inherited>
+ </plugin>
+ </plugins>
+ </build>
</profile>
<profile>
<id>apache-release</id>
Modified: rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/conversion/impl/MongoDbActivityStreamsEntryConverter.java
URL: http://svn.apache.org/viewvc/rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/conversion/impl/MongoDbActivityStreamsEntryConverter.java?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/conversion/impl/MongoDbActivityStreamsEntryConverter.java (original)
+++ rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/model/conversion/impl/MongoDbActivityStreamsEntryConverter.java Tue May 7 18:13:14 2013
@@ -23,9 +23,10 @@ import com.google.common.collect.Lists;
import org.apache.rave.model.ActivityStreamsEntry;
import org.apache.rave.model.ActivityStreamsMediaLink;
import org.apache.rave.model.ActivityStreamsObject;
+import org.apache.rave.portal.model.MongoDbActivityStreamsEntry;
+import org.apache.rave.portal.model.MongoDbActivityStreamsMediaLink;
+import org.apache.rave.portal.model.MongoDbActivityStreamsObject;
import org.apache.rave.portal.model.conversion.HydratingModelConverter;
-import org.apache.rave.portal.model.impl.ActivityStreamsEntryImpl;
-import org.apache.rave.portal.model.impl.ActivityStreamsMediaLinkImpl;
import org.apache.rave.portal.model.impl.ActivityStreamsObjectImpl;
import org.springframework.stereotype.Component;
@@ -34,10 +35,10 @@ import java.util.List;
import static org.apache.rave.portal.model.util.MongoDbModelUtil.generateId;
@Component
-public class MongoDbActivityStreamsEntryConverter implements HydratingModelConverter<ActivityStreamsEntry, ActivityStreamsEntryImpl> {
+public class MongoDbActivityStreamsEntryConverter implements HydratingModelConverter<ActivityStreamsEntry, MongoDbActivityStreamsEntry> {
@Override
- public void hydrate(ActivityStreamsEntryImpl dehydrated) {
+ public void hydrate(MongoDbActivityStreamsEntry dehydrated) {
}
@Override
@@ -46,9 +47,9 @@ public class MongoDbActivityStreamsEntry
}
@Override
- public ActivityStreamsEntryImpl convert(ActivityStreamsEntry source) {
+ public MongoDbActivityStreamsEntry convert(ActivityStreamsEntry source) {
if (source != null) {
- ActivityStreamsEntryImpl converted = new ActivityStreamsEntryImpl();
+ MongoDbActivityStreamsEntry converted = new MongoDbActivityStreamsEntry();
converted.setActor(convert(source.getActor()));
converted.setObject(convert(source.getObject()));
converted.setGenerator(convert(source.getGenerator()));
@@ -65,7 +66,7 @@ public class MongoDbActivityStreamsEntry
private ActivityStreamsMediaLink convert(ActivityStreamsMediaLink source) {
if (source != null) {
- ActivityStreamsMediaLink converted = new ActivityStreamsMediaLinkImpl();
+ MongoDbActivityStreamsMediaLink converted = new MongoDbActivityStreamsMediaLink();
converted.setId(source.getId() == null ? generateId() : source.getId());
converted.setDuration(source.getDuration());
converted.setHeight(source.getHeight());
@@ -79,7 +80,7 @@ public class MongoDbActivityStreamsEntry
public ActivityStreamsObject convert(ActivityStreamsObject source) {
if (source != null) {
- ActivityStreamsObjectImpl converted = new ActivityStreamsObjectImpl();
+ MongoDbActivityStreamsObject converted = new MongoDbActivityStreamsObject();
converted.setAuthor(convert(source.getAuthor()));
converted.setAttachments(convert(source.getAttachments()));
converted.setImage(convert(source.getImage()));
Modified: rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/repository/impl/MongoDbActivityStreamsRepository.java
URL: http://svn.apache.org/viewvc/rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/repository/impl/MongoDbActivityStreamsRepository.java?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/repository/impl/MongoDbActivityStreamsRepository.java (original)
+++ rave/trunk/rave-components/rave-mongodb/src/main/java/org/apache/rave/portal/repository/impl/MongoDbActivityStreamsRepository.java Tue May 7 18:13:14 2013
@@ -20,6 +20,7 @@
package org.apache.rave.portal.repository.impl;
import org.apache.rave.model.ActivityStreamsEntry;
+import org.apache.rave.portal.model.MongoDbActivityStreamsEntry;
import org.apache.rave.portal.model.conversion.HydratingConverterFactory;
import org.apache.rave.portal.model.impl.ActivityStreamsEntryImpl;
import org.apache.rave.portal.repository.ActivityStreamsRepository;
@@ -39,7 +40,7 @@ import static org.springframework.data.m
*/
@Repository
public class MongoDbActivityStreamsRepository implements ActivityStreamsRepository {
- private static final Class<? extends ActivityStreamsEntry> CLASS = ActivityStreamsEntryImpl.class;
+ private static final Class<? extends ActivityStreamsEntry> CLASS = MongoDbActivityStreamsEntry.class;
private final MongoOperations template;
private final HydratingConverterFactory converter;
Modified: rave/trunk/rave-components/rave-mongodb/src/test/java/org/apache/rave/portal/repository/impl/MongoDbActivityStreamsRepositoryTest.java
URL: http://svn.apache.org/viewvc/rave/trunk/rave-components/rave-mongodb/src/test/java/org/apache/rave/portal/repository/impl/MongoDbActivityStreamsRepositoryTest.java?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-components/rave-mongodb/src/test/java/org/apache/rave/portal/repository/impl/MongoDbActivityStreamsRepositoryTest.java (original)
+++ rave/trunk/rave-components/rave-mongodb/src/test/java/org/apache/rave/portal/repository/impl/MongoDbActivityStreamsRepositoryTest.java Tue May 7 18:13:14 2013
@@ -22,6 +22,7 @@ package org.apache.rave.portal.repositor
import com.google.common.collect.Lists;
import org.apache.rave.model.ActivityStreamsEntry;
+import org.apache.rave.portal.model.MongoDbActivityStreamsEntry;
import org.apache.rave.portal.model.conversion.HydratingConverterFactory;
import org.apache.rave.portal.model.impl.ActivityStreamsEntryImpl;
import org.apache.rave.portal.repository.ActivityStreamsRepository;
@@ -41,6 +42,7 @@ import static org.junit.Assert.assertTha
public class MongoDbActivityStreamsRepositoryTest {
public static final String ID = "1";
+ public static final Class<MongoDbActivityStreamsEntry> ENTITY_CLASS = MongoDbActivityStreamsEntry.class;
private MongoOperations template;
private HydratingConverterFactory factory;
private ActivityStreamsRepository repository;
@@ -54,8 +56,8 @@ public class MongoDbActivityStreamsRepos
@Test
public void getAll() {
- List<ActivityStreamsEntryImpl> result = Lists.newArrayList();
- expect(template.findAll(eq(ActivityStreamsEntryImpl.class), eq(ACTIVITIES))).andReturn(result);
+ List<MongoDbActivityStreamsEntry> result = Lists.newArrayList();
+ expect(template.findAll(eq(ENTITY_CLASS), eq(ACTIVITIES))).andReturn(result);
replay(template);
List<ActivityStreamsEntry> entries = repository.getAll();
@@ -64,8 +66,8 @@ public class MongoDbActivityStreamsRepos
@Test
public void getByUserId() {
- List<ActivityStreamsEntryImpl> result = Lists.newArrayList();
- expect(template.find(Query.query(Criteria.where("actor._id").is(ID)), ActivityStreamsEntryImpl.class, ACTIVITIES)).andReturn(result);
+ List<MongoDbActivityStreamsEntry> result = Lists.newArrayList();
+ expect(template.find(Query.query(Criteria.where("actor._id").is(ID)), ENTITY_CLASS, ACTIVITIES)).andReturn(result);
replay(template);
List<ActivityStreamsEntry> entries = repository.getByUserId(ID);
@@ -102,9 +104,9 @@ public class MongoDbActivityStreamsRepos
@Test
public void getById() {
- ActivityStreamsEntryImpl entry = new ActivityStreamsEntryImpl();
+ MongoDbActivityStreamsEntry entry = new MongoDbActivityStreamsEntry();
entry.setId(ID);
- expect(template.findById(ID, ActivityStreamsEntryImpl.class, ACTIVITIES)).andReturn(entry);
+ expect(template.findById(ID, ENTITY_CLASS, ACTIVITIES)).andReturn(entry);
replay(template);
ActivityStreamsEntry result = repository.get(ID);
Modified: rave/trunk/rave-demo-gadgets/src/main/webapp/canvas-nav.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-demo-gadgets/src/main/webapp/canvas-nav.xml?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-demo-gadgets/src/main/webapp/canvas-nav.xml (original)
+++ rave/trunk/rave-demo-gadgets/src/main/webapp/canvas-nav.xml Tue May 7 18:13:14 2013
@@ -107,10 +107,9 @@
</Content>
<Content type="html" view="default">
- <![CDATA[
+ <![CDATA[
Default view.
]]>
</Content>
-
</Module>
Modified: rave/trunk/rave-portal-resources/src/main/resources/wro.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/resources/wro.xml?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/resources/wro.xml (original)
+++ rave/trunk/rave-portal-resources/src/main/resources/wro.xml Tue May 7 18:13:14 2013
@@ -20,10 +20,23 @@ under the License.
<groups xmlns="http://www.isdc.ro/wro">
<!-- defines a wro4j group called rave-all.min which represents all of our javascript files -->
<group name="rave.core.min">
- <js>/static/script/core/*.js</js>
+ <js>/static/script/core/rave_core.js</js>
+ <js>/static/script/core/rave_ajax.js</js>
+ <js>/static/script/core/rave_api.js</js>
+ <js>/static/script/core/rave_widget.js</js>
+ <js>/static/script/core/rave_opensocial.js</js>
+ <js>/static/script/core/rave_wookie.js</js>
</group>
<group name="rave.portal.min">
- <js>/static/script/portal/*.js</js>
+ <js>/static/script/portal/rave_portal.js</js>
+ <js>/static/script/portal/rave_backbone.js</js>
+ <js>/static/script/portal/rave_models.js</js>
+ <js>/static/script/portal/rave_layout.js</js>
+ <js>/static/script/portal/rave_ui.js</js>
+ <js>/static/script/portal/rave_forms.js</js>
+ <js>/static/script/portal/rave_person_profile.js</js>
+ <js>/static/script/portal/rave_store.js</js>
+ <js>/static/script/portal/rave_admin.js</js>
</group>
<!-- defines a wro4j group called rave_css which represents the rave less file -->
<group name="rave">
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/page.jsp Tue May 7 18:13:14 2013
@@ -390,10 +390,13 @@
<portal:register-init-script location="${'AFTER_RAVE'}">
<script>
+ rave.init();
+ rave.RegionWidget.defaultView = 'home';
+
$(function() {
rave.initPageEditorStatus(<c:out value="${pageUser.editor}"/>);
- rave.init();
rave.layout.init(${applicationProperties['portal.export.ui.enable']});
+ rave.renderWidgets('home');
});
</script>
<script>rave.models.currentPage.set({id: ${page.id}, ownerId: ${page.ownerId}, viewerId: <sec:authentication property="principal.id" />}, {silent:true})</script>
Modified: rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/personProfile.jsp Tue May 7 18:13:14 2013
@@ -207,10 +207,10 @@
<portal:register-init-script location="${'AFTER_RAVE'}">
<script>
- $(function () {
- rave.RegionWidget.defaultView = 'profile';
+ rave.init();
+ rave.RegionWidget.defaultView = 'profile';
- rave.init();
+ $(function () {
rave.layout.init();
rave.personprofile.init();
rave.setPageOwner({
@@ -218,6 +218,7 @@
id: "<c:out value="${userProfile.id}"/>"
});
rave.forms.validateEditAccountForm();
+ rave.renderWidgets('home');
});
</script>
</portal:register-init-script>
Modified: rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_core.js Tue May 7 18:13:14 2013
@@ -69,6 +69,11 @@ rave = (function () {
delete regionWidgets[regionWidgetId];
}
+ //convenience method to render all registered widgets
+ exports.renderWidgets = function(el, opts) {
+ _.invoke(rave.getWidgets(), 'render', el, opts);
+ }
+
//get registered widget by regionWidgetId
exports.getWidget = function (regionWidgetId) {
return regionWidgets[regionWidgetId];
@@ -174,8 +179,11 @@ rave = (function () {
}
//wrap a safe version of console.log
- exports.log = (console && console.log) || function () {
- };
+ exports.log = function(msg){
+ if (console && console.log) {
+ console.log(msg);
+ }
+ }
//reset internal data - used for testing cleanup
exports.reset = function () {
Modified: rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_admin.js
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_admin.js?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_admin.js (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_admin.js Tue May 7 18:13:14 2013
@@ -17,3 +17,51 @@
* under the License.
*/
+var rave = rave || {};
+rave.admin = rave.admin || (function() {
+
+ var adminUi = (function() {
+
+ function datatableClick() {
+ $('.datatable tr').bind('click', function() {
+ var link = $(this).attr('data-detaillink');
+ if (link != undefined && link != '') {
+ window.location = link;
+ }
+ });
+ }
+
+ //Resize bootstrap modal & adjust margins to size of image.
+ function resizeImageModal(){
+ $('#thumbnailModal, #screenshotModal').on('shown', function () {
+ if(!$(this).hasClass("sized")){
+ var imageWidth = $(this).find("img").width(),
+ imageHeight = $(this).find("img").height(),
+ footerHeight = $(this).find(".modal-footer").outerHeight(),
+ headerHeight = $(this).find(".modal-header").outerHeight(),
+ totalHeight = imageHeight + footerHeight + headerHeight;
+
+ $(this).css({
+ width: imageWidth + "px",
+ 'margin-top': "-" + Math.round(totalHeight/2) + "px",
+ 'margin-left': "-" + Math.round(imageWidth/2) + "px"
+ }).addClass("sized");
+ }
+ });
+ }
+
+ function init() {
+ datatableClick();
+ resizeImageModal();
+ }
+
+ return {
+ init:init
+ }
+ })();
+
+ return {
+ initAdminUi : adminUi.init
+ }
+
+})();
Modified: rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_person_profile.js
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_person_profile.js?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_person_profile.js (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_person_profile.js Tue May 7 18:13:14 2013
@@ -40,6 +40,7 @@ rave.personprofile = rave.personprofile
//on tab click, change the url hash
var page = $(this).text();
var target = $(this).attr('href');
+ var regionId = target.split('-')[1];
location.hash = encodeURIComponent(page);
// refresh the widgets on the sub page when selected to ensure proper sizing
Modified: rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_ui.js
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_ui.js?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_ui.js (original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/static/script/portal/rave_ui.js Tue May 7 18:13:14 2013
@@ -210,14 +210,10 @@ _.extend(rave.ui, (function () {
$("#emptyPageMessageWrapper").removeClass("hidden");
}
- function renderWidgets() {
+ function showEmptyDisplay() {
if (_.isEmpty(rave.getWidgets())) {
displayEmptyPageMessage();
}
-
- _.each(rave.getWidgets(), function (widget) {
- widget.render('home');
- });
}
function getNonLockedRegions() {
@@ -569,23 +565,24 @@ _.extend(rave.ui, (function () {
var HomeView = function (widget) {
this.widget = widget;
- var widgetId = widget.regionWidgetId;
+ var regionWidgetId = widget.regionWidgetId;
- this.$chrome = $('#widget-' + widgetId + '-wrapper');
- this.$minimizeIcon = $("#widget-" + widgetId + "-min");
- this.$toggleCollapseIcon = $("#widget-" + widgetId + "-collapse");
- this.$menuItemMove = $("#widget-" + widgetId + "-menu-move-item");
- this.$menuItemDelete = $("#widget-" + widgetId + "-menu-delete-item");
- this.$menuItemMaximize = $("#widget-" + widgetId + "-menu-maximize-item");
- this.$menuItemAbout = $("#widget-" + widgetId + "-menu-about-item");
- this.$menuItemComment = $("#widget-" + widgetId + "-menu-comment-item");
- this.$menuItemRate = $("#widget-" + widgetId + "-menu-rate-item");
- this.$menuItemEditPrefs = $("#widget-" + widgetId + "-menu-editprefs-item");
- this.$widgetSite = $("#widget-" + widgetId + "-body");
+ this.$chrome = $('#widget-' + regionWidgetId + '-wrapper');
+ this.$minimizeIcon = $("#widget-" + regionWidgetId + "-min");
+ this.$toggleCollapseIcon = $("#widget-" + regionWidgetId + "-collapse");
+ this.$menuItemMove = $("#widget-" + regionWidgetId + "-menu-move-item");
+ this.$menuItemDelete = $("#widget-" + regionWidgetId + "-menu-delete-item");
+ this.$menuItemMaximize = $("#widget-" + regionWidgetId + "-menu-maximize-item");
+ this.$menuItemAbout = $("#widget-" + regionWidgetId + "-menu-about-item");
+ this.$menuItemComment = $("#widget-" + regionWidgetId + "-menu-comment-item");
+ this.$menuItemRate = $("#widget-" + regionWidgetId + "-menu-rate-item");
+ this.$menuItemEditPrefs = $("#widget-" + regionWidgetId + "-menu-editprefs-item");
+ this.$widgetSite = $("#widget-" + regionWidgetId + "-body");
}
HomeView.prototype.render = function (widget) {
- var widgetId = this.widget.regionWidgetId;
+ var regionWidgetId = this.widget.regionWidgetId;
+ var widgetId = this.widget.widgetId;
var self = this;
doCollapseExpand();
@@ -595,13 +592,13 @@ _.extend(rave.ui, (function () {
$(".dnd-overlay, .canvas-overlay").remove();
getNonLockedRegions().sortable("option", "disabled", false);
// display the widget in normal view
- $("#widget-" + widgetId + "-wrapper").removeClass("widget-wrapper-canvas").addClass("widget-wrapper");
+ $("#widget-" + regionWidgetId + "-wrapper").removeClass("widget-wrapper-canvas").addClass("widget-wrapper");
// hide the widget minimize button
- $("#widget-" + widgetId + "-min").hide();
+ $("#widget-" + regionWidgetId + "-min").hide();
// show the widget menu
- $("#widget-" + widgetId + "-widget-menu-wrapper").show();
+ $("#widget-" + regionWidgetId + "-widget-menu-wrapper").show();
// show the collapse/restore toggle icon
- $("#widget-" + widgetId + "-collapse").show();
+ $("#widget-" + regionWidgetId + "-collapse").show();
// if the widget is collapsed execute the collapse function
// otherwise execute the minimize function
return false;
@@ -612,7 +609,7 @@ _.extend(rave.ui, (function () {
}
function maximize() {
- self.widget.render('canvas');
+ self.widget.render('canvas', {view: 'canvas'});
}
function toggleCollapse() {
@@ -638,7 +635,7 @@ _.extend(rave.ui, (function () {
// Clear the dropdown box; needing to do self may be a bug?
$('.dropdown').removeClass('open');
// Open the modal
- $("#moveWidgetModal").data('regionWidgetId', widgetId);
+ $("#moveWidgetModal").data('regionWidgetId', regionWidgetId);
$("#moveWidgetModal").modal('show');
return false;
@@ -669,7 +666,7 @@ _.extend(rave.ui, (function () {
return false;
}
- $('#widget-' + widgetId + '-toolbar').mousedown(function (event) {
+ $('#widget-' + regionWidgetId + '-toolbar').mousedown(function (event) {
// don't allow drag and drop when self item is clicked
event.stopPropagation();
});
@@ -710,6 +707,12 @@ _.extend(rave.ui, (function () {
displayEmptyPageMessage();
}
}
+ HomeView.prototype.expand = function(){
+ this.$chrome.show();
+ }
+ HomeView.prototype.collapse = function(){
+ this.$chrome.hide();
+ }
rave.registerView('home', HomeView);
}
@@ -906,7 +909,7 @@ _.extend(rave.ui, (function () {
registerHomeView();
registerCanvasView();
registerPopups();
- renderWidgets();
+ showEmptyDisplay();
setupDragAndDrop();
}
Modified: rave/trunk/rave-portal/pom.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-portal/pom.xml?rev=1479999&r1=1479998&r2=1479999&view=diff
==============================================================================
--- rave/trunk/rave-portal/pom.xml (original)
+++ rave/trunk/rave-portal/pom.xml Tue May 7 18:13:14 2013
@@ -347,7 +347,7 @@
<directory>${project.basedir}/src/test/resources_mongo</directory>
</testResource>
</testResources>
- <plugins>
+ <plugins><!--
<plugin>
<groupId>com.github.joelittlejohn.embedmongo</groupId>
<artifactId>embedmongo-maven-plugin</artifactId>
@@ -368,7 +368,7 @@
</goals>
</execution>
</executions>
- </plugin>
+ </plugin>-->
</plugins>
</build>
</profile>