[kune-commits] r821 - in trunk: .
src/main/java/org/ourproject/kune/app/public/css
src/main/java/org/ourproject/kune/platf/client/services
src/main/java/org/ourproject/kune/platf/client/ui
src/main/java/org/ourproject/kune/platf/client/ui/gridmenu
src/main/java/org/ourproject/kune/platf/client/ui/rate
src/main/java/org/ourproject/kune/platf/client/ui/stacks
src/main/java/org/ourproject/kune/workspace/client/socialnet
src/main/java/org/ourproject/kune/workspace/client/tags
src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign
src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel
src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/themes
src/main/resources
src/test/java/org/ourproject/kune/platf/server/manager
vjrj
vjrj at ourproject.org
Mon Jul 28 04:23:10 CEST 2008
Author: vjrj
Date: 2008-07-28 04:23:02 +0200 (Mon, 28 Jul 2008)
New Revision: 821
Added:
trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipHelper.java
Modified:
trunk/pom.xml
trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
trunk/src/main/java/org/ourproject/kune/app/public/css/kune.css
trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneErrorHandler.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/DropDownPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/stacks/StackedDropDownPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntityWorkspace.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/WorkspaceSkeleton.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/themes/WsThemePanel.java
trunk/src/main/resources/kune.properties
trunk/src/test/java/org/ourproject/kune/platf/server/manager/SocialNetworkManagerTest.java
Log:
Complete - task 25: Make a Quicktip initialization class (for both emite and kune)
Complete - task 17: Theme menus with colors and other themes
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/pom.xml 2008-07-28 02:23:02 UTC (rev 821)
@@ -213,7 +213,6 @@
</dependency>
<!-- jetty dependencies -->
- <!-- for jetty:continuations: -->
<dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-util</artifactId>
Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/all.css 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/all.css 2008-07-28 02:23:02 UTC (rev 821)
@@ -1787,6 +1787,18 @@
margin-top: 3px;
}
+.kune-Margin-Small-l {
+ margin-left: 3px;
+}
+
+.kune-Margin-Small-r {
+ margin-right: 3px;
+}
+
+.kune-Margin-Small-b {
+ margin-bottom: 3px;
+}
+
.kune-Margin-Mini-trbl {
margin: 1px;
}
@@ -1814,6 +1826,10 @@
margin-right: 1px;
}
+.kune-Margin-Mini-b {
+ margin-bottom: 1px;
+}
+
.kune-Margin-Mini-l {
margin-left: 1px;
}
@@ -2929,7 +2945,7 @@
height: 27px;
}
-.k-entitytextlogo-def .gwt-Label {
+.k-entitytextlogo-default .gwt-Label {
color: #69312F;
}
@@ -2962,7 +2978,7 @@
background-color: #FFF;
}
-.k-entity-def .x-layout-split {
+.k-entity-default .x-layout-split {
background: #DD8A3D none repeat scroll 0% 50%;
}
@@ -2990,7 +3006,7 @@
background: transparent none repeat scroll 0% 50%;
}
-.k-entityworkspace-def .x-layout-split {
+.k-entityworkspace-default .x-layout-split {
background: #DEAA87 none repeat scroll 0% 50%;
}
@@ -3032,7 +3048,7 @@
white-space: nowrap;
}
-.k-entity-title-rd-def {
+.k-entity-title-rd-default {
background: #DD8A3D;
}
@@ -3056,7 +3072,7 @@
background: #D40000;
}
-.k-entity-title-def {
+.k-entity-title-default {
background: #F1BB59 none repeat scroll 0% 50%;
border-left-color: #DD8A3D;
}
@@ -3086,7 +3102,7 @@
border-left-color: #D40000;
}
-.k-entity-title-def div {
+.k-entity-title-default div {
color: #69312F;
}
@@ -3110,7 +3126,7 @@
color: #800000;
}
-.k-entity-subtitle-def {
+.k-entity-subtitle-default {
background: #DD8A3D none repeat scroll 0% 50%;
}
@@ -3134,7 +3150,7 @@
background: #D40000 none repeat scroll 0% 50%;
}
-.k-entity-subtitle-def div {
+.k-entity-subtitle-default div {
color: #FFF;
}
@@ -3158,7 +3174,7 @@
color: #FFF;
}
-.k-entity-bottom-rd-def, .k-entity-bottom-def {
+.k-entity-bottom-rd-default, .k-entity-bottom-default {
background: #DD8A3D;
}
@@ -3188,7 +3204,7 @@
text-decoration: underline;
}
-.k-entity-container-def div {
+.k-entity-container-default div {
background: #FFD09D none repeat scroll 0% 50%;
}
@@ -3270,7 +3286,7 @@
.k-dropdownouter-members {
}
-.k-dropdownouter-members-def {
+.k-dropdownouter-members-default {
background-color: #DF5244;
}
@@ -3297,7 +3313,7 @@
.k-dropdownouter-part {
}
-.k-dropdownouter-part-def {
+.k-dropdownouter-part-default {
background-color: #CA5842;
}
@@ -3324,7 +3340,7 @@
.k-dropdownouter-tags {
}
-.k-dropdownouter-tags-def {
+.k-dropdownouter-tags-default {
background-color: #87501E;
}
@@ -3351,7 +3367,7 @@
.k-dropdownouter-summary {
}
-.k-dropdownouter-summary-def {
+.k-dropdownouter-summary-default {
background-color: #9F734B;
}
@@ -3396,7 +3412,7 @@
margin: 0 3px 0 1px;
}
/* WsTheme */
-.k-wstheme-icon-def {
+.k-wstheme-icon-default {
background: #FF8C00;
}
Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2008-07-28 02:23:02 UTC (rev 821)
@@ -71,7 +71,7 @@
height: 27px;
}
-.k-entitytextlogo-def .gwt-Label {
+.k-entitytextlogo-default .gwt-Label {
color: #69312F;
}
@@ -104,7 +104,7 @@
background-color: #FFF;
}
-.k-entity-def .x-layout-split {
+.k-entity-default .x-layout-split {
background: #DD8A3D none repeat scroll 0% 50%;
}
@@ -132,7 +132,7 @@
background: transparent none repeat scroll 0% 50%;
}
-.k-entityworkspace-def .x-layout-split {
+.k-entityworkspace-default .x-layout-split {
background: #DEAA87 none repeat scroll 0% 50%;
}
@@ -174,7 +174,7 @@
white-space: nowrap;
}
-.k-entity-title-rd-def {
+.k-entity-title-rd-default {
background: #DD8A3D;
}
@@ -198,7 +198,7 @@
background: #D40000;
}
-.k-entity-title-def {
+.k-entity-title-default {
background: #F1BB59 none repeat scroll 0% 50%;
border-left-color: #DD8A3D;
}
@@ -228,7 +228,7 @@
border-left-color: #D40000;
}
-.k-entity-title-def div {
+.k-entity-title-default div {
color: #69312F;
}
@@ -252,7 +252,7 @@
color: #800000;
}
-.k-entity-subtitle-def {
+.k-entity-subtitle-default {
background: #DD8A3D none repeat scroll 0% 50%;
}
@@ -276,7 +276,7 @@
background: #D40000 none repeat scroll 0% 50%;
}
-.k-entity-subtitle-def div {
+.k-entity-subtitle-default div {
color: #FFF;
}
@@ -300,7 +300,7 @@
color: #FFF;
}
-.k-entity-bottom-rd-def, .k-entity-bottom-def {
+.k-entity-bottom-rd-default, .k-entity-bottom-default {
background: #DD8A3D;
}
@@ -330,7 +330,7 @@
text-decoration: underline;
}
-.k-entity-container-def div {
+.k-entity-container-default div {
background: #FFD09D none repeat scroll 0% 50%;
}
@@ -412,7 +412,7 @@
.k-dropdownouter-members {
}
-.k-dropdownouter-members-def {
+.k-dropdownouter-members-default {
background-color: #DF5244;
}
@@ -439,7 +439,7 @@
.k-dropdownouter-part {
}
-.k-dropdownouter-part-def {
+.k-dropdownouter-part-default {
background-color: #CA5842;
}
@@ -466,7 +466,7 @@
.k-dropdownouter-tags {
}
-.k-dropdownouter-tags-def {
+.k-dropdownouter-tags-default {
background-color: #87501E;
}
@@ -493,7 +493,7 @@
.k-dropdownouter-summary {
}
-.k-dropdownouter-summary-def {
+.k-dropdownouter-summary-default {
background-color: #9F734B;
}
@@ -538,7 +538,7 @@
margin: 0 3px 0 1px;
}
/* WsTheme */
-.k-wstheme-icon-def {
+.k-wstheme-icon-default {
background: #FF8C00;
}
Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/kune.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/kune.css 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune.css 2008-07-28 02:23:02 UTC (rev 821)
@@ -469,6 +469,18 @@
margin-top: 3px;
}
+.kune-Margin-Small-l {
+ margin-left: 3px;
+}
+
+.kune-Margin-Small-r {
+ margin-right: 3px;
+}
+
+.kune-Margin-Small-b {
+ margin-bottom: 3px;
+}
+
.kune-Margin-Mini-trbl {
margin: 1px;
}
@@ -496,6 +508,10 @@
margin-right: 1px;
}
+.kune-Margin-Mini-b {
+ margin-bottom: 1px;
+}
+
.kune-Margin-Mini-l {
margin-left: 1px;
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneErrorHandler.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneErrorHandler.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneErrorHandler.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -102,7 +102,6 @@
logException(e, true);
Site.error(i18n.t("Error performing operation"));
GWT.log("Other kind of exception in StateManagerDefault/processErrorException", null);
- throw new RuntimeException();
}
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KuneModule.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -21,6 +21,7 @@
import org.ourproject.kune.platf.client.state.SessionImpl;
import org.ourproject.kune.platf.client.state.StateManager;
import org.ourproject.kune.platf.client.state.StateManagerDefault;
+import org.ourproject.kune.platf.client.ui.QuickTipHelper;
import org.ourproject.kune.platf.client.ui.rate.RateIt;
import org.ourproject.kune.platf.client.ui.rate.RateItPanel;
import org.ourproject.kune.platf.client.ui.rate.RateItPresenter;
@@ -149,6 +150,14 @@
}
}, SingletonScope.class);
+ builder.registerProvider(QuickTipHelper.class, new Provider<QuickTipHelper>() {
+ public QuickTipHelper get() {
+ return new QuickTipHelper();
+ }
+ }, SingletonScope.class);
+
+ i(QuickTipHelper.class);
+
builder.registerProvider(UserServiceAsync.class, new Provider<UserServiceAsync>() {
public UserServiceAsync get() {
final UserServiceAsync service = (UserServiceAsync) GWT.create(UserService.class);
@@ -479,7 +488,7 @@
public GroupMembersSummary get() {
final GroupMembersSummaryPresenter presenter = new GroupMembersSummaryPresenter(i18n,
p(StateManager.class), i(ImageUtils.class), i(Session.class),
- p(SocialNetworkServiceAsync.class), p(GroupLiveSearcher.class));
+ p(SocialNetworkServiceAsync.class), p(UserLiveSearcher.class));
final GroupMembersSummaryView view = new GroupMembersSummaryPanel(presenter, i18n, ws);
presenter.init(view);
return presenter;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/DropDownPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/DropDownPanel.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/DropDownPanel.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -105,22 +105,16 @@
vp.setStylePrimaryName(stylePrimaryName);
}
- @Deprecated
- public void setColor(final String color) {
- // outerBorder.setColor(color);
- // DOM.setStyleAttribute(arrowImage.getElement(), "backgroundColor",
- // color);
- // DOM.setStyleAttribute(vp.getElement(), "backgroundColor", color);
- // DOM.setStyleAttribute(titleLabel.getElement(), "backgroundColor",
- // color);
- }
-
public void setContent(final Widget widget) {
contentPanel.setWidget(widget);
// refresh panel
setContentVisible(isContentVisible());
}
+ public void setContentHeight(final String height) {
+ contentPanel.setHeight(height);
+ }
+
public void setContentVisible(final boolean visible) {
if (visible) {
img.arrowDownWhite().applyTo(arrowImage);
Added: trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipHelper.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipHelper.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/QuickTipHelper.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -0,0 +1,15 @@
+package org.ourproject.kune.platf.client.ui;
+
+import com.gwtext.client.widgets.QuickTip;
+import com.gwtext.client.widgets.QuickTips;
+
+public class QuickTipHelper {
+
+ public QuickTipHelper() {
+ QuickTips.init();
+ final QuickTip quickTipInstance = QuickTips.getQuickTip();
+ quickTipInstance.setDismissDelay(8000);
+ quickTipInstance.setHideDelay(500);
+ quickTipInstance.setInterceptTitles(true);
+ }
+}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/gridmenu/GridMenuPanel.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -5,7 +5,6 @@
import com.allen_sauer.gwt.log.client.Log;
import com.calclab.suco.client.signal.Signal;
import com.calclab.suco.client.signal.Slot;
-import com.google.gwt.user.client.ui.Composite;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.core.SortDir;
import com.gwtext.client.data.ArrayReader;
@@ -36,7 +35,7 @@
import com.gwtext.client.widgets.grid.event.GridRowListener;
import com.gwtext.client.widgets.layout.FitLayout;
-public class GridMenuPanel<T> extends Composite {
+public class GridMenuPanel<T> extends Panel {
public static final String GRID_MENU_PANEL_DD = "gridMenuPanelDD";
public static final int DEFAULT_INITIAL_WIDTH = 150;
private static final String GROUP = "groupField";
@@ -55,7 +54,6 @@
private RecordDef recordDef;
private GroupingStore store;
private GridPanel grid;
- private final Panel panel;
private final boolean grouped;
private final boolean withCounters;
private final Signal<String> onClick;
@@ -101,20 +99,19 @@
this.grouped = grouped;
this.withCounters = withCounters;
this.withEndIcon = withEndIcon;
- panel = new Panel();
- panel.setBorder(false);
- panel.setLayout(new FitLayout());
+ super.setBorder(false);
+ super.setLayout(new FitLayout());
+ //super.setAutoScroll(true);
if (withTopBar) {
topBar = new Toolbar();
- panel.setTopToolbar(topBar);
+ super.setTopToolbar(topBar);
}
if (withBottomBar) {
bottomBar = new Toolbar();
- panel.setBottomToolbar(bottomBar);
+ super.setBottomToolbar(bottomBar);
}
menuMap = new HashMap<String, GridMenu<T>>();
recordMap = new HashMap<T, Record>();
- initWidget(panel);
}
public GridMenuPanel(final String emptyText, final GridDropConfiguration gridDropConfiguration) {
@@ -172,6 +169,12 @@
};
}
+ public void doLayoutIfNeeded() {
+ if (super.isRendered()) {
+ super.doLayout();
+ }
+ }
+
public Toolbar getBottomBar() {
assert bottomBar != null;
return bottomBar;
@@ -210,9 +213,19 @@
}
}
+ @Override
+ public void setHeight(final int height) {
+ super.setHeight(height);
+ // grid.setHeight(height);
+ doLayoutIfNeeded();
+ }
+
+ @Override
public void setWidth(final int width) {
if (grid != null) {
+ // grid.setWidth(width - 27);
grid.setWidth(width - 27);
+ //super.setWidth(width - 11);
doLayoutIfNeeded();
}
}
@@ -420,7 +433,7 @@
} else {
grid.setDraggable(false);
}
- panel.add(grid);
+ super.add(grid);
}
private void createGridIfNeeded() {
@@ -429,12 +442,6 @@
}
}
- private void doLayoutIfNeeded() {
- if (panel.isRendered()) {
- panel.doLayout();
- }
- }
-
private void onClick(final int rowIndex) {
final Record record = store.getRecordAt(rowIndex);
onClick.fire(record.getAsString(ID));
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPanel.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rate/RateItPanel.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -120,7 +120,7 @@
rateGrid.setCellSpacing(0);
rateGrid.setBorderWidth(0);
rateItLabel.addStyleName("kune-Margin-Medium-r");
- rateItLabel.addStyleName("kune-Margin-Medium-l");
+ // rateItLabel.addStyleName("kune-Margin-Medium-l");
rateItLabel.addStyleName("kune-RatePanel-Label");
rateGrid.addStyleName("kune-RatePanel-Stars");
rateGrid.addStyleName("kune-RatePanel-Stars-RateIt");
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/stacks/StackedDropDownPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/stacks/StackedDropDownPanel.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/stacks/StackedDropDownPanel.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -66,7 +66,7 @@
setContent(generalVP);
// Set properties
- super.setColor(borderColor);
+ // super.setColor(borderColor);
setContentVisible(false); // DropDown
setHeaderText(headerText);
setHeaderTitle(headerTitle);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -25,6 +25,7 @@
import com.gwtext.client.widgets.event.ContainerListenerAdapter;
public class GroupMembersSummaryPanel extends DropDownPanel implements GroupMembersSummaryView {
+ // private static final int MAX_HEIGHT = 110;
private final GridMenuPanel<GroupDTO> gridMenuPanel;
private final I18nUITranslationService i18n;
private final GroupMembersSummaryPresenter presenter;
@@ -39,6 +40,7 @@
super.setHeaderTitle(i18n.t("People and groups collaborating in this group"));
super.setBorderStylePrimaryName("k-dropdownouter-members");
super.addStyleName("kune-Margin-Medium-t");
+ // super.addStyleName("kune-Margin-Small-r");
final GridDragConfiguration dragConf = new GridDragConfiguration(UserGridPanel.USER_GROUP_DD, i18n
.t("Drop in the chat area to start a chat.")
@@ -85,6 +87,10 @@
gridMenuPanel.addItem(gridItem);
}
+ public void addToolbarFill() {
+ gridMenuPanel.getBottomBar().addFill();
+ }
+
public void clear() {
gridMenuPanel.removeAll();
for (final ToolbarButton button : buttonsCache.values()) {
@@ -111,12 +117,19 @@
});
}
+ public void setDefaultHeigth() {
+ // super.setContentHeight("");
+ // gridMenuPanel.setHeight("auto");
+ // gridMenuPanel.doLayoutIfNeeded();
+ }
+
public void setDraggable(final boolean draggable) {
// gridMenuPanel.setDraggable(draggable);
}
- public void setDropDownContentVisible(final boolean visible) {
- super.setContentVisible(visible);
+ public void setMaxHeigth() {
+ // super.setContentHeight("" + MAX_HEIGHT);
+ // gridMenuPanel.setHeight(MAX_HEIGHT - 26);
}
public void setTheme(final WsTheme oldTheme, final WsTheme newTheme) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -20,8 +20,8 @@
import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService;
import org.ourproject.kune.workspace.client.sitebar.Site;
import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
-import org.ourproject.kune.workspace.client.workspace.GroupLiveSearcher;
import org.ourproject.kune.workspace.client.workspace.GroupMembersSummary;
+import org.ourproject.kune.workspace.client.workspace.UserLiveSearcher;
import com.calclab.suco.client.container.Provider;
import com.calclab.suco.client.signal.Slot;
@@ -40,7 +40,7 @@
public GroupMembersSummaryPresenter(final I18nUITranslationService i18n,
final Provider<StateManager> stateManagerProvider, final ImageUtils imageUtils, final Session session,
final Provider<SocialNetworkServiceAsync> snServiceProvider,
- final Provider<GroupLiveSearcher> groupLiveSearcherProvider) {
+ final Provider<UserLiveSearcher> userLiveSearcherProvider) {
super(i18n, stateManagerProvider, imageUtils, session, snServiceProvider);
this.i18n = i18n;
this.session = session;
@@ -54,15 +54,16 @@
pendigCategory = new GridGroup(pendingTitle, pendingTitle, i18n
.t("People pending to be accepted in this group by the admins"), imageUtils
.getImageHtml(ImageDescriptor.alert), true);
- addMember = new GridButton("images/add-green.gif", i18n.t("Add member"), i18n
+ // i18n.t("Add member")
+ addMember = new GridButton("images/add-green.gif", "", i18n
.t("Add a group or a person as member of this group"), new Slot<String>() {
public void onEvent(final String parameter) {
- groupLiveSearcherProvider.get().onSelection(new Slot<LinkDTO>() {
+ userLiveSearcherProvider.get().onSelection(new Slot<LinkDTO>() {
public void onEvent(final LinkDTO link) {
view.confirmAddCollab(link.getShortName(), link.getLongName());
}
});
- groupLiveSearcherProvider.get().show();
+ userLiveSearcherProvider.get().show();
}
});
super.addGroupOperation(gotoMemberMenuItem, false);
@@ -117,11 +118,11 @@
final boolean userCanView = rights.isVisible();
boolean userIsMember = isMember(userIsAdmin, userIsCollab);
- view.setDropDownContentVisible(false);
view.clear();
if (userIsAdmin) {
view.addButton(addMember);
+ view.addToolbarFill();
}
view.setDraggable(session.isLogged());
@@ -143,13 +144,24 @@
.addItem(createGridItem(collabCategory, collab, rights, changeToAdminMenuItem,
removeMemberMenuItem));
}
- for (final GroupDTO pendingCollab : pendingCollabsList) {
- view.addItem(createGridItem(pendigCategory, pendingCollab, rights, acceptJoinGroupMenuItem,
- denyJoinGroupMenuItem));
+ if (userIsAdmin) {
+ for (final GroupDTO pendingCollab : pendingCollabsList) {
+ view.addItem(createGridItem(pendigCategory, pendingCollab, rights, acceptJoinGroupMenuItem,
+ denyJoinGroupMenuItem));
+ }
}
}
- view.setDropDownContentVisible(true);
+ setMaxSize(adminsList.size(), collabList.size(), pendingCollabsList.size(), userIsAdmin);
view.setVisible(true);
}
+ private void setMaxSize(final int admins, final int collabs, final int pendingCollabs, final boolean isAdmin) {
+ final int members = admins + collabs + (isAdmin ? pendingCollabs : 0);
+ if (members > 2) {
+ view.setMaxHeigth();
+ } else {
+ view.setDefaultHeigth();
+ }
+ }
+
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -11,13 +11,19 @@
void addItem(GridItem<GroupDTO> gridItem);
+ void addToolbarFill();
+
void clear();
void confirmAddCollab(String groupShortName, String groupLongName);
+ void setContentVisible(boolean visible);
+
+ void setDefaultHeigth();
+
void setDraggable(boolean draggable);
- void setDropDownContentVisible(boolean visible);
+ void setMaxHeigth();
void setTheme(WsTheme oldTheme, WsTheme newTheme);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -65,7 +65,6 @@
public void setState(final StateDTO state) {
final ParticipationDataDTO participation = state.getParticipation();
final AccessRightsDTO rights = state.getGroupRights();
- view.setContentVisible(false);
view.clear();
final List<LinkDTO> groupsIsAdmin = participation.getGroupsIsAdmin();
final List<LinkDTO> groupsIsCollab = participation.getGroupsIsCollab();
@@ -89,7 +88,6 @@
view.addItem(createGridItem(collabCategory, group, rights, unJoinMenuItem));
}
if (numAdmins > 0 || numCollaborators > 0) {
- view.setContentVisible(true);
view.show();
} else {
hide();
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -32,6 +32,7 @@
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
@@ -59,7 +60,7 @@
addStyleName("kune-Margin-Medium-t");
flowPanel.addStyleName("kune-Margin-Small-trbl");
ws.getEntitySummary().addInSummary(this);
- ws.unMask();
+ RootPanel.get("kuneinitialcurtain").setVisible(false);
}
public void setTags(final List<TagResultDTO> groupTags) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/sitebar/sitesign/SiteSignInLinkPanel.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -18,7 +18,8 @@
signInHyperlink.setTargetHistoryToken(SiteToken.signin.toString());
loggedUserMenu = new ToolbarButton("user");
ws.getSiteBar().add(signInHyperlink);
- // ws.getSiteBar().add(loggedUserMenu);
+ // ws.getEntityWorkspace().setContainer(loggedUserMenu);
+ // loggedUserMenu.render(loggedUserMenu.getElement());
}
public void setLoggedUserMenuVisible(final boolean visible) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntityWorkspace.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntityWorkspace.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntityWorkspace.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -1,6 +1,5 @@
package org.ourproject.kune.workspace.client.ui.newtmp.skel;
-import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.ui.DefaultBorderLayout;
import org.ourproject.kune.platf.client.ui.RoundedPanel;
import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme;
@@ -31,7 +30,6 @@
final Panel bottomPanel = new Panel();
bottomPanel.setBorder(false);
bottomPanel.setLayout(new AnchorLayout());
- ;
title = new TitleBar();
title.setHeight("" + (DEF_TOOLBAR_HEIGHT - 2));
@@ -81,7 +79,7 @@
add(titles, DefaultBorderLayout.Position.NORTH, DEF_TOOLBAR_HEIGHT * 2);
add(contentWrap.getPanel(), DefaultBorderLayout.Position.CENTER);
add(containerWrap.getPanel(), DefaultBorderLayout.Position.EAST, true, 175);
- add(bottomPanel, DefaultBorderLayout.Position.SOUTH, DEF_TOOLBAR_HEIGHT);
+ add(bottomPanel, DefaultBorderLayout.Position.SOUTH, DEF_TOOLBAR_HEIGHT + 2);
}
public TitleBar getBottomTitle() {
@@ -112,12 +110,12 @@
return title;
}
- public void setContainer(final View view) {
- setPanel(container, (Widget) view);
+ public void setContainer(final Widget widget) {
+ setPanel(container, widget);
}
- public void setContent(final View view) {
- setPanel(content, (Widget) view);
+ public void setContent(final Widget widget) {
+ setPanel(content, widget);
}
public void setTheme(final WsTheme oldTheme, final WsTheme newTheme) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/WorkspaceSkeleton.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/WorkspaceSkeleton.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/WorkspaceSkeleton.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -7,8 +7,6 @@
import com.gwtext.client.core.ExtElement;
import com.gwtext.client.widgets.MessageBox;
import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.QuickTip;
-import com.gwtext.client.widgets.QuickTips;
import com.gwtext.client.widgets.Toolbar;
import com.gwtext.client.widgets.Viewport;
import com.gwtext.client.widgets.layout.FitLayout;
@@ -22,12 +20,6 @@
public WorkspaceSkeleton() {
extRootBody = new ExtElement(RootPanel.getBodyElement());
- mask();
- QuickTips.init(); // extgwt tips
- final QuickTip quickTipInstance = QuickTips.getQuickTip();
- quickTipInstance.setDismissDelay(8000);
- quickTipInstance.setHideDelay(500);
- quickTipInstance.setInterceptTitles(true);
container = new Panel();
container.setLayout(new FitLayout());
container.setBorder(false);
@@ -85,7 +77,6 @@
public void unMask() {
extRootBody.unmask();
- RootPanel.get("kuneinitialcurtain").setVisible(false);
}
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/themes/WsThemePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/themes/WsThemePanel.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/themes/WsThemePanel.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -40,9 +40,8 @@
final WsTheme theme = new WsTheme(themes[i]);
final MenuItem item = new MenuItem();
final String name = theme.getName();
- final String itemText = name.equals("def") ? i18n.t("default") : i18n.t(name);
item.setIconCls("k-wstheme-icon-" + name);
- item.setText(itemText);
+ item.setText(i18n.t(name));
menu.addItem(item);
item.addListener(new BaseItemListenerAdapter() {
@Override
Modified: trunk/src/main/resources/kune.properties
===================================================================
--- trunk/src/main/resources/kune.properties 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/main/resources/kune.properties 2008-07-28 02:23:02 UTC (rev 821)
@@ -18,7 +18,8 @@
kune.chat.roomHost = rooms.localhost
# Workspace enabled themes
-kune.wsthemes = def,green,blue,grey,purple,red
-kune.wsthemes.default = def
+# This names are also the name of the items in the theme menu and there are translated
+kune.wsthemes = default,green,blue,grey,purple,red
+kune.wsthemes.default = default
kune.sitelogourl = images/kune-logo-16px.png
\ No newline at end of file
Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/SocialNetworkManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/SocialNetworkManagerTest.java 2008-07-27 03:03:11 UTC (rev 820)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/SocialNetworkManagerTest.java 2008-07-28 02:23:02 UTC (rev 821)
@@ -32,7 +32,6 @@
@Test
public void acceptJoinGroup() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.acceptJoinGroup(admin, userGroup, group);
@@ -42,82 +41,75 @@
assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getList().size(), 1);
assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getMode(), GroupListMode.NORMAL);
assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 0);
+ closeTransaction();
}
@Test(expected = Exception.class)
public void acceptJoinNotPendingGroupFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.acceptJoinGroup(admin, userGroup, group);
}
@Test(expected = AlreadyGroupMemberException.class)
public void addAdminAsAdminFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.addGroupToAdmins(admin, admin.getUserGroup(), group);
}
@Test(expected = AlreadyGroupMemberException.class)
public void addAdminAsCollabFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.addGroupToCollabs(admin, admin.getUserGroup(), group);
}
@Test(expected = AlreadyGroupMemberException.class)
public void addAdminAsViewerFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.addGroupToViewers(admin, admin.getUserGroup(), group);
}
@Test(expected = Exception.class)
public void addAdminNotAdminFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addGroupToAdmins(otherUser, userGroup, group);
}
@Test(expected = Exception.class)
public void addCollabNotAdminFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addGroupToCollabs(otherUser, userGroup, group);
}
@Test
public void addPendingAsCollabDirectly() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.addGroupToCollabs(admin, userGroup, group);
assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 0);
+ closeTransaction();
}
@Test
public void addPendingAsCollabDirectlyAsAdmin() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.addGroupToAdmins(admin, userGroup, group);
assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 0);
+ closeTransaction();
}
@Test(expected = Exception.class)
public void addViewerNotAdminFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addGroupToViewers(otherUser, userGroup, group);
}
@After
public void close() {
if (getTransaction().isActive()) {
- getTransaction().rollback();
+ rollbackTransaction();
}
}
@Test
public void deleteMember() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.acceptJoinGroup(admin, userGroup, group);
@@ -128,18 +120,17 @@
assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getMode(), GroupListMode.NOBODY);
assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getList().size(), 0);
assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 0);
+ closeTransaction();
}
@Test(expected = Exception.class)
public void deleteNotMemberFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.deleteMember(admin, userGroup, group);
}
@Test
public void denyJoinGroup() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.denyJoinGroup(admin, userGroup, group);
@@ -148,18 +139,17 @@
assertFalse(group.getSocialNetwork().getAccessLists().getEditors().getList().contains(userGroup));
assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getList().size(), 0);
assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 0);
+ closeTransaction();
}
@Test(expected = AccessViolationException.class)
public void denyJoinGroupNotAdminFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.denyJoinGroup(otherUser, userGroup, group);
}
@Test(expected = Exception.class)
public void denyNotPendingFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.denyJoinGroup(admin, userGroup, group);
}
@@ -167,7 +157,6 @@
@Test(expected = RuntimeException.class)
public void ilegalAdmissionType() throws Exception {
group.setAdmissionType(null);
-
socialNetworkManager.requestToJoin(user, group);
}
@@ -186,18 +175,17 @@
userGroup = user.getUserGroup();
admin = ctx.getUser("admin");
otherUser = ctx.getUser("otheruser");
+ assertSocialNetworkIsEmpty();
}
@Test(expected = LastAdminInGroupException.class)
public void lastAdminUnjoinGroupFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.unJoinGroup(admin.getUserGroup(), group);
}
@Test(expected = AccessViolationException.class)
public void notAdminTryDeleteMember() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.acceptJoinGroup(admin, userGroup, group);
@@ -206,37 +194,36 @@
@Test
public void requestJoinAClosedGroupDeny() throws Exception {
- assertSocialNetworkIsEmpty();
group.setAdmissionType(AdmissionType.Closed);
final String result = socialNetworkManager.requestToJoin(user, group);
assertEquals(result, SocialNetworkDTO.REQ_JOIN_DENIED);
+ closeTransaction();
}
@Test
public void requestJoinAModeratedGroupAddUserGroupToPending() throws Exception {
- assertSocialNetworkIsEmpty();
group.setAdmissionType(AdmissionType.Moderated);
final String result = socialNetworkManager.requestToJoin(user, group);
assertEquals(result, SocialNetworkDTO.REQ_JOIN_WAITING_MODERATION);
assertTrue(group.getSocialNetwork().getPendingCollaborators().getList().contains(userGroup));
+ closeTransaction();
}
@Test
public void requestJoinAOpenGroupAddUserGroupToEditors() throws Exception {
- assertSocialNetworkIsEmpty();
group.setAdmissionType(AdmissionType.Open);
final String result = socialNetworkManager.requestToJoin(user, group);
assertEquals(result, SocialNetworkDTO.REQ_JOIN_ACEPTED);
assertTrue(group.getSocialNetwork().getAccessLists().getEditors().getList().contains(userGroup));
assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getMode(), GroupListMode.NORMAL);
+ closeTransaction();
}
@Test
public void requestJoinAOrphanedGroupAddUserGroupToAdmins() throws Exception {
- assertSocialNetworkIsEmpty();
orphanedGroup.setAdmissionType(AdmissionType.Open);
final String result = socialNetworkManager.requestToJoin(user, orphanedGroup);
@@ -245,11 +232,11 @@
assertEquals(orphanedGroup.getSocialNetwork().getAccessLists().getAdmins().getMode(), GroupListMode.NORMAL);
// FIXME Check change group type to PROJECT
+ closeTransaction();
}
@Test(expected = AlreadyGroupMemberException.class)
public void requestJoinTwiceAOrphanedGroupAddUserGroupToAdmins() throws Exception {
- assertSocialNetworkIsEmpty();
orphanedGroup.setAdmissionType(AdmissionType.Open);
final String result = socialNetworkManager.requestToJoin(user, orphanedGroup);
@@ -259,17 +246,16 @@
@Test
public void requestToJoinTwiceDontDuplicatePending() throws Exception {
- assertSocialNetworkIsEmpty();
group.setAdmissionType(AdmissionType.Moderated);
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.requestToJoin(user, group);
assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 1);
+ closeTransaction();
}
@Test(expected = Exception.class)
public void setAdminAnonMemberFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.setAdminAsCollab(admin, userGroup, group);
@@ -277,7 +263,6 @@
@Test
public void setAdminAsCollab() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.acceptJoinGroup(admin, userGroup, group);
@@ -292,11 +277,11 @@
assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getList().size(), 1);
assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getMode(), GroupListMode.NORMAL);
assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 0);
+ closeTransaction();
}
@Test(expected = AccessViolationException.class)
public void setAdminAsCollabNotAdminFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.acceptJoinGroup(admin, userGroup, group);
@@ -305,7 +290,6 @@
@Test(expected = Exception.class)
public void setAdminNotCollabFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.setCollabAsAdmin(admin, userGroup, group);
@@ -313,7 +297,6 @@
@Test
public void setCollabAsAdmin() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.acceptJoinGroup(admin, userGroup, group);
@@ -327,11 +310,11 @@
assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getList().size(), 0);
assertEquals(group.getSocialNetwork().getAccessLists().getEditors().getMode(), GroupListMode.NOBODY);
assertEquals(group.getSocialNetwork().getPendingCollaborators().getList().size(), 0);
+ closeTransaction();
}
@Test(expected = AccessViolationException.class)
public void setCollabAsAdminNotAdminFails() throws Exception {
- assertSocialNetworkIsEmpty();
socialNetworkManager.requestToJoin(user, group);
socialNetworkManager.addAdmin(admin, group);
socialNetworkManager.acceptJoinGroup(admin, userGroup, group);
More information about the kune-commits
mailing list