kune-commits
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
August 2011
- 2 participants
- 56 discussions
Author: vjrj_
Date: 2011-08-13 17:59:10 +0200 (Sat, 13 Aug 2011)
New Revision: 1493
Added:
trunk/src/main/java/cc/kune/gspace/client/actions/RefreshCurrentStateAction.java
trunk/src/main/java/cc/kune/lists/client/actions/NewListAction.java
trunk/src/main/java/cc/kune/lists/client/actions/NewListPostAction.java
trunk/src/main/java/cc/kune/lists/client/actions/NewListPostIconBtn.java
trunk/src/main/java/cc/kune/lists/client/actions/NewListPostIconMenuItem.java
trunk/src/main/java/cc/kune/lists/client/actions/OptionsListMenu.java
trunk/src/main/java/cc/kune/lists/client/actions/RefreshListMenuItem.java
trunk/src/main/java/cc/kune/lists/client/actions/SetListOpenessAction.java
trunk/src/main/java/cc/kune/lists/client/actions/SetListOpenessMenuItem.java
trunk/src/main/java/cc/kune/lists/client/actions/SubscriteToListAction.java
trunk/src/main/java/cc/kune/lists/client/rpc/
trunk/src/main/java/cc/kune/lists/client/rpc/ListsService.java
trunk/src/main/java/cc/kune/lists/client/rpc/ListsServiceAsync.java
trunk/src/main/java/cc/kune/lists/server/rpc/
trunk/src/main/java/cc/kune/lists/server/rpc/ListsRPC.java
trunk/src/main/java/cc/kune/wave/server/KuneWaveUtils.java
trunk/src/test/java/cc/kune/lists/server/ListsServiceTest.java
Removed:
trunk/src/main/java/cc/kune/lists/client/actions/NewWaveIconBtn.java
trunk/src/main/java/cc/kune/lists/client/actions/NewWaveMenuItem.java
Modified:
trunk/src/main/java/cc/kune/chat/client/actions/NewRoomBtn.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/PromptTopDialog.java
trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java
trunk/src/main/java/cc/kune/core/server/auth/Authorizated.java
trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java
trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java
trunk/src/main/java/cc/kune/core/shared/dto/GroupDTO.java
trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java
trunk/src/main/java/cc/kune/domain/GroupList.java
trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentMenuItem.java
trunk/src/main/java/cc/kune/lists/client/ListsGinModule.java
trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java
trunk/src/main/java/cc/kune/lists/client/actions/NewListBtn.java
trunk/src/main/java/cc/kune/lists/client/actions/NewListMenuItem.java
trunk/src/main/java/cc/kune/lists/client/actions/SubscribeToListBtn.java
trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java
trunk/src/main/java/cc/kune/meets/shared/MeetingsConstants.java
trunk/src/main/java/cc/kune/wave/server/KuneAgent.java
trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java
trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java
trunk/src/test/java/cc/kune/core/server/integration/IntegrationTest.java
trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java
trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceGetTest.java
trunk/src/test/java/cc/kune/core/server/integration/socialnet/SocialNetworkMembersTest.java
trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java
trunk/src/test/java/cc/kune/wave/server/KuneWaveManagerDefaultTest.java
Log:
NEW - # 93: List tool
http://kune.ourproject.org/issues/ticket/93
Modified: trunk/src/main/java/cc/kune/chat/client/actions/NewRoomBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/actions/NewRoomBtn.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/chat/client/actions/NewRoomBtn.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -42,7 +42,6 @@
import com.google.inject.Provider;
public class NewRoomBtn extends ButtonDescriptor {
-
public static class NewRoomAction extends RolAction {
private static final String CANCEL_ID = "k-nrbt-cancel";
@@ -91,7 +90,8 @@
final String groupShortName = session.getCurrentState().getGroup().getShortName();
contentService.get().addRoom(session.getUserHash(),
session.getContainerState().getRootContainer().getStateToken(),
- groupShortName + "-" + diag.getText(), new AsyncCallbackSimple<StateContainerDTO>() {
+ groupShortName + "-" + diag.getTextFieldValue(),
+ new AsyncCallbackSimple<StateContainerDTO>() {
@Override
public void onSuccess(final StateContainerDTO state) {
stateManager.setRetrievedStateAndGo(state);
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/PromptTopDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/PromptTopDialog.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/PromptTopDialog.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -25,14 +25,15 @@
public static class Builder extends BasicTopDialog.Builder {
- private boolean allowBlank;
- private int maxLength;
+ private boolean allowBlank = false;
+ private int maxLength = 0;
private String maxLengthText;
- private int minLength;
+ private int minLength = 0;
private String minLengthText;
private String regex;
private String regexText;
private String textboxId;
+ private int width = 0;
public Builder(final String dialogId, final String promptText, final boolean autohide,
final boolean modal) {
@@ -85,6 +86,12 @@
this.textboxId = textboxId;
return this;
}
+
+ @Override
+ public Builder width(final int width) {
+ this.width = width;
+ return this;
+ }
}
private final TextField<String> textField;
@@ -97,8 +104,15 @@
textField.getMessages().setMinLengthText(builder.minLengthText);
textField.getMessages().setMaxLengthText(builder.maxLengthText);
textField.setId(builder.textboxId);
- textField.setMinLength(builder.minLength);
- textField.setMaxLength(builder.maxLength);
+ if (builder.width != 0) {
+ textField.setWidth(builder.width);
+ }
+ if (builder.minLength != 0) {
+ textField.setMinLength(builder.minLength);
+ }
+ if (builder.maxLength != 0) {
+ textField.setMaxLength(builder.maxLength);
+ }
textField.setAllowBlank(builder.allowBlank);
super.getInnerPanel().add(textField);
}
@@ -107,7 +121,7 @@
textField.focus();
}
- public String getText() {
+ public String getTextFieldValue() {
return textField.getValue();
}
@@ -115,7 +129,7 @@
return textField.isValid();
}
- public void setText(final String text) {
+ public void setTextFieldValue(final String text) {
textField.setValue(text);
}
Modified: trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -55,6 +55,7 @@
import cc.kune.core.server.rest.TestJSONService;
import cc.kune.core.server.rest.UserJSONService;
import cc.kune.docs.server.DocumentServerModule;
+import cc.kune.lists.client.rpc.ListsService;
import cc.kune.lists.server.ListsServerModule;
import cc.kune.meets.server.MeetingServerModule;
import cc.kune.tasks.server.TaskServerModule;
@@ -140,7 +141,7 @@
new ForwardFilter("/ws/ws.html"));
builder.installGWTServices("^/ws/", SiteService.class, GroupService.class, ContentService.class,
- UserService.class, SocialNetworkService.class, I18nService.class);
+ UserService.class, SocialNetworkService.class, I18nService.class, ListsService.class);
builder.installRESTServices("^/ws/json/", TestJSONService.class, GroupJSONService.class,
UserJSONService.class, I18nTranslationJSONService.class, ContentJSONService.class);
builder.installServlet("^/ws/servlets/", FileUploadManager.class, FileDownloadManager.class,
Modified: trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -97,6 +97,8 @@
import cc.kune.core.server.xmpp.XmppManagerDefault;
import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.domain.SocialNetwork;
+import cc.kune.lists.client.rpc.ListsService;
+import cc.kune.lists.server.rpc.ListsRPC;
import cc.kune.wave.server.KuneWaveManager;
import cc.kune.wave.server.KuneWaveManagerDefault;
import cc.kune.wave.server.ParticipantUtils;
@@ -141,6 +143,7 @@
bind(UserService.class).to(UserRPC.class);
bind(SocialNetworkService.class).to(SocialNetworkRPC.class);
bind(I18nService.class).to(I18nRPC.class);
+ bind(ListsService.class).to(ListsRPC.class);
}
private void bindServices() {
Modified: trunk/src/main/java/cc/kune/core/server/auth/Authorizated.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/auth/Authorizated.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/core/server/auth/Authorizated.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -28,26 +28,27 @@
/**
* Use in RPC methods, for instance: <code>
- * Authorizated(authLevelRequired = AuthLevelRequired.COLLAB, checkContent = true) </code>
+ * Authorizated({@link #accessRolRequired} = {@link AccessRol#Administrator}, {@link #mustCheckMembership} = true) </code>
*
- * The first parameter in the method must be the userHash, the second the group
- * shortName, and if you want to check also the content access, the 3rd
- * parameter must be a content id (string)
+ * The first parameter in the method must be the userHash and if you want to
+ * check also the second parameter should be the token of the Content (use
+ * {@link ActionLevel#content}) or Container ({@link ActionLevel#container})
+ * etc.
*
*/
@BindingAnnotation
@Retention(RetentionPolicy.RUNTIME)
public @interface Authorizated {
- AccessRol accessRolRequired() default AccessRol.Viewer;
+ AccessRol accessRolRequired() default AccessRol.Viewer;
- /**
- * If the action is over a "group", "tool", "container" or over the content.
- *
- * @return
- */
- ActionLevel actionLevel() default ActionLevel.content;
+ /**
+ * If the action is over a "group", "tool", "container" or over the content.
+ *
+ * @return
+ */
+ ActionLevel actionLevel() default ActionLevel.content;
- boolean mustCheckMembership() default true;
+ boolean mustCheckMembership() default true;
}
Modified: trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/core/server/content/ContentManagerDefault.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -29,7 +29,6 @@
import org.apache.lucene.queryParser.MultiFieldQueryParser;
import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.Query;
-import org.waveprotocol.wave.model.waveref.InvalidWaveRefException;
import org.waveprotocol.wave.model.waveref.WaveRef;
import org.waveprotocol.wave.util.escapers.jvm.JavaWaverefEncoder;
@@ -58,6 +57,7 @@
import cc.kune.domain.finders.I18nLanguageFinder;
import cc.kune.domain.finders.UserFinder;
import cc.kune.wave.server.KuneWaveManager;
+import cc.kune.wave.server.KuneWaveUtils;
import cc.kune.wave.server.ParticipantUtils;
import com.google.inject.Inject;
@@ -107,8 +107,8 @@
public void addParticipant(final User user, final Long contentId, final String participant) {
final Content content = finder.getContent(contentId);
if (content.isWave()) {
- kuneWaveManager.addParticipant(getWaveRef(content), content.getAuthors().get(0).getShortName(),
- user.getShortName(), participant);
+ kuneWaveManager.addParticipants(KuneWaveUtils.getWaveRef(content),
+ content.getAuthors().get(0).getShortName(), user.getShortName(), participant);
}
}
@@ -183,14 +183,6 @@
}
}
- private WaveRef getWaveRef(final Content content) {
- try {
- return JavaWaverefEncoder.decodeWaveRefFromPath(String.valueOf(content.getWaveId()));
- } catch (final InvalidWaveRefException e) {
- throw new DefaultException("Error getting the wave");
- }
- }
-
@Override
public Content moveContent(final Content content, final Container newContainer) {
if (newContainer.equals(content.getContainer())) {
@@ -248,7 +240,7 @@
content.getLastRevision().setTitle(newTitleWithoutNL);
if (content.isWave()) {
final String author = content.getAuthors().get(0).getShortName();
- kuneWaveManager.setTitle(getWaveRef(content), newTitle, author);
+ kuneWaveManager.setTitle(KuneWaveUtils.getWaveRef(content), newTitle, author);
}
setModifiedTime(content);
return content;
Modified: trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -249,12 +249,20 @@
return getUserSession().getUser();
}
- private StateContainerDTO getState(final User user, final Container container) {
+ public StateContainerDTO getState(final Container container) {
+ return getState(getCurrentUser(), container);
+ }
+
+ public StateContentDTO getState(final Content content) {
+ return getState(getCurrentUser(), content);
+ }
+
+ public StateContainerDTO getState(final User user, final Container container) {
final StateContainer state = stateService.create(user, container);
return mapState(state, user);
}
- private StateContentDTO getState(final User user, final Content content) {
+ public StateContentDTO getState(final User user, final Content content) {
final StateContent state = stateService.create(user, content);
return mapState(state, user);
}
Modified: trunk/src/main/java/cc/kune/core/shared/dto/GroupDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/GroupDTO.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/core/shared/dto/GroupDTO.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -121,11 +121,12 @@
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + (defaultLicense == null ? 0 : defaultLicense.hashCode());
- result = prime * result + (id == null ? 0 : id.hashCode());
- result = prime * result + (longName == null ? 0 : longName.hashCode());
+ // result = prime * result + (defaultLicense == null ? 0 :
+ // defaultLicense.hashCode());
+ // result = prime * result + (id == null ? 0 : id.hashCode());
+ // result = prime * result + (longName == null ? 0 : longName.hashCode());
result = prime * result + (shortName == null ? 0 : shortName.hashCode());
- result = prime * result + (groupType == null ? 0 : groupType.hashCode());
+ // result = prime * result + (groupType == null ? 0 : groupType.hashCode());
return result;
}
Modified: trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -38,6 +38,17 @@
this.list = list;
}
+ public boolean checkIfIncludes(final GroupDTO group, final String mode) {
+ if (mode.equals(NOBODY)) {
+ return false;
+ }
+ if (mode.equals(EVERYONE)) {
+ return true;
+ }
+ boolean contains = list.contains(group);
+ return contains;
+ }
+
public Set<GroupDTO> getList() {
return list;
}
@@ -46,6 +57,10 @@
return mode;
}
+ public boolean includes(final GroupDTO group) {
+ return checkIfIncludes(group, mode);
+ }
+
public void setList(final Set<GroupDTO> list) {
this.list = list;
}
Modified: trunk/src/main/java/cc/kune/domain/GroupList.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/GroupList.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/domain/GroupList.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -68,12 +68,8 @@
}
public void add(final Group group) {
- // No group duplicate
+ list.add(group);
// TODO: Get this outside Domain?
- if (!list.contains(group)) {
- list.add(group);
- }
- // TODO: Get this outside Domain?
if (getMode() == GroupListMode.NOBODY) {
setMode(GroupListMode.NORMAL);
}
@@ -90,6 +86,10 @@
}
}
+ public void clear() {
+ list.clear();
+ }
+
public ArrayList<Group> duplicate() {
return new ArrayList<Group>(list);
}
Modified: trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentMenuItem.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/gspace/client/actions/RefreshContentMenuItem.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -19,36 +19,18 @@
*/
package cc.kune.gspace.client.actions;
-import cc.kune.common.client.actions.AbstractExtendedAction;
-import cc.kune.common.client.actions.ActionEvent;
import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
import cc.kune.core.client.resources.nav.NavResources;
-import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.inject.Inject;
public class RefreshContentMenuItem extends MenuItemDescriptor {
- public static class GoParentContainerAction extends AbstractExtendedAction {
-
- private final StateManager stateManager;
-
- @Inject
- public GoParentContainerAction(final StateManager stateManager) {
- this.stateManager = stateManager;
- }
-
- @Override
- public void actionPerformed(final ActionEvent event) {
- stateManager.refreshCurrentStateWithoutCache();
- }
-
- }
-
@Inject
- public RefreshContentMenuItem(final I18nTranslationService i18n, final GoParentContainerAction action,
- final ContentViewerOptionsMenu optionsMenu, final NavResources res) {
+ public RefreshContentMenuItem(final I18nTranslationService i18n,
+ final RefreshCurrentStateAction action, final ContentViewerOptionsMenu optionsMenu,
+ final NavResources res) {
super(action);
this.withText(i18n.t("Reload current page")).withIcon(res.refresh()).withParent(optionsMenu, false);
}
Added: trunk/src/main/java/cc/kune/gspace/client/actions/RefreshCurrentStateAction.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/actions/RefreshCurrentStateAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/actions/RefreshCurrentStateAction.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,23 @@
+package cc.kune.gspace.client.actions;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.core.client.state.StateManager;
+
+import com.google.inject.Inject;
+
+public class RefreshCurrentStateAction extends AbstractExtendedAction {
+
+ private final StateManager stateManager;
+
+ @Inject
+ public RefreshCurrentStateAction(final StateManager stateManager) {
+ this.stateManager = stateManager;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ stateManager.refreshCurrentStateWithoutCache();
+ }
+
+}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/lists/client/ListsGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/ListsGinModule.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/lists/client/ListsGinModule.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -22,11 +22,13 @@
import cc.kune.common.client.ExtendedGinModule;
import cc.kune.lists.client.actions.ListsClientActions;
import cc.kune.lists.client.actions.ListsNewMenu;
+import cc.kune.lists.client.actions.OptionsListMenu;
public class ListsGinModule extends ExtendedGinModule {
@Override
protected void configure() {
+ s(OptionsListMenu.class);
s(ListsNewMenu.class);
s(ListsClientTool.class);
s(ListsClientActions.class);
Modified: trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -20,8 +20,8 @@
package cc.kune.lists.client.actions;
import static cc.kune.lists.shared.ListsConstants.TYPE_LIST;
+import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
import static cc.kune.lists.shared.ListsConstants.TYPE_ROOT;
-import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
import cc.kune.chat.client.actions.ChatAboutContentBtn;
import cc.kune.core.client.actions.ActionRegistryByType;
import cc.kune.core.client.i18n.I18nUITranslationService;
@@ -31,9 +31,7 @@
import cc.kune.core.client.state.StateManager;
import cc.kune.gspace.client.actions.AbstractFoldableToolActions;
import cc.kune.gspace.client.actions.ActionGroups;
-import cc.kune.gspace.client.actions.ContentViewerOptionsMenu;
import cc.kune.gspace.client.actions.ParticipateInContentBtn;
-import cc.kune.gspace.client.actions.RefreshContentMenuItem;
import cc.kune.gspace.client.actions.SetAsHomePageMenuItem;
import com.google.inject.Inject;
@@ -50,11 +48,13 @@
@Inject
public ListsClientActions(final I18nUITranslationService i18n, final Session session,
final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
- final Provider<GoParentFolderBtn> folderGoUp, final Provider<NewWaveMenuItem> newWaveItem,
- final Provider<NewWaveIconBtn> newWaveIconBtn, final Provider<NewListMenuItem> newListMenuItem,
- final Provider<NewListBtn> newListBtn, final Provider<OpenFolderMenuItem> openContentMenuItem,
- final Provider<RefreshContentMenuItem> refresh, final Provider<SubscribeToListBtn> subscribeBtn,
- final Provider<ContentViewerOptionsMenu> optionsMenuContent,
+ final Provider<GoParentFolderBtn> folderGoUp, final Provider<NewListPostIconMenuItem> newPostItem,
+ final Provider<NewListPostIconBtn> newPostIconBtn,
+ final Provider<NewListMenuItem> newListMenuItem, final Provider<NewListBtn> newListBtn,
+ final Provider<OpenFolderMenuItem> openContentMenuItem,
+ final Provider<RefreshListMenuItem> refresh, final Provider<SubscribeToListBtn> subscribeBtn,
+ final Provider<OptionsListMenu> optionsMenuContent,
+ final Provider<SetListOpenessMenuItem> listOpenessMenuItem,
final Provider<ParticipateInContentBtn> participateBtn, final ListsNewMenu listNewMenu,
final NewMenusForTypeIdsRegistry newMenusRegistry, final Provider<ChatAboutContentBtn> chatAbout,
final Provider<DelListMenuItem> delFolderMenuItem,
@@ -64,8 +64,9 @@
actionsRegistry.addAction(ActionGroups.TOOLBAR, listNewMenu, containers);
actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
actionsRegistry.addAction(ActionGroups.TOOLBAR, subscribeBtn, containersNoRoot);
- actionsRegistry.addAction(ActionGroups.TOOLBAR, newWaveItem, containersNoRoot);
- actionsRegistry.addAction(ActionGroups.TOOLBAR, newWaveIconBtn, noRoot);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, listOpenessMenuItem, containersNoRoot);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newPostItem, containersNoRoot);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newPostIconBtn, noRoot);
actionsRegistry.addAction(ActionGroups.TOOLBAR, newListMenuItem, TYPE_ROOT);
actionsRegistry.addAction(ActionGroups.TOOLBAR, newListBtn, TYPE_ROOT);
actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
Added: trunk/src/main/java/cc/kune/lists/client/actions/NewListAction.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewListAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewListAction.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,90 @@
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.common.client.ui.dialogs.PromptTopDialog;
+import cc.kune.common.client.ui.dialogs.PromptTopDialog.Builder;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.state.ContentCache;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.StateContainerDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.viewers.FolderViewerPresenter;
+import cc.kune.lists.client.rpc.ListsServiceAsync;
+import cc.kune.lists.shared.ListsConstants;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.Singleton;
+
+@Singleton
+public class NewListAction extends RolAction {
+ private static final String CANCEL_ID = "k-nla-cancel";
+ private static final String CREATE_ID = "k-nla-create";
+ private static final String ID = "k-nla-dialog";
+ private static final String TEXTBOX_ID = "k-nla-textbox";
+
+ private final ContentCache cache;
+ private final FolderViewerPresenter folderViewer;
+ private final I18nTranslationService i18n;
+ private final Provider<ListsServiceAsync> listsService;
+ private final Session session;
+ private final StateManager stateManager;
+
+ @Inject
+ public NewListAction(final Session session, final StateManager stateManager,
+ final I18nTranslationService i18n, final Provider<ListsServiceAsync> listsService,
+ final ContentCache cache, final FolderViewerPresenter folderViewer) {
+ super(AccessRolDTO.Administrator, true);
+ this.session = session;
+ this.stateManager = stateManager;
+ this.i18n = i18n;
+ this.listsService = listsService;
+ this.cache = cache;
+ this.folderViewer = folderViewer;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ final Builder builder = new PromptTopDialog.Builder(ID, "Name of the new list?", false, true);
+ builder.width("300px").height("50px").firstButtonTitle(i18n.t("Create")).sndButtonTitle(
+ i18n.t("Cancel")).firstButtonId(CREATE_ID).sndButtonId(CANCEL_ID).width(270);
+ builder.textboxId(TEXTBOX_ID);
+ final PromptTopDialog diag = builder.build();
+ diag.showCentered();
+ diag.focusOnTextBox();
+ diag.getSecondBtn().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ diag.hide();
+ }
+ });
+ diag.getFirstBtn().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ NotifyUser.showProgressProcessing();
+ diag.hide();
+ listsService.get().createList(session.getUserHash(), session.getCurrentStateToken(),
+ diag.getTextFieldValue(), ListsConstants.TYPE_LIST, true,
+ new AsyncCallbackSimple<StateContainerDTO>() {
+ @Override
+ public void onSuccess(final StateContainerDTO state) {
+ stateManager.setRetrievedStateAndGo(state);
+ NotifyUser.hideProgress();
+
+ NotifyUser.info(i18n.t("List created"));
+ folderViewer.highlightTitle();
+ }
+ });
+ cache.removeContent(session.getCurrentStateToken());
+ }
+ });
+
+ }
+
+}
Modified: trunk/src/main/java/cc/kune/lists/client/actions/NewListBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewListBtn.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewListBtn.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -19,20 +19,19 @@
*/
package cc.kune.lists.client.actions;
+import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
import cc.kune.core.client.resources.nav.NavResources;
import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.actions.NewContainerBtn;
-import cc.kune.lists.shared.ListsConstants;
import com.google.inject.Inject;
-public class NewListBtn extends NewContainerBtn {
+public class NewListBtn extends ButtonDescriptor {
@Inject
- public NewListBtn(final I18nTranslationService i18n, final NewContainerAction action,
- final NavResources res) {
- super(i18n, action, res.listadd(), i18n.t("New list"), i18n.t("Create a new list"),
- i18n.t("New list"), ListsConstants.TYPE_LIST);
+ public NewListBtn(final I18nTranslationService i18n, final NewListAction action, final NavResources res) {
+ super(action);
+ withText(i18n.t("New list")).withToolTip(i18n.t("Create a new list")).withIcon(res.listadd()).withStyles(
+ "k-def-docbtn, k-fl");
}
}
Modified: trunk/src/main/java/cc/kune/lists/client/actions/NewListMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewListMenuItem.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewListMenuItem.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -19,20 +19,22 @@
*/
package cc.kune.lists.client.actions;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
import cc.kune.core.client.resources.nav.NavResources;
import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.actions.NewContainerMenuItem;
-import cc.kune.lists.shared.ListsConstants;
import com.google.inject.Inject;
-public class NewListMenuItem extends NewContainerMenuItem {
+public class NewListMenuItem extends MenuItemDescriptor {
@Inject
- public NewListMenuItem(final I18nTranslationService i18n, final NewContainerAction action,
+ public NewListMenuItem(final I18nTranslationService i18n, final NewListAction action,
final NavResources res, final ListsNewMenu newMenu) {
- super(i18n, action, res.listadd(), i18n.t("New list"), i18n.t("Create a list"), i18n.t("New list"),
- ListsConstants.TYPE_LIST, newMenu.get());
+ super(action);
+ setParent(newMenu.get(), false);
+ withText(i18n.t("New list")).withToolTip(i18n.t("Create a new list")).withIcon(res.listadd()).withStyles(
+ "k-def-docbtn, k-fl");
+
}
}
Added: trunk/src/main/java/cc/kune/lists/client/actions/NewListPostAction.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewListPostAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewListPostAction.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,100 @@
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.notify.NotifyLevel;
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.common.client.ui.dialogs.PromptTopDialog;
+import cc.kune.common.client.ui.dialogs.PromptTopDialog.Builder;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.client.auth.SignIn;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.state.ContentCache;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.SiteTokens;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.TokenUtils;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.StateContentDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.viewers.FolderViewerPresenter;
+import cc.kune.lists.client.rpc.ListsServiceAsync;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.Singleton;
+
+@Singleton
+public class NewListPostAction extends RolAction {
+ private static final String CANCEL_ID = "k-nlistpa-cancel";
+ private static final String CREATE_ID = "k-nlistpa-create";
+ private static final String ID = "k-nlistpa-dialog";
+ private static final String TEXTBOX_ID = "k-nlistpa-textbox";
+
+ private final ContentCache cache;
+ private final FolderViewerPresenter folderViewer;
+ private final I18nTranslationService i18n;
+ private final Provider<ListsServiceAsync> listsService;
+ private final Session session;
+ private final Provider<SignIn> signIn;
+ private final StateManager stateManager;
+
+ @Inject
+ public NewListPostAction(final Session session, final StateManager stateManager,
+ final I18nTranslationService i18n, final Provider<ListsServiceAsync> listsService,
+ final ContentCache cache, final FolderViewerPresenter folderViewer, final Provider<SignIn> signIn) {
+ super(AccessRolDTO.Viewer, false);
+ this.session = session;
+ this.stateManager = stateManager;
+ this.i18n = i18n;
+ this.listsService = listsService;
+ this.cache = cache;
+ this.folderViewer = folderViewer;
+ this.signIn = signIn;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ if (session.isLogged()) {
+ final Builder builder = new PromptTopDialog.Builder(ID, "Title of the new post?", false, true);
+ builder.width("300px").height("50px").firstButtonTitle(i18n.t("Post")).sndButtonTitle(
+ i18n.t("Cancel")).firstButtonId(CREATE_ID).sndButtonId(CANCEL_ID).width(270);
+ builder.textboxId(TEXTBOX_ID);
+ final PromptTopDialog diag = builder.build();
+ diag.showCentered();
+ diag.focusOnTextBox();
+ diag.getSecondBtn().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ diag.hide();
+ }
+ });
+ diag.getFirstBtn().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ NotifyUser.showProgressProcessing();
+ diag.hide();
+ listsService.get().newPost(session.getUserHash(),
+ session.getCurrentStateToken().copy().clearDocument(), diag.getTextFieldValue(),
+ new AsyncCallbackSimple<StateContentDTO>() {
+ @Override
+ public void onSuccess(final StateContentDTO state) {
+ stateManager.setRetrievedStateAndGo(state);
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Post created. Edit it"));
+ folderViewer.highlightTitle();
+ }
+ });
+ cache.removeContent(session.getCurrentStateToken());
+ }
+ });
+ } else {
+ signIn.get().setErrorMessage(i18n.t("Sign in or create an account to susbscribe to this list"),
+ NotifyLevel.info);
+ stateManager.gotoHistoryToken(TokenUtils.addRedirect(SiteTokens.SIGNIN,
+ session.getCurrentStateToken().toString()));
+ }
+ }
+
+}
Copied: trunk/src/main/java/cc/kune/lists/client/actions/NewListPostIconBtn.java (from rev 1491, trunk/src/main/java/cc/kune/lists/client/actions/NewWaveIconBtn.java)
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewListPostIconBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewListPostIconBtn.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,39 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class NewListPostIconBtn extends ButtonDescriptor {
+
+ @Inject
+ public NewListPostIconBtn(final I18nTranslationService i18n, final NewListPostAction action,
+ final NavResources res, final GlobalShortcutRegister shorcutReg) {
+ super(action);
+ this.withText(i18n.t("New post")).withToolTip(i18n.t("Create a new post")).withIcon(res.newemail()).withStyles(
+ "k-def-docbtn, k-fl");
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/NewListPostIconMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewListPostIconMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewListPostIconMenuItem.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class NewListPostIconMenuItem extends MenuItemDescriptor {
+
+ @Inject
+ public NewListPostIconMenuItem(final I18nTranslationService i18n, final NewListPostAction action,
+ final NavResources res, final GlobalShortcutRegister shorcutReg, final ListsNewMenu menu) {
+ super(menu.get(), false, action);
+ this.withText(i18n.t("New post")).withToolTip(i18n.t("Create a new post")).withIcon(res.newemail()).withStyles(
+ "k-def-docbtn, k-fr");
+ }
+}
Deleted: trunk/src/main/java/cc/kune/lists/client/actions/NewWaveIconBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewWaveIconBtn.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewWaveIconBtn.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -1,41 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.lists.client.actions;
-
-import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
-import cc.kune.core.client.resources.nav.NavResources;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.actions.NewContentAction;
-import cc.kune.gspace.client.actions.NewContentBtn;
-import cc.kune.lists.shared.ListsConstants;
-
-import com.google.inject.Inject;
-
-public class NewWaveIconBtn extends NewContentBtn {
-
- @Inject
- public NewWaveIconBtn(final I18nTranslationService i18n, final NewContentAction action,
- final NavResources res, final GlobalShortcutRegister shorcutReg) {
- super(i18n, action, res.newemail(), shorcutReg, "", i18n.t("Create a new post"), i18n.t("New post"),
- ListsConstants.TYPE_POST);
- withStyles("k-btn-min, k-fl");
- }
-
-}
Deleted: trunk/src/main/java/cc/kune/lists/client/actions/NewWaveMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewWaveMenuItem.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewWaveMenuItem.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -1,40 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.lists.client.actions;
-
-import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
-import cc.kune.core.client.resources.nav.NavResources;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.actions.NewContentAction;
-import cc.kune.gspace.client.actions.NewContentMenuItem;
-import cc.kune.lists.shared.ListsConstants;
-
-import com.google.inject.Inject;
-
-public class NewWaveMenuItem extends NewContentMenuItem {
-
- @Inject
- public NewWaveMenuItem(final I18nTranslationService i18n, final NewContentAction action,
- final NavResources res, final GlobalShortcutRegister shorcutReg, final ListsNewMenu listsNewMenu) {
- super(i18n, action, res.newemail(), shorcutReg, i18n.t("New post"), i18n.t("Create a new post"),
- i18n.t("New post"), ListsConstants.TYPE_POST, listsNewMenu.get());
- }
-
-}
Added: trunk/src/main/java/cc/kune/lists/client/actions/OptionsListMenu.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/OptionsListMenu.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/OptionsListMenu.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
+import cc.kune.core.client.resources.CoreResources;
+
+import com.google.inject.Inject;
+
+public class OptionsListMenu extends MenuDescriptor {
+
+ @Inject
+ public OptionsListMenu(final CoreResources res) {
+ super();
+ this.withIcon(res.arrowdownsitebar()).withStyles(
+ "k-def-docbtn, k-fr, k-noborder, k-no-backimage, k-nobackcolor");
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/RefreshListMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/RefreshListMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/RefreshListMenuItem.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.RefreshCurrentStateAction;
+
+import com.google.inject.Inject;
+
+public class RefreshListMenuItem extends MenuItemDescriptor {
+
+ @Inject
+ public RefreshListMenuItem(final I18nTranslationService i18n, final RefreshCurrentStateAction action,
+ final OptionsListMenu optionsMenu, final NavResources res) {
+ super(action);
+ this.withText(i18n.t("Reload this")).withIcon(res.refresh()).withParent(optionsMenu, false);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/SetListOpenessAction.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/SetListOpenessAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/SetListOpenessAction.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,57 @@
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.StateContainerDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.lists.client.rpc.ListsServiceAsync;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class SetListOpenessAction extends RolAction {
+
+ public static final String ISPUBLIC = "stla-ispublic";
+
+ private final I18nTranslationService i18n;
+ private final Provider<ListsServiceAsync> listService;
+ private final Session session;
+ private final StateManager stateManager;
+
+ @Inject
+ public SetListOpenessAction(final I18nTranslationService i18n, final StateManager stateManager,
+ final Session session, final Provider<ListsServiceAsync> listService) {
+ super(AccessRolDTO.Administrator, true);
+ this.i18n = i18n;
+ this.stateManager = stateManager;
+ this.session = session;
+ this.listService = listService;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ NotifyUser.showProgress();
+ final boolean setPublic = !isPublic();
+ listService.get().setPublic(session.getUserHash(), session.getCurrentStateToken(), setPublic,
+ new AsyncCallbackSimple<StateContainerDTO>() {
+ @Override
+ public void onSuccess(final StateContainerDTO result) {
+ NotifyUser.info(setPublic ? i18n.t("This list is now public")
+ : i18n.t("This list is now restricted to the public"));
+ stateManager.setRetrievedState(result);
+ stateManager.refreshCurrentState();
+ NotifyUser.hideProgress();
+ }
+ });
+ }
+
+ private Boolean isPublic() {
+ return (Boolean) getValue(ISPUBLIC);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/SetListOpenessMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/SetListOpenessMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/SetListOpenessMenuItem.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,29 @@
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.dto.GroupListDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class SetListOpenessMenuItem extends MenuItemDescriptor {
+
+ @Inject
+ public SetListOpenessMenuItem(final I18nTranslationService i18n, final SetListOpenessAction action,
+ final Session session, final CoreResources res, final OptionsListMenu menu) {
+ super(action);
+ setParent(menu, false);
+ final Boolean isPublic = session.getContainerState().getAccessLists().getViewers().getMode().equals(
+ GroupListDTO.EVERYONE);
+ action.putValue(SetListOpenessAction.ISPUBLIC, isPublic);
+ if (!isPublic) {
+ withText(i18n.t("Make this list public"));
+ withIcon(res.everybody());
+ } else {
+ withText(i18n.t("Make this list not public"));
+ withIcon(res.nobody());
+ }
+ }
+}
Modified: trunk/src/main/java/cc/kune/lists/client/actions/SubscribeToListBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/SubscribeToListBtn.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/lists/client/actions/SubscribeToListBtn.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -1,40 +1,30 @@
package cc.kune.lists.client.actions;
-import cc.kune.common.client.actions.ActionEvent;
import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
-import cc.kune.common.client.notify.NotifyUser;
-import cc.kune.common.client.utils.TextUtils;
-import cc.kune.core.client.actions.RolAction;
import cc.kune.core.client.resources.CoreResources;
-import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.client.state.Session;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.inject.Inject;
public class SubscribeToListBtn extends ButtonDescriptor {
- public static class SubscriteToListAction extends RolAction {
-
- private final I18nTranslationService i18n;
-
- @Inject
- public SubscriteToListAction(final I18nTranslationService i18n) {
- super(AccessRolDTO.Editor, true);
- this.i18n = i18n;
- }
-
- @Override
- public void actionPerformed(final ActionEvent event) {
- NotifyUser.info(i18n.t(TextUtils.IN_DEVELOPMENT));
- }
-
- }
-
@Inject
public SubscribeToListBtn(final I18nTranslationService i18n, final SubscriteToListAction action,
- final CoreResources res) {
+ final Session session, final CoreResources res) {
super(action);
- withText(i18n.t("Subscribe")).withIcon(res.add()).withToolTip(
- i18n.t("Subscribe yourself to this list"));
+ final Boolean areYouMember = session.isLogged()
+ && session.getContainerState().getAccessLists().getEditors().getList().contains(
+ session.getCurrentUserInfo().getUserGroup());
+ action.putValue(SubscriteToListAction.ISMEMBER, areYouMember);
+ if (!areYouMember) {
+ withText(i18n.t("Subscribe"));
+ withIcon(res.add());
+ withToolTip(i18n.t("Subscribe to this list"));
+ } else {
+ withText(i18n.t("Unsubscribe"));
+ withIcon(res.remove());
+ withToolTip(i18n.t("Unsubscribe to this list"));
+ }
}
}
Added: trunk/src/main/java/cc/kune/lists/client/actions/SubscriteToListAction.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/SubscriteToListAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/SubscriteToListAction.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,89 @@
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.notify.ConfirmAskEvent;
+import cc.kune.common.client.notify.NotifyLevel;
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.common.client.utils.OnAcceptCallback;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.client.auth.SignIn;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.SiteTokens;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.TokenUtils;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.StateContainerDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.lists.client.rpc.ListsServiceAsync;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class SubscriteToListAction extends RolAction {
+
+ public static final String ISMEMBER = "stla-ismember";
+
+ private final EventBus eventBus;
+ private final I18nTranslationService i18n;
+ private final Provider<ListsServiceAsync> listService;
+ private final Session session;
+ private final Provider<SignIn> signIn;
+ private final StateManager stateManager;
+
+ @Inject
+ public SubscriteToListAction(final Provider<SignIn> signIn, final I18nTranslationService i18n,
+ final StateManager stateManager, final Session session,
+ final Provider<ListsServiceAsync> listService, final EventBus eventBus) {
+ super(AccessRolDTO.Viewer, false);
+ this.signIn = signIn;
+ this.i18n = i18n;
+ this.stateManager = stateManager;
+ this.session = session;
+ this.listService = listService;
+ this.eventBus = eventBus;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ if (session.isLogged()) {
+ if (isMember()) {
+ ConfirmAskEvent.fire(eventBus, i18n.t("Please confirm"), i18n.t("Are you sure?"), i18n.t("Yes"),
+ i18n.t("No"), null, null, new OnAcceptCallback() {
+ @Override
+ public void onSuccess() {
+ performAction();
+ }
+ });
+ } else {
+ performAction();
+ }
+ } else {
+ signIn.get().setErrorMessage(i18n.t("Sign in or create an account to susbscribe to this list"),
+ NotifyLevel.info);
+ stateManager.gotoHistoryToken(TokenUtils.addRedirect(SiteTokens.SIGNIN,
+ session.getCurrentStateToken().toString()));
+ }
+ }
+
+ private Boolean isMember() {
+ return (Boolean) getValue(ISMEMBER);
+ }
+
+ private void performAction() {
+ NotifyUser.showProgress();
+ final boolean subcribe = !isMember();
+ listService.get().subscribeToList(session.getUserHash(), session.getCurrentStateToken(),
+ Boolean.valueOf(subcribe), new AsyncCallbackSimple<StateContainerDTO>() {
+ @Override
+ public void onSuccess(final StateContainerDTO result) {
+ NotifyUser.info(subcribe ? i18n.t("Subscribed") : i18n.t("Unsubscribed"));
+ stateManager.setRetrievedState(result);
+ stateManager.refreshCurrentState();
+ NotifyUser.hideProgress();
+ }
+ });
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/rpc/ListsService.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/rpc/ListsService.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/rpc/ListsService.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,22 @@
+package cc.kune.lists.client.rpc;
+
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.StateContainerDTO;
+import cc.kune.core.shared.dto.StateContentDTO;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
+
+@RemoteServiceRelativePath("ListsService")
+public interface ListsService extends RemoteService {
+
+ StateContainerDTO createList(String hash, StateToken parentToken, String name, String description,
+ boolean isPublic);
+
+ public StateContentDTO newPost(final String userHash, final StateToken parentToken, final String title);
+
+ StateContainerDTO setPublic(String hash, StateToken token, Boolean isPublic);
+
+ StateContainerDTO subscribeToList(String hash, StateToken token, Boolean subscribe);
+
+}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/lists/client/rpc/ListsServiceAsync.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/rpc/ListsServiceAsync.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/rpc/ListsServiceAsync.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,23 @@
+package cc.kune.lists.client.rpc;
+
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.StateContainerDTO;
+import cc.kune.core.shared.dto.StateContentDTO;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+public interface ListsServiceAsync {
+
+ void createList(String hash, StateToken parentToken, String name, String description,
+ boolean isPublic, AsyncCallback<StateContainerDTO> callback);
+
+ void newPost(String userHash, StateToken parentToken, String title,
+ AsyncCallback<StateContentDTO> callback);
+
+ void setPublic(String hash, StateToken token, Boolean isPublic,
+ AsyncCallback<StateContainerDTO> callback);
+
+ void subscribeToList(String hash, StateToken token, Boolean subscribe,
+ AsyncCallback<StateContainerDTO> callback);
+
+}
Modified: trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -22,35 +22,77 @@
import static cc.kune.lists.shared.ListsConstants.NAME;
import static cc.kune.lists.shared.ListsConstants.ROOT_NAME;
import static cc.kune.lists.shared.ListsConstants.TYPE_LIST;
+import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
import static cc.kune.lists.shared.ListsConstants.TYPE_ROOT;
-import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.Set;
import cc.kune.core.server.AbstractServerTool;
+import cc.kune.core.server.UserSession;
import cc.kune.core.server.content.ContainerManager;
import cc.kune.core.server.content.ContentManager;
import cc.kune.core.server.manager.ToolConfigurationManager;
import cc.kune.core.server.tool.ServerToolTarget;
+import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.domain.Container;
+import cc.kune.domain.Content;
import cc.kune.domain.Group;
import cc.kune.domain.User;
+import cc.kune.wave.server.KuneWaveManager;
+import cc.kune.wave.server.KuneWaveUtils;
import com.google.inject.Inject;
+import com.google.inject.Provider;
public class ListsServerTool extends AbstractServerTool {
+ private final Provider<UserSession> userSessionProvider;
+ private final KuneWaveManager waveManager;
+
@Inject
public ListsServerTool(final ContentManager contentManager, final ContainerManager containerManager,
- final ToolConfigurationManager configurationManager, final I18nTranslationService i18n) {
+ final ToolConfigurationManager configurationManager, final I18nTranslationService i18n,
+ final Provider<UserSession> userSessionProvider, final KuneWaveManager waveManager) {
super(NAME, ROOT_NAME, TYPE_ROOT, Arrays.asList(TYPE_POST), Arrays.asList(TYPE_LIST),
Arrays.asList(TYPE_LIST), Arrays.asList(TYPE_ROOT), contentManager, containerManager,
configurationManager, i18n, ServerToolTarget.forGroups);
+ this.userSessionProvider = userSessionProvider;
+ this.waveManager = waveManager;
}
+ private Group getUserGroup() {
+ return userSessionProvider.get().getUser().getUserGroup();
+ }
+
@Override
public Group initGroup(final User user, final Group group, final Object... otherVars) {
createRoot(group);
return group;
}
+
+ @Override
+ public void onCreateContent(final Content content, final Container parent) {
+ content.setStatus(ContentStatus.publishedOnline);
+ content.setPublishedOn(new Date());
+ final Set<Group> admins = parent.getAccessLists().getAdmins().getList();
+ final Set<Group> editors = parent.getAccessLists().getEditors().getList();
+ final ArrayList<String> members = new ArrayList<String>();
+ for (final Group admin : admins) {
+ members.add(admin.getShortName());
+ }
+ for (final Group editor : editors) {
+ members.add(editor.getShortName());
+ }
+ members.add(getUserGroup().getShortName());
+ Collections.sort(members);
+ waveManager.addParticipants(KuneWaveUtils.getWaveRef(content),
+ content.getAuthors().get(0).getShortName(), getUserGroup().getShortName(),
+ members.toArray(new String[members.size()]));
+ }
+
}
Added: trunk/src/main/java/cc/kune/lists/server/rpc/ListsRPC.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/server/rpc/ListsRPC.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/server/rpc/ListsRPC.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,122 @@
+package cc.kune.lists.server.rpc;
+
+import cc.kune.core.client.errors.AccessViolationException;
+import cc.kune.core.server.UserSession;
+import cc.kune.core.server.auth.ActionLevel;
+import cc.kune.core.server.auth.Authenticated;
+import cc.kune.core.server.auth.Authorizated;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentUtils;
+import cc.kune.core.server.rpc.ContentRPC;
+import cc.kune.core.server.rpc.RPC;
+import cc.kune.core.shared.domain.AccessRol;
+import cc.kune.core.shared.domain.GroupListMode;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.StateContainerDTO;
+import cc.kune.core.shared.dto.StateContentDTO;
+import cc.kune.domain.AccessLists;
+import cc.kune.domain.Container;
+import cc.kune.domain.Group;
+import cc.kune.lists.client.rpc.ListsService;
+import cc.kune.lists.shared.ListsConstants;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.persist.Transactional;
+
+public class ListsRPC implements ListsService, RPC {
+ private final ContainerManager contentManager;
+ private final ContentRPC contentRPC;
+ private final Provider<UserSession> userSessionProvider;
+
+ @Inject
+ public ListsRPC(final ContentRPC contentRPC, final Provider<UserSession> userSessionProvider,
+ final ContainerManager contentManager) {
+ this.contentRPC = contentRPC;
+ this.userSessionProvider = userSessionProvider;
+ this.contentManager = contentManager;
+ }
+
+ @Override
+ @Authenticated
+ @Authorizated(accessRolRequired = AccessRol.Administrator, actionLevel = ActionLevel.container)
+ @Transactional
+ public StateContainerDTO createList(final String userHash, final StateToken parentToken,
+ final String title, final String description, final boolean isPublic) {
+ final StateContainerDTO result = contentRPC.addFolder(userHash, parentToken, title,
+ ListsConstants.TYPE_LIST);
+ // Not public list, don't permit subscriptions neither view posts
+ return contentRPC.getState(setContainerAcl(result.getStateToken(), isPublic));
+ }
+
+ private Group getUserGroup() {
+ return userSessionProvider.get().getUser().getUserGroup();
+ }
+
+ @Override
+ @Authenticated
+ @Authorizated(accessRolRequired = AccessRol.Viewer, actionLevel = ActionLevel.container)
+ @Transactional
+ public StateContentDTO newPost(final String userHash, final StateToken parentToken, final String title) {
+ final StateContentDTO content = contentRPC.addContent(userHash, parentToken, title,
+ ListsConstants.TYPE_POST);
+ return content;
+ }
+
+ private Container setContainerAcl(final StateToken token, final boolean isPublic) {
+ final Container container = contentManager.find(ContentUtils.parseId(token.getFolder()));
+ final AccessLists acl = new AccessLists();
+ acl.getAdmins().setMode(GroupListMode.NORMAL);
+ acl.getAdmins().add(getUserGroup());
+ acl.getEditors().setMode(isPublic ? GroupListMode.EVERYONE : GroupListMode.NOBODY);
+ setViewersAcl(isPublic, acl);
+ contentManager.setAccessList(container, acl);
+ return container;
+ }
+
+ @Override
+ @Authenticated
+ @Authorizated(accessRolRequired = AccessRol.Administrator, actionLevel = ActionLevel.container)
+ @Transactional
+ public StateContainerDTO setPublic(final String hash, final StateToken token, final Boolean isPublic) {
+ final Container container = setPublicAcl(token, isPublic);
+ return contentRPC.getState(container);
+ }
+
+ private Container setPublicAcl(final StateToken token, final boolean isPublic) {
+ final Container container = contentManager.find(ContentUtils.parseId(token.getFolder()));
+ final AccessLists acl = container.getAccessLists();
+ setViewersAcl(isPublic, acl);
+ contentManager.setAccessList(container, acl);
+ return container;
+ }
+
+ private void setViewersAcl(final boolean isPublic, final AccessLists acl) {
+ acl.getViewers().clear();
+ acl.getViewers().setMode(isPublic ? GroupListMode.EVERYONE : GroupListMode.NOBODY);
+ }
+
+ @Override
+ @Authenticated
+ @Authorizated(accessRolRequired = AccessRol.Viewer, actionLevel = ActionLevel.container)
+ @Transactional
+ public StateContainerDTO subscribeToList(final String userHash, final StateToken token,
+ final Boolean subscribe) {
+ final Container container = contentManager.find(ContentUtils.parseId(token.getFolder()));
+ final AccessLists acl = container.getAccessLists();
+ if (subscribe) {
+ if (!acl.getAdmins().includes(getUserGroup())
+ && acl.getViewers().getMode().equals(GroupListMode.NOBODY)) {
+ // Not public list, don't permit subscriptions neither view posts
+ throw new AccessViolationException();
+ } else {
+ acl.getEditors().add(getUserGroup());
+ }
+ } else {
+ acl.getEditors().remove(getUserGroup());
+ }
+ contentManager.setAccessList(container, acl);
+ return contentRPC.getState(container);
+ }
+
+}
Modified: trunk/src/main/java/cc/kune/meets/shared/MeetingsConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/shared/MeetingsConstants.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/meets/shared/MeetingsConstants.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -22,7 +22,7 @@
public final class MeetingsConstants {
public static final String NAME = "meets";
- public static final String ROOT_NAME = "meets";
+ public static final String ROOT_NAME = "meetings";
public static final String TYPE_MEETING = NAME + "." + "meet";
public static final String TYPE_ROOT = NAME + "." + "root";
Modified: trunk/src/main/java/cc/kune/wave/server/KuneAgent.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/KuneAgent.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/wave/server/KuneAgent.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -63,8 +63,8 @@
}
@Override
- public void addParticipant(final WaveRef waveName, final String author, final String userWhoAdd,
- final String newParticipant) {
+ public void addParticipants(final WaveRef waveName, final String author, final String userWhoAdd,
+ final String... newParticipants) {
// TODO Auto-generated method stub
}
Modified: trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/wave/server/KuneWaveManager.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -33,7 +33,7 @@
void addGadget(WaveRef waveName, String author, String gadgetUrl);
- void addParticipant(WaveRef waveName, String author, String userWhoAdd, String newParticipant);
+ void addParticipants(WaveRef waveName, String author, String userWhoAdd, String... newParticipant);
WaveRef createWave(String message, ParticipantId participants);
Modified: trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/main/java/cc/kune/wave/server/KuneWaveManagerDefault.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -186,22 +186,30 @@
}
@Override
- public void addParticipant(final WaveRef waveName, final String author, final String userWhoAdds,
- final String newLocalParticipant) {
+ public void addParticipants(final WaveRef waveName, final String author, final String userWhoAdds,
+ final String... newLocalParticipants) {
final Wavelet wavelet = fetchWave(waveName, author);
- final String newPartWithDomain = participantUtils.of(newLocalParticipant).toString();
- for (final String current : wavelet.getParticipants()) {
- if (current.equals(newPartWithDomain)) {
- // Current user is a participant already (issue #73)
- return;
+ final OperationQueue opQueue = new OperationQueue();
+
+ for (final String newLocalParticipant : newLocalParticipants) {
+ final String newPartWithDomain = participantUtils.of(newLocalParticipant).toString();
+ boolean mustAdd = true;
+ for (final String current : wavelet.getParticipants()) {
+ if (current.equals(newPartWithDomain)) {
+ // Current user is a participant already (issue #73)
+ mustAdd = false;
+ break;
+ }
}
+ if (mustAdd) {
+ opQueue.addParticipantToWavelet(wavelet, newPartWithDomain);
+ }
}
- final String whoAdd = wavelet.getParticipants().contains(participantUtils.of(userWhoAdds)) ? userWhoAdds
- : author;
- final OperationQueue opQueue = new OperationQueue();
- opQueue.addParticipantToWavelet(wavelet, newPartWithDomain);
- doOperation(whoAdd, opQueue, "add participant");
-
+ if (opQueue.getPendingOperations().size() > 0) {
+ final String whoAdd = wavelet.getParticipants().contains(participantUtils.of(userWhoAdds)) ? userWhoAdds
+ : author;
+ doOperation(whoAdd, opQueue, "add participant");
+ }
}
@Override
Added: trunk/src/main/java/cc/kune/wave/server/KuneWaveUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/server/KuneWaveUtils.java (rev 0)
+++ trunk/src/main/java/cc/kune/wave/server/KuneWaveUtils.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,18 @@
+package cc.kune.wave.server;
+
+import org.waveprotocol.wave.model.waveref.InvalidWaveRefException;
+import org.waveprotocol.wave.model.waveref.WaveRef;
+import org.waveprotocol.wave.util.escapers.jvm.JavaWaverefEncoder;
+
+import cc.kune.core.client.errors.DefaultException;
+import cc.kune.domain.Content;
+
+public class KuneWaveUtils {
+ public static WaveRef getWaveRef(final Content content) {
+ try {
+ return JavaWaverefEncoder.decodeWaveRefFromPath(String.valueOf(content.getWaveId()));
+ } catch (final InvalidWaveRefException e) {
+ throw new DefaultException("Error getting the wave");
+ }
+ }
+}
Modified: trunk/src/test/java/cc/kune/core/server/integration/IntegrationTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/IntegrationTest.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/test/java/cc/kune/core/server/integration/IntegrationTest.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -23,64 +23,64 @@
import java.io.IOException;
-
import cc.kune.core.client.errors.DefaultException;
import cc.kune.core.client.rpcservices.UserService;
import cc.kune.core.server.UserSession;
import cc.kune.core.server.properties.KuneBasicProperties;
+import cc.kune.core.shared.dto.UserInfoDTO;
import com.google.inject.Inject;
public abstract class IntegrationTest {
- @Inject
- KuneBasicProperties properties;
- @Inject
- protected UserSession session;
- protected String token;
- @Inject
- UserService userService;
+ @Inject
+ KuneBasicProperties properties;
+ @Inject
+ protected UserSession session;
+ protected String token;
+ @Inject
+ UserService userService;
- protected String doLogin() throws DefaultException, IOException {
- waveLogin();
- return userService.login(getSiteAdminShortName(), properties.getAdminPassword(), token).getUserHash();
- }
+ protected UserInfoDTO doLogin() throws DefaultException, IOException {
+ waveLogin();
+ return userService.login(getSiteAdminShortName(), properties.getAdminPassword(), token);
+ }
- protected String doLoginWithDummyUser() throws DefaultException, IOException {
- waveLogin();
- return userService.login("dummy", properties.getAdminPassword(), token).getUserHash();
- }
+ protected String doLoginWithDummyUser() throws DefaultException, IOException {
+ waveLogin();
+ return userService.login("dummy", properties.getAdminPassword(), token).getUserHash();
+ }
- protected void doLogout() throws DefaultException {
- userService.logout(getHash());
- }
+ protected void doLogout() throws DefaultException {
+ userService.logout(getHash());
+ }
- protected String getDefLicense() {
- return properties.getDefaultLicense();
- }
+ protected String getDefLicense() {
+ return properties.getDefaultLicense();
+ }
- protected String getDefSiteGroupName() {
- return properties.getDefaultSiteShortName();
- }
+ protected String getDefSiteGroupName() {
+ return properties.getDefaultSiteShortName();
+ }
- public String getHash() {
- return session.getHash();
- }
+ public String getHash() {
+ return session.getHash();
+ }
- protected String getSiteAdminShortName() {
- return properties.getAdminShortName();
- }
+ protected String getSiteAdminShortName() {
+ return properties.getAdminShortName();
+ }
- protected void waveLogin() throws IOException {
- token = "somesampletoken";
- // final ClientAuthenticator authenticator = new
- // ClientAuthenticator("http://localhost:8080"
- // + SessionManager.SIGN_IN_URL);
- // final HttpCookie cookie =
- // authenticator.authenticate("admin@localhost",
- // "easyeasy".toCharArray());
- // token = cookie.getValue();
- assertNotNull(token);
- }
+ protected void waveLogin() throws IOException {
+ token = "somesampletoken";
+ // final ClientAuthenticator authenticator = new
+ // ClientAuthenticator("http://localhost:8080"
+ // + SessionManager.SIGN_IN_URL);
+ // final HttpCookie cookie =
+ // authenticator.authenticate("admin@localhost",
+ // "easyeasy".toCharArray());
+ // token = cookie.getValue();
+ assertNotNull(token);
+ }
}
Modified: trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -30,6 +30,7 @@
import org.waveprotocol.box.server.waveserver.WaveServerImpl;
import org.waveprotocol.wave.federation.noop.NoOpFederationModule;
+import cc.kune.barters.server.BarterServerModule;
import cc.kune.chat.server.ChatServerModule;
import cc.kune.core.server.KunePersistenceService;
import cc.kune.core.server.PlatformServerModule;
@@ -37,6 +38,9 @@
import cc.kune.core.server.init.FinderRegistry;
import cc.kune.core.server.properties.PropertiesFileName;
import cc.kune.docs.server.DocumentServerModule;
+import cc.kune.lists.server.ListsServerModule;
+import cc.kune.meets.server.MeetingServerModule;
+import cc.kune.tasks.server.TaskServerModule;
import cc.kune.wave.server.CustomSettingsBinder;
import cc.kune.wiki.server.WikiServerModule;
@@ -59,9 +63,10 @@
final NoOpFederationModule federationModule = injector.getInstance(NoOpFederationModule.class);
final Injector childInjector = injector.createChildInjector(wavePersistModule,
FinderRegistry.init(new JpaPersistModule(TestConstants.PERSISTENCE_UNIT)),
- new RobotApiModule(), new PlatformServerModule(), new DocumentServerModule(),
- new ChatServerModule(), new ServerModule(false), federationModule, new WikiServerModule(),
- new AbstractModule() {
+ new ListsServerModule(), new RobotApiModule(), new PlatformServerModule(),
+ new DocumentServerModule(), new ChatServerModule(), new ServerModule(false), federationModule,
+ new WikiServerModule(), new TaskServerModule(), new BarterServerModule(),
+ new MeetingServerModule(), new AbstractModule() {
@Override
protected void configure() {
bindScope(SessionScoped.class, Scopes.SINGLETON);
Modified: trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceGetTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceGetTest.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/test/java/cc/kune/core/server/integration/content/ContentServiceGetTest.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -36,99 +36,100 @@
public class ContentServiceGetTest extends ContentServiceIntegrationTest {
- @Test
- public void contentOfUserWithNoHomePage() throws Exception {
- final String userHash = doLogin();
- final StateAbstractDTO response = contentService.getContent(userHash, new StateToken(getSiteAdminShortName()));
- assertTrue(response instanceof StateNoContentDTO);
- }
+ @Test
+ public void contentOfUserWithNoHomePage() throws Exception {
+ final String userHash = doLogin().getUserHash();
+ final StateAbstractDTO response = contentService.getContent(userHash, new StateToken(
+ getSiteAdminShortName()));
+ assertTrue(response instanceof StateNoContentDTO);
+ }
- @Test
- public void contentWithLoggedUserIsEditable() throws Exception {
- final String userHash = doLogin();
- final StateContentDTO response = (StateContentDTO) contentService.getContent(userHash,
- getSiteDefaultContent().getStateToken());
- assertNotNull(response.getContentRights());
- assertTrue(response.getContentRights().isEditable());
- assertTrue(response.getAccessLists().getAdmins().getList().size() == 1);
- }
+ @Test
+ public void contentWithLoggedUserIsEditable() throws Exception {
+ final String userHash = doLogin().getUserHash();
+ final StateContentDTO response = (StateContentDTO) contentService.getContent(userHash,
+ getSiteDefaultContent().getStateToken());
+ assertNotNull(response.getContentRights());
+ assertTrue(response.getContentRights().isEditable());
+ assertTrue(response.getAccessLists().getAdmins().getList().size() == 1);
+ }
- @Before
- public void create() {
- new IntegrationTestHelper(this);
- }
+ @Before
+ public void create() {
+ new IntegrationTestHelper(this);
+ }
- @Test
- public void defaultCountentShouldExist() throws Exception {
- final StateContentDTO content = (StateContentDTO) contentService.getContent(null, new StateToken());
- assertNotNull(content);
- assertNotNull(content.getGroup());
- assertNotNull(content.getContainer());
- assertNotNull(content.getContainer().getId());
- assertNotNull(content.getToolName());
- assertNotNull(content.getDocumentId());
- assertNotNull(content.getRateByUsers());
- assertNotNull(content.getRate());
- }
+ @Test
+ public void defaultCountentShouldExist() throws Exception {
+ final StateContentDTO content = (StateContentDTO) contentService.getContent(null, new StateToken());
+ assertNotNull(content);
+ assertNotNull(content.getGroup());
+ assertNotNull(content.getContainer());
+ assertNotNull(content.getContainer().getId());
+ assertNotNull(content.getToolName());
+ assertNotNull(content.getDocumentId());
+ assertNotNull(content.getRateByUsers());
+ assertNotNull(content.getRate());
+ }
- @Test
- public void defContentOfUserWithNoHomePage() throws Exception {
- final String userHash = doLogin();
- final StateAbstractDTO response = contentService.getContent(userHash, new StateToken());
- assertTrue(response.getStateToken().equals(getSiteDefaultContent().getStateToken()));
- }
+ @Test
+ public void defContentOfUserWithNoHomePage() throws Exception {
+ final String userHash = doLogin().getUserHash();
+ final StateAbstractDTO response = contentService.getContent(userHash, new StateToken());
+ assertTrue(response.getStateToken().equals(getSiteDefaultContent().getStateToken()));
+ }
- @Test
- public void noContentNotLogged() throws Exception {
- final StateContentDTO response = (StateContentDTO) contentService.getContent(null, new StateToken());
- assertNotNull(response);
- }
+ @Test
+ public void noContentNotLogged() throws Exception {
+ final StateContentDTO response = (StateContentDTO) contentService.getContent(null, new StateToken());
+ assertNotNull(response);
+ }
- @Test(expected = ContentNotFoundException.class)
- public void nonExistentContent() throws Exception {
- contentService.getContent(null, new StateToken("foo foo foo"));
- }
+ @Test(expected = ContentNotFoundException.class)
+ public void nonExistentContent() throws Exception {
+ contentService.getContent(null, new StateToken("foo foo foo"));
+ }
- @Test(expected = ContentNotFoundException.class)
- public void nonExistentContent2() throws Exception {
- contentService.getContent(null, new StateToken("site.foofoo"));
- }
+ @Test(expected = ContentNotFoundException.class)
+ public void nonExistentContent2() throws Exception {
+ contentService.getContent(null, new StateToken("site.foofoo"));
+ }
- @Test(expected = ContentNotFoundException.class)
- public void nonExistentContent3() throws Exception {
- contentService.getContent(null, new StateToken("site.docs.foofoo"));
- }
+ @Test(expected = ContentNotFoundException.class)
+ public void nonExistentContent3() throws Exception {
+ contentService.getContent(null, new StateToken("site.docs.foofoo"));
+ }
- @Test(expected = ContentNotFoundException.class)
- public void nonExistentContent4() throws Exception {
- final StateContainerDTO stateDTO = getSiteDefaultContent();
- contentService.getContent(null, stateDTO.getStateToken().copy().setDocument("dadaas"));
- }
+ @Test(expected = ContentNotFoundException.class)
+ public void nonExistentContent4() throws Exception {
+ final StateContainerDTO stateDTO = getSiteDefaultContent();
+ contentService.getContent(null, stateDTO.getStateToken().copy().setDocument("dadaas"));
+ }
- @Test(expected = ContentNotFoundException.class)
- public void nonExistentContent5() throws Exception {
- contentService.getContent(null, new StateToken("comm3.docs.19"));
- }
+ @Test(expected = ContentNotFoundException.class)
+ public void nonExistentContent5() throws Exception {
+ contentService.getContent(null, new StateToken("comm3.docs.19"));
+ }
- @Test
- public void notLoggedUserShouldNotEditDefaultDoc() throws Exception {
- final StateContentDTO content = (StateContentDTO) contentService.getContent(null, new StateToken());
- assertFalse(content.getContentRights().isAdministrable());
- assertFalse(content.getContentRights().isEditable());
- assertTrue(content.getContentRights().isVisible());
- assertFalse(content.getContainerRights().isAdministrable());
- assertFalse(content.getContainerRights().isEditable());
- assertTrue(content.getContainerRights().isVisible());
- }
+ @Test
+ public void notLoggedUserShouldNotEditDefaultDoc() throws Exception {
+ final StateContentDTO content = (StateContentDTO) contentService.getContent(null, new StateToken());
+ assertFalse(content.getContentRights().isAdministrable());
+ assertFalse(content.getContentRights().isEditable());
+ assertTrue(content.getContentRights().isVisible());
+ assertFalse(content.getContainerRights().isAdministrable());
+ assertFalse(content.getContainerRights().isEditable());
+ assertTrue(content.getContainerRights().isVisible());
+ }
- @Test
- public void unknownContent() throws Exception {
- final StateContainerDTO content = (StateContainerDTO) contentService.getContent(null, new StateToken(
- "site.docs"));
- assertNotNull(content);
- assertNotNull(content.getGroup());
- assertNotNull(content.getContainer());
- assertNotNull(content.getContainer().getId());
- assertNotNull(content.getToolName());
- }
+ @Test
+ public void unknownContent() throws Exception {
+ final StateContainerDTO content = (StateContainerDTO) contentService.getContent(null,
+ new StateToken("site.docs"));
+ assertNotNull(content);
+ assertNotNull(content.getGroup());
+ assertNotNull(content.getContainer());
+ assertNotNull(content.getContainer().getId());
+ assertNotNull(content.getToolName());
+ }
}
Modified: trunk/src/test/java/cc/kune/core/server/integration/socialnet/SocialNetworkMembersTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/socialnet/SocialNetworkMembersTest.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/test/java/cc/kune/core/server/integration/socialnet/SocialNetworkMembersTest.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -20,6 +20,8 @@
package cc.kune.core.server.integration.socialnet;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
import java.util.Set;
@@ -31,6 +33,7 @@
import cc.kune.core.server.integration.IntegrationTestHelper;
import cc.kune.core.server.manager.GroupManager;
import cc.kune.core.server.manager.SocialNetworkManager;
+import cc.kune.domain.AccessLists;
import cc.kune.domain.Group;
import com.google.inject.Inject;
@@ -54,6 +57,19 @@
}
@Test
+ public void testAdminAddTwice() throws Exception {
+ doLogin();
+ final Set<Group> result = groupFinder.findAdminInGroups(group.getId());
+ final AccessLists acl = group.getSocialNetwork().getAccessLists();
+ assertTrue(acl.getAdmins().includes(group));
+ assertFalse(acl.getEditors().includes(group));
+ acl.addAdmin(group);
+ acl.addAdmin(group);
+ acl.addAdmin(group);
+ assertEquals(2, result.size());
+ }
+
+ @Test
public void testAdminMembersOfGroupFinder() throws Exception {
doLogin();
final Set<Group> result = groupFinder.findAdminInGroups(group.getId());
Modified: trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java
===================================================================
--- trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -20,8 +20,8 @@
package cc.kune.lists.server;
import static cc.kune.lists.shared.ListsConstants.TYPE_LIST;
+import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
import static cc.kune.lists.shared.ListsConstants.TYPE_ROOT;
-import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
import org.junit.Before;
import org.junit.Test;
@@ -35,7 +35,7 @@
@Before
public void before() {
- serverTool = new ListsServerTool(null, null, null, null);
+ serverTool = new ListsServerTool(null, null, null, null, null, null);
}
@Test
Added: trunk/src/test/java/cc/kune/lists/server/ListsServiceTest.java
===================================================================
--- trunk/src/test/java/cc/kune/lists/server/ListsServiceTest.java (rev 0)
+++ trunk/src/test/java/cc/kune/lists/server/ListsServiceTest.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -0,0 +1,122 @@
+package cc.kune.lists.server;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import cc.kune.core.client.errors.AccessViolationException;
+import cc.kune.core.client.errors.DefaultException;
+import cc.kune.core.client.rpcservices.ContentService;
+import cc.kune.core.server.integration.IntegrationTest;
+import cc.kune.core.server.integration.IntegrationTestHelper;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.AccessListsDTO;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.core.shared.dto.StateContainerDTO;
+import cc.kune.core.shared.dto.StateContentDTO;
+import cc.kune.core.shared.dto.UserInfoDTO;
+import cc.kune.lists.client.rpc.ListsService;
+import cc.kune.lists.shared.ListsConstants;
+
+import com.google.inject.Inject;
+
+public class ListsServiceTest extends IntegrationTest {
+ private StateContainerDTO closeList;
+ @Inject
+ ContentService contentService;
+ @Inject
+ ListsService listsService;
+ private StateContainerDTO openList;
+ private GroupDTO userGroup;
+
+ @Before
+ public void init() throws DefaultException, IOException {
+ new IntegrationTestHelper(this);
+ final UserInfoDTO userInfoDTO = doLogin();
+ userGroup = userInfoDTO.getUserGroup();
+ final StateAbstractDTO rootList = contentService.getContent(getHash(), new StateToken(
+ getDefSiteGroupName(), ListsConstants.ROOT_NAME));
+ openList = listsService.createList(getHash(), rootList.getStateToken(), "test list", "", true);
+ closeList = listsService.createList(getHash(), rootList.getStateToken(), "test list", "", false);
+ }
+
+ @Test(expected = AccessViolationException.class)
+ public void postToCloseShouldFailTest() throws DefaultException, IOException {
+ doLogout();
+ doLoginWithDummyUser();
+ listsService.newPost(getHash(), closeList.getStateToken(), "lalala");
+ }
+
+ @Test
+ public void postToOpenByOthersTest() throws DefaultException, IOException {
+ doLogout();
+ doLoginWithDummyUser();
+ final StateContentDTO newPost = listsService.newPost(getHash(), openList.getStateToken(), "lalala");
+ // FIXME: check participation
+ assertNotNull(newPost);
+ }
+
+ @Test
+ public void postToOpenCloseAndLaterOpenByOthersTest() throws DefaultException, IOException {
+ listsService.setPublic(token, openList.getStateToken(), false);
+ listsService.setPublic(token, openList.getStateToken(), true);
+ doLogout();
+ doLoginWithDummyUser();
+ final StateContentDTO newPost = listsService.newPost(getHash(), openList.getStateToken(), "lalala");
+ assertNotNull(newPost);
+ }
+
+ @Test
+ public void subscribeSeveralToCloseTest() throws DefaultException, IOException {
+ subscribeUnsubsSeveral(closeList);
+ }
+
+ @Test
+ public void subscribeSeveralToPublicTest() {
+ subscribeUnsubsSeveral(openList);
+ }
+
+ @Test(expected = AccessViolationException.class)
+ public void subscribeToCloseShouldFailTest() throws DefaultException, IOException {
+ doLogout();
+ doLoginWithDummyUser();
+ listsService.subscribeToList(getHash(), closeList.getStateToken(), true);
+ }
+
+ @Test(expected = AccessViolationException.class)
+ public void subscribeToOpenAndLaterCloseListShouldFailTest() throws DefaultException, IOException {
+ listsService.setPublic(token, openList.getStateToken(), false);
+ doLogout();
+ doLoginWithDummyUser();
+ listsService.subscribeToList(getHash(), openList.getStateToken(), true);
+ }
+
+ private void subscribeUnsubsSeveral(final StateContainerDTO list) {
+ final AccessListsDTO initialAcl = list.getAccessLists();
+ assertTrue(initialAcl.getAdmins().includes(userGroup));
+ assertFalse(initialAcl.getEditors().getList().contains(userGroup));
+
+ StateContainerDTO state = listsService.subscribeToList(getHash(), list.getStateToken(), true);
+ AccessListsDTO acl = state.getAccessLists();
+ assertTrue(acl.getEditors().includes(userGroup));
+ assertTrue(acl.getAdmins().includes(userGroup));
+
+ state = listsService.subscribeToList(getHash(), list.getStateToken(), false);
+ acl = state.getAccessLists();
+ assertFalse(acl.getEditors().includes(userGroup));
+ assertTrue(acl.getAdmins().includes(userGroup));
+
+ state = listsService.subscribeToList(getHash(), list.getStateToken(), true);
+ acl = state.getAccessLists();
+ assertTrue(acl.getEditors().includes(userGroup));
+ assertTrue(acl.getEditors().getList().contains(userGroup));
+ assertTrue(acl.getAdmins().includes(userGroup));
+ }
+
+}
Modified: trunk/src/test/java/cc/kune/wave/server/KuneWaveManagerDefaultTest.java
===================================================================
--- trunk/src/test/java/cc/kune/wave/server/KuneWaveManagerDefaultTest.java 2011-08-12 18:33:43 UTC (rev 1492)
+++ trunk/src/test/java/cc/kune/wave/server/KuneWaveManagerDefaultTest.java 2011-08-13 15:59:10 UTC (rev 1493)
@@ -62,7 +62,7 @@
doLogin();
final WaveRef waveletName = createTestWave();
assertNotNull(waveletName);
- manager.addParticipant(waveletName, getSiteAdminShortName(), whoAdds, NEW_PARTICIPANT);
+ manager.addParticipants(waveletName, getSiteAdminShortName(), whoAdds, NEW_PARTICIPANT);
final Wavelet fetchWavelet = manager.fetchWave(waveletName, getSiteAdminShortName());
assertNotNull(fetchWavelet);
assertEquals(2, fetchWavelet.getParticipants().size());
@@ -75,10 +75,12 @@
doLogin();
final WaveRef waveletName = createTestWave();
assertNotNull(waveletName);
- manager.addParticipant(waveletName, getSiteAdminShortName(), getSiteAdminShortName(),
+ manager.addParticipants(waveletName, getSiteAdminShortName(), getSiteAdminShortName(),
NEW_PARTICIPANT);
- manager.addParticipant(waveletName, getSiteAdminShortName(), getSiteAdminShortName(),
- NEW_PARTICIPANT);
+ manager.addParticipants(waveletName, getSiteAdminShortName(), getSiteAdminShortName(),
+ NEW_PARTICIPANT, NEW_PARTICIPANT);
+ manager.addParticipants(waveletName, getSiteAdminShortName(), getSiteAdminShortName(),
+ NEW_PARTICIPANT, NEW_PARTICIPANT, NEW_PARTICIPANT);
final Wavelet fetchWavelet = manager.fetchWave(waveletName, getSiteAdminShortName());
assertNotNull(fetchWavelet);
assertEquals(2, fetchWavelet.getParticipants().size());
1
0
Author: vjrj_
Date: 2011-08-12 20:33:43 +0200 (Fri, 12 Aug 2011)
New Revision: 1492
Modified:
trunk/TODO
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractParentGuiActionDescrip.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuDescriptor.java
trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActions.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
trunk/src/main/java/cc/kune/core/client/sn/GroupSNPresenter.java
trunk/src/main/java/cc/kune/core/server/NotInObject.java
trunk/src/main/java/cc/kune/core/server/manager/GroupManager.java
trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java
trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java
trunk/src/main/java/cc/kune/core/server/users/UserInfo.java
trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java
trunk/src/main/java/cc/kune/core/shared/dto/UserInfoDTO.java
trunk/src/main/java/cc/kune/domain/GroupList.java
trunk/src/main/java/cc/kune/domain/finders/GroupFinder.java
trunk/src/main/java/cc/kune/domain/utils/ParticipationData.java
trunk/src/main/java/cc/kune/lists/client/ListsClientTool.java
trunk/src/main/java/cc/kune/msgs/client/UserMessagesPanel.java
trunk/src/test/java/cc/kune/core/server/integration/site/UserServiceTest.java
trunk/src/test/java/cc/kune/core/server/integration/socialnet/SocialNetworkMembersTest.java
trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java
Log:
GroupList now use Set instead of List
Fix "Your groups" submenu.
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/TODO 2011-08-12 18:33:43 UTC (rev 1492)
@@ -167,6 +167,15 @@
http://code.google.com/p/google-web-toolkit/wiki/WAR_Design_1_6
http://www.gwt-ext.com/forum/viewtopic.php?f=5&p=12038
** TODO <v> User preferences storing
+*** links:
+**** http://download.oracle.com/javase/1.4.2/docs/guide/lang/preferences.html (Preferences API)
+**** http://stackoverflow.com/questions/6050397/hibernate-mapping-optional-value
+**** http://stackoverflow.com/questions/3100881/user-preferences-file-vs-app-pre…
+**** http://stackoverflow.com/questions/1079711/best-approach-to-save-user-prefe…
+**** http://stackoverflow.com/questions/3109550/user-preferences-in-jee-applicat…
+**** http://stackoverflow.com/questions/598877/user-preferences-database-table-d…
+
+*** old work
(See also variables in 'Styling braimstorming')
We need a way to store (in db) User preferences (like emite chat configurations) in a extensible way.
Something similar to java.util.prefs.Preferences or Mozilla about:config
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -197,6 +197,13 @@
setParent(parent, true);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * cc.kune.common.client.actions.ui.descrip.GuiActionDescrip#setParent(cc.
+ * kune.common.client.actions.ui.descrip.GuiActionDescrip, boolean)
+ */
@Override
public void setParent(final GuiActionDescrip parent, final boolean addToParent) {
if (parent != NO_PARENT && addToParent) {
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractParentGuiActionDescrip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractParentGuiActionDescrip.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractParentGuiActionDescrip.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -16,6 +16,10 @@
childs.add(descriptors);
}
+ public void clear() {
+ childs.clear();
+ }
+
public GuiActionDescCollection getChilds() {
return childs;
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -98,7 +98,8 @@
* @param addToParent
* if yes, the action will be added directly to the parent, useful to
* attach menu items (or other child actions) directly to its parent
- * without any other check (for instance session status, etc)
+ * without any other check (for instance session status, etc).
+ * Default to yes
*/
void setParent(GuiActionDescrip parent, boolean addToParent);
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuDescriptor.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuDescriptor.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuDescriptor.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -73,10 +73,12 @@
this(new BaseAction(text, tooltip, icon));
}
+ @Override
public void clear() {
// Action detects changes in values, then we fire a change (whatever) to
// fire this method in the UI
putValue(MENU_CLEAR, !((Boolean) getValue(MENU_CLEAR)));
+ super.clear();
}
public ImageResource getRightIcon() {
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -19,7 +19,7 @@
\*/
package cc.kune.core.client.sitebar;
-import java.util.List;
+import java.util.Set;
import cc.kune.common.client.actions.AbstractExtendedAction;
import cc.kune.common.client.actions.Action;
@@ -46,7 +46,9 @@
import com.google.inject.Inject;
import com.google.inject.Provider;
+import com.google.inject.Singleton;
+@Singleton
public class SiteUserOptionsPresenter implements SiteUserOptions {
public static final MenuDescriptor LOGGED_USER_MENU = new MenuDescriptor();
@@ -98,7 +100,7 @@
}
private void addActionImpl(final GuiActionDescrip descriptor) {
- descriptor.setParent(LOGGED_USER_MENU);
+ descriptor.setParent(LOGGED_USER_MENU, true);
}
private void addPartipation(final GroupDTO group) {
@@ -107,8 +109,8 @@
participant.setTarget(group);
participant.putValue(Action.NAME, group.getLongName());
participant.putValue(Action.SMALL_ICON, logoImageUrl);
- participant.setParent(partiMenu, false);
- siteOptions.getRightToolbar().add(participant);
+ participant.setParent(partiMenu, true);
+ // siteOptions.getRightToolbar().add(participant);
}
private void createActions() {
@@ -142,8 +144,8 @@
LOGGED_USER_MENU.setEnabled(true);
setLoggedUserName(userInfoDTO.getShortName());
partiMenu.clear();
- final List<GroupDTO> groupsIsAdmin = userInfoDTO.getGroupsIsAdmin();
- final List<GroupDTO> groupsIsCollab = userInfoDTO.getGroupsIsCollab();
+ final Set<GroupDTO> groupsIsAdmin = userInfoDTO.getGroupsIsAdmin();
+ final Set<GroupDTO> groupsIsCollab = userInfoDTO.getGroupsIsCollab();
for (final GroupDTO group : groupsIsAdmin) {
addPartipation(group);
}
@@ -151,6 +153,7 @@
addPartipation(group);
}
partiMenu.setEnabled((groupsIsAdmin.size() + groupsIsCollab.size()) > 0);
+ siteOptions.refreshActions();
}
private void setLoggedUserName(final String shortName) {
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActions.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActions.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActions.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -27,4 +27,6 @@
ToolbarDescriptor getRightToolbar();
+ void refreshActions();
+
}
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -68,11 +68,9 @@
private static final MenuDescriptor OPTIONS_MENU = new MenuDescriptor();
private static final ToolbarDescriptor RIGHT_TOOLBAR = new ToolbarDescriptor();
public static final String SITE_OPTIONS_MENU = "kune-sop-om";
-
private final I18nTranslationService i18n;
private final CoreResources icons;
private final Provider<SitebarNewGroupLink> newGroupLink;
-
private final CoreResources res;
private final Provider<SitebarSignInLink> signInLink;
private final Provider<SitebarSignOutLink> signOutLink;
@@ -181,6 +179,17 @@
MenuSeparatorDescriptor.build(OPTIONS_MENU);
MenuItemDescriptor.build(OPTIONS_MENU, wavePowered);
OPTIONS_MENU.setParent(RIGHT_TOOLBAR);
+ refreshActionsImpl();
+ }
+
+ @Override
+ public void refreshActions() {
+ refreshActionsImpl();
+ }
+
+ private void refreshActionsImpl() {
+ getView().getLeftBar().clear();
+ getView().getRightBar().clear();
getView().getLeftBar().add(LEFT_TOOLBAR);
getView().getRightBar().add(RIGHT_TOOLBAR);
}
Modified: trunk/src/main/java/cc/kune/core/client/sn/GroupSNPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/GroupSNPresenter.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/client/sn/GroupSNPresenter.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -19,7 +19,7 @@
*/
package cc.kune.core.client.sn;
-import java.util.List;
+import java.util.Set;
import cc.kune.common.client.actions.ui.IsActionExtensible;
import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
@@ -181,9 +181,9 @@
private void setGroupMembers(final SocialNetworkDTO socialNetwork, final AccessRights rights) {
final AccessListsDTO accessLists = socialNetwork.getAccessLists();
- final List<GroupDTO> adminsList = accessLists.getAdmins().getList();
- final List<GroupDTO> collabList = accessLists.getEditors().getList();
- final List<GroupDTO> pendingCollabsList = socialNetwork.getPendingCollaborators().getList();
+ final Set<GroupDTO> adminsList = accessLists.getAdmins().getList();
+ final Set<GroupDTO> collabList = accessLists.getEditors().getList();
+ final Set<GroupDTO> pendingCollabsList = socialNetwork.getPendingCollaborators().getList();
final int numAdmins = adminsList.size();
final int numCollabs = collabList.size();
Modified: trunk/src/main/java/cc/kune/core/server/NotInObject.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/NotInObject.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/server/NotInObject.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -27,21 +27,22 @@
public class NotInObject extends AbstractMatcher<Method> {
- private final List<String> excluded;
+ private final List<String> excluded;
- public NotInObject() {
- super();
- // FIXME exclude password
- excluded = Arrays.asList(new String[] { "finalize", "toString", "hashCode", "getClass", "wait", "equals" });
- }
+ public NotInObject() {
+ super();
+ // FIXME exclude password
+ excluded = Arrays.asList(new String[] { "finalize", "toString", "hashCode", "getClass", "wait",
+ "equals" });
+ }
- @Override
- public boolean matches(final Method method) {
- final String name = method.getName();
-
- final boolean isGetter = name.startsWith("set");
- final boolean isExcluded = excluded.contains(name);
- return !isGetter || !isExcluded;
- }
-
+ @Override
+ public boolean matches(final Method method) {
+ final String name = method.getName();
+ // http://code.google.com/p/google-guice/issues/detail?id=640
+ final boolean isSynth = method.isSynthetic();
+ final boolean isGetter = name.startsWith("set");
+ final boolean isExcluded = excluded.contains(name);
+ return !isSynth && (!isGetter || !isExcluded);
+ }
}
Modified: trunk/src/main/java/cc/kune/core/server/manager/GroupManager.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/GroupManager.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/server/manager/GroupManager.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -20,6 +20,7 @@
package cc.kune.core.server.manager;
import java.util.List;
+import java.util.Set;
import cc.kune.core.client.errors.AccessViolationException;
import cc.kune.core.client.errors.EmailAddressInUseException;
@@ -46,11 +47,11 @@
Group createUserGroup(User user, boolean wantPersonalHomepage) throws GroupNameInUseException,
EmailAddressInUseException;
- List<Group> findAdminInGroups(Long groupId);
+ Set<Group> findAdminInGroups(Long groupId);
Group findByShortName(String groupName);
- List<Group> findCollabInGroups(Long groupId);
+ Set<Group> findCollabInGroups(Long groupId);
List<String> findEnabledTools(Long id);
Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -21,6 +21,7 @@
import java.util.Collection;
import java.util.List;
+import java.util.Set;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
@@ -202,7 +203,7 @@
}
@Override
- public List<Group> findAdminInGroups(final Long groupId) {
+ public Set<Group> findAdminInGroups(final Long groupId) {
return finder.findAdminInGroups(groupId);
}
@@ -212,7 +213,7 @@
}
@Override
- public List<Group> findCollabInGroups(final Long groupId) {
+ public Set<Group> findCollabInGroups(final Long groupId) {
return finder.findCollabInGroups(groupId);
}
Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/SocialNetworkManagerDefault.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -19,7 +19,7 @@
*/
package cc.kune.core.server.manager.impl;
-import java.util.List;
+import java.util.Set;
import javax.persistence.EntityManager;
@@ -74,7 +74,7 @@
throws DefaultException, AccessViolationException {
final SocialNetwork sn = inGroup.getSocialNetwork();
checkUserLoggedIsAdmin(userLogged, sn);
- final List<Group> pendingCollabs = sn.getPendingCollaborators().getList();
+ final Set<Group> pendingCollabs = sn.getPendingCollaborators().getList();
if (pendingCollabs.contains(group)) {
sn.addCollaborator(group);
sn.removePendingCollaborator(group);
@@ -161,7 +161,7 @@
throws DefaultException {
final SocialNetwork sn = inGroup.getSocialNetwork();
checkUserLoggedIsAdmin(userLogged, sn);
- final List<Group> pendingCollabs = sn.getPendingCollaborators().getList();
+ final Set<Group> pendingCollabs = sn.getPendingCollaborators().getList();
if (pendingCollabs.contains(group)) {
sn.removePendingCollaborator(group);
} else {
@@ -174,13 +174,13 @@
throws AccessViolationException {
get(userLogged, group); // check access
final Long groupId = group.getId();
- final List<Group> adminInGroups = finder.findAdminInGroups(groupId);
+ final Set<Group> adminInGroups = finder.findAdminInGroups(groupId);
// Don't show self user group
if (group.isPersonal()) {
adminInGroups.remove(group);
}
// adminInGroups.remove(userLogged.getUserGroup());
- final List<Group> collabInGroups = finder.findCollabInGroups(groupId);
+ final Set<Group> collabInGroups = finder.findCollabInGroups(groupId);
return new ParticipationData(adminInGroups, collabInGroups);
}
Modified: trunk/src/main/java/cc/kune/core/server/users/UserInfo.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/users/UserInfo.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/server/users/UserInfo.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -20,6 +20,7 @@
package cc.kune.core.server.users;
import java.util.List;
+import java.util.Set;
import cc.kune.domain.Group;
import cc.kune.domain.I18nCountry;
@@ -27,112 +28,112 @@
import cc.kune.domain.User;
public class UserInfo {
- private String chatName;
- private String chatPassword;
- private List<String> enabledTools;
- private List<Group> groupsIsAdmin;
- private List<Group> groupsIsCollab;
- private String homePage;
- private boolean showDeletedContent;
- private User user;
- private Group userGroup;
- private String userHash;
+ private String chatName;
+ private String chatPassword;
+ private List<String> enabledTools;
+ private Set<Group> groupsIsAdmin;
+ private Set<Group> groupsIsCollab;
+ private String homePage;
+ private boolean showDeletedContent;
+ private User user;
+ private Group userGroup;
+ private String userHash;
- public String getChatName() {
- return chatName;
- }
+ public String getChatName() {
+ return chatName;
+ }
- public String getChatPassword() {
- return chatPassword;
- }
+ public String getChatPassword() {
+ return chatPassword;
+ }
- public I18nCountry getCountry() {
- return user.getCountry();
- }
+ public I18nCountry getCountry() {
+ return user.getCountry();
+ }
- public List<String> getEnabledTools() {
- return enabledTools;
- }
+ public List<String> getEnabledTools() {
+ return enabledTools;
+ }
- public List<Group> getGroupsIsAdmin() {
- return groupsIsAdmin;
- }
+ public Set<Group> getGroupsIsAdmin() {
+ return groupsIsAdmin;
+ }
- public List<Group> getGroupsIsCollab() {
- return groupsIsCollab;
- }
+ public Set<Group> getGroupsIsCollab() {
+ return groupsIsCollab;
+ }
- public String getHomePage() {
- return homePage;
- }
+ public String getHomePage() {
+ return homePage;
+ }
- public I18nLanguage getLanguage() {
- return user.getLanguage();
- }
+ public I18nLanguage getLanguage() {
+ return user.getLanguage();
+ }
- public String getName() {
- return user.getName();
- }
+ public String getName() {
+ return user.getName();
+ }
- public String getShortName() {
- return user.getShortName();
- }
+ public String getShortName() {
+ return user.getShortName();
+ }
- public boolean getShowDeletedContent() {
- return showDeletedContent;
- }
+ public boolean getShowDeletedContent() {
+ return showDeletedContent;
+ }
- public User getUser() {
- return user;
- }
+ public User getUser() {
+ return user;
+ }
- public Group getUserGroup() {
- return userGroup;
- }
+ public Group getUserGroup() {
+ return userGroup;
+ }
- public String getUserHash() {
- return userHash;
- }
+ public String getUserHash() {
+ return userHash;
+ }
- public void setChatName(final String chatName) {
- this.chatName = chatName;
- }
+ public void setChatName(final String chatName) {
+ this.chatName = chatName;
+ }
- @Deprecated
- public void setChatPassword(final String chatPassword) {
- this.chatPassword = chatPassword;
- }
+ @Deprecated
+ public void setChatPassword(final String chatPassword) {
+ this.chatPassword = chatPassword;
+ }
- public void setEnabledTools(final List<String> enabledTools) {
- this.enabledTools = enabledTools;
- }
+ public void setEnabledTools(final List<String> enabledTools) {
+ this.enabledTools = enabledTools;
+ }
- public void setGroupsIsAdmin(final List<Group> groupsIsAdmin) {
- this.groupsIsAdmin = groupsIsAdmin;
- }
+ public void setGroupsIsAdmin(final Set<Group> groupsIsAdmin) {
+ this.groupsIsAdmin = groupsIsAdmin;
+ }
- public void setGroupsIsCollab(final List<Group> groupsIsCollab) {
- this.groupsIsCollab = groupsIsCollab;
- }
+ public void setGroupsIsCollab(final Set<Group> groupsIsCollab) {
+ this.groupsIsCollab = groupsIsCollab;
+ }
- public void setHomePage(final String homePage) {
- this.homePage = homePage;
- }
+ public void setHomePage(final String homePage) {
+ this.homePage = homePage;
+ }
- public void setShowDeletedContent(final boolean showDeletedContent) {
- this.showDeletedContent = showDeletedContent;
- }
+ public void setShowDeletedContent(final boolean showDeletedContent) {
+ this.showDeletedContent = showDeletedContent;
+ }
- public void setUser(final User user) {
- this.user = user;
- }
+ public void setUser(final User user) {
+ this.user = user;
+ }
- public void setUserGroup(final Group userGroup) {
- this.userGroup = userGroup;
- }
+ public void setUserGroup(final Group userGroup) {
+ this.userGroup = userGroup;
+ }
- public void setUserHash(final String userHash) {
- this.userHash = userHash;
- }
+ public void setUserHash(final String userHash) {
+ this.userHash = userHash;
+ }
}
Modified: trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/shared/dto/GroupListDTO.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -19,42 +19,43 @@
*/
package cc.kune.core.shared.dto;
-import java.util.List;
+import java.util.Set;
import com.google.gwt.user.client.rpc.IsSerializable;
public class GroupListDTO implements IsSerializable {
- public static final String EVERYONE = "EVERYONE";
- public static final String NOBODY = "NOBODY";
- public static final String NORMAL = "NORMAL";
- private List<GroupDTO> list;
- private String mode;
+ public static final String EVERYONE = "EVERYONE";
+ public static final String NOBODY = "NOBODY";
+ public static final String NORMAL = "NORMAL";
+ private Set<GroupDTO> list;
+ private String mode;
- public GroupListDTO() {
- this(null);
- }
+ public GroupListDTO() {
+ this(null);
+ }
- public GroupListDTO(final List<GroupDTO> list) {
- this.list = list;
- }
+ public GroupListDTO(final Set<GroupDTO> list) {
+ this.list = list;
+ }
- public List<GroupDTO> getList() {
- return list;
- }
+ public Set<GroupDTO> getList() {
+ return list;
+ }
- public String getMode() {
- return mode;
- }
+ public String getMode() {
+ return mode;
+ }
- public void setList(final List<GroupDTO> list) {
- this.list = list;
- }
+ public void setList(final Set<GroupDTO> list) {
+ this.list = list;
+ }
- public void setMode(final String mode) {
- this.mode = mode;
- }
+ public void setMode(final String mode) {
+ this.mode = mode;
+ }
- public String toString() {
- return "GroupListDTO[(" + mode + "): " + list + "]";
- }
+ @Override
+ public String toString() {
+ return "GroupListDTO[(" + mode + "): " + list + "]";
+ }
}
Modified: trunk/src/main/java/cc/kune/core/shared/dto/UserInfoDTO.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/UserInfoDTO.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/core/shared/dto/UserInfoDTO.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -20,118 +20,119 @@
package cc.kune.core.shared.dto;
import java.util.List;
+import java.util.Set;
import com.google.gwt.user.client.rpc.IsSerializable;
public class UserInfoDTO implements IsSerializable {
- private String chatName;
- private String chatPassword;
- private List<String> enabledTools;
- private List<GroupDTO> groupsIsAdmin;
- private List<GroupDTO> groupsIsCollab;
- private String homePage;
- private boolean showDeletedContent;
- private UserSimpleDTO user;
- private GroupDTO userGroup;
- private String userHash;
+ private String chatName;
+ private String chatPassword;
+ private List<String> enabledTools;
+ private Set<GroupDTO> groupsIsAdmin;
+ private Set<GroupDTO> groupsIsCollab;
+ private String homePage;
+ private boolean showDeletedContent;
+ private UserSimpleDTO user;
+ private GroupDTO userGroup;
+ private String userHash;
- public String getChatName() {
- return chatName;
- }
+ public String getChatName() {
+ return chatName;
+ }
- @Deprecated
- public String getChatPassword() {
- return chatPassword;
- }
+ @Deprecated
+ public String getChatPassword() {
+ return chatPassword;
+ }
- public I18nCountryDTO getCountry() {
- return user.getCountry();
- }
+ public I18nCountryDTO getCountry() {
+ return user.getCountry();
+ }
- public List<String> getEnabledTools() {
- return enabledTools;
- }
+ public List<String> getEnabledTools() {
+ return enabledTools;
+ }
- public List<GroupDTO> getGroupsIsAdmin() {
- return groupsIsAdmin;
- }
+ public Set<GroupDTO> getGroupsIsAdmin() {
+ return groupsIsAdmin;
+ }
- public List<GroupDTO> getGroupsIsCollab() {
- return groupsIsCollab;
- }
+ public Set<GroupDTO> getGroupsIsCollab() {
+ return groupsIsCollab;
+ }
- public String getHomePage() {
- return homePage;
- }
+ public String getHomePage() {
+ return homePage;
+ }
- public I18nLanguageDTO getLanguage() {
- return user.getLanguage();
- }
+ public I18nLanguageDTO getLanguage() {
+ return user.getLanguage();
+ }
- public String getName() {
- return user.getName();
- }
+ public String getName() {
+ return user.getName();
+ }
- public String getShortName() {
- return user.getShortName();
- }
+ public String getShortName() {
+ return user.getShortName();
+ }
- public boolean getShowDeletedContent() {
- return showDeletedContent;
- }
+ public boolean getShowDeletedContent() {
+ return showDeletedContent;
+ }
- public UserSimpleDTO getUser() {
- return user;
- }
+ public UserSimpleDTO getUser() {
+ return user;
+ }
- public GroupDTO getUserGroup() {
- return userGroup;
- }
+ public GroupDTO getUserGroup() {
+ return userGroup;
+ }
- public String getUserHash() {
- return userHash;
- }
+ public String getUserHash() {
+ return userHash;
+ }
- public void setChatName(final String chatName) {
- this.chatName = chatName;
- }
+ public void setChatName(final String chatName) {
+ this.chatName = chatName;
+ }
- @Deprecated
- public void setChatPassword(final String password) {
- this.chatPassword = password;
+ @Deprecated
+ public void setChatPassword(final String password) {
+ this.chatPassword = password;
- }
+ }
- public void setEnabledTools(final List<String> enabledTools) {
- this.enabledTools = enabledTools;
- }
+ public void setEnabledTools(final List<String> enabledTools) {
+ this.enabledTools = enabledTools;
+ }
- public void setGroupsIsAdmin(final List<GroupDTO> groupsIsAdmin) {
- this.groupsIsAdmin = groupsIsAdmin;
- }
+ public void setGroupsIsAdmin(final Set<GroupDTO> groupsIsAdmin) {
+ this.groupsIsAdmin = groupsIsAdmin;
+ }
- public void setGroupsIsCollab(final List<GroupDTO> groupsIsCollab) {
- this.groupsIsCollab = groupsIsCollab;
- }
+ public void setGroupsIsCollab(final Set<GroupDTO> groupsIsCollab) {
+ this.groupsIsCollab = groupsIsCollab;
+ }
- public void setHomePage(final String homePage) {
- this.homePage = homePage;
- }
+ public void setHomePage(final String homePage) {
+ this.homePage = homePage;
+ }
- public void setShowDeletedContent(final boolean showDeletedContent) {
- this.showDeletedContent = showDeletedContent;
- }
+ public void setShowDeletedContent(final boolean showDeletedContent) {
+ this.showDeletedContent = showDeletedContent;
+ }
- public void setUser(final UserSimpleDTO user) {
- this.user = user;
- }
+ public void setUser(final UserSimpleDTO user) {
+ this.user = user;
+ }
- public void setUserGroup(final GroupDTO userGroup) {
- this.userGroup = userGroup;
- }
+ public void setUserGroup(final GroupDTO userGroup) {
+ this.userGroup = userGroup;
+ }
- public void setUserHash(final String userHash) {
- this.userHash = userHash;
- }
+ public void setUserHash(final String userHash) {
+ this.userHash = userHash;
+ }
}
Modified: trunk/src/main/java/cc/kune/domain/GroupList.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/GroupList.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/domain/GroupList.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -20,7 +20,8 @@
package cc.kune.domain;
import java.util.ArrayList;
-import java.util.List;
+import java.util.HashSet;
+import java.util.Set;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
@@ -51,18 +52,18 @@
@Fetch(FetchMode.JOIN)
@OrderBy("shortName ASC")
@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
- List<Group> list;
+ Set<Group> list;
@Enumerated(EnumType.STRING)
@Basic
private GroupListMode mode;
public GroupList() {
- this(new ArrayList<Group>());
+ this(new HashSet<Group>());
this.mode = GroupListMode.NORMAL;
}
- public GroupList(final List<Group> list) {
+ public GroupList(final Set<Group> list) {
this.list = list;
}
@@ -78,7 +79,7 @@
}
}
- public boolean checkIfIncludes(final Group group, final List<Group> list, final GroupListMode mode) {
+ public boolean checkIfIncludes(final Group group, final Set<Group> list, final GroupListMode mode) {
switch (mode) {
case NOBODY:
return false;
@@ -97,7 +98,7 @@
return id;
}
- public List<Group> getList() {
+ public Set<Group> getList() {
return list;
}
@@ -125,7 +126,7 @@
this.id = id;
}
- public void setList(final List<Group> list) {
+ public void setList(final Set<Group> list) {
this.list = list;
}
Modified: trunk/src/main/java/cc/kune/domain/finders/GroupFinder.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/finders/GroupFinder.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/domain/finders/GroupFinder.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -20,7 +20,9 @@
package cc.kune.domain.finders;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import cc.kune.domain.Group;
@@ -29,18 +31,21 @@
public interface GroupFinder {
- @Finder(query = "FROM Group g WHERE g.id IN (SELECT g.id FROM g.socialNetwork.accessLists.admins.list adm WHERE adm.id = :groupid)", returnAs = ArrayList.class)
- public List<Group> findAdminInGroups(@Named("groupid") final Long groupId);
+ @Finder(query = "FROM Group g WHERE g.id IN (SELECT g.id "
+ + "FROM g.socialNetwork.accessLists.admins.list adm WHERE adm.id = :groupid)", returnAs = HashSet.class)
+ public Set<Group> findAdminInGroups(@Named("groupid") final Long groupId);
- @Finder(query = "FROM Group g WHERE g.shortName = :shortName")
- public Group findByShortName(@Named("shortName") final String shortName);
+ @Finder(query = "FROM Group g WHERE g.shortName = :shortName")
+ public Group findByShortName(@Named("shortName") final String shortName);
- @Finder(query = "FROM Group g WHERE g.id IN (SELECT g.id FROM g.socialNetwork.accessLists.editors.list AS ed WHERE ed.id = :groupid)", returnAs = ArrayList.class)
- public List<Group> findCollabInGroups(@Named("groupid") final Long groupId);
+ @Finder(query = "FROM Group g WHERE g.id IN (SELECT g.id FROM "
+ + "g.socialNetwork.accessLists.editors.list AS ed WHERE ed.id = :groupid)", returnAs = HashSet.class)
+ public Set<Group> findCollabInGroups(@Named("groupid") final Long groupId);
- @Finder(query = "SELECT t.root.toolName FROM ToolConfiguration t WHERE t.enabled=true AND t.root.owner.id = :groupid", returnAs = ArrayList.class)
- public List<String> findEnabledTools(@Named("groupid") final Long groupId);
+ @Finder(query = "SELECT t.root.toolName FROM ToolConfiguration t "
+ + "WHERE t.enabled=true AND t.root.owner.id = :groupid", returnAs = ArrayList.class)
+ public List<String> findEnabledTools(@Named("groupid") final Long groupId);
- @Finder(query = "FROM Group", returnAs = ArrayList.class)
- public List<Group> getAll();
+ @Finder(query = "FROM Group", returnAs = ArrayList.class)
+ public List<Group> getAll();
}
Modified: trunk/src/main/java/cc/kune/domain/utils/ParticipationData.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/utils/ParticipationData.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/domain/utils/ParticipationData.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -19,37 +19,37 @@
*/
package cc.kune.domain.utils;
-import java.util.List;
+import java.util.Set;
import cc.kune.domain.Group;
public class ParticipationData {
- private List<Group> groupsIsAdmin;
- private List<Group> groupsIsCollab;
+ private Set<Group> groupsIsAdmin;
+ private Set<Group> groupsIsCollab;
- public ParticipationData() {
- this(null, null);
- }
+ public ParticipationData() {
+ this(null, null);
+ }
- public ParticipationData(final List<Group> groupsIsAdmin, final List<Group> groupsIsCollab) {
- this.groupsIsAdmin = groupsIsAdmin;
- this.groupsIsCollab = groupsIsCollab;
- }
+ public ParticipationData(final Set<Group> groupsIsAdmin, final Set<Group> groupsIsCollab) {
+ this.groupsIsAdmin = groupsIsAdmin;
+ this.groupsIsCollab = groupsIsCollab;
+ }
- public List<Group> getGroupsIsAdmin() {
- return groupsIsAdmin;
- }
+ public Set<Group> getGroupsIsAdmin() {
+ return groupsIsAdmin;
+ }
- public List<Group> getGroupsIsCollab() {
- return groupsIsCollab;
- }
+ public Set<Group> getGroupsIsCollab() {
+ return groupsIsCollab;
+ }
- public void setGroupsIsAdmin(final List<Group> groupsIsAdmin) {
- this.groupsIsAdmin = groupsIsAdmin;
- }
+ public void setGroupsIsAdmin(final Set<Group> groupsIsAdmin) {
+ this.groupsIsAdmin = groupsIsAdmin;
+ }
- public void setGroupsIsCollab(final List<Group> groupsIsCollab) {
- this.groupsIsCollab = groupsIsCollab;
- }
+ public void setGroupsIsCollab(final Set<Group> groupsIsCollab) {
+ this.groupsIsCollab = groupsIsCollab;
+ }
}
Modified: trunk/src/main/java/cc/kune/lists/client/ListsClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/ListsClientTool.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/lists/client/ListsClientTool.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -22,8 +22,8 @@
import static cc.kune.lists.shared.ListsConstants.NAME;
import static cc.kune.lists.shared.ListsConstants.ROOT_NAME;
import static cc.kune.lists.shared.ListsConstants.TYPE_LIST;
+import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
import static cc.kune.lists.shared.ListsConstants.TYPE_ROOT;
-import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.nav.NavResources;
import cc.kune.core.shared.i18n.I18nTranslationService;
@@ -60,7 +60,7 @@
registerContentTypeIcon(TYPE_ROOT, navResources.list());
registerContentTypeIcon(TYPE_LIST, navResources.list());
registerContentTypeIcon(TYPE_POST, navResources.email());
- final String noWave = i18n.t("There isn't nothing post yet, create one");
+ final String noWave = i18n.t("There is nothing posted yet. Post something");
final String noList = i18n.t("There isn't any list, create one");
registerEmptyMessages(TYPE_ROOT, noList);
registerEmptyMessages(TYPE_LIST, noWave);
Modified: trunk/src/main/java/cc/kune/msgs/client/UserMessagesPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/msgs/client/UserMessagesPanel.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/main/java/cc/kune/msgs/client/UserMessagesPanel.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -31,24 +31,21 @@
public class UserMessagesPanel extends Composite implements UserMessagesView {
- interface MessagesPanelUiBinder extends UiBinder<Widget, UserMessagesPanel> {
- }
- private static MessagesPanelUiBinder uiBinder = GWT.create(MessagesPanelUiBinder.class);
+ interface MessagesPanelUiBinder extends UiBinder<Widget, UserMessagesPanel> {
+ }
+ private static MessagesPanelUiBinder uiBinder = GWT.create(MessagesPanelUiBinder.class);
- @UiField
- VerticalPanel vp;
+ @UiField
+ VerticalPanel vp;
- public UserMessagesPanel() {
- initWidget(uiBinder.createAndBindUi(this));
- }
+ public UserMessagesPanel() {
+ initWidget(uiBinder.createAndBindUi(this));
+ }
- @Override
- public void add(final NotifyLevel level, final String title, final String message, final String id,
- final boolean closeable, final CloseCallback closeCallback) {
- final UserMessage msg = new UserMessage(level, title, message, id, closeable, closeCallback);
- vp.add(msg);
- // final SlideUp anim = new SlideUp(msg.getElement());
- // anim.setDuration(.5);
- // anim.play();
- }
+ @Override
+ public void add(final NotifyLevel level, final String title, final String message, final String id,
+ final boolean closeable, final CloseCallback closeCallback) {
+ final UserMessage msg = new UserMessage(level, title, message, id, closeable, closeCallback);
+ vp.add(msg);
+ }
}
Modified: trunk/src/test/java/cc/kune/core/server/integration/site/UserServiceTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/site/UserServiceTest.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/test/java/cc/kune/core/server/integration/site/UserServiceTest.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -23,7 +23,8 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
-import java.util.List;
+import java.util.Iterator;
+import java.util.Set;
import org.junit.Before;
import org.junit.Test;
@@ -73,13 +74,12 @@
@Inject
UserService userService;
- private void assertEqualGroupLists(final List<GroupDTO> listDTO, final List<Group> list) {
+ private void assertEqualGroupLists(final Set<GroupDTO> listDTO, final Set<Group> list) {
assertEquals(listDTO.size(), list.size());
- for (int i = 0; i < listDTO.size(); i++) {
- final Object object = listDTO.get(i);
- assertEquals(GroupDTO.class, object.getClass());
- final GroupDTO d = (GroupDTO) object;
- final Group l = list.get(i);
+ final Iterator<Group> ite = list.iterator();
+ for (final GroupDTO groupDTO : listDTO) {
+ final GroupDTO d = groupDTO;
+ final Group l = ite.next();
assertNotNull(d);
assertNotNull(l);
final GroupDTO map = mapper.map(l, GroupDTO.class);
@@ -156,8 +156,8 @@
final UserInfoDTO userInfoDTO = mapper.map(userInfo, UserInfoDTO.class);
assertEquals(userInfo.getName(), userInfoDTO.getName());
assertEquals(userInfo.getChatName(), userInfoDTO.getChatName());
- final List<Group> adminsGroup = userInfo.getGroupsIsAdmin();
- final List<GroupDTO> adminsGroupDTO = userInfoDTO.getGroupsIsAdmin();
+ final Set<Group> adminsGroup = userInfo.getGroupsIsAdmin();
+ final Set<GroupDTO> adminsGroupDTO = userInfoDTO.getGroupsIsAdmin();
assertEqualGroupLists(adminsGroupDTO, adminsGroup);
}
Modified: trunk/src/test/java/cc/kune/core/server/integration/socialnet/SocialNetworkMembersTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/socialnet/SocialNetworkMembersTest.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/test/java/cc/kune/core/server/integration/socialnet/SocialNetworkMembersTest.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -21,7 +21,7 @@
import static org.junit.Assert.assertEquals;
-import java.util.List;
+import java.util.Set;
import org.junit.Before;
import org.junit.Test;
@@ -37,34 +37,34 @@
import com.google.inject.persist.Transactional;
public class SocialNetworkMembersTest extends IntegrationTest {
- @Inject
- UserSession session;
- @Inject
- SocialNetworkManager socialNetManager;
- @Inject
- GroupManager groupFinder;
+ private Group group;
+ @Inject
+ GroupManager groupFinder;
+ @Inject
+ UserSession session;
- private Group group;
+ @Inject
+ SocialNetworkManager socialNetManager;
- @Transactional
- @Before
- public void init() {
- new IntegrationTestHelper(this);
- group = groupFinder.findByShortName(getSiteAdminShortName());
- }
+ @Transactional
+ @Before
+ public void init() {
+ new IntegrationTestHelper(this);
+ group = groupFinder.findByShortName(getSiteAdminShortName());
+ }
- @Test
- public void testAdminMembersOfGroupFinder() throws Exception {
- doLogin();
- final List<Group> result = groupFinder.findAdminInGroups(group.getId());
- assertEquals(2, result.size());
- }
+ @Test
+ public void testAdminMembersOfGroupFinder() throws Exception {
+ doLogin();
+ final Set<Group> result = groupFinder.findAdminInGroups(group.getId());
+ assertEquals(2, result.size());
+ }
- @Test
- public void testCollabMembersOfGroupFinder() throws Exception {
- doLogin();
- final List<Group> result = groupFinder.findCollabInGroups(group.getId());
- assertEquals(0, result.size());
- }
+ @Test
+ public void testCollabMembersOfGroupFinder() throws Exception {
+ doLogin();
+ final Set<Group> result = groupFinder.findCollabInGroups(group.getId());
+ assertEquals(0, result.size());
+ }
}
Modified: trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java 2011-08-11 11:40:45 UTC (rev 1491)
+++ trunk/src/test/java/cc/kune/core/server/mapper/MapperTest.java 2011-08-12 18:33:43 UTC (rev 1492)
@@ -26,7 +26,9 @@
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
+import java.util.Set;
import org.junit.Before;
import org.junit.Ignore;
@@ -86,14 +88,13 @@
}
private void assertValidAccessListsMapping(final GroupList groupList, final GroupListDTO groupListDTO) {
- final List<Group> listOrig = groupList.getList();
- final List<GroupDTO> listDto = groupListDTO.getList();
+ final Set<Group> listOrig = groupList.getList();
+ final Set<GroupDTO> listDto = groupListDTO.getList();
assertEquals(listDto.size(), listOrig.size());
- for (int i = 0; i < listDto.size(); i++) {
- final Object object = listDto.get(i);
- assertEquals(GroupDTO.class, object.getClass());
- final GroupDTO d = (GroupDTO) object;
- final Group g = listOrig.get(i);
+ final Iterator<Group> ite = listOrig.iterator();
+ for (final GroupDTO groupDTO : listDto) {
+ final GroupDTO d = groupDTO;
+ final Group g = ite.next();
assertNotNull(d);
assertNotNull(g);
final GroupDTO map = mapper.map(g, GroupDTO.class);
@@ -324,8 +325,8 @@
assertEquals(SocialNetworkVisibility.onlymembers, map.getSocialNetworkVisibility());
assertEquals(UserSNetVisibility.yourbuddies, map.getUserBuddiesVisibility());
assertEquals("test",
- map.getGroupMembers().getAccessLists().getAdmins().getList().get(0).getShortName());
- assertEquals("test", map.getUserParticipation().getGroupsIsAdmin().get(0).getShortName());
+ map.getGroupMembers().getAccessLists().getAdmins().getList().iterator().next().getShortName());
+ assertEquals("test", map.getUserParticipation().getGroupsIsAdmin().iterator().next().getShortName());
assertEquals("usertest", map.getUserBuddies().getBuddies().get(0).getShortName());
assertFalse(map.getGroupRights().isAdministrable());
assertFalse(map.getGroupRights().isEditable());
1
0
Author: vjrj_
Date: 2011-08-11 13:40:45 +0200 (Thu, 11 Aug 2011)
New Revision: 1491
Added:
trunk/img/icons/text-small.png
trunk/img/icons/text-small.xcf
trunk/src/main/java/cc/kune/core/client/resources/nav/email.png
trunk/src/main/java/cc/kune/core/client/resources/nav/list.png
trunk/src/main/java/cc/kune/core/client/resources/nav/listadd.png
trunk/src/main/java/cc/kune/core/client/resources/nav/newemail.png
trunk/src/main/java/cc/kune/lists/client/ListsClientTool.java
trunk/src/main/java/cc/kune/lists/client/ListsGinModule.java
trunk/src/main/java/cc/kune/lists/client/ListsGinjector.java
trunk/src/main/java/cc/kune/lists/client/ListsParts.java
trunk/src/main/java/cc/kune/lists/client/actions/
trunk/src/main/java/cc/kune/lists/client/actions/DelListMenuItem.java
trunk/src/main/java/cc/kune/lists/client/actions/DelPostMenuItem.java
trunk/src/main/java/cc/kune/lists/client/actions/GoParentFolderBtn.java
trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java
trunk/src/main/java/cc/kune/lists/client/actions/ListsNewMenu.java
trunk/src/main/java/cc/kune/lists/client/actions/NewListBtn.java
trunk/src/main/java/cc/kune/lists/client/actions/NewListMenuItem.java
trunk/src/main/java/cc/kune/lists/client/actions/NewWaveIconBtn.java
trunk/src/main/java/cc/kune/lists/client/actions/NewWaveMenuItem.java
trunk/src/main/java/cc/kune/lists/client/actions/OpenFolderMenuItem.java
trunk/src/main/java/cc/kune/lists/client/actions/SubscribeToListBtn.java
Removed:
trunk/src/main/java/cc/kune/blogs/client/actions/AbstractOptionsMenu.java
trunk/src/main/java/cc/kune/tasks/client/actions/AbstractOptionsMenu.java
Modified:
trunk/TODO
trunk/TODO_done
trunk/img/icons-base.svg
trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java
trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
trunk/src/main/java/cc/kune/client/KuneGinjector.java
trunk/src/main/java/cc/kune/common/client/tooltip/Tooltip.java
trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java
trunk/src/main/java/cc/kune/domain/Content.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptToolsPresenter.java
trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java
trunk/src/main/java/cc/kune/lists/shared/ListsConstants.java
trunk/src/main/webapp/others/kune-client-actions.xml
trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java
Log:
NEW - # 93: List tool
http://kune.ourproject.org/issues/ticket/93
CLOSED - # 88: Create a tasks tool for groups/persons
http://kune.ourproject.org/issues/ticket/88
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/TODO 2011-08-11 11:40:45 UTC (rev 1491)
@@ -12,17 +12,22 @@
nick == assigned to
* SHORT-TERM (URGENT)
-** TODO Wiab EDitor in GSpace
-*** Logged
-**** -Status---
-**** Admins (view plain, create new, participate in all)
-**** Editors (view plain --> create new --> ask for participation)
-**** Viewers (view plain --> ask for participation)
-*** Not logged (view plain wave)
+** TODO Lists tool
+*** title
+*** description!
+*** type
+**** Public
+***** Anyone can read the archives. Anyone can join, but only members can post
+***** In Kune: Viewers: all, Editors: Group members, Admins: Group members
+**** Announcement-only
+***** Anyone can read the archives. Anyone can join, but only managers can post messages.
+***** In Kune: View: all, Editors: view, Admins: r/w
+**** Restricted
+***** People must be invited to join the group and post or read messages. Your group and its archives do not appear in public Google search results or the directory.
+***** In Kune: no
** TODO >> Delete host/room conf in ws.html
** TODO >> kune.properties from cmd line
-** TODO HelloWord with samples of extensions: sitebar, sitebar options menu, siteuseroptions, sn, ...
-** TODO Register of "reserved words" not permitted for groups/users names (in server and in client)
+** TODO HelloWorld with samples of extensions: sitebar, sitebar options menu, siteuseroptions, sn, ...
** WIAB under proxies
https://groups.google.com/group/wave-protocol/browse_thread/thread/202dee4b…
** TODO StateManager #signin while already signed in NPE
Modified: trunk/TODO_done
===================================================================
--- trunk/TODO_done 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/TODO_done 2011-08-11 11:40:45 UTC (rev 1491)
@@ -261,6 +261,28 @@
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)
at java.lang.Thread.run(Thread.java:679)
2011-04-27 16:59:01,904 [qtp2042579307-41] ERROR - Wavelet [WaveletName localhost/w+1v66qilgtl2o6E/localhost/conv+root] couldn't be retrieved
+* TODO Wiab EDitor in GSpace :ARCHIVE:
+ :PROPERTIES:
+ :ARCHIVE_TIME: 2011-08-10 mié 21:59
+ :ARCHIVE_FILE: ~/proyectos/dev/kune/trunk/TODO
+ :ARCHIVE_OLPATH: SHORT-TERM (URGENT)
+ :ARCHIVE_CATEGORY: TODO
+ :ARCHIVE_TODO: TODO
+ :END:
+** Logged
+*** -Status---
+*** Admins (view plain, create new, participate in all)
+*** Editors (view plain --> create new --> ask for participation)
+*** Viewers (view plain --> ask for participation)
+** Not logged (view plain wave)
+* TODO Register of "reserved words" not permitted for groups/users names (in server and in client)
+ :PROPERTIES:
+ :ARCHIVE_TIME: 2011-08-10 mié 22:00
+ :ARCHIVE_FILE: ~/proyectos/dev/kune/trunk/TODO
+ :ARCHIVE_OLPATH: SHORT-TERM (URGENT)
+ :ARCHIVE_CATEGORY: TODO
+ :ARCHIVE_TODO: TODO
+ :END:
@@ -275,3 +297,5 @@
+
+
Added: trunk/img/icons/text-small.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/icons/text-small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/icons/text-small.xcf
===================================================================
(Binary files differ)
Property changes on: trunk/img/icons/text-small.xcf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/img/icons-base.svg
===================================================================
--- trunk/img/icons-base.svg 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/img/icons-base.svg 2011-08-11 11:40:45 UTC (rev 1491)
@@ -28,21 +28,23 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="8.540524"
- inkscape:cx="281.33968"
- inkscape:cy="353.04378"
+ inkscape:zoom="5.4453125"
+ inkscape:cx="303.02471"
+ inkscape:cy="213.02648"
inkscape:document-units="px"
inkscape:current-layer="layer1"
- inkscape:window-width="1080"
- inkscape:window-height="973"
+ inkscape:window-width="1078"
+ inkscape:window-height="897"
inkscape:window-x="0"
- inkscape:window-y="21"
- showgrid="false"
+ inkscape:window-y="947"
+ showgrid="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:grid-points="true"
inkscape:guide-points="true"
- inkscape:window-maximized="0">
+ inkscape:window-maximized="0"
+ inkscape:snap-grids="true"
+ inkscape:snap-bbox="true">
<inkscape:grid
empspacing="1"
empopacity="0.4"
@@ -4693,11 +4695,11 @@
<image
sodipodi:absref="/home/vjrj/proyectos/dev/kune/trunk/img/icons/lock_break.png"
xlink:href="icons/lock_break.png"
- width="16"
+ y="450.82797"
+ x="330.84604"
+ id="image2972"
height="16"
- id="image2972"
- x="330.84604"
- y="450.82797" />
+ width="16" />
<use
x="0"
y="0"
@@ -4788,12 +4790,12 @@
<image
sodipodi:absref="/home/vjrj/proyectos/dev/kune/trunk/img/icons/lock_break.png"
xlink:href="icons/lock_break.png"
- transform="scale(-1,1)"
+ y="432.36218"
+ x="-371"
+ id="image3958"
+ height="16"
width="16"
- height="16"
- id="image3958"
- x="-371"
- y="432.36218" />
+ transform="scale(-1,1)" />
<g
id="g3962"
transform="translate(-43.509019,-21.462476)">
@@ -5528,5 +5530,320 @@
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAQZJREFU OI1j/P//PwMlgIki3cPDABZsggVTo2r+M/wv+/HrO+/nbx8/f/jyrmtb+8UWbGoZ0WMhc0JQg6SM QL2xpgmDjJAqw/6rGxhOXDnM8ODOm94TU56VEPTC1x+fyw009Bn+Mv1l0Jd0ZfjL+JvBQteKgYGB IRubCzAMeP/lLQcrIw+Dn2YuAwMDA0Ox8ywGZTE9BgYGBg6iDHj78dWPq8+OMXTsTmRgYGBg6NiV yHD31SUGBgaGH0QZ8O//v94Tl44xsDGwMGy+PI2BjZGF4ciFgwwMDAxTsRmAEYgMDAwMFjlSHQwM DFkMDAy8DAwMnxkYGKadmPKsgmgDSAEDnxIpNgAAJ+ZYJkBPdSwAAAAASUVORK5CYII= "
height="16"
width="16" />
+ <rect
+ style="opacity:0.76999996;color:#000000;fill:#cccccc;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.0625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect3661"
+ width="16"
+ height="16"
+ x="296.93954"
+ y="754.41309" />
+ <image
+ y="761.23108"
+ x="235.11862"
+ id="image3658"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAXpJREFU
+OI2Nk7GOGjEQhn9veAbSXMRV0FEQcdfQ8BQ810lQ8EQooqOkIykQ27CIBS/rmflTsOuw5CAZaSR7
+rP/7x2PZkYRz7gXAVwBf8DxSAD9JWqyQBIDvRVFkIQQVEX6WRVFwOp1+AHgFkJC8aivAWwhB8zzn
+6XSKeTgcuN/vudvtKCLcbreczWYNCAA4AG8iQu89L5cLvff03vN4PDLLMqZpShHh+Xxmnuecz+cf
+AF5JwlWAoYj8UFUsFguUZYmyLBFCiDmZTBrDaLVa7wCWrdtikiQYjUZxNqoKVYWIIMsymBlEBO12
++w/oFuCcw3K5RAgBIoKyLCEiEWRmGI/HzU7u32k4HDb2dSdmBlWth/4YsFqtICIN51poZvGKDwH9
+fv++FMX1+ilgvV7HwZlZbB0AzAyDweA5oNvtNpzuHe/jL8Bms4nOdd5Cer3eQwABuE6n89SxCqu6
+Y8Ir3lTV1wf/EqvqGYACgKu+8zdcv3PyP/aVOCX56zfInVxa8Hj31gAAAABJRU5ErkJggg==
+"
+ height="16"
+ width="16" />
+ <image
+ y="747.60388"
+ x="265.6059"
+ id="image3628"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAhVJREFU
+OI3Fk7tuE1EQhr85e7xeO15fSBxDHCfCSBEtz8ADUPMEtLwAPTUtHRIF6ZBAiqAIEikAQZ8iSAk2
+MVlfkniztvd6KGzCpU3BSKOZKebX/DP/iDGGq5i6UjegHz39uOsU3TsDP166mCUqM5BhSDNDZgyp
+MWTZvF64QdI4npwPOvsHB7peq7Qe3Nsqh7ERJ2/9hS7/5jKP0zCxpmG6dv9xOFPeOGlHSSbPd3t0
+BhFBaDgaZnRGGd2zjN55hucbBoEhTqE7jHjyqsdpECq33rqlgjCVfE7RvFHmzRePs4uYRlnIWWBb
+gq0FW0O1IAzHEdt7J1SvlVmu5gFETWYJAO3rJdYbZXY+e5z6MSslha3BtqDiCCM/YnvPY2W5TLtZ
+QhbHU8EsnW/TgvZaiXqtyIt3HUZ+RMURXEcY+hHP3naoVIq010oU9B9nDKbzCUQgiRMcnbHRrPL6
+k0d3MKM7mPHyg0erWcW1U5RJsPXvzepJmGKAKEo4Gfm0Gi62naM3cni/P0YBW60ajeUCwSyiN/BZ
+qbkYAxhBT8LEpJkRb+jTqrsUnBwYuLlaZGO1iACy0IYu2uhVl+P+mGm1ACYzOhh9PwyjZPP2ekFK
+BSWiUtSCkohcauCXDkCzWXOzwx9+NO53j3V00T+6+3CnlneXlnTeEq0tlCVYCpQSlF4AyCVtkyZR
+ND0/Hfa/dr7Jf3+mKwP8BP1J+XtVAGrrAAAAAElFTkSuQmCC
+"
+ height="16"
+ width="16" />
+ <image
+ y="749.65729"
+ x="265.74442"
+ id="image3725"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAVRJREFU
+OI2Vk7FqAkEQhr+5XbQULLQLSZvGKuZ9xOIqXyWIFlelVPIcgpAyT2CSRmIhCAHN7ZhJEU9Os8Zk
+YdiF2f3/b2Z3BbgAmoDwcyyAVzP7jOT24ybP8w9VtSJCCLZer20wGPSBK8CZGbEQoK2qjyEEZrMZ
+8/mcEAK1Wo0QAqPR6CHLsjHwdIqmraq22WxsMplYnuf2HxpfqCRJsp9jNK1Wq5emaTPLsrGIHNC0
+C6fpdGq/0RS54XDYBy6BxJdrEZEojaqiqoQQqNfrdDqdnveeNE3vkti1iAjOuYO1c25vUKlU6Ha7
+PaARFSjTOOdIkgTnHNVqldVqxXK53O87KMHMztKICKoaFyhcT4kU+fI+Dyy897d8P+VrVb2P0RTu
+ZSEAb2bPIvLC0V+I0ZT7clCCfduZiLydozkWPm7in2m22+07sJVY53eHLoFGNLnTABZfqoEJ24bE
+i/YAAAAASUVORK5CYII=
+"
+ height="16"
+ width="16" />
+ <image
+ y="-787.57947"
+ x="-342.35602"
+ id="image3857"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAUNJREFU
+OI2lk89qAjEQh79klZ56EuylB0+CXgutz+ET+ADSx+i1CILP1BcQvHr0tIfgrskk00Ob7XaxtX8C
+w8yEzG8+ZohRVf5z7L+qgV47McaYSwXaQTbALXADFD9segD2qpryxV1d12UIIYqIfmd1Xet6vV4B
+I8CqKj2gKIri2ntvY4yoKv1+n0wqIqSU8N4zGAyYz+ePAMvl8tkYswe4z+pVVWlVVXo6nZrYOadl
+WerhcFAR0ePxqM453Ww2K2Bk3gVeYozsdjtCCFhr88BQVWKMeO+ZzWafN9DrPTRbsNYynU67EyfG
+2FhZlqSUEBGGw+GbSLMOY9hut+fWRoyRlFLjx+PxB0X7cZegLZIF8qDPCpwjyCel1AhNJpPfEWSK
+tv2JIAu1G10k6P7Wbm4Wi8WTc+5KRPjKQgiNz7GIoKqnV4ZMMuP74A8FAAAAAElFTkSuQmCC
+"
+ height="16"
+ width="16"
+ transform="scale(-1,-1)" />
+ <image
+ y="771.07178"
+ x="267.13602"
+ id="image3790"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAVZJREFU
+OI2FkbFuwjAQhr9zLNgYGNqtYu5e+j6IgamvUlViYOqz8BLsbScUJBBQhTS+9DqUpE6IykmWLfvu
+8/3/CXAH3ALCZaTAh5l9d7zV8VAUxZeqWrzyPLf5fP4CjABnZnQtgLGq2ul0suPxaLvdztI0NVW1
+LMtssVi8AKOrgDzPLcsyOxwOttls6k5CCAY8Au4sU2KAr3QkSVLv/X6f1WrFer1mMBgA3J/TDEBE
+Gt6M49+qTpbLpRVFYde8qTs4k+tOnHM45wghoKqoKiEEhsMhk8nkyXvPbDZ7du2RiAgignOuAU2S
+BJHfSfd6PabT6RNwcwGIIZUnzrnam/1+z3a7rXMbEqqxVJC2rAqsqt2AqqjrHEuI3zyQeu8f2yqA
+e1V9bcuKQQDezN5E5L0DcBGxLw0JFov/S6zvurxpAK5FuwigLMtPoJTW53HRCLj5h1sC6Q9MlgFW
+OwAOYwAAAABJRU5ErkJggg==
+"
+ height="16"
+ width="16" />
+ <image
+ width="16"
+ height="16"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAXpJREFU
+OI2Nk7GOGjEQhn9veAbSXMRV0FEQcdfQ8BQ810lQ8EQooqOkIykQ27CIBS/rmflTsOuw5CAZaSR7
+rP/7x2PZkYRz7gXAVwBf8DxSAD9JWqyQBIDvRVFkIQQVEX6WRVFwOp1+AHgFkJC8aivAWwhB8zzn
+6XSKeTgcuN/vudvtKCLcbreczWYNCAA4AG8iQu89L5cLvff03vN4PDLLMqZpShHh+Xxmnuecz+cf
+AF5JwlWAoYj8UFUsFguUZYmyLBFCiDmZTBrDaLVa7wCWrdtikiQYjUZxNqoKVYWIIMsymBlEBO12
++w/oFuCcw3K5RAgBIoKyLCEiEWRmGI/HzU7u32k4HDb2dSdmBlWth/4YsFqtICIN51poZvGKDwH9
+fv++FMX1+ilgvV7HwZlZbB0AzAyDweA5oNvtNpzuHe/jL8Bms4nOdd5Cer3eQwABuE6n89SxCqu6
+Y8Ir3lTV1wf/EqvqGYACgKu+8zdcv3PyP/aVOCX56zfInVxa8Hj31gAAAABJRU5ErkJggg==
+"
+ id="image3860"
+ x="281"
+ y="-814.36218"
+ transform="scale(1,-1)" />
+ <image
+ width="16"
+ height="16"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAVRJREFU
+OI2Vk7FqAkEQhr+5XbQULLQLSZvGKuZ9xOIqXyWIFlelVPIcgpAyT2CSRmIhCAHN7ZhJEU9Os8Zk
+YdiF2f3/b2Z3BbgAmoDwcyyAVzP7jOT24ybP8w9VtSJCCLZer20wGPSBK8CZGbEQoK2qjyEEZrMZ
+8/mcEAK1Wo0QAqPR6CHLsjHwdIqmraq22WxsMplYnuf2HxpfqCRJsp9jNK1Wq5emaTPLsrGIHNC0
+C6fpdGq/0RS54XDYBy6BxJdrEZEojaqiqoQQqNfrdDqdnveeNE3vkti1iAjOuYO1c25vUKlU6Ha7
+PaARFSjTOOdIkgTnHNVqldVqxXK53O87KMHMztKICKoaFyhcT4kU+fI+Dyy897d8P+VrVb2P0RTu
+ZSEAb2bPIvLC0V+I0ZT7clCCfduZiLydozkWPm7in2m22+07sJVY53eHLoFGNLnTABZfqoEJ24bE
+i/YAAAAASUVORK5CYII=
+"
+ id="image3862"
+ x="253.74442"
+ y="789.65729" />
+ <g
+ id="g4026"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/list.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <rect
+ style="opacity:0.76999996000000004;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.06250000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect3864"
+ width="16"
+ height="16"
+ x="301"
+ y="798.36218" />
+ <image
+ width="16"
+ height="11"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAABHNCSVQICAgIfAhkiAAAAgNJREFU
+KJFdkrtuE1EQhr85e7zedby+kDiGOCbCSBEtz8ADUPMEtDwAD0BNSYlEQTokkCIogkSKCEGfIkgJ
+NjFZX5J4s7b3eihsEsRIo/mnGc3365fnrw72nJL3cBgkK1fzVOUGcgxZbsiNITOGPF/syzZIliTT
+y2H38OhIN+rV9tPH25UoMeIULf4t+V/LYs6i1JpF2caTF9Fc+ZO0E6e5vNnr0x3GhJHhZJTTHef0
+LnL6lzl+YBiGhiSD3ijm5fs+52GkvEb7vgqjTIoFRetOhY/ffS6uEpoVoWCBbQm2FmwNNVcYTWJ2
+9s+o3aqwWisCiJrOUwA6t8tsNivsfvM5DxLWygpbg21B1RHGQczOvs/aaoVOq4yYBZoK5xkA2oLO
+RplGvcTbz13GQUzVETxHGAUxrz91qVZLdDbKuPrGGxXOFh+IQJqkODrnbqvGh68+veGc3nDOuwOf
+dquGZ2cok2LrG2f1NMowQBynnI0D2k0P2y7QHzt8OZyggO12neaqSziP6Q8D1uoexgBG0NMoNVlu
+xB8FtBserlMAA/fWS9xdLyGALLOhSzZ63eN0MGFWc8HkRofjX8dRnG492HSl7CoRlaGWSCJynYG/
+OQDNVt3Lj38H8WTQO9Xx1eDk0bPdetFbWdFFS7S2UJZgKVBKUHp5QK6xTZbG8ezyfDT40f35B/6e
+83OfcJ+mAAAAAElFTkSuQmCC
+"
+ id="image4023"
+ x="301"
+ y="799.36218" />
+ <image
+ width="16"
+ height="9"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAYAAAA7KqwyAAAABHNCSVQICAgIfAhkiAAAAMZJREFU
+KJGNkr2Kg2AQRc/niC5h+7BFsNPOwtoib553sLST7fYBsgjfHVP4g2sg2QsDw8A9d2AmMOsCfPF/
+CfgBvtNlcB7H8WZmH0DyxuyS7nmeX1dAABIzOwF0XUeMkRgjkraapgl3p23bJMuyT8CAkB7xdV0/
+Ra7mtd/rCdD3PZKIMeLuuDuS5t3daZrmNaAsyz9Jx8Sj9oAJCMMwbMlr7SFVVQH46kkXo0v6NbNT
+URQvEwEk3ZlPSVhmF+DM+xNuDJY/eACnnm1bpLVzVgAAAABJRU5ErkJggg==
+"
+ id="image3993"
+ x="301"
+ y="805.36218" />
+ </g>
+ <g
+ id="g4031"
+ transform="translate(0,17)"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/listadd.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <rect
+ y="798.36218"
+ x="301"
+ height="16"
+ width="16"
+ id="rect4033"
+ style="opacity:0.76999996;color:#000000;fill:none;stroke:none;stroke-width:1.0625;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <image
+ y="799.36218"
+ x="301"
+ id="image4035"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAABHNCSVQICAgIfAhkiAAAAgNJREFU
+KJFdkrtuE1EQhr85e7zedby+kDiGOCbCSBEtz8ADUPMEtDwAD0BNSYlEQTokkCIogkSKCEGfIkgJ
+NjFZX5J4s7b3eihsEsRIo/mnGc3365fnrw72nJL3cBgkK1fzVOUGcgxZbsiNITOGPF/syzZIliTT
+y2H38OhIN+rV9tPH25UoMeIULf4t+V/LYs6i1JpF2caTF9Fc+ZO0E6e5vNnr0x3GhJHhZJTTHef0
+LnL6lzl+YBiGhiSD3ijm5fs+52GkvEb7vgqjTIoFRetOhY/ffS6uEpoVoWCBbQm2FmwNNVcYTWJ2
+9s+o3aqwWisCiJrOUwA6t8tsNivsfvM5DxLWygpbg21B1RHGQczOvs/aaoVOq4yYBZoK5xkA2oLO
+RplGvcTbz13GQUzVETxHGAUxrz91qVZLdDbKuPrGGxXOFh+IQJqkODrnbqvGh68+veGc3nDOuwOf
+dquGZ2cok2LrG2f1NMowQBynnI0D2k0P2y7QHzt8OZyggO12neaqSziP6Q8D1uoexgBG0NMoNVlu
+xB8FtBserlMAA/fWS9xdLyGALLOhSzZ63eN0MGFWc8HkRofjX8dRnG492HSl7CoRlaGWSCJynYG/
+OQDNVt3Lj38H8WTQO9Xx1eDk0bPdetFbWdFFS7S2UJZgKVBKUHp5QK6xTZbG8ezyfDT40f35B/6e
+83OfcJ+mAAAAAElFTkSuQmCC
+"
+ height="11"
+ width="16" />
+ <image
+ y="805.36218"
+ x="301"
+ id="image4037"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAYAAAA7KqwyAAAABHNCSVQICAgIfAhkiAAAAMZJREFU
+KJGNkr2Kg2AQRc/niC5h+7BFsNPOwtoib553sLST7fYBsgjfHVP4g2sg2QsDw8A9d2AmMOsCfPF/
+CfgBvtNlcB7H8WZmH0DyxuyS7nmeX1dAABIzOwF0XUeMkRgjkraapgl3p23bJMuyT8CAkB7xdV0/
+Ra7mtd/rCdD3PZKIMeLuuDuS5t3daZrmNaAsyz9Jx8Sj9oAJCMMwbMlr7SFVVQH46kkXo0v6NbNT
+URQvEwEk3ZlPSVhmF+DM+xNuDJY/eACnnm1bpLVzVgAAAABJRU5ErkJggg==
+"
+ height="9"
+ width="16" />
+ </g>
+ <image
+ width="16"
+ height="16"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAQZJREFU OI1j/P//PwMlgIki3cPDABZsggVTo2r+M/wv+/HrO+/nbx8/f/jyrmtb+8UWbGoZ0WMhc0JQg6SM QL2xpgmDjJAqw/6rGxhOXDnM8ODOm94TU56VEPTC1x+fyw009Bn+Mv1l0Jd0ZfjL+JvBQteKgYGB IRubCzAMeP/lLQcrIw+Dn2YuAwMDA0Ox8ywGZTE9BgYGBg6iDHj78dWPq8+OMXTsTmRgYGBg6NiV yHD31SUGBgaGH0QZ8O//v94Tl44xsDGwMGy+PI2BjZGF4ciFgwwMDAxTsRmAEYgMDAwMFjlSHQwM DFkMDAy8DAwMnxkYGKadmPKsgmgDSAEDnxIpNgAAJ+ZYJkBPdSwAAAAASUVORK5CYII= "
+ id="image4039"
+ x="306"
+ y="819.36218" />
+ <image
+ y="836.36218"
+ x="300"
+ id="image4103"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAqNJREFU
+OI2FkU9oXGUUxX/3e997M5PM2LQlatJMps3CFrqorioUxFKXQkERcas7NxZcqMuKFZRsXNisrBux
+lKBFNCIq6qIbDf5BKKaWtEkmRpMxkzj/3sx73/uui0mCQwNeuJvDufeec66oKvvVe1+tnbWh/SYQ
+IUndC88/MXZlX6Kq3tNvzS5emr2xrkvrXV2r93Ru/m99e/bO1f249wCvf3j7u8/nN7QRe+051dSp
+dlOvN27W9eIHt+9OX18Z/y9fdi28O1d92Ih8f/r4SPTQkWEQodnNADhQMFgDy7UuX/+yxXbHPfXa
+05PXgf6Cdz5ZefnwgWj65t3ari+8glfFOU/iPIdKIa3YocDpkxMsrMYzF5+rvMjlz6rZ3Pym/rnt
+9NUrv+r/1YWZH7URe/3y5y1949pyZtO4VT13arzSSxXv+3ZmfhsMeqGWstrI+OjJPF5BNCPutPj2
+px9W7EbDTSbOc+nqrb2BZycSREAVXOaJDzlasQPyVNfbvPL+Ai+dn6Q0Wq6Ydi+TXGg480gZkb4C
+ERAgMBAGhnwUkI8CVKE4FHHyeJnDIzkAMZ2uA2DqwSJnTh3j8qeLCICAiBAEQhQGDOUsb177nbOP
+nmDqSJGdW9j2zqtsAFPjRXJByvTHdwgDGcghccr5x44SZ+EAbtux25PtUkeSKs88fgwbDhJdmnJr
+tcHY6H3Y0PZBAdPpZSiQJI71epPyAyWiaHAYwIYhR8dK1LebeOdQBVSwnZ7TzKtsbDYpj5Yo5ENQ
+UCDrH0EUPIodirD3l1irNYhHCqBebbv+x1IvcZUTEwUpFoyIyTC7nxDZVboXLFgqB0t+6a9m0qit
+rtmkVVs+d+GLg7nS8LDNBWJtgAmEwIAxgrE7C2TPtmYuSeJ/tjZri9WVfwH1K4zAd92YdQAAAABJ
+RU5ErkJggg==
+"
+ height="16"
+ width="16"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/email.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <image
+ width="16"
+ height="16"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAqNJREFU
+OI2FkU9oXGUUxX/3e997M5PM2LQlatJMps3CFrqorioUxFKXQkERcas7NxZcqMuKFZRsXNisrBux
+lKBFNCIq6qIbDf5BKKaWtEkmRpMxkzj/3sx73/uui0mCQwNeuJvDufeec66oKvvVe1+tnbWh/SYQ
+IUndC88/MXZlX6Kq3tNvzS5emr2xrkvrXV2r93Ru/m99e/bO1f249wCvf3j7u8/nN7QRe+051dSp
+dlOvN27W9eIHt+9OX18Z/y9fdi28O1d92Ih8f/r4SPTQkWEQodnNADhQMFgDy7UuX/+yxXbHPfXa
+05PXgf6Cdz5ZefnwgWj65t3ari+8glfFOU/iPIdKIa3YocDpkxMsrMYzF5+rvMjlz6rZ3Pym/rnt
+9NUrv+r/1YWZH7URe/3y5y1949pyZtO4VT13arzSSxXv+3ZmfhsMeqGWstrI+OjJPF5BNCPutPj2
+px9W7EbDTSbOc+nqrb2BZycSREAVXOaJDzlasQPyVNfbvPL+Ai+dn6Q0Wq6Ydi+TXGg480gZkb4C
+ERAgMBAGhnwUkI8CVKE4FHHyeJnDIzkAMZ2uA2DqwSJnTh3j8qeLCICAiBAEQhQGDOUsb177nbOP
+nmDqSJGdW9j2zqtsAFPjRXJByvTHdwgDGcghccr5x44SZ+EAbtux25PtUkeSKs88fgwbDhJdmnJr
+tcHY6H3Y0PZBAdPpZSiQJI71epPyAyWiaHAYwIYhR8dK1LebeOdQBVSwnZ7TzKtsbDYpj5Yo5ENQ
+UCDrH0EUPIodirD3l1irNYhHCqBebbv+x1IvcZUTEwUpFoyIyTC7nxDZVboXLFgqB0t+6a9m0qit
+rtmkVVs+d+GLg7nS8LDNBWJtgAmEwIAxgrE7C2TPtmYuSeJ/tjZri9WVfwH1K4zAd92YdQAAAABJ
+RU5ErkJggg==
+"
+ id="image4106"
+ x="300"
+ y="856.36218"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/newemail.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <image
+ y="860.36218"
+ x="305"
+ id="image4108"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAQZJREFU OI1j/P//PwMlgIki3cPDABZsggVTo2r+M/wv+/HrO+/nbx8/f/jyrmtb+8UWbGoZ0WMhc0JQg6SM QL2xpgmDjJAqw/6rGxhOXDnM8ODOm94TU56VEPTC1x+fyw009Bn+Mv1l0Jd0ZfjL+JvBQteKgYGB IRubCzAMeP/lLQcrIw+Dn2YuAwMDA0Ox8ywGZTE9BgYGBg6iDHj78dWPq8+OMXTsTmRgYGBg6NiV yHD31SUGBgaGH0QZ8O//v94Tl44xsDGwMGy+PI2BjZGF4ciFgwwMDAxTsRmAEYgMDAwMFjlSHQwM DFkMDAy8DAwMnxkYGKadmPKsgmgDSAEDnxIpNgAAJ+ZYJkBPdSwAAAAASUVORK5CYII= "
+ height="16"
+ width="16" />
+ <g
+ id="g4110"
+ transform="translate(0,-17)">
+ <rect
+ y="798.36218"
+ x="301"
+ height="16"
+ width="16"
+ id="rect4112"
+ style="opacity:0.76999996;color:#000000;fill:none;stroke:none;stroke-width:1.0625;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <image
+ y="799.36218"
+ x="301"
+ id="image4114"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAABHNCSVQICAgIfAhkiAAAAgNJREFU
+KJFdkrtuE1EQhr85e7zedby+kDiGOCbCSBEtz8ADUPMEtDwAD0BNSYlEQTokkCIogkSKCEGfIkgJ
+NjFZX5J4s7b3eihsEsRIo/mnGc3365fnrw72nJL3cBgkK1fzVOUGcgxZbsiNITOGPF/syzZIliTT
+y2H38OhIN+rV9tPH25UoMeIULf4t+V/LYs6i1JpF2caTF9Fc+ZO0E6e5vNnr0x3GhJHhZJTTHef0
+LnL6lzl+YBiGhiSD3ijm5fs+52GkvEb7vgqjTIoFRetOhY/ffS6uEpoVoWCBbQm2FmwNNVcYTWJ2
+9s+o3aqwWisCiJrOUwA6t8tsNivsfvM5DxLWygpbg21B1RHGQczOvs/aaoVOq4yYBZoK5xkA2oLO
+RplGvcTbz13GQUzVETxHGAUxrz91qVZLdDbKuPrGGxXOFh+IQJqkODrnbqvGh68+veGc3nDOuwOf
+dquGZ2cok2LrG2f1NMowQBynnI0D2k0P2y7QHzt8OZyggO12neaqSziP6Q8D1uoexgBG0NMoNVlu
+xB8FtBserlMAA/fWS9xdLyGALLOhSzZ63eN0MGFWc8HkRofjX8dRnG492HSl7CoRlaGWSCJynYG/
+OQDNVt3Lj38H8WTQO9Xx1eDk0bPdetFbWdFFS7S2UJZgKVBKUHp5QK6xTZbG8ezyfDT40f35B/6e
+83OfcJ+mAAAAAElFTkSuQmCC
+"
+ height="11"
+ width="16" />
+ <image
+ y="805.36218"
+ x="301"
+ id="image4116"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAJCAYAAAA7KqwyAAAABHNCSVQICAgIfAhkiAAAAMZJREFU
+KJGNkr2Kg2AQRc/niC5h+7BFsNPOwtoib553sLST7fYBsgjfHVP4g2sg2QsDw8A9d2AmMOsCfPF/
+CfgBvtNlcB7H8WZmH0DyxuyS7nmeX1dAABIzOwF0XUeMkRgjkraapgl3p23bJMuyT8CAkB7xdV0/
+Ra7mtd/rCdD3PZKIMeLuuDuS5t3daZrmNaAsyz9Jx8Sj9oAJCMMwbMlr7SFVVQH46kkXo0v6NbNT
+URQvEwEk3ZlPSVhmF+DM+xNuDJY/eACnnm1bpLVzVgAAAABJRU5ErkJggg==
+"
+ height="9"
+ width="16" />
+ </g>
+ <path
+ inkscape:connector-curvature="0"
+ style="color:#000000;fill:#ff5555;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.06250000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 313.22393,788.31216 -5.61351,5.05002 -1.81751,-2.09221 -2.22424,2.28085 c 1.60629,1.4242 2.80319,2.43911 4.13653,3.80876 2.24198,-2.10143 4.53857,-3.76628 6.97148,-5.34924 -0.3707,-1.58182 -0.85095,-2.67256 -1.45275,-3.69818 z"
+ id="path4118"
+ sodipodi:nodetypes="ccccccc"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/task.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
</g>
</svg>
Deleted: trunk/src/main/java/cc/kune/blogs/client/actions/AbstractOptionsMenu.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/client/actions/AbstractOptionsMenu.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/blogs/client/actions/AbstractOptionsMenu.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -1,32 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.blogs.client.actions;
-
-import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
-import cc.kune.core.client.resources.CoreResources;
-
-public abstract class AbstractOptionsMenu extends MenuDescriptor {
-
- public AbstractOptionsMenu(final CoreResources res) {
- super();
- this.withIcon(res.arrowDownBlack()).withStyles("k-fr");
- }
-
-}
Modified: trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -53,7 +53,7 @@
public BlogsClientActions(final I18nUITranslationService i18n, final Session session,
final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
final Provider<GoParentBlogBtn> folderGoUp, final Provider<NewPostMenuItem> newPostItem,
- final Provider<NewPostIconBtn> newPostIconBtn, final Provider<NewBlogBtn> newFolderBtn,
+ final Provider<NewPostIconBtn> newPostIconBtn, final Provider<NewBlogBtn> newBlogBtn,
final Provider<OpenBlogMenuItem> openContentMenuItem,
final Provider<DelPostMenuItem> delContentMenuItem,
final Provider<RefreshContentMenuItem> refresh,
@@ -68,7 +68,7 @@
actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
actionsRegistry.addAction(ActionGroups.TOOLBAR, newPostItem, containersNoRoot);
actionsRegistry.addAction(ActionGroups.TOOLBAR, newPostIconBtn, noRoot);
- actionsRegistry.addAction(ActionGroups.TOOLBAR, newFolderBtn, TYPE_ROOT);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newBlogBtn, TYPE_ROOT);
actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, containers);
actionsRegistry.addAction(ActionGroups.TOOLBAR, participateBtn, contents);
Modified: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -79,12 +79,13 @@
/* Tools (order in GUI) */
ginjector.getDocsParts();
+ ginjector.getBartersParts();
ginjector.getBlogsParts();
- ginjector.getWikiParts();
ginjector.getChatParts();
- ginjector.getBartersParts();
+ ginjector.getListsParts();
ginjector.getMeetingsParts();
ginjector.getTasksParts();
+ ginjector.getWikiParts();
ginjector.getSiteLogoPresenter();
ginjector.getSpacesTabPresenter();
Modified: trunk/src/main/java/cc/kune/client/KuneGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -56,6 +56,8 @@
import cc.kune.docs.client.DocsGinjector;
import cc.kune.gspace.client.GSpaceGinModule;
import cc.kune.gspace.client.GSpaceGinjector;
+import cc.kune.lists.client.ListsGinModule;
+import cc.kune.lists.client.ListsGinjector;
import cc.kune.meets.client.MeetingsGinModule;
import cc.kune.meets.client.MeetingsGinjector;
import cc.kune.pspace.client.PSpaceGinModule;
@@ -77,9 +79,10 @@
@GinModules({ KuneGinModule.class, CoreGinModule.class, WaveGinModule.class, PSpaceGinModule.class,
GSpaceGinModule.class, DocsGinModule.class, BlogsGinModule.class, ChatGinModule.class,
- WikiGinModule.class, BartersGinModule.class, MeetingsGinModule.class, TasksGinModule.class })
+ WikiGinModule.class, BartersGinModule.class, MeetingsGinModule.class, TasksGinModule.class,
+ ListsGinModule.class })
public interface KuneGinjector extends Ginjector, GSpaceGinjector, DocsGinjector, BlogsGinjector,
- WikiGinjector, BartersGinjector, MeetingsGinjector, ChatGinjector, TasksGinjector {
+ WikiGinjector, BartersGinjector, MeetingsGinjector, ChatGinjector, TasksGinjector, ListsGinjector {
/*
* You have to add here all the GWTPresenters (as Provider or AsyncProvider)
Modified: trunk/src/main/java/cc/kune/common/client/tooltip/Tooltip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/tooltip/Tooltip.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/common/client/tooltip/Tooltip.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -134,6 +134,7 @@
public void hide() {
super.hide();
timers.cancel();
+ Tooltip.current = null;
}
@Override
Modified: trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -45,6 +45,9 @@
@Source("download.png")
ImageResource download();
+ @Source("email.png")
+ ImageResource email();
+
@Source("film.png")
ImageResource film();
@@ -63,9 +66,18 @@
@Source("go.png")
ImageResource go();
+ @Source("list.png")
+ ImageResource list();
+
+ @Source("listadd.png")
+ ImageResource listadd();
+
@Source("music.png")
ImageResource music();
+ @Source("newemail.png")
+ ImageResource newemail();
+
@Source("page.png")
ImageResource page();
Added: trunk/src/main/java/cc/kune/core/client/resources/nav/email.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nav/email.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/resources/nav/list.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nav/list.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/resources/nav/listadd.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nav/listadd.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/resources/nav/newemail.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nav/newemail.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/cc/kune/domain/Content.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/Content.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/domain/Content.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -58,6 +58,7 @@
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.docs.shared.DocsConstants;
import cc.kune.domain.utils.HasStateToken;
+import cc.kune.lists.shared.ListsConstants;
import cc.kune.meets.shared.MeetingsConstants;
import cc.kune.tasks.shared.TasksConstants;
import cc.kune.wiki.shared.WikiConstants;
@@ -266,6 +267,7 @@
public boolean isWave() {
return (typeId.equals(DocsConstants.TYPE_DOCUMENT))
|| typeId.equals(TasksConstants.TYPE_TASK)
+ || typeId.equals(ListsConstants.TYPE_POST)
|| typeId.equals(WikiConstants.TYPE_WIKIPAGE)
|| (typeId.equals(BlogsConstants.TYPE_POST) || typeId.equals(BartersConstants.TYPE_BARTER) || typeId.equals(MeetingsConstants.TYPE_MEETING));
}
Modified: trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptToolsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptToolsPresenter.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptToolsPresenter.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -89,7 +89,7 @@
if (enabledTools.contains(toolName)) {
// FIXME uncomment this when fixed
// setToolCheckedInServer(checked, toolName);
- // gotoDifLocationIfNecessary(toolName);
+ gotoDifLocationIfNecessary(toolName);
}
}
}
@@ -139,7 +139,7 @@
@Override
public void onSuccess(final Void result) {
- stateManager.refreshCurrentState();
+ stateManager.refreshCurrentStateWithoutCache();
// view.unmask();
}
});
Added: trunk/src/main/java/cc/kune/lists/client/ListsClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/ListsClientTool.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/ListsClientTool.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,70 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client;
+
+import static cc.kune.lists.shared.ListsConstants.NAME;
+import static cc.kune.lists.shared.ListsConstants.ROOT_NAME;
+import static cc.kune.lists.shared.ListsConstants.TYPE_LIST;
+import static cc.kune.lists.shared.ListsConstants.TYPE_ROOT;
+import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
+import cc.kune.gspace.client.tool.selector.ToolSelector;
+
+import com.google.inject.Inject;
+
+public class ListsClientTool extends FoldableAbstractClientTool {
+
+ @Inject
+ public ListsClientTool(final I18nTranslationService i18n, final ToolSelector toolSelector,
+ final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources) {
+ super(NAME, i18n.t(ROOT_NAME), toolSelector, cntCapRegistry, i18n, navResources);
+
+ // registerAclEditableTypes();
+ registerAuthorableTypes(TYPE_POST);
+ registerDragableTypes();
+ registerDropableTypes();
+ registerPublishModerableTypes();
+ registerRateableTypes(TYPE_POST);
+ registerRenamableTypes(TYPE_LIST, TYPE_POST);
+ registerTageableTypes(TYPE_LIST, TYPE_POST);
+ // registerTranslatableTypes();
+ registerIcons();
+ }
+
+ @Override
+ public String getName() {
+ return NAME;
+ }
+
+ private void registerIcons() {
+ registerContentTypeIcon(TYPE_ROOT, navResources.list());
+ registerContentTypeIcon(TYPE_LIST, navResources.list());
+ registerContentTypeIcon(TYPE_POST, navResources.email());
+ final String noWave = i18n.t("There isn't nothing post yet, create one");
+ final String noList = i18n.t("There isn't any list, create one");
+ registerEmptyMessages(TYPE_ROOT, noList);
+ registerEmptyMessages(TYPE_LIST, noWave);
+ // registerShowDeleted();
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/ListsGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/ListsGinModule.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/ListsGinModule.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client;
+
+import cc.kune.common.client.ExtendedGinModule;
+import cc.kune.lists.client.actions.ListsClientActions;
+import cc.kune.lists.client.actions.ListsNewMenu;
+
+public class ListsGinModule extends ExtendedGinModule {
+
+ @Override
+ protected void configure() {
+ s(ListsNewMenu.class);
+ s(ListsClientTool.class);
+ s(ListsClientActions.class);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/ListsGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/ListsGinjector.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/ListsGinjector.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client;
+
+import com.google.gwt.inject.client.Ginjector;
+
+public interface ListsGinjector extends Ginjector {
+
+ ListsParts getListsParts();
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/ListsParts.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/ListsParts.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/ListsParts.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client;
+
+import cc.kune.core.client.state.Session;
+import cc.kune.gspace.client.tool.ContentViewerSelector;
+import cc.kune.gspace.client.viewers.ContentViewerPresenter;
+import cc.kune.gspace.client.viewers.FolderViewerPresenter;
+import cc.kune.lists.client.actions.ListsClientActions;
+import cc.kune.lists.shared.ListsConstants;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class ListsParts {
+
+ @Inject
+ public ListsParts(final Session session, final Provider<ListsClientTool> clientTool,
+ final ContentViewerSelector viewerSelector, final ListsClientActions listsActions,
+ final ContentViewerPresenter contentViewer, final FolderViewerPresenter folderViewer) {
+ clientTool.get();
+ viewerSelector.register(contentViewer, true, ListsConstants.TYPE_POST);
+ viewerSelector.register(folderViewer, true, ListsConstants.TYPE_ROOT, ListsConstants.TYPE_LIST);
+ }
+}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/lists/client/actions/DelListMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/DelListMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/DelListMenuItem.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.DelContainerMenuItem;
+
+import com.google.inject.Inject;
+
+public class DelListMenuItem extends DelContainerMenuItem {
+
+ @Inject
+ public DelListMenuItem(final I18nTranslationService i18n, final DelContainerAction action, final CoreResources res) {
+ super(i18n, action, res);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/DelPostMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/DelPostMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/DelPostMenuItem.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,34 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.DelContentMenuItem;
+
+import com.google.inject.Inject;
+
+public class DelPostMenuItem extends DelContentMenuItem {
+
+ @Inject
+ public DelPostMenuItem(final I18nTranslationService i18n, final DelContentAction action, final CoreResources res) {
+ super(i18n, action, res);
+ }
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/GoParentFolderBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/GoParentFolderBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/GoParentFolderBtn.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.GoParentContainerBtn;
+import cc.kune.lists.shared.ListsConstants;
+
+import com.google.inject.Inject;
+
+public class GoParentFolderBtn extends GoParentContainerBtn {
+
+ @Inject
+ public GoParentFolderBtn(final I18nTranslationService i18n, final GoParentContainerAction action,
+ final CoreResources res, final Session session) {
+ super(i18n, action, res, session, ListsConstants.TYPE_ROOT);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,85 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.lists.client.actions;
+
+import static cc.kune.lists.shared.ListsConstants.TYPE_LIST;
+import static cc.kune.lists.shared.ListsConstants.TYPE_ROOT;
+import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
+import cc.kune.chat.client.actions.ChatAboutContentBtn;
+import cc.kune.core.client.actions.ActionRegistryByType;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.NewMenusForTypeIdsRegistry;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.gspace.client.actions.AbstractFoldableToolActions;
+import cc.kune.gspace.client.actions.ActionGroups;
+import cc.kune.gspace.client.actions.ContentViewerOptionsMenu;
+import cc.kune.gspace.client.actions.ParticipateInContentBtn;
+import cc.kune.gspace.client.actions.RefreshContentMenuItem;
+import cc.kune.gspace.client.actions.SetAsHomePageMenuItem;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class ListsClientActions extends AbstractFoldableToolActions {
+
+ final String[] all = { TYPE_ROOT, TYPE_LIST, TYPE_POST };
+ final String[] containers = { TYPE_ROOT, TYPE_LIST };
+ final String[] containersNoRoot = { TYPE_LIST };
+ final String[] contents = { TYPE_POST };
+ final String[] noRoot = { TYPE_LIST, TYPE_POST };
+
+ @Inject
+ public ListsClientActions(final I18nUITranslationService i18n, final Session session,
+ final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
+ final Provider<GoParentFolderBtn> folderGoUp, final Provider<NewWaveMenuItem> newWaveItem,
+ final Provider<NewWaveIconBtn> newWaveIconBtn, final Provider<NewListMenuItem> newListMenuItem,
+ final Provider<NewListBtn> newListBtn, final Provider<OpenFolderMenuItem> openContentMenuItem,
+ final Provider<RefreshContentMenuItem> refresh, final Provider<SubscribeToListBtn> subscribeBtn,
+ final Provider<ContentViewerOptionsMenu> optionsMenuContent,
+ final Provider<ParticipateInContentBtn> participateBtn, final ListsNewMenu listNewMenu,
+ final NewMenusForTypeIdsRegistry newMenusRegistry, final Provider<ChatAboutContentBtn> chatAbout,
+ final Provider<DelListMenuItem> delFolderMenuItem,
+ final Provider<SetAsHomePageMenuItem> setAsHomePage) {
+ super(session, stateManager, i18n, registry);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, optionsMenuContent, all);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, listNewMenu, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, subscribeBtn, containersNoRoot);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newWaveItem, containersNoRoot);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newWaveIconBtn, noRoot);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newListMenuItem, TYPE_ROOT);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newListBtn, TYPE_ROOT);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, participateBtn, contents);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, chatAbout, contents);
+ actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, contents);
+ actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, containersNoRoot);
+ actionsRegistry.addAction(ActionGroups.ITEM_MENU, delFolderMenuItem, containersNoRoot);
+ newMenusRegistry.register(TYPE_LIST, listNewMenu.get());
+ newMenusRegistry.register(TYPE_ROOT, listNewMenu.get());
+ }
+
+ @Override
+ protected void createPostSessionInitActions() {
+ }
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/ListsNewMenu.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/ListsNewMenu.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/ListsNewMenu.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,34 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.gspace.client.actions.AbstractNewMenu;
+import cc.kune.gspace.client.actions.NewMenuProvider;
+
+import com.google.inject.Inject;
+
+public class ListsNewMenu extends NewMenuProvider {
+
+ @Inject
+ public ListsNewMenu(final AbstractNewMenu menu) {
+ super(menu);
+ }
+
+}
Copied: trunk/src/main/java/cc/kune/lists/client/actions/NewListBtn.java (from rev 1489, trunk/src/main/java/cc/kune/blogs/client/actions/NewBlogBtn.java)
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewListBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewListBtn.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.NewContainerBtn;
+import cc.kune.lists.shared.ListsConstants;
+
+import com.google.inject.Inject;
+
+public class NewListBtn extends NewContainerBtn {
+
+ @Inject
+ public NewListBtn(final I18nTranslationService i18n, final NewContainerAction action,
+ final NavResources res) {
+ super(i18n, action, res.listadd(), i18n.t("New list"), i18n.t("Create a new list"),
+ i18n.t("New list"), ListsConstants.TYPE_LIST);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/NewListMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewListMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewListMenuItem.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.NewContainerMenuItem;
+import cc.kune.lists.shared.ListsConstants;
+
+import com.google.inject.Inject;
+
+public class NewListMenuItem extends NewContainerMenuItem {
+
+ @Inject
+ public NewListMenuItem(final I18nTranslationService i18n, final NewContainerAction action,
+ final NavResources res, final ListsNewMenu newMenu) {
+ super(i18n, action, res.listadd(), i18n.t("New list"), i18n.t("Create a list"), i18n.t("New list"),
+ ListsConstants.TYPE_LIST, newMenu.get());
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/NewWaveIconBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewWaveIconBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewWaveIconBtn.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.NewContentAction;
+import cc.kune.gspace.client.actions.NewContentBtn;
+import cc.kune.lists.shared.ListsConstants;
+
+import com.google.inject.Inject;
+
+public class NewWaveIconBtn extends NewContentBtn {
+
+ @Inject
+ public NewWaveIconBtn(final I18nTranslationService i18n, final NewContentAction action,
+ final NavResources res, final GlobalShortcutRegister shorcutReg) {
+ super(i18n, action, res.newemail(), shorcutReg, "", i18n.t("Create a new post"), i18n.t("New post"),
+ ListsConstants.TYPE_POST);
+ withStyles("k-btn-min, k-fl");
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/NewWaveMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/NewWaveMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/NewWaveMenuItem.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.NewContentAction;
+import cc.kune.gspace.client.actions.NewContentMenuItem;
+import cc.kune.lists.shared.ListsConstants;
+
+import com.google.inject.Inject;
+
+public class NewWaveMenuItem extends NewContentMenuItem {
+
+ @Inject
+ public NewWaveMenuItem(final I18nTranslationService i18n, final NewContentAction action,
+ final NavResources res, final GlobalShortcutRegister shorcutReg, final ListsNewMenu listsNewMenu) {
+ super(i18n, action, res.newemail(), shorcutReg, i18n.t("New post"), i18n.t("Create a new post"),
+ i18n.t("New post"), ListsConstants.TYPE_POST, listsNewMenu.get());
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/OpenFolderMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/OpenFolderMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/OpenFolderMenuItem.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.OpenContentMenuItem;
+
+import com.google.inject.Inject;
+
+public class OpenFolderMenuItem extends OpenContentMenuItem {
+
+ @Inject
+ public OpenFolderMenuItem(final I18nTranslationService i18n, final OpenContentAction action, final NavResources res) {
+ super(i18n, action, res);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/lists/client/actions/SubscribeToListBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/SubscribeToListBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/client/actions/SubscribeToListBtn.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -0,0 +1,40 @@
+package cc.kune.lists.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class SubscribeToListBtn extends ButtonDescriptor {
+
+ public static class SubscriteToListAction extends RolAction {
+
+ private final I18nTranslationService i18n;
+
+ @Inject
+ public SubscriteToListAction(final I18nTranslationService i18n) {
+ super(AccessRolDTO.Editor, true);
+ this.i18n = i18n;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ NotifyUser.info(i18n.t(TextUtils.IN_DEVELOPMENT));
+ }
+
+ }
+
+ @Inject
+ public SubscribeToListBtn(final I18nTranslationService i18n, final SubscriteToListAction action,
+ final CoreResources res) {
+ super(action);
+ withText(i18n.t("Subscribe")).withIcon(res.add()).withToolTip(
+ i18n.t("Subscribe yourself to this list"));
+ }
+}
Modified: trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -23,7 +23,7 @@
import static cc.kune.lists.shared.ListsConstants.ROOT_NAME;
import static cc.kune.lists.shared.ListsConstants.TYPE_LIST;
import static cc.kune.lists.shared.ListsConstants.TYPE_ROOT;
-import static cc.kune.lists.shared.ListsConstants.TYPE_WAVE;
+import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
import java.util.Arrays;
@@ -43,7 +43,7 @@
@Inject
public ListsServerTool(final ContentManager contentManager, final ContainerManager containerManager,
final ToolConfigurationManager configurationManager, final I18nTranslationService i18n) {
- super(NAME, ROOT_NAME, TYPE_ROOT, Arrays.asList(TYPE_WAVE), Arrays.asList(TYPE_LIST),
+ super(NAME, ROOT_NAME, TYPE_ROOT, Arrays.asList(TYPE_POST), Arrays.asList(TYPE_LIST),
Arrays.asList(TYPE_LIST), Arrays.asList(TYPE_ROOT), contentManager, containerManager,
configurationManager, i18n, ServerToolTarget.forGroups);
}
Modified: trunk/src/main/java/cc/kune/lists/shared/ListsConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/shared/ListsConstants.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/lists/shared/ListsConstants.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -24,8 +24,8 @@
public static final String NAME = "lists";
public static final String ROOT_NAME = "lists";
public static final String TYPE_LIST = NAME + "." + "list";
+ public static final String TYPE_POST = NAME + "." + "post";
public static final String TYPE_ROOT = NAME + "." + "root";
- public static final String TYPE_WAVE = NAME + "." + "wave";
private ListsConstants() {
}
Deleted: trunk/src/main/java/cc/kune/tasks/client/actions/AbstractOptionsMenu.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/AbstractOptionsMenu.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/AbstractOptionsMenu.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -1,32 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.tasks.client.actions;
-
-import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
-import cc.kune.core.client.resources.CoreResources;
-
-public abstract class AbstractOptionsMenu extends MenuDescriptor {
-
- public AbstractOptionsMenu(final CoreResources res) {
- super();
- this.withIcon(res.arrowDownBlack()).withStyles("k-fr");
- }
-
-}
Modified: trunk/src/main/webapp/others/kune-client-actions.xml
===================================================================
--- trunk/src/main/webapp/others/kune-client-actions.xml 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/main/webapp/others/kune-client-actions.xml 2011-08-11 11:40:45 UTC (rev 1491)
@@ -227,6 +227,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -253,6 +254,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -279,6 +281,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -304,6 +307,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -332,6 +336,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -377,6 +382,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -408,6 +414,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -434,6 +441,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -460,6 +468,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -486,6 +495,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -514,6 +524,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -542,6 +553,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -567,6 +579,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -596,6 +609,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -623,6 +637,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -648,6 +663,7 @@
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -668,12 +684,14 @@
</description>
<new-content-title>New Vector Image</new-content-title>
<new-content-textintro>With this gadget you can make a vector
- image with others in real-time</new-content-textintro>
+ image with others in real-time
+ </new-content-textintro>
<enabled>true</enabled>
<typeIds>
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
@@ -694,12 +712,17 @@
</description>
<new-content-title>New Barter</new-content-title>
<new-content-textintro>With this gadget you can propose barters to
- others. Fill up with something you want to give or you something you are looking for, and share with your groups or with the general public. Also you can write more details instead of this text. </new-content-textintro>
+ others. Fill up with something you want to give or you something
+ you are looking for, and share with your groups or with the
+ general public. Also you can write more details instead of this
+ text.
+ </new-content-textintro>
<enabled>true</enabled>
<typeIds>
<typeId origTypeId="docs.folder" destTypeId="docs.doc"/>
<typeId origTypeId="docs.root" destTypeId="docs.doc"/>
<typeId origTypeId="blogs.blog" destTypeId="blogs.post"/>
+ <typeId origTypeId="lists.list" destTypeId="lists.post"/>
</typeIds>
<rol>
<!-- Administrator, Editor, Viewer -->
Modified: trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java
===================================================================
--- trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java 2011-08-11 08:36:59 UTC (rev 1490)
+++ trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java 2011-08-11 11:40:45 UTC (rev 1491)
@@ -21,7 +21,7 @@
import static cc.kune.lists.shared.ListsConstants.TYPE_LIST;
import static cc.kune.lists.shared.ListsConstants.TYPE_ROOT;
-import static cc.kune.lists.shared.ListsConstants.TYPE_WAVE;
+import static cc.kune.lists.shared.ListsConstants.TYPE_POST;
import org.junit.Before;
import org.junit.Test;
@@ -50,12 +50,12 @@
@Test
public void testCreateContentInCorrectContainer() {
- serverTool.checkTypesBeforeContentCreation(TYPE_LIST, TYPE_WAVE);
+ serverTool.checkTypesBeforeContentCreation(TYPE_LIST, TYPE_POST);
}
@Test(expected = ContentNotPermittedException.class)
public void testCreateContentInIncorrectContainer1() {
- serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_WAVE);
+ serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_POST);
}
}
\ No newline at end of file
1
0
r1490 - in kune-sandbox: . .settings src/cc/kune/sandbox/client
by Vicente J. Ruiz Jurado 11 Aug '11
by Vicente J. Ruiz Jurado 11 Aug '11
11 Aug '11
Author: vjrj_
Date: 2011-08-11 10:36:59 +0200 (Thu, 11 Aug 2011)
New Revision: 1490
Removed:
kune-sandbox/.gwt/
kune-sandbox/src/cc/kune/sandbox/client/CSSBasicUtils.java
Modified:
kune-sandbox/
kune-sandbox/.classpath
kune-sandbox/.project
kune-sandbox/.settings/com.google.gwt.eclipse.core.prefs
kune-sandbox/src/cc/kune/sandbox/client/KuneSandboxEntryPoint.java
Log:
Sandbox updated
Property changes on: kune-sandbox
___________________________________________________________________
Name: svn:ignore
- test-classes
+ test-classes
.recommenders
.gwt
Modified: kune-sandbox/.classpath
===================================================================
--- kune-sandbox/.classpath 2011-08-11 00:58:21 UTC (rev 1489)
+++ kune-sandbox/.classpath 2011-08-11 08:36:59 UTC (rev 1490)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
+ <classpathentry excluding="**/*.java" kind="src" path="splash-src"/>
<classpathentry kind="src" output="test-classes" path="test"/>
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
Modified: kune-sandbox/.project
===================================================================
--- kune-sandbox/.project 2011-08-11 00:58:21 UTC (rev 1489)
+++ kune-sandbox/.project 2011-08-11 08:36:59 UTC (rev 1490)
@@ -21,9 +21,27 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.recommenders.rcp.analysis.RecommendersBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
+ <nature>org.eclipse.recommenders.rcp.analysis.RecommendersNature</nature>
</natures>
+ <linkedResources>
+ <link>
+ <name>splash-src</name>
+ <type>2</type>
+ <location>/home/vjrj/proyectos/dev/wave/splash/src</location>
+ </link>
+ <link>
+ <name>src-1</name>
+ <type>2</type>
+ <location>/home/vjrj/proyectos/dev/wave/splash/src</location>
+ </link>
+ </linkedResources>
</projectDescription>
Modified: kune-sandbox/.settings/com.google.gwt.eclipse.core.prefs
===================================================================
--- kune-sandbox/.settings/com.google.gwt.eclipse.core.prefs 2011-08-11 00:58:21 UTC (rev 1489)
+++ kune-sandbox/.settings/com.google.gwt.eclipse.core.prefs 2011-08-11 08:36:59 UTC (rev 1490)
@@ -1,4 +1,5 @@
-#Sat Jan 08 18:57:39 CET 2011
+#Thu Jun 30 02:40:51 CEST 2011
eclipse.preferences.version=1
+entryPointModules=
filesCopiedToWebInfLib=gwt-servlet.jar
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBW11dPjwvZXh0cmEtYXJncz48dm0tYXJncz48IVtDREFUQVstWG14NTEybV1dPjwvdm0tYXJncz48L2d3dC1jb21waWxlLXNldHRpbmdzPg\=\=
Deleted: kune-sandbox/src/cc/kune/sandbox/client/CSSBasicUtils.java
===================================================================
--- kune-sandbox/src/cc/kune/sandbox/client/CSSBasicUtils.java 2011-08-11 00:58:21 UTC (rev 1489)
+++ kune-sandbox/src/cc/kune/sandbox/client/CSSBasicUtils.java 2011-08-11 08:36:59 UTC (rev 1490)
@@ -1,29 +0,0 @@
-package cc.kune.sandbox.client;
-
-import com.google.gwt.dom.client.Document;
-import com.google.gwt.dom.client.Element;
-import com.google.gwt.dom.client.LinkElement;
-import com.google.gwt.dom.client.StyleElement;
-
-public class CSSBasicUtils {
-
- private LinkElement currentLink;
-
- public CSSBasicUtils() {
- }
-
- public void addCss(String cssUrl) {
- Element head = Document.get().getElementsByTagName("head").getItem(0);
- LinkElement link = Document.get().createLinkElement();
- link.setType("text/css");
- link.setRel("stylesheet");
- link.setHref(cssUrl);
- link.setMedia("screen");
- link.setTitle("dynamicLoadedSheet");
- head.appendChild(link);
- if (currentLink != null)
- currentLink.removeFromParent();
- currentLink = link;
- }
-
-}
Modified: kune-sandbox/src/cc/kune/sandbox/client/KuneSandboxEntryPoint.java
===================================================================
--- kune-sandbox/src/cc/kune/sandbox/client/KuneSandboxEntryPoint.java 2011-08-11 00:58:21 UTC (rev 1489)
+++ kune-sandbox/src/cc/kune/sandbox/client/KuneSandboxEntryPoint.java 2011-08-11 08:36:59 UTC (rev 1490)
@@ -1,8 +1,8 @@
package cc.kune.sandbox.client;
import cc.kune.common.client.notify.NotifyLevel;
-import cc.kune.common.client.notify.NotifyUser;
import cc.kune.common.client.tooltip.Tooltip;
+import cc.kune.common.client.ui.BasicThumb;
import cc.kune.common.client.ui.MaskWidget;
import cc.kune.common.client.ui.PopupBottomPanel;
import cc.kune.common.client.ui.PopupTopPanel;
@@ -10,6 +10,8 @@
import cc.kune.common.client.ui.dialogs.PromptTopDialog;
import cc.kune.common.client.ui.dialogs.PromptTopDialog.Builder;
import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.client.avatar.AvatarDecorator;
+import cc.kune.core.client.resources.CoreResources;
import cc.kune.gspace.client.GSpaceArmorImpl;
import cc.kune.gspace.client.tool.selector.ToolSelectorItemPanel;
import cc.kune.gspace.client.tool.selector.ToolSelectorPanel;
@@ -19,6 +21,7 @@
import cc.kune.msgs.client.UserMessagesPresenter;
import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.DOM;
@@ -51,6 +54,24 @@
// testTooltips();
//testBarButtons();
+ //testPromptDialog();
+
+ //testAvatarDecorators();
+ }
+
+ private void testAvatarDecorators() {
+// BasicThumb thumb = new BasicThumb("http://kune.beta.iepala.es/others/unknown.jpg", 50, "kk", 50, false, new ClickHandler() {
+// @Override
+// public void onClick(ClickEvent event) {
+// }
+// });
+// CoreResources res = GWT.create(CoreResources.class);
+// AvatarDecorator avatarDecorator = new AvatarDecorator(res, thumb);
+// avatarDecorator.setBusy();
+// RootPanel.get().add(avatarDecorator);
+ }
+
+ private void testPromptDialog() {
Builder builder = new PromptTopDialog.Builder("kkj-kk", "Some ask text?", false, true);
builder.width("200px").height("200px").firstButtonTitle("Create").sndButtonTitle("Cancel");
builder.regex(TextUtils.UNIX_NAME).regexText("The name must contain only characters, numbers and dashes");
@@ -64,7 +85,6 @@
Window.alert("ok");
}
});
-
}
private void testBarButtons() {
@@ -112,7 +132,7 @@
}
private void testToolpanel() {
- ToolSelectorPanel toolSelector = new ToolSelectorPanel(new GSpaceArmorImpl(null));
+ ToolSelectorPanel toolSelector = new ToolSelectorPanel(new GSpaceArmorImpl(null), null);
ToolSelectorItemPanel toolItem1 = new ToolSelectorItemPanel();
toolItem1.getLabel().setText("documents");
ToolSelectorItemPanel toolItem2 = new ToolSelectorItemPanel();
1
0
r1489 - in trunk: . src/main/java/cc/kune src/main/java/cc/kune/core/server src/main/java/cc/kune/lists src/main/java/cc/kune/lists/server src/main/java/cc/kune/lists/shared src/test/java/cc/kune src/test/java/cc/kune/blogs/server src/test/java/cc/kune/lists src/test/java/cc/kune/lists/server src/test/java/cc/kune/tasks
by Vicente J. Ruiz Jurado 11 Aug '11
by Vicente J. Ruiz Jurado 11 Aug '11
11 Aug '11
Author: vjrj_
Date: 2011-08-11 02:58:21 +0200 (Thu, 11 Aug 2011)
New Revision: 1489
Added:
trunk/src/main/java/cc/kune/lists/
trunk/src/main/java/cc/kune/lists/KuneLists.gwt.xml
trunk/src/main/java/cc/kune/lists/client/
trunk/src/main/java/cc/kune/lists/server/
trunk/src/main/java/cc/kune/lists/server/ListsServerModule.java
trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java
trunk/src/main/java/cc/kune/lists/shared/
trunk/src/main/java/cc/kune/lists/shared/ListsConstants.java
trunk/src/test/java/cc/kune/blogs/server/BlogServerToolTest.java
trunk/src/test/java/cc/kune/lists/
trunk/src/test/java/cc/kune/lists/server/
trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java
trunk/src/test/java/cc/kune/tasks/
trunk/src/test/java/cc/kune/tasks/server/
Removed:
trunk/src/test/java/cc/kune/blogs/server/TaskServerToolTest.java
Modified:
trunk/.classpath
trunk/src/main/java/cc/kune/Kune.gwt.xml
trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
Log:
lists took started
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2011-08-10 17:35:46 UTC (rev 1488)
+++ trunk/.classpath 2011-08-11 00:58:21 UTC (rev 1489)
@@ -1,154 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
- <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
- <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
- <classpathentry kind="output" path="target/kune-0.1.0-SNAPSHOT/WEB-INF/classes"/>
- <classpathentry kind="var" path="M2_REPO/javax/inject/javax.inject/1/javax.inject-1.jar" sourcepath="M2_REPO/javax/inject/javax.inject/1/javax.inject-1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar" sourcepath="M2_REPO/javax/transaction/jta/1.1/jta-1.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/appengine/appengine-api-1.0-sdk/1.3.1/appengine-api-1.0-sdk-1.3.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/box/0.3.1-SNAPSHOT/box-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/box-src/0.3.1-SNAPSHOT/box-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar"/>
- <classpathentry kind="var" path="M2_REPO/c3p0/c3p0/0.9.1/c3p0-0.9.1.jar" sourcepath="M2_REPO/c3p0/c3p0/0.9.1/c3p0-0.9.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client/0.3.1-SNAPSHOT/client-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-common/0.3.1-SNAPSHOT/client-common-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-common-src/0.3.1-SNAPSHOT/client-common-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-scheduler-src/0.3.1-SNAPSHOT/client-scheduler-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-src/0.3.1-SNAPSHOT/client-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/cobogw/gwt/cobogw/1.3.1/cobogw-1.3.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/common-src/0.3.1-SNAPSHOT/common-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar" sourcepath="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar" sourcepath="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.3.1/commons-io-1.3.1.jar" sourcepath="M2_REPO/commons-io/commons-io/1.3.1/commons-io-1.3.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/communication-src/0.3.1-SNAPSHOT/communication-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/concurrencycontrol-src/0.3.1-SNAPSHOT/concurrencycontrol-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/crawl_htmlunit/r5662-gae/crawl_htmlunit-r5662-gae.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5.jar" sourcepath="M2_REPO/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sf/dozer/dozer/4.0/dozer-4.0.jar" sourcepath="M2_REPO/net/sf/dozer/dozer/4.0/dozer-4.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar" sourcepath="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/calclab/emite/emite/r1694/emite-r1694.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/calclab/emite/emite-proxy/0.1/emite-proxy-0.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sf/ezmorph/ezmorph/1.0.3/ezmorph-1.0.3.jar" sourcepath="M2_REPO/net/sf/ezmorph/ezmorph/1.0.3/ezmorph-1.0.3-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/freemarker/freemarker/2.3.8/freemarker-2.3.8.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/guava/guava-gwt/r09/guava-gwt-r09.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/inject/guice/3.0/guice-3.0.jar" sourcepath="M2_REPO/com/google/inject/guice/3.0/guice-3.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-assisted-inject/2.0/guice-assisted-inject-2.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-persist/3.0/guice-persist-3.0.jar" sourcepath="M2_REPO/com/google/inject/extensions/guice-persist/3.0/guice-persist-3.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0.jar" sourcepath="M2_REPO/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/dnd/gwt-dnd/gwt-dnd/3.0.1/gwt-dnd-3.0.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/adamtacy/gwt-fx/r464/gwt-fx-r464.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-gin/1.0-r137/gwt-gin-1.0-r137.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/log/gwt-log/gwt-log/3.0.1/gwt-log-3.0.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-servlet/2.1.1/gwt-servlet-2.1.1.jar" sourcepath="M2_REPO/com/google/gwt/gwt-servlet/2.1.1/gwt-servlet-2.1.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-user/2.1.1/gwt-user-2.1.1.jar" sourcepath="M2_REPO/com/google/gwt/gwt-user/2.1.1/gwt-user-2.1.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/gwt-util-src/0.3.1-SNAPSHOT/gwt-util-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/voices/gwt-voices/gwt-voices/2.0.0/gwt-voices-2.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtextux/gwtextux/0.4.0.924/gwtextux-0.4.0.924.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-all/0.5/gwtp-all-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-all/0.5/gwtp-all-0.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-clients-common/0.5/gwtp-clients-common-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-clients-common/0.5/gwtp-clients-common-0.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-crawler/0.5/gwtp-crawler-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-crawler/0.5/gwtp-crawler-0.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-dispatch-client/0.5/gwtp-dispatch-client-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-dispatch-client/0.5/gwtp-dispatch-client-0.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-dispatch-server/0.5/gwtp-dispatch-server-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-dispatch-server/0.5/gwtp-dispatch-server-0.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-dispatch-shared/0.5/gwtp-dispatch-shared-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-dispatch-shared/0.5/gwtp-dispatch-shared-0.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-mvp-client/0.5/gwtp-mvp-client-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-mvp-client/0.5/gwtp-mvp-client-0.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-processors/0.5/gwtp-processors-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-processors/0.5/gwtp-processors-0.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-tester/0.5/gwtp-tester-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-tester/0.5/gwtp-tester-0.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/googlecode/gwtupload/gwtupload/0.6.3-compat/gwtupload-0.6.3-compat.jar" sourcepath="M2_REPO/com/googlecode/gwtupload/gwtupload/0.6.3-compat/gwtupload-0.6.3-compat-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/extjs/gxt/2.2.1/gxt-2.2.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/h2database/h2/1.0.20070617/h2-1.0.20070617.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/calclab/emite/hablar/r1697/hablar-r1697.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-all/1.1/hamcrest-all-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-all/1.1/hamcrest-all-1.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-c3p0/3.3.1.GA/hibernate-c3p0-3.3.1.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-c3p0/3.3.1.GA/hibernate-c3p0-3.3.1.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.3.0.ga/hibernate-commons-annotations-3.3.0.ga.jar" sourcepath="M2_REPO/org/hibernate/hibernate-commons-annotations/3.3.0.ga/hibernate-commons-annotations-3.3.0.ga-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/3.3.1.GA/hibernate-core-3.3.1.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-core/3.3.1.GA/hibernate-core-3.3.1.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-search/3.1.0.GA/hibernate-search-3.1.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-search/3.1.0.GA/hibernate-search-3.1.0.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-tools/3.2.3.GA/hibernate-tools-3.2.3.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-validator/3.1.0.GA/hibernate-validator-3.1.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-validator/3.1.0.GA/hibernate-validator-3.1.0.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit/2.7/htmlunit-2.7.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit/2.7/htmlunit-2.7-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit-core-js/2.7/htmlunit-core-js-2.7.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit-core-js/2.7/htmlunit-core-js-2.7-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.4.GA/javassist-3.4.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/slf4j/jcl-over-slf4j/1.6.1/jcl-over-slf4j-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/jcl-over-slf4j/1.6.1/jcl-over-slf4j-1.6.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/beust/jcommander/1.12/jcommander-1.12.jar" sourcepath="M2_REPO/com/beust/jcommander/1.12/jcommander-1.12-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/codehaus/jettison/jettison/1.0-RC2/jettison-1.0-RC2.jar" sourcepath="M2_REPO/org/codehaus/jettison/jettison/1.0-RC2/jettison-1.0-RC2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/jmagick/jmagick/6.2.6-0/jmagick-6.2.6-0.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/java/dev/jna/jna/3.2.2/jna-3.2.2.jar" sourcepath="M2_REPO/net/java/dev/jna/jna/3.2.2/jna-3.2.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jruby/jruby-complete/1.2.0/jruby-complete-1.2.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jruby/rack/jruby-rack/0.9.4/jruby-rack-0.9.4.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/json/json/20080701/json-20080701.jar" sourcepath="M2_REPO/org/json/json/20080701/json-20080701-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sf/json-lib/json-lib/2.1/json-lib-2.1-jdk15.jar" sourcepath="M2_REPO/net/sf/json-lib/json-lib/2.1/json-lib-2.1-jdk15-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jsoup/jsoup/1.2.2/jsoup-1.2.2.jar" sourcepath="M2_REPO/org/jsoup/jsoup/1.2.2/jsoup-1.2.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sourceforge/findbugs/jsr-305/v0r47/jsr-305-v0r47.jar" sourcepath="M2_REPO/net/sourceforge/findbugs/jsr-305/v0r47/jsr-305-v0r47-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/jtidy/r8-20060801/jtidy-r8-20060801.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jukito/jukito/1.0/jukito-1.0.jar" sourcepath="M2_REPO/org/jukito/jukito/1.0/jukito-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/4.8.2/junit-4.8.2.jar" sourcepath="M2_REPO/junit/junit/4.8.2/junit-4.8.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/liquibase/liquibase-core/1.7.0/liquibase-core-1.7.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/liquibase/liquibase-plugin/1.7.0.0/liquibase-plugin-1.7.0.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16.jar" sourcepath="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/logkit/logkit/1.0.1/logkit-1.0.1.jar" sourcepath="M2_REPO/logkit/logkit/1.0.1/logkit-1.0.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/2.4.0/lucene-core-2.4.0.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-core/2.4.0/lucene-core-2.4.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact-manager/2.0/maven-artifact-manager-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-artifact-manager/2.0/maven-artifact-manager-2.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-model/2.0/maven-model-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-model/2.0/maven-model-2.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/media-src/0.3.1-SNAPSHOT/media-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/mockito/mockito-core/1.8.5/mockito-core-1.8.5.jar" sourcepath="M2_REPO/org/mockito/mockito-core/1.8.5/mockito-core-1.8.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/model-src/0.3.1-SNAPSHOT/model-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/mvel/mvel2/2.0.16/mvel2-2.0.16.jar" sourcepath="M2_REPO/org/mvel/mvel2/2.0.16/mvel2-2.0.16-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.13/mysql-connector-java-5.1.13.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.14/nekohtml-1.9.14.jar" sourcepath="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.14/nekohtml-1.9.14-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/objenesis/objenesis/1.0/objenesis-1.0.jar" sourcepath="M2_REPO/org/objenesis/objenesis/1.0/objenesis-1.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/proto-msg/0.3.1-SNAPSHOT/proto-msg-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/w3c/css/sac/1.3/sac-1.3.jar" sourcepath="M2_REPO/org/w3c/css/sac/1.3/sac-1.3-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium/2.0a4/selenium-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium/2.0a4/selenium-2.0a4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/2.0a4/selenium-chrome-driver-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/2.0a4/selenium-chrome-driver-2.0a4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-common/2.0a4/selenium-common-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-common/2.0a4/selenium-common-2.0a4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/2.0a4/selenium-firefox-driver-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/2.0a4/selenium-firefox-driver-2.0a4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-htmlunit-driver/2.0a4/selenium-htmlunit-driver-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-htmlunit-driver/2.0a4/selenium-htmlunit-driver-2.0a4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/2.0a4/selenium-ie-driver-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/2.0a4/selenium-ie-driver-2.0a4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-remote-client/2.0a4/selenium-remote-client-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-remote-client/2.0a4/selenium-remote-client-2.0a4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-remote-common/2.0a4/selenium-remote-common-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-remote-common/2.0a4/selenium-remote-common-2.0a4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-support/2.0a4/selenium-support-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-support/2.0a4/selenium-support-2.0a4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/xalan/serializer/2.7.1/serializer-2.7.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/jivesoftware/smack/3.1.0/smack-3.1.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/jivesoftware/smackx/3.1.0/smackx-3.1.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jivesoftware/smackx/debugger/smackx-debugger/3.0.4/smackx-debugger-3.0.4.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/yaml/snakeyaml/1.6/snakeyaml-1.6.jar" sourcepath="M2_REPO/org/yaml/snakeyaml/1.6/snakeyaml-1.6-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/testng/testng/6.0.1/testng-6.0.1.jar" sourcepath="M2_REPO/org/testng/testng/6.0.1/testng-6.0.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/tigase/tigase-xmltools/3.3.5/tigase-xmltools-3.3.5.jar" sourcepath="M2_REPO/tigase/tigase-xmltools/3.3.5/tigase-xmltools-3.3.5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/util-src/0.3.1-SNAPSHOT/util-src-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/waveprotocol/waveinabox-server-0.3/0.3.1-SNAPSHOT/waveinabox-server-0.3-0.3.1-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="M2_REPO/xalan/xalan/2.7.1/xalan-2.7.1.jar" sourcepath="M2_REPO/xalan/xalan/2.7.1/xalan-2.7.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/xpp3/xpp3_min/1.1.3.4.O/xpp3_min-1.1.3.4.O.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2.jar" sourcepath="M2_REPO/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/xwiki/platform/xwiki-web-gwt-dom/2.3-rc-1/xwiki-web-gwt-dom-2.3-rc-1.jar" sourcepath="M2_REPO/org/xwiki/platform/xwiki-web-gwt-dom/2.3-rc-1/xwiki-web-gwt-dom-2.3-rc-1-sources.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="src" path=".apt_generated" including="**/*.java"/> <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
-</classpath>
\ No newline at end of file
+ <classpathentry including="**/*.java" kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry including="**/*.java" kind="src" path="src/main/java"/>
+ <classpathentry excluding="**/*.java" kind="src" path="src/main/resources"/>
+ <classpathentry kind="var" path="M2_REPO/javax/inject/javax.inject/1/javax.inject-1.jar" sourcepath="M2_REPO/javax/inject/javax.inject/1/javax.inject-1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar" sourcepath="M2_REPO/javax/transaction/jta/1.1/jta-1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0.jar" sourcepath="M2_REPO/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar" sourcepath="M2_REPO/javax/servlet/servlet-api/2.5/servlet-api-2.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/appengine/appengine-api-1.0-sdk/1.3.1/appengine-api-1.0-sdk-1.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/box/0.3.1-SNAPSHOT/box-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/box-src/0.3.1-SNAPSHOT/box-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/c3p0/c3p0/0.9.1/c3p0-0.9.1.jar" sourcepath="M2_REPO/c3p0/c3p0/0.9.1/c3p0-0.9.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client/0.3.1-SNAPSHOT/client-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-common/0.3.1-SNAPSHOT/client-common-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-common-src/0.3.1-SNAPSHOT/client-common-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-scheduler-src/0.3.1-SNAPSHOT/client-scheduler-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/client-src/0.3.1-SNAPSHOT/client-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/cobogw/gwt/cobogw/1.3.1/cobogw-1.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/common-src/0.3.1-SNAPSHOT/common-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar" sourcepath="M2_REPO/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2.jar" sourcepath="M2_REPO/commons-cli/commons-cli/1.2/commons-cli-1.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2.jar" sourcepath="M2_REPO/commons-collections/commons-collections/3.2/commons-collections-3.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar" sourcepath="M2_REPO/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-io/commons-io/1.3.1/commons-io-1.3.1.jar" sourcepath="M2_REPO/commons-io/commons-io/1.3.1/commons-io-1.3.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.5/commons-lang-2.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/communication-src/0.3.1-SNAPSHOT/communication-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/concurrencycontrol-src/0.3.1-SNAPSHOT/concurrencycontrol-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/crawl_htmlunit/r5662-gae/crawl_htmlunit-r5662-gae.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5.jar" sourcepath="M2_REPO/net/sourceforge/cssparser/cssparser/0.9.5/cssparser-0.9.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sf/dozer/dozer/4.0/dozer-4.0.jar" sourcepath="M2_REPO/net/sf/dozer/dozer/4.0/dozer-4.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar" sourcepath="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/calclab/emite/emite/r1694/emite-r1694.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/calclab/emite/emite-proxy/0.1/emite-proxy-0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sf/ezmorph/ezmorph/1.0.3/ezmorph-1.0.3.jar" sourcepath="M2_REPO/net/sf/ezmorph/ezmorph/1.0.3/ezmorph-1.0.3-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/freemarker/freemarker/2.3.8/freemarker-2.3.8.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/guava/guava-gwt/r09/guava-gwt-r09.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/inject/guice/3.0/guice-3.0.jar" sourcepath="M2_REPO/com/google/inject/guice/3.0/guice-3.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-assisted-inject/2.0/guice-assisted-inject-2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-persist/3.0/guice-persist-3.0.jar" sourcepath="M2_REPO/com/google/inject/extensions/guice-persist/3.0/guice-persist-3.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0.jar" sourcepath="M2_REPO/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/dnd/gwt-dnd/gwt-dnd/3.0.1/gwt-dnd-3.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/adamtacy/gwt-fx/r464/gwt-fx-r464.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-gin/1.0-r137/gwt-gin-1.0-r137.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/log/gwt-log/gwt-log/3.0.1/gwt-log-3.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-servlet/2.1.1/gwt-servlet-2.1.1.jar" sourcepath="M2_REPO/com/google/gwt/gwt-servlet/2.1.1/gwt-servlet-2.1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-user/2.1.1/gwt-user-2.1.1.jar" sourcepath="M2_REPO/com/google/gwt/gwt-user/2.1.1/gwt-user-2.1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/gwt-util-src/0.3.1-SNAPSHOT/gwt-util-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/voices/gwt-voices/gwt-voices/2.0.0/gwt-voices-2.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtextux/gwtextux/0.4.0.924/gwtextux-0.4.0.924.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-all/0.5/gwtp-all-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-all/0.5/gwtp-all-0.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-clients-common/0.5/gwtp-clients-common-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-clients-common/0.5/gwtp-clients-common-0.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-crawler/0.5/gwtp-crawler-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-crawler/0.5/gwtp-crawler-0.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-dispatch-client/0.5/gwtp-dispatch-client-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-dispatch-client/0.5/gwtp-dispatch-client-0.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-dispatch-server/0.5/gwtp-dispatch-server-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-dispatch-server/0.5/gwtp-dispatch-server-0.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-dispatch-shared/0.5/gwtp-dispatch-shared-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-dispatch-shared/0.5/gwtp-dispatch-shared-0.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-mvp-client/0.5/gwtp-mvp-client-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-mvp-client/0.5/gwtp-mvp-client-0.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-processors/0.5/gwtp-processors-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-processors/0.5/gwtp-processors-0.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-tester/0.5/gwtp-tester-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-tester/0.5/gwtp-tester-0.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/googlecode/gwtupload/gwtupload/0.6.3-compat/gwtupload-0.6.3-compat.jar" sourcepath="M2_REPO/com/googlecode/gwtupload/gwtupload/0.6.3-compat/gwtupload-0.6.3-compat-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/extjs/gxt/2.2.1/gxt-2.2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/h2database/h2/1.0.20070617/h2-1.0.20070617.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/calclab/emite/hablar/r1697/hablar-r1697.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-all/1.1/hamcrest-all-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-all/1.1/hamcrest-all-1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-c3p0/3.3.1.GA/hibernate-c3p0-3.3.1.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-c3p0/3.3.1.GA/hibernate-c3p0-3.3.1.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.3.0.ga/hibernate-commons-annotations-3.3.0.ga.jar" sourcepath="M2_REPO/org/hibernate/hibernate-commons-annotations/3.3.0.ga/hibernate-commons-annotations-3.3.0.ga-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/3.3.1.GA/hibernate-core-3.3.1.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-core/3.3.1.GA/hibernate-core-3.3.1.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-search/3.1.0.GA/hibernate-search-3.1.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-search/3.1.0.GA/hibernate-search-3.1.0.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-tools/3.2.3.GA/hibernate-tools-3.2.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-validator/3.1.0.GA/hibernate-validator-3.1.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-validator/3.1.0.GA/hibernate-validator-3.1.0.GA-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit/2.7/htmlunit-2.7.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit/2.7/htmlunit-2.7-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sourceforge/htmlunit/htmlunit-core-js/2.7/htmlunit-core-js-2.7.jar" sourcepath="M2_REPO/net/sourceforge/htmlunit/htmlunit-core-js/2.7/htmlunit-core-js-2.7-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.4.GA/javassist-3.4.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/jcl-over-slf4j/1.6.1/jcl-over-slf4j-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/jcl-over-slf4j/1.6.1/jcl-over-slf4j-1.6.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/beust/jcommander/1.12/jcommander-1.12.jar" sourcepath="M2_REPO/com/beust/jcommander/1.12/jcommander-1.12-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/jettison/jettison/1.0-RC2/jettison-1.0-RC2.jar" sourcepath="M2_REPO/org/codehaus/jettison/jettison/1.0-RC2/jettison-1.0-RC2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jmagick/jmagick/6.2.6-0/jmagick-6.2.6-0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/java/dev/jna/jna/3.2.2/jna-3.2.2.jar" sourcepath="M2_REPO/net/java/dev/jna/jna/3.2.2/jna-3.2.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jruby/jruby-complete/1.2.0/jruby-complete-1.2.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jruby/rack/jruby-rack/0.9.4/jruby-rack-0.9.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/json/json/20080701/json-20080701.jar" sourcepath="M2_REPO/org/json/json/20080701/json-20080701-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sf/json-lib/json-lib/2.1/json-lib-2.1-jdk15.jar" sourcepath="M2_REPO/net/sf/json-lib/json-lib/2.1/json-lib-2.1-jdk15-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jsoup/jsoup/1.2.2/jsoup-1.2.2.jar" sourcepath="M2_REPO/org/jsoup/jsoup/1.2.2/jsoup-1.2.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sourceforge/findbugs/jsr-305/v0r47/jsr-305-v0r47.jar" sourcepath="M2_REPO/net/sourceforge/findbugs/jsr-305/v0r47/jsr-305-v0r47-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/jtidy/r8-20060801/jtidy-r8-20060801.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jukito/jukito/1.0/jukito-1.0.jar" sourcepath="M2_REPO/org/jukito/jukito/1.0/jukito-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.8.2/junit-4.8.2.jar" sourcepath="M2_REPO/junit/junit/4.8.2/junit-4.8.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/liquibase/liquibase-core/1.7.0/liquibase-core-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/liquibase/liquibase-plugin/1.7.0.0/liquibase-plugin-1.7.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16.jar" sourcepath="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/logkit/logkit/1.0.1/logkit-1.0.1.jar" sourcepath="M2_REPO/logkit/logkit/1.0.1/logkit-1.0.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/2.4.0/lucene-core-2.4.0.jar" sourcepath="M2_REPO/org/apache/lucene/lucene-core/2.4.0/lucene-core-2.4.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-artifact/2.0/maven-artifact-2.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-artifact-manager/2.0/maven-artifact-manager-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-artifact-manager/2.0/maven-artifact-manager-2.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-model/2.0/maven-model-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-model/2.0/maven-model-2.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-plugin-api/2.0/maven-plugin-api-2.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/media-src/0.3.1-SNAPSHOT/media-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mockito/mockito-core/1.8.5/mockito-core-1.8.5.jar" sourcepath="M2_REPO/org/mockito/mockito-core/1.8.5/mockito-core-1.8.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/model-src/0.3.1-SNAPSHOT/model-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mvel/mvel2/2.0.16/mvel2-2.0.16.jar" sourcepath="M2_REPO/org/mvel/mvel2/2.0.16/mvel2-2.0.16-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.13/mysql-connector-java-5.1.13.jar"/>
+ <classpathentry kind="var" path="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.14/nekohtml-1.9.14.jar" sourcepath="M2_REPO/net/sourceforge/nekohtml/nekohtml/1.9.14/nekohtml-1.9.14-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/objenesis/objenesis/1.0/objenesis-1.0.jar" sourcepath="M2_REPO/org/objenesis/objenesis/1.0/objenesis-1.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/proto-msg/0.3.1-SNAPSHOT/proto-msg-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/w3c/css/sac/1.3/sac-1.3.jar" sourcepath="M2_REPO/org/w3c/css/sac/1.3/sac-1.3-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium/2.0a4/selenium-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium/2.0a4/selenium-2.0a4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/2.0a4/selenium-chrome-driver-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-chrome-driver/2.0a4/selenium-chrome-driver-2.0a4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-common/2.0a4/selenium-common-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-common/2.0a4/selenium-common-2.0a4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/2.0a4/selenium-firefox-driver-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-firefox-driver/2.0a4/selenium-firefox-driver-2.0a4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-htmlunit-driver/2.0a4/selenium-htmlunit-driver-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-htmlunit-driver/2.0a4/selenium-htmlunit-driver-2.0a4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/2.0a4/selenium-ie-driver-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-ie-driver/2.0a4/selenium-ie-driver-2.0a4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-remote-client/2.0a4/selenium-remote-client-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-remote-client/2.0a4/selenium-remote-client-2.0a4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-remote-common/2.0a4/selenium-remote-common-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-remote-common/2.0a4/selenium-remote-common-2.0a4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/seleniumhq/selenium/selenium-support/2.0a4/selenium-support-2.0a4.jar" sourcepath="M2_REPO/org/seleniumhq/selenium/selenium-support/2.0a4/selenium-support-2.0a4-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xalan/serializer/2.7.1/serializer-2.7.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jivesoftware/smack/3.1.0/smack-3.1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jivesoftware/smackx/3.1.0/smackx-3.1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jivesoftware/smackx/debugger/smackx-debugger/3.0.4/smackx-debugger-3.0.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/yaml/snakeyaml/1.6/snakeyaml-1.6.jar" sourcepath="M2_REPO/org/yaml/snakeyaml/1.6/snakeyaml-1.6-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/testng/testng/6.0.1/testng-6.0.1.jar" sourcepath="M2_REPO/org/testng/testng/6.0.1/testng-6.0.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/tigase/tigase-xmltools/3.3.5/tigase-xmltools-3.3.5.jar" sourcepath="M2_REPO/tigase/tigase-xmltools/3.3.5/tigase-xmltools-3.3.5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/util-src/0.3.1-SNAPSHOT/util-src-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5.jar" sourcepath="M2_REPO/org/apache/maven/wagon/wagon-provider-api/1.0-alpha-5/wagon-provider-api-1.0-alpha-5-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/waveprotocol/waveinabox-server-0.3/0.3.1-SNAPSHOT/waveinabox-server-0.3-0.3.1-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xalan/xalan/2.7.1/xalan-2.7.1.jar" sourcepath="M2_REPO/xalan/xalan/2.7.1/xalan-2.7.1-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar" sourcepath="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xpp3/xpp3_min/1.1.3.4.O/xpp3_min-1.1.3.4.O.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2.jar" sourcepath="M2_REPO/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/xwiki/platform/xwiki-web-gwt-dom/2.3-rc-1/xwiki-web-gwt-dom-2.3-rc-1.jar" sourcepath="M2_REPO/org/xwiki/platform/xwiki-web-gwt-dom/2.3-rc-1/xwiki-web-gwt-dom-2.3-rc-1-sources.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
+ <classpathentry kind="output" path="target/kune-0.1.0-SNAPSHOT/WEB-INF/classes"/>
+</classpath>
Modified: trunk/src/main/java/cc/kune/Kune.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-08-10 17:35:46 UTC (rev 1488)
+++ trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-08-11 00:58:21 UTC (rev 1489)
@@ -1,37 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.0.1/distro-source/core/…">
<module rename-to="ws">
- <inherits name="com.google.gwt.user.User"/>
- <inherits name='com.google.gwt.logging.Logging'/>
- <inherits name="cc.kune.core.KuneCore"/>
- <inherits name="cc.kune.wave.KuneWave"/>
- <inherits name="cc.kune.barters.KuneBarters"/>
- <inherits name="cc.kune.blogs.KuneBlogs"/>
- <inherits name="cc.kune.chat.KuneChat"/>
- <inherits name="cc.kune.docs.KuneDocs"/>
- <inherits name="cc.kune.wiki.KuneWiki"/>
- <inherits name="cc.kune.meets.KuneMeets"/>
- <inherits name="cc.kune.tasks.KuneTasks"/>
- <inherits name="cc.kune.pspace.PSpace"/>
- <inherits name="com.calclab.suco.Suco"/>
+ <inherits name="com.google.gwt.user.User" />
+ <inherits name='com.google.gwt.logging.Logging' />
+ <inherits name="cc.kune.core.KuneCore" />
+ <inherits name="cc.kune.wave.KuneWave" />
+ <inherits name="cc.kune.barters.KuneBarters" />
+ <inherits name="cc.kune.blogs.KuneBlogs" />
+ <inherits name="cc.kune.chat.KuneChat" />
+ <inherits name="cc.kune.docs.KuneDocs" />
+ <inherits name="cc.kune.wiki.KuneWiki" />
+ <inherits name="cc.kune.meets.KuneMeets" />
+ <inherits name="cc.kune.tasks.KuneTasks" />
+ <inherits name="cc.kune.lists.KuneLists" />
+ <inherits name="cc.kune.pspace.PSpace" />
+ <inherits name="com.calclab.suco.Suco" />
<inherits name="org.adamtacy.GWTEffects"></inherits>
- <inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>
+ <inherits name='com.allen_sauer.gwt.dnd.gwt-dnd' />
<source path='client'
- excludes="**/*Test.java,**/*Tests.java,**/*MockProvider.java"/>
+ excludes="**/*Test.java,**/*Tests.java,**/*MockProvider.java" />
<!-- <source path='shared'/> -->
<!-- <public path="public"/> -->
<!-- Logging Configuration -->
- <set-property name="gwt.logging.enabled" value="TRUE"/>
- <set-property name="gwt.logging.logLevel" value="INFO"/>
- <set-property name="gwt.logging.consoleHandler" value="ENABLED"/>
+ <set-property name="gwt.logging.enabled" value="TRUE" />
+ <set-property name="gwt.logging.logLevel" value="INFO" />
+ <set-property name="gwt.logging.consoleHandler" value="ENABLED" />
<set-property name="gwt.logging.developmentModeHandler"
- value="ENABLED"/>
- <set-property name="gwt.logging.firebugHandler" value="ENABLED"/>
- <set-property name="gwt.logging.hasWidgetsHandler" value="DISABLED"/>
- <set-property name="gwt.logging.popupHandler" value="DISABLED"/>
- <set-property name="gwt.logging.systemHandler" value="ENABLED"/>
+ value="ENABLED" />
+ <set-property name="gwt.logging.firebugHandler" value="ENABLED" />
+ <set-property name="gwt.logging.hasWidgetsHandler" value="DISABLED" />
+ <set-property name="gwt.logging.popupHandler" value="DISABLED" />
+ <set-property name="gwt.logging.systemHandler" value="ENABLED" />
<set-property name="gwt.logging.simpleRemoteHandler"
- value="DISABLED"/>
+ value="DISABLED" />
<!-- Uncomment if you are enabling server side deobfuscation of StackTraces
<set-property name="compiler.emulatedStack" value="true" /> <set-configuration-property
name="compiler.emulatedStack.recordLineNumbers" value="true" /> <set-configuration-property
@@ -39,28 +40,28 @@
<!-- NOTE: this only compiles for chromium/safari ============= -->
<!--http://code.google.com/p/google-web-toolkit/issues/detail?id=42 -->
<!-- <set-property name="user.agent" value="gecko1_8" /> -->
- <set-property name="user.agent" value="safari,gecko1_8,ie6"/>
+ <set-property name="user.agent" value="safari,gecko1_8,ie6" />
<!-- gwt-platform ============================================= -->
- <inherits name='com.gwtplatform.mvp.Mvp'/>
+ <inherits name='com.gwtplatform.mvp.Mvp' />
<define-configuration-property name="gin.ginjector"
- is-multi-valued="false"/>
+ is-multi-valued="false" />
<set-configuration-property name="gin.ginjector"
- value="cc.kune.client.KuneGinjector"/>
+ value="cc.kune.client.KuneGinjector" />
<!-- Debugging ================================================ -->
<!-- for add ensureDebugIds (debugId in UIBinder), remove/comment in production
see UIObject.ensureDebugId()) -->
- <inherits name="com.google.gwt.user.Debug"/>
- <!-- For make CSS obfuscation more pretty -->
+ <inherits name="com.google.gwt.user.Debug" />
+ <!-- For make CSS obfuscation more pretty -->
<set-configuration-property name="CssResource.style"
- value="pretty"/>
+ value="pretty" />
<!-- Hardcoded locale (to override emite italian support) ===== -->
- <extend-property name="locale" values="en"/>
- <set-property name="locale" value="en"/>
+ <extend-property name="locale" values="en" />
+ <set-property name="locale" value="en" />
<!-- Hardcoded log level ====================================== -->
<!-- Turn off logging in wave -->
- <set-property name="loglevel" value="none"/>
+ <set-property name="loglevel" value="none" />
<!-- <set-property name="loglevel" value="debug" /> -->
<!-- Entrypoint =============================================== -->
- <entry-point class="cc.kune.client.KuneEntryPoint"/>
+ <entry-point class="cc.kune.client.KuneEntryPoint" />
<!-- <entry-point class="cc.kune.common.client.SampleEntryPoint" /> -->
</module>
Modified: trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-08-10 17:35:46 UTC (rev 1488)
+++ trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-08-11 00:58:21 UTC (rev 1489)
@@ -55,6 +55,7 @@
import cc.kune.core.server.rest.TestJSONService;
import cc.kune.core.server.rest.UserJSONService;
import cc.kune.docs.server.DocumentServerModule;
+import cc.kune.lists.server.ListsServerModule;
import cc.kune.meets.server.MeetingServerModule;
import cc.kune.tasks.server.TaskServerModule;
import cc.kune.wiki.server.WikiServerModule;
@@ -167,6 +168,7 @@
builder.use(new BarterServerModule());
builder.use(new MeetingServerModule());
builder.use(new TaskServerModule());
+ builder.use(new ListsServerModule());
// builder.use(new GalleryServerModule());
builder.use(new RESTServicesModule());
builder.use(configModule);
Added: trunk/src/main/java/cc/kune/lists/KuneLists.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/lists/KuneLists.gwt.xml (rev 0)
+++ trunk/src/main/java/cc/kune/lists/KuneLists.gwt.xml 2011-08-11 00:58:21 UTC (rev 1489)
@@ -0,0 +1,6 @@
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.1.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.1.0/distro-source/core/…">
+<module>
+ <inherits name="cc.kune.core.KuneCore" />
+ <source path="client" />
+ <source path="shared" />
+</module>
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/lists/server/ListsServerModule.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/server/ListsServerModule.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/server/ListsServerModule.java 2011-08-11 00:58:21 UTC (rev 1489)
@@ -0,0 +1,29 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.server;
+
+import com.google.inject.Binder;
+import com.google.inject.Module;
+
+public class ListsServerModule implements Module {
+ public void configure(final Binder binder) {
+ binder.bind(ListsServerTool.class).asEagerSingleton();
+ }
+}
Added: trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/server/ListsServerTool.java 2011-08-11 00:58:21 UTC (rev 1489)
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.server;
+
+import static cc.kune.lists.shared.ListsConstants.NAME;
+import static cc.kune.lists.shared.ListsConstants.ROOT_NAME;
+import static cc.kune.lists.shared.ListsConstants.TYPE_LIST;
+import static cc.kune.lists.shared.ListsConstants.TYPE_ROOT;
+import static cc.kune.lists.shared.ListsConstants.TYPE_WAVE;
+
+import java.util.Arrays;
+
+import cc.kune.core.server.AbstractServerTool;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.ToolConfigurationManager;
+import cc.kune.core.server.tool.ServerToolTarget;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.domain.Group;
+import cc.kune.domain.User;
+
+import com.google.inject.Inject;
+
+public class ListsServerTool extends AbstractServerTool {
+
+ @Inject
+ public ListsServerTool(final ContentManager contentManager, final ContainerManager containerManager,
+ final ToolConfigurationManager configurationManager, final I18nTranslationService i18n) {
+ super(NAME, ROOT_NAME, TYPE_ROOT, Arrays.asList(TYPE_WAVE), Arrays.asList(TYPE_LIST),
+ Arrays.asList(TYPE_LIST), Arrays.asList(TYPE_ROOT), contentManager, containerManager,
+ configurationManager, i18n, ServerToolTarget.forGroups);
+ }
+
+ @Override
+ public Group initGroup(final User user, final Group group, final Object... otherVars) {
+ createRoot(group);
+ return group;
+ }
+}
Added: trunk/src/main/java/cc/kune/lists/shared/ListsConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/shared/ListsConstants.java (rev 0)
+++ trunk/src/main/java/cc/kune/lists/shared/ListsConstants.java 2011-08-11 00:58:21 UTC (rev 1489)
@@ -0,0 +1,32 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.shared;
+
+public final class ListsConstants {
+
+ public static final String NAME = "lists";
+ public static final String ROOT_NAME = "lists";
+ public static final String TYPE_LIST = NAME + "." + "list";
+ public static final String TYPE_ROOT = NAME + "." + "root";
+ public static final String TYPE_WAVE = NAME + "." + "wave";
+
+ private ListsConstants() {
+ }
+}
Copied: trunk/src/test/java/cc/kune/blogs/server/BlogServerToolTest.java (from rev 1488, trunk/src/test/java/cc/kune/blogs/server/TaskServerToolTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/blogs/server/BlogServerToolTest.java (rev 0)
+++ trunk/src/test/java/cc/kune/blogs/server/BlogServerToolTest.java 2011-08-11 00:58:21 UTC (rev 1489)
@@ -0,0 +1,67 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.blogs.server;
+
+import static cc.kune.blogs.shared.BlogsConstants.TYPE_BLOG;
+import static cc.kune.blogs.shared.BlogsConstants.TYPE_POST;
+import static cc.kune.blogs.shared.BlogsConstants.TYPE_ROOT;
+import static cc.kune.blogs.shared.BlogsConstants.TYPE_UPLOADEDFILE;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import cc.kune.core.client.errors.ContainerNotPermittedException;
+import cc.kune.core.client.errors.ContentNotPermittedException;
+
+public class BlogServerToolTest {
+
+ private BlogServerTool serverTool;
+
+ @Before
+ public void before() {
+ serverTool = new BlogServerTool(null, null, null, null);
+ }
+
+ @Test
+ public void testCreateContainerInCorrectContainer() {
+ serverTool.checkTypesBeforeContainerCreation(TYPE_ROOT, TYPE_BLOG);
+ }
+
+ @Test(expected = ContainerNotPermittedException.class)
+ public void testCreateContainerInIncorrectContainer7() {
+ serverTool.checkTypesBeforeContainerCreation(TYPE_BLOG, TYPE_BLOG);
+ }
+
+ @Test
+ public void testCreateContentInCorrectContainer() {
+ serverTool.checkTypesBeforeContentCreation(TYPE_BLOG, TYPE_POST);
+ serverTool.checkTypesBeforeContentCreation(TYPE_BLOG, TYPE_UPLOADEDFILE);
+ }
+
+ @Test(expected = ContentNotPermittedException.class)
+ public void testCreateContentInIncorrectContainer1() {
+ serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_POST);
+ }
+
+ @Test(expected = ContentNotPermittedException.class)
+ public void testCreateContentInIncorrectContainer8() {
+ serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_UPLOADEDFILE);
+ }
+}
\ No newline at end of file
Deleted: trunk/src/test/java/cc/kune/blogs/server/TaskServerToolTest.java
===================================================================
--- trunk/src/test/java/cc/kune/blogs/server/TaskServerToolTest.java 2011-08-10 17:35:46 UTC (rev 1488)
+++ trunk/src/test/java/cc/kune/blogs/server/TaskServerToolTest.java 2011-08-11 00:58:21 UTC (rev 1489)
@@ -1,67 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.blogs.server;
-
-import static cc.kune.blogs.shared.BlogsConstants.TYPE_BLOG;
-import static cc.kune.blogs.shared.BlogsConstants.TYPE_POST;
-import static cc.kune.blogs.shared.BlogsConstants.TYPE_ROOT;
-import static cc.kune.blogs.shared.BlogsConstants.TYPE_UPLOADEDFILE;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import cc.kune.core.client.errors.ContainerNotPermittedException;
-import cc.kune.core.client.errors.ContentNotPermittedException;
-
-public class TaskServerToolTest { // extends PersistenceTest {
-
- private BlogServerTool serverTool;
-
- @Before
- public void before() {
- serverTool = new BlogServerTool(null, null, null, null);
- }
-
- @Test
- public void testCreateContainerInCorrectContainer() {
- serverTool.checkTypesBeforeContainerCreation(TYPE_ROOT, TYPE_BLOG);
- }
-
- @Test(expected = ContainerNotPermittedException.class)
- public void testCreateContainerInIncorrectContainer7() {
- serverTool.checkTypesBeforeContainerCreation(TYPE_BLOG, TYPE_BLOG);
- }
-
- @Test
- public void testCreateContentInCorrectContainer() {
- serverTool.checkTypesBeforeContentCreation(TYPE_BLOG, TYPE_POST);
- serverTool.checkTypesBeforeContentCreation(TYPE_BLOG, TYPE_UPLOADEDFILE);
- }
-
- @Test(expected = ContentNotPermittedException.class)
- public void testCreateContentInIncorrectContainer1() {
- serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_POST);
- }
-
- @Test(expected = ContentNotPermittedException.class)
- public void testCreateContentInIncorrectContainer8() {
- serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_UPLOADEDFILE);
- }
-}
\ No newline at end of file
Added: trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java
===================================================================
--- trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java (rev 0)
+++ trunk/src/test/java/cc/kune/lists/server/ListsServerToolTest.java 2011-08-11 00:58:21 UTC (rev 1489)
@@ -0,0 +1,61 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.lists.server;
+
+import static cc.kune.lists.shared.ListsConstants.TYPE_LIST;
+import static cc.kune.lists.shared.ListsConstants.TYPE_ROOT;
+import static cc.kune.lists.shared.ListsConstants.TYPE_WAVE;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import cc.kune.core.client.errors.ContainerNotPermittedException;
+import cc.kune.core.client.errors.ContentNotPermittedException;
+
+public class ListsServerToolTest { // extends PersistenceTest {
+
+ private ListsServerTool serverTool;
+
+ @Before
+ public void before() {
+ serverTool = new ListsServerTool(null, null, null, null);
+ }
+
+ @Test
+ public void testCreateContainerInCorrectContainer() {
+ serverTool.checkTypesBeforeContainerCreation(TYPE_ROOT, TYPE_LIST);
+ }
+
+ @Test(expected = ContainerNotPermittedException.class)
+ public void testCreateContainerInIncorrectContainer7() {
+ serverTool.checkTypesBeforeContainerCreation(TYPE_LIST, TYPE_LIST);
+ }
+
+ @Test
+ public void testCreateContentInCorrectContainer() {
+ serverTool.checkTypesBeforeContentCreation(TYPE_LIST, TYPE_WAVE);
+ }
+
+ @Test(expected = ContentNotPermittedException.class)
+ public void testCreateContentInIncorrectContainer1() {
+ serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_WAVE);
+ }
+
+}
\ No newline at end of file
1
0
10 Aug '11
Author: vjrj_
Date: 2011-08-10 19:35:46 +0200 (Wed, 10 Aug 2011)
New Revision: 1488
Modified:
trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java
Log:
CLOSED - # 88: Create a tasks tool for groups/persons
http://kune.ourproject.org/issues/ticket/88
Modified: trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java 2011-08-10 17:09:53 UTC (rev 1487)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java 2011-08-10 17:35:46 UTC (rev 1488)
@@ -78,6 +78,8 @@
actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, containersNoRoot);
actionsRegistry.addAction(ActionGroups.ITEM_MENU, marksAsDoneMenuItem,
ContentStatus.publishedOnline, TYPE_TASK);
+ actionsRegistry.addAction(ActionGroups.ITEM_MENU, marksAsDoneMenuItem,
+ ContentStatus.editingInProgress, TYPE_TASK);
actionsRegistry.addAction(ActionGroups.ITEM_MENU, marksAsNotDoneMenuItem,
ContentStatus.inTheDustbin, TYPE_TASK);
actionsRegistry.addAction(ActionGroups.ITEM_MENU, delFolderMenuItem, containersNoRoot);
1
0
Author: vjrj_
Date: 2011-08-10 19:09:53 +0200 (Wed, 10 Aug 2011)
New Revision: 1487
Added:
trunk/img/webtemplate/confirmation.png
trunk/src/main/java/cc/kune/common/client/resources/cross.png
trunk/src/main/java/cc/kune/common/client/resources/kune-close-grey.png
trunk/src/main/java/cc/kune/common/client/resources/kune-close-greylight.png
trunk/src/main/java/cc/kune/common/client/resources/kune-close.png
trunk/src/main/java/cc/kune/core/client/registry/IdGenerator.java
trunk/src/main/java/cc/kune/core/client/registry/ShowDeletedRegistry.java
trunk/src/main/java/cc/kune/core/client/resources/nav/taskdone.png
trunk/src/main/java/cc/kune/core/client/resources/nav/taskfolder.png
trunk/src/main/java/cc/kune/core/client/resources/nav/taskfolderadd.png
trunk/src/main/java/cc/kune/gspace/client/actions/SetContentStatusAsAdminMenuItem.java
trunk/src/main/java/cc/kune/tasks/client/actions/MarkAsDoneTaskMenuItem.java
trunk/src/main/java/cc/kune/tasks/client/actions/MarkAsNotDoneTaskMenuItem.java
trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderMenuItem.java
trunk/src/test/java/cc/kune/core/client/registry/
trunk/src/test/java/cc/kune/core/client/registry/IdGeneratorTest.java
Removed:
trunk/src/main/java/cc/kune/tasks/client/actions/DelTaskMenuItem.java
trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderBtn.java
Modified:
trunk/img/icons-base.svg
trunk/img/webtemplate/web_template-2011.svg
trunk/src/main/java/cc/kune/common/client/resources/CommonIconResources.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.ui.xml
trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialogView.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java
trunk/src/main/java/cc/kune/common/public/kune-common.css
trunk/src/main/java/cc/kune/core/client/actions/ActionRegistryByType.java
trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java
trunk/src/main/java/cc/kune/core/client/registry/IconsRegistry.java
trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java
trunk/src/main/java/cc/kune/core/client/resources/nav/task.png
trunk/src/main/java/cc/kune/core/client/resources/nav/taskadd.png
trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java
trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java
trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java
trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPanel.ui.xml
trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java
trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java
trunk/src/main/java/cc/kune/tasks/client/TasksClientTool.java
trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java
trunk/src/main/java/cc/kune/tasks/server/TaskServerTool.java
trunk/src/test/java/org/ourproject/kune/platf/client/actions/IconsRegistryTest.java
Log:
CLOSED - # 88: Create a tasks tool for groups/persons
http://kune.ourproject.org/issues/ticket/88
CLOSED - # 50: Add a Close up button to BasicDialogs (thanks to Alfredo Alvarez)
http://kune.ourproject.org/issues/ticket/50
Modified: trunk/img/icons-base.svg
===================================================================
--- trunk/img/icons-base.svg 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/img/icons-base.svg 2011-08-10 17:09:53 UTC (rev 1487)
@@ -28,12 +28,12 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="1"
- inkscape:cx="268"
- inkscape:cy="359"
+ inkscape:zoom="8.540524"
+ inkscape:cx="281.33968"
+ inkscape:cy="353.04378"
inkscape:document-units="px"
inkscape:current-layer="layer1"
- inkscape:window-width="1278"
+ inkscape:window-width="1080"
inkscape:window-height="973"
inkscape:window-x="0"
inkscape:window-y="21"
@@ -5373,17 +5373,7 @@
y="520.36218"
x="445"
id="image4719"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAdNJREFU
-OI2Vk7FrU1EUxn/3vbSCJDGN1JQMhSIGXFy0amIE0RJwdtAhOBRFbR3ExUGXgjgIjvoPNIO7m6hL
-1S66OCmRUqjRSEJeb2zQRu85DqGPvMRAPdO937nnx/k+uIaBKpfLxve9587JXL/u+94L56RUqVS0
-XzcAN+fMFQMPFSYUDzt1iXz+CJ5nABBRVlc/sK/+FIMAtFT11uOXLJuFs8R8zwQXzhyMf+lmeRfk
-aNkuMzPTGLMDENbXN0glxzma+syUv8Gz12tWVNMxIO55Zmw85vO+kWPp/iOCIKBarUaszc8fIp1O
-c+/ubS5mvyGqcWA81v+osw3JZBJVYXb22GA8JBIJtv+AUxNqIUA1kg0rb95G7sVCfggYAQzW6VOF
-8KwqiLjRAP1HY2cDVUVFyJ88/n8bFAt5RAQRQVWw1jI5mdkdoH9QpDfc/tHe/QYiLoTUvtZoNhtD
-IUcBAz3neoB229JsNCiVzo9yijdqA2s3qX+vIyKhfn3hKpenV0Zb2DumtIIWmUyWTCZLLncYazdR
-FW4sXguHfaMRwJaI/u78cntOpD7yYOkOP91wNMX9n1jrHAAgpTWMMVuq2jUAi+d6vxHDxEizfaXa
-+41PXrH8F0/m4ZhJIciYAAAAAElFTkSuQmCC
-"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAdNJREFU OI2Vk7FrU1EUxn/3vbSCJDGN1JQMhSIGXFy0amIE0RJwdtAhOBRFbR3ExUGXgjgIjvoPNIO7m6hL 1S66OCmRUqjRSEJeb2zQRu85DqGPvMRAPdO937nnx/k+uIaBKpfLxve9587JXL/u+94L56RUqVS0 XzcAN+fMFQMPFSYUDzt1iXz+CJ5nABBRVlc/sK/+FIMAtFT11uOXLJuFs8R8zwQXzhyMf+lmeRfk aNkuMzPTGLMDENbXN0glxzma+syUv8Gz12tWVNMxIO55Zmw85vO+kWPp/iOCIKBarUaszc8fIp1O c+/ubS5mvyGqcWA81v+osw3JZBJVYXb22GA8JBIJtv+AUxNqIUA1kg0rb95G7sVCfggYAQzW6VOF 8KwqiLjRAP1HY2cDVUVFyJ88/n8bFAt5RAQRQVWw1jI5mdkdoH9QpDfc/tHe/QYiLoTUvtZoNhtD IUcBAz3neoB229JsNCiVzo9yijdqA2s3qX+vIyKhfn3hKpenV0Zb2DumtIIWmUyWTCZLLncYazdR FW4sXguHfaMRwJaI/u78cntOpD7yYOkOP91wNMX9n1jrHAAgpTWMMVuq2jUAi+d6vxHDxEizfaXa +41PXrH8F0/m4ZhJIciYAAAAAElFTkSuQmCC "
height="16"
width="16" />
<path
@@ -5420,24 +5410,9 @@
y="504.36218"
x="268"
id="image7247"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAQZJREFU
-OI1j/P//PwMlgIki3cPDABZsggVTo2r+M/wv+/HrO+/nbx8/f/jyrmtb+8UWbGoZ0WMhc0JQg6SM
-QL2xpgmDjJAqw/6rGxhOXDnM8ODOm94TU56VEPTC1x+fyw009Bn+Mv1l0Jd0ZfjL+JvBQteKgYGB
-IRubCzAMeP/lLQcrIw+Dn2YuAwMDA0Ox8ywGZTE9BgYGBg6iDHj78dWPq8+OMXTsTmRgYGBg6NiV
-yHD31SUGBgaGH0QZ8O//v94Tl44xsDGwMGy+PI2BjZGF4ciFgwwMDAxTsRmAEYgMDAwMFjlSHQwM
-DFkMDAy8DAwMnxkYGKadmPKsgmgDSAEDnxIpNgAAJ+ZYJkBPdSwAAAAASUVORK5CYII=
-"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAQZJREFU OI1j/P//PwMlgIki3cPDABZsggVTo2r+M/wv+/HrO+/nbx8/f/jyrmtb+8UWbGoZ0WMhc0JQg6SM QL2xpgmDjJAqw/6rGxhOXDnM8ODOm94TU56VEPTC1x+fyw009Bn+Mv1l0Jd0ZfjL+JvBQteKgYGB IRubCzAMeP/lLQcrIw+Dn2YuAwMDA0Ox8ywGZTE9BgYGBg6iDHj78dWPq8+OMXTsTmRgYGBg6NiV yHD31SUGBgaGH0QZ8O//v94Tl44xsDGwMGy+PI2BjZGF4ciFgwwMDAxTsRmAEYgMDAwMFjlSHQwM DFkMDAy8DAwMnxkYGKadmPKsgmgDSAEDnxIpNgAAJ+ZYJkBPdSwAAAAASUVORK5CYII= "
height="16"
width="16" />
- <path
- inkscape:connector-curvature="0"
- style="color:#000000;fill:#ff2a2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.0625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- d="m 272.19758,658.71675 -5.61351,5.05002 -1.81751,-2.09221 -2.22424,2.28085 c 1.60629,1.4242 2.80319,2.43911 4.13653,3.80876 2.24198,-2.10143 4.53857,-3.76628 6.97148,-5.34924 -0.3707,-1.58182 -0.85095,-2.67256 -1.45275,-3.69818 z"
- id="path7250"
- sodipodi:nodetypes="ccccccc"
- inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/checked.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90" />
<rect
rx="2.5"
inkscape:export-ydpi="90"
@@ -5449,20 +5424,35 @@
height="13.999999"
width="14"
id="rect7252"
- style="opacity:1;fill:none;stroke:#aa4400;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ style="opacity:1;fill:#ffffff;stroke:#aa4400;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <path
+ inkscape:connector-curvature="0"
+ style="color:#000000;fill:#ff2a2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.0625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 272.19758,658.71675 -5.61351,5.05002 -1.81751,-2.09221 -2.22424,2.28085 c 1.60629,1.4242 2.80319,2.43911 4.13653,3.80876 2.24198,-2.10143 4.53857,-3.76628 6.97148,-5.34924 -0.3707,-1.58182 -0.85095,-2.67256 -1.45275,-3.69818 z"
+ id="path7250"
+ sodipodi:nodetypes="ccccccc"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/checked.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
<image
width="16"
height="16"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAQZJREFU
-OI1j/P//PwMlgIki3cPDABZsggVTo2r+M/wv+/HrO+/nbx8/f/jyrmtb+8UWbGoZ0WMhc0JQg6SM
-QL2xpgmDjJAqw/6rGxhOXDnM8ODOm94TU56VEPTC1x+fyw009Bn+Mv1l0Jd0ZfjL+JvBQteKgYGB
-IRubCzAMeP/lLQcrIw+Dn2YuAwMDA0Ox8ywGZTE9BgYGBg6iDHj78dWPq8+OMXTsTmRgYGBg6NiV
-yHD31SUGBgaGH0QZ8O//v94Tl44xsDGwMGy+PI2BjZGF4ciFgwwMDAxTsRmAEYgMDAwMFjlSHQwM
-DFkMDAy8DAwMnxkYGKadmPKsgmgDSAEDnxIpNgAAJ+ZYJkBPdSwAAAAASUVORK5CYII=
-"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAQZJREFU OI1j/P//PwMlgIki3cPDABZsggVTo2r+M/wv+/HrO+/nbx8/f/jyrmtb+8UWbGoZ0WMhc0JQg6SM QL2xpgmDjJAqw/6rGxhOXDnM8ODOm94TU56VEPTC1x+fyw009Bn+Mv1l0Jd0ZfjL+JvBQteKgYGB IRubCzAMeP/lLQcrIw+Dn2YuAwMDA0Ox8ywGZTE9BgYGBg6iDHj78dWPq8+OMXTsTmRgYGBg6NiV yHD31SUGBgaGH0QZ8O//v94Tl44xsDGwMGy+PI2BjZGF4ciFgwwMDAxTsRmAEYgMDAwMFjlSHQwM DFkMDAy8DAwMnxkYGKadmPKsgmgDSAEDnxIpNgAAJ+ZYJkBPdSwAAAAASUVORK5CYII= "
id="image7254"
x="265"
y="659.36218" />
+ <rect
+ style="fill:#ffffff;stroke:#aa4400;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect7258"
+ width="14"
+ height="13.999999"
+ x="261"
+ y="686.36218"
+ ry="2.5"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/taskdone.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ rx="2.5" />
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
@@ -5473,16 +5463,70 @@
style="color:#000000;fill:#ff2a2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.0625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
inkscape:connector-curvature="0" />
<rect
- style="fill:none;stroke:#aa4400;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
- id="rect7258"
+ rx="2.5"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/task.png"
+ ry="2.5"
+ y="706.36218"
+ x="261"
+ height="13.999999"
width="14"
- height="13.999999"
- x="261"
- y="686.36218"
- ry="2.5"
- inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/task.png"
+ id="rect3596"
+ style="fill:#ffffff;stroke:#aa4400;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <path
+ inkscape:connector-curvature="0"
+ style="color:#000000;fill:#ff2a2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.06250000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;opacity:0.34000001"
+ d="m 272.19758,708.71675 -5.61351,5.05002 -1.81751,-2.09221 -2.22424,2.28085 c 1.60629,1.4242 2.80319,2.43911 4.13653,3.80876 2.24198,-2.10143 4.53857,-3.76628 6.97148,-5.34924 -0.3707,-1.58182 -0.85095,-2.67256 -1.45275,-3.69818 z"
+ id="path3594"
+ sodipodi:nodetypes="ccccccc"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/tasknew.png"
inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <image
+ y="653.36218"
+ x="285"
+ id="image4629"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAa1JREFU OI3Fk72KFEEUhb/q7RlbsYcFRXRRBBNnN3dB2GwNTXwCE19BDATBUF9AMwMzQ8FMxMAHWDRTNHAR d9ef6fnd7uqqewy6nRkTkxWspIrLPd89t26Vk8RRVnIk9b8ApADvX1zZyXobG84t80Q1/rgbQ3EV qP5QOQCml6+/CymAU9K/sPWk45wDNWKcI5TfL+3v3N9VGwVY6fakWB9Mvr66DTxLAQgqMX+s2ntE 9CuQ9HAuJ1vbZm3zQRcJMJABwiUnz354vnVvAahdIvNE30Um7PAz9XSfycFrOtk5UA3mkQIQyPt3 usguzu8Ap8zCIX4G8lPq8Yi8f5Ps1Hrb8G8HahykqxCTdAGoE9LjZ1hdvzVPFIb5L4TiJYpDFIYo jFCckJ2/C5VYAkiKJTZ72yTHMQoFVg9QHEIo2vgIxSmognppjFRIFrD6W1MpDlEo2vOgrTyaA6Qw H2wD8JIjovCzFRYL23GIwnghtrJpMywB5G0QZj9O1JNujuWJ1AHLQadRrACPkmZ3SSSWpeStWgDK 6uGnxzc2Eddw5H99uwLcG4/paTPA//0bfwG+iB9/gfCdpwAAAABJRU5ErkJggg== "
+ height="16"
+ width="16"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/taskfolder.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <path
inkscape:export-ydpi="90"
- rx="2.5" />
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/checked.png"
+ sodipodi:nodetypes="ccccccc"
+ id="path4632"
+ d="m 297.19758,656.71675 -5.61351,5.05002 -1.81751,-2.09221 -2.22424,2.28085 c 1.60629,1.4242 2.80319,2.43911 4.13653,3.80876 2.24198,-2.10143 4.53857,-3.76628 6.97148,-5.34924 -0.3707,-1.58182 -0.85095,-2.67256 -1.45275,-3.69818 z"
+ style="color:#000000;fill:#ff2a2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.06250000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;opacity:0.77"
+ inkscape:connector-curvature="0" />
+ <image
+ width="16"
+ height="16"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAa1JREFU OI3Fk72KFEEUhb/q7RlbsYcFRXRRBBNnN3dB2GwNTXwCE19BDATBUF9AMwMzQ8FMxMAHWDRTNHAR d9ef6fnd7uqqewy6nRkTkxWspIrLPd89t26Vk8RRVnIk9b8ApADvX1zZyXobG84t80Q1/rgbQ3EV qP5QOQCml6+/CymAU9K/sPWk45wDNWKcI5TfL+3v3N9VGwVY6fakWB9Mvr66DTxLAQgqMX+s2ntE 9CuQ9HAuJ1vbZm3zQRcJMJABwiUnz354vnVvAahdIvNE30Um7PAz9XSfycFrOtk5UA3mkQIQyPt3 usguzu8Ap8zCIX4G8lPq8Yi8f5Ps1Hrb8G8HahykqxCTdAGoE9LjZ1hdvzVPFIb5L4TiJYpDFIYo jFCckJ2/C5VYAkiKJTZ72yTHMQoFVg9QHEIo2vgIxSmognppjFRIFrD6W1MpDlEo2vOgrTyaA6Qw H2wD8JIjovCzFRYL23GIwnghtrJpMywB5G0QZj9O1JNujuWJ1AHLQadRrACPkmZ3SSSWpeStWgDK 6uGnxzc2Eddw5H99uwLcG4/paTPA//0bfwG+iB9/gfCdpwAAAABJRU5ErkJggg== "
+ id="image4651"
+ x="285"
+ y="673.36218"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/taskfolderadd.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <path
+ inkscape:connector-curvature="0"
+ style="opacity:0.76999996;color:#000000;fill:#ff2a2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.0625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 297.19758,676.71675 -5.61351,5.05002 -1.81751,-2.09221 -2.22424,2.28085 c 1.60629,1.4242 2.80319,2.43911 4.13653,3.80876 2.24198,-2.10143 4.53857,-3.76628 6.97148,-5.34924 -0.3707,-1.58182 -0.85095,-2.67256 -1.45275,-3.69818 z"
+ id="path4653"
+ sodipodi:nodetypes="ccccccc"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/checked.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <image
+ y="677.36218"
+ x="290"
+ id="image4655"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAQZJREFU OI1j/P//PwMlgIki3cPDABZsggVTo2r+M/wv+/HrO+/nbx8/f/jyrmtb+8UWbGoZ0WMhc0JQg6SM QL2xpgmDjJAqw/6rGxhOXDnM8ODOm94TU56VEPTC1x+fyw009Bn+Mv1l0Jd0ZfjL+JvBQteKgYGB IRubCzAMeP/lLQcrIw+Dn2YuAwMDA0Ox8ywGZTE9BgYGBg6iDHj78dWPq8+OMXTsTmRgYGBg6NiV yHD31SUGBgaGH0QZ8O//v94Tl44xsDGwMGy+PI2BjZGF4ciFgwwMDAxTsRmAEYgMDAwMFjlSHQwM DFkMDAy8DAwMnxkYGKadmPKsgmgDSAEDnxIpNgAAJ+ZYJkBPdSwAAAAASUVORK5CYII= "
+ height="16"
+ width="16" />
</g>
</svg>
Added: trunk/img/webtemplate/confirmation.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/webtemplate/confirmation.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/img/webtemplate/web_template-2011.svg
===================================================================
--- trunk/img/webtemplate/web_template-2011.svg 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/img/webtemplate/web_template-2011.svg 2011-08-10 17:09:53 UTC (rev 1487)
@@ -78,14 +78,14 @@
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
- inkscape:zoom="1"
- inkscape:cx="488.6491"
- inkscape:cy="1879.6308"
- inkscape:current-layer="layer1"
+ inkscape:zoom="2"
+ inkscape:cx="509.97457"
+ inkscape:cy="579.66806"
+ inkscape:current-layer="g8450"
inkscape:document-units="px"
showgrid="false"
- inkscape:window-width="1080"
- inkscape:window-height="1824"
+ inkscape:window-width="1920"
+ inkscape:window-height="984"
inkscape:window-x="0"
inkscape:window-y="21"
inkscape:window-maximized="1"
@@ -258,7 +258,7 @@
id="g5365">
<path
transform="matrix(0.102065,0,0,0.102065,387.7515,-17.05636)"
- d="m 277.35793,332.62314 a 26.82268,26.82268 0 1 1 -53.64536,0 26.82268,26.82268 0 1 1 53.64536,0 z"
+ d="m 277.35793,332.62314 c 0,14.81376 -12.00893,26.82268 -26.82268,26.82268 -14.81376,0 -26.82268,-12.00892 -26.82268,-26.82268 0,-14.81376 12.00892,-26.82268 26.82268,-26.82268 14.81375,0 26.82268,12.00892 26.82268,26.82268 z"
sodipodi:ry="26.82268"
sodipodi:rx="26.82268"
sodipodi:cy="332.62314"
@@ -268,7 +268,7 @@
sodipodi:type="arc" />
<path
transform="matrix(0.05245387,0,0,0.05245387,400.1808,-0.554549)"
- d="m 277.35793,332.62314 a 26.82268,26.82268 0 1 1 -53.64536,0 26.82268,26.82268 0 1 1 53.64536,0 z"
+ d="m 277.35793,332.62314 c 0,14.81376 -12.00893,26.82268 -26.82268,26.82268 -14.81376,0 -26.82268,-12.00892 -26.82268,-26.82268 0,-14.81376 12.00892,-26.82268 26.82268,-26.82268 14.81375,0 26.82268,12.00892 26.82268,26.82268 z"
sodipodi:ry="26.82268"
sodipodi:rx="26.82268"
sodipodi:cy="332.62314"
@@ -475,22 +475,16 @@
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/web_template-2011.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
- <rect
+ <path
style="color:#000000;fill:#deaa87;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999994;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 819.5,118.5 c 18.45998,0 36.91997,0 55.37995,0 0,129.9314 0,259.86279 0,389.79419 -18.45998,0 -36.91997,0 -55.37995,0 0,-129.9314 0,-259.86279 0,-389.79419 z"
id="rect3097"
- width="55.379948"
- height="389.79419"
- x="819.5"
- y="118.5" />
- <rect
- ry="6.3900704"
- rx="10"
- y="118.5"
- x="837.5"
- height="389.79419"
- width="177"
+ inkscape:connector-curvature="0" />
+ <path
+ style="color:#000000;fill:#deaa87;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999976;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 847.5,118.5 c 53.10074,0.0235 106.20219,-0.0469 159.3025,0.0352 13.3258,4.43265 6.0678,21.90725 7.6975,32.98079 0,116.79605 0,233.59209 0,350.38814 -7.9948,11.56207 -24.38385,4.77722 -36.62591,6.39007 -44.85902,-0.25563 -89.80292,0.5129 -134.60856,-0.38714 -10.65566,-7.08979 -4.20704,-22.48179 -5.76553,-33.65321 0,-116.45459 0,-232.90918 0,-349.36377 0.35401,-4.73035 6.04734,-6.37115 10,-6.39007 z"
id="rect3095"
- style="color:#000000;fill:#deaa87;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.99999976;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ inkscape:connector-curvature="0" />
</g>
<rect
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
@@ -552,7 +546,7 @@
transform="translate(-751,-12)">
<path
transform="translate(0,-3)"
- d="m 333,232 a 11,11 0 1 1 -22,0 11,11 0 1 1 22,0 z"
+ d="m 333,232 c 0,6.07513 -4.92487,11 -11,11 -6.07513,0 -11,-4.92487 -11,-11 0,-6.07513 4.92487,-11 11,-11 6.07513,0 11,4.92487 11,11 z"
sodipodi:ry="11"
sodipodi:rx="11"
sodipodi:cy="232"
@@ -720,7 +714,7 @@
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAASCAYAAABB7B6eAAAABHNCSVQICAgIfAhkiAAAAzBJREFU OI2NlE1LK2cUx3+ZMXHGydxE5U5yE2MNuFBKoJRARdpIi34C674LF0q5m/sVur+0uPIbFFHopl2q FequoTXFFruQJjM2hpjoHccMmbcu7s1wzYv0wGGel3P+/zPnOedE6JNKpfLBw8PDt5ZlfXJ3d5d2 HCfSb9OTaDQaJBKJuqqqP0mS9E2hUPhnb2+PjY2N0OaR8+np6VGj0ViRJCmSy+XIZDIoikI0Gh0A dxwH0zSp1+vUajVs2w5SqdQvtVrtMyAkCQkODw+vPM97USgU0DQNgCAIQh0lkchbiEajwdnZGc+e PWvpuj7dIxEATk5OfnVd98Xy8jKapuG6Lo7j4Lounufh+/5I9TwPz/OYnp5maWmJdrs9lc/nm70A hHK5/Gmr1fq4WCwiSRLdbncoqGVZXFxcYFnWSLLx8XGKxSK6rk+vrq5+DyCYpvldKpUimUyOBPd9 H13X2dnZwTCMJ/8oHo+TTCapVqtfAnNjlmUt5nI5XNfFdd2RufZ9HwBRFB/th4mmaVxfX/vAyzHL suSpqSlc1x1w6nQ6XF1dAYRfXdfpdrv4vk8mk0GW5QGCZDLJ+fl5FPhoDECWZWzbHiAwDIPd3d1H Z/v7++F6e3ubfD4/UGXvlfXKGBDmvt8wnU6ztbVFLBbDMAwODg5YX18nm80CMDMzMzRdtm2H67GJ iYnO7e2trCjKgGEsFmN2dhZBEEKnbDZLLpd7VAz9gbVaLRRFsYGoIEnSn7VaDUEQRta54zh4nge8 bb5en/TO+32azSaqqr4BfhdkWX5Zr9fDNxilmqaxublJNpt90s40TUzTZGFh4Qr4LQJwdHT0h23b Hy4uLg6dOz2JRCKIojj0vQBc16VSqaCq6l+lUuk58EU4i46Pj+8ty1Lm5uZQVTWcMf9HgiDANE0u Ly8B7LW1tWosFvsRePUIpVwuN6rV6nNRFEkkEkxOTqIoSthc/aCdToebmxva7Ta2baNp2t+lUqkD eMDnwN1AmPf3968Nw/i60WiIzWZTdBznyehVVX2TTqf/nZ+fj8bj8VlgB3jVux+ahyAIEsBXwMo7 TT7JAj8DP7zT6vsX/wEtdTE7+osNZwAAAABJRU5ErkJggg== "
height="18"
width="24"
- inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/web_template-2011.png"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90" />
<image
@@ -2183,7 +2177,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/from-private-to-public.png"
transform="matrix(0.475,0,0,0.95,-21.570622,377.21335)"
- d="m 110,32.362183 a 20,10 0 1 1 -40,0 20,10 0 1 1 40,0 z"
+ d="m 110,32.362183 c 0,5.522847 -8.95431,10 -20,10 -11.045695,0 -20,-4.477153 -20,-10 0,-5.522848 8.954305,-10 20,-10 11.04569,0 20,4.477152 20,10 z"
sodipodi:ry="10"
sodipodi:rx="20"
sodipodi:cy="32.362183"
@@ -2196,7 +2190,7 @@
inkscape:export-xdpi="90"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/from-private-to-public.png"
transform="matrix(1.8840121,0.6711918,-0.6711918,1.8840121,8.0842525,364.37023)"
- d="m 16,16.362183 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 16,16.362183 c 0,0.552284 -0.447715,1 -1,1 -0.552285,0 -1,-0.447716 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="16.362183"
@@ -2215,14 +2209,14 @@
sodipodi:cy="16.362183"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 16,16.362183 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 16,16.362183 c 0,0.552284 -0.447715,1 -1,1 -0.552285,0 -1,-0.447716 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(1.8840121,0.6711918,-0.6711918,1.8840121,2.7154875,362.20909)" />
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/from-private-to-public.png"
transform="matrix(1.8840121,0.6711918,-0.6711918,1.8840121,7.7663825,370.24449)"
- d="m 16,16.362183 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 16,16.362183 c 0,0.552284 -0.447715,1 -1,1 -0.552285,0 -1,-0.447716 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="16.362183"
@@ -2241,14 +2235,14 @@
sodipodi:cy="16.362183"
sodipodi:rx="1"
sodipodi:ry="1"
- d="m 16,16.362183 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 16,16.362183 c 0,0.552284 -0.447715,1 -1,1 -0.552285,0 -1,-0.447716 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
transform="matrix(1.8840121,0.6711918,-0.6711918,1.8840121,2.2467045,371.75097)" />
<path
inkscape:export-ydpi="90"
inkscape:export-xdpi="90"
inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/from-private-to-public.png"
transform="matrix(1.8840121,0.6711918,-0.6711918,1.8840121,-0.8112855,366.96948)"
- d="m 16,16.362183 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z"
+ d="m 16,16.362183 c 0,0.552284 -0.447715,1 -1,1 -0.552285,0 -1,-0.447716 -1,-1 0,-0.552285 0.447715,-1 1,-1 0.552285,0 1,0.447715 1,1 z"
sodipodi:ry="1"
sodipodi:rx="1"
sodipodi:cy="16.362183"
@@ -4308,7 +4302,7 @@
inkscape:groupmode="layer"
id="layer4"
inkscape:label="dialogs"
- style="display:inline"
+ style="display:none"
sodipodi:insensitive="true">
<rect
style="color:#000000;fill:#552200;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
@@ -4469,11 +4463,21 @@
sodipodi:nodetypes="cccc" />
</g>
<g
- style="display:none"
+ style="display:inline"
inkscape:label="confirmation"
id="g8450"
inkscape:groupmode="layer">
<rect
+ style="color:#000000;fill:#653616;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect6843"
+ width="476.85486"
+ height="7.9567051"
+ x="277.29156"
+ y="115.08939"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <rect
ry="10"
rx="10"
y="113.49999"
@@ -4481,7 +4485,10 @@
height="205.09827"
width="476.85486"
id="rect8452"
- style="opacity:0.85;color:#000000;fill:#552200;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ style="opacity:1;color:#000000;fill:#653616;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
<rect
style="opacity:0.85;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect8454"
@@ -4490,21 +4497,30 @@
x="293.62372"
y="149.06573"
rx="3"
- ry="3" />
+ ry="3"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
<rect
y="112.08939"
x="277.29156"
height="7.9567051"
width="476.85486"
id="rect8456"
- style="color:#000000;fill:#552200;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ style="color:#000000;fill:#181817;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#241c1c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Bold"
x="317.16895"
y="191.81694"
id="text8468"
- sodipodi:linespacing="125%"><tspan
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan8470"
x="317.16895"
@@ -4517,14 +4533,20 @@
height="26"
width="103.29102"
id="rect8472"
- style="color:#000000;fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:#666666;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ style="color:#000000;fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:#666666;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
<text
sodipodi:linespacing="125%"
id="text8474"
y="298.10547"
x="522.03516"
style="font-size:16px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#666666;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Bold"
- xml:space="preserve"><tspan
+ xml:space="preserve"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
y="298.10547"
x="522.03516"
id="tspan8476"
@@ -4537,14 +4559,20 @@
x="636"
y="280"
rx="6.9999995"
- ry="7" />
+ ry="7"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
<text
xml:space="preserve"
style="font-size:16px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#666666;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Bold"
x="653.03516"
y="298.10547"
id="text8490"
- sodipodi:linespacing="125%"><tspan
+ sodipodi:linespacing="125%"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan8492"
x="653.03516"
@@ -4560,7 +4588,10 @@
y="229.14001"
x="317.08438"
style="font-size:20px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#552200;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Ubuntu;-inkscape-font-specification:Ubuntu"
- xml:space="preserve"><tspan
+ xml:space="preserve"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"><tspan
sodipodi:role="line"
id="tspan8502"
x="317.08438"
@@ -4573,12 +4604,57 @@
inkscape:transform-center-y="-0.62993359"
inkscape:transform-center-x="-5.9580116"
style="color:#000000;fill:#6c5353;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <path
+ style="color:#000000;fill:#a05a2c;fill-opacity:0.94901961000000001;fill-rule:nonzero;stroke:none;stroke-width:1.40678155000000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 738 124 C 736.338 124 735 125.338 735 127 L 735 142 C 735 143.662 736.338 145 738 145 L 751 145 C 752.662 145 754 143.662 754 142 L 754 127 C 754 125.338 752.662 124 751 124 L 738 124 z "
+ id="rect4000"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <rect
+ y="124"
+ x="742.76031"
+ height="21"
+ width="11.239679"
+ id="rect4002"
+ style="color:#000000;fill:#a05a2c;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.40678155000000005;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <image
+ y="-71.70166"
+ x="737.84711"
+ id="image6818"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAoFJREFU
+OI2lkstPE3EQx+e3rtACTVrA0NKWAlKLbAjYQkMfQFYU8FWQQBoR43/hxZjwL3j1qCiUJkKitKUN
+oWjwFcSLB6Pd4gMjPjBd7G4X9vHzQNq0PA7GSebynZlPJvMdhDGG/wlir+AemDrl7JsyH9TcNRhs
+6hwKnDgU0Hkx6OjrbQh5usxLHecfmvJrXt8kZXdWz7e0VEe7hx9YszqZo/sC9jP99Y8ou16/S8VL
+7p5g17OFka9e3yTldNWEWzvMJkXBgAHHPJcDPcszfia3gaqs6Farw6DnBAnYjAhe2lLv7NYvdVwI
+nnW5LGG722zmRQUECYCyG4zFJHkDAABlj0jTcbKqKRP2X23uYQUJKRhDmYqEdSbFVdVqSzlBBgAE
+6bQgR2ffBebvDYxhDBjlu0DTcVJPCZGRUeo0K8hIUQBIAsGOjGFbVIBlBelJ6P10dGJwDGPABRvk
+Q441ZhavXGv2/uYl4LYl+MmKQCoyXo4kZmL3B4ezwwfaKGq+2RqsunpelOHTLx6YDQ5SvAgigZCu
+Qm1r750qcKcA4PZNNno8tRHzycrq1WQKOEECQ7kKEACk0jLUtZkoi1UXzv+THKD93ITNYTdGKm1a
+E/M9DYhAUFl8RHr++EOiooRQEALY4mWobTNRNVZtKAvJATQa9e1GR5XlB7sNBIFAryalp2FmlvmT
+oV7Or0V0KqQghHabEVKBohwtAGwJm0PxueQLo1YNhtIiaTGUmA0ff+N/Oz2yk/msGViJJaPlxaCs
+vV5PfGQ2+l/FRpP7XGjz3SmpM5oWMrz8Ze7uJX/+tWk6TirlmxNcJn1zJXSdyQ1hjAvS5ZpWw/g4
+sVc/LPf9wb/GX4vjPAuggBABAAAAAElFTkSuQmCC
+"
+ height="16"
+ width="16"
+ style="fill:#ffffff;stroke:#ffffff" />
+ <path
+ style="color:#000000;fill:#181817;fill-opacity:1;fill-rule:nonzero;stroke:#181817;stroke-width:1.40678155000000005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 741.5625 129.375 L 740.5 130.4375 L 744.125 134.0625 L 740.5 137.6875 L 741.5625 138.75 L 745.1875 135.125 L 748.8125 138.75 L 749.84375 137.6875 L 746.21875 134.0625 L 749.84375 130.4375 L 748.8125 129.375 L 745.1875 133 L 741.5625 129.375 z "
+ id="rect6837"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/webtemplate/confirmation.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
</g>
<g
inkscape:groupmode="layer"
id="layer5"
inkscape:label="notify"
- style="display:inline"
+ style="display:none"
sodipodi:insensitive="true">
<g
style="display:inline"
Modified: trunk/src/main/java/cc/kune/common/client/resources/CommonIconResources.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/resources/CommonIconResources.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/common/client/resources/CommonIconResources.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -25,17 +25,29 @@
public interface CommonIconResources extends ClientBundle {
- public static final CommonIconResources INSTANCE = GWT.create(CommonIconResources.class);
+ public static final CommonIconResources INSTANCE = GWT.create(CommonIconResources.class);
- @Source("checked.png")
- ImageResource checked();
+ @Source("checked.png")
+ ImageResource checked();
- @Source("radiochecked.png")
- ImageResource radioChecked();
+ @Source("kune-close.png")
+ ImageResource kuneClose();
- @Source("radiounchecked.png")
- ImageResource radioUnChecked();
+ @Source("kune-close-grey.png")
+ ImageResource kuneCloseGrey();
- @Source("unchecked.png")
- ImageResource unChecked();
+ @Source("kune-close-greylight.png")
+ ImageResource kuneCloseGreylight();
+
+ @Source("radiochecked.png")
+ ImageResource radioChecked();
+
+ @Source("radiounchecked.png")
+ ImageResource radioUnChecked();
+
+ @Source("cross.png")
+ ImageResource redCross();
+
+ @Source("unchecked.png")
+ ImageResource unChecked();
}
Added: trunk/src/main/java/cc/kune/common/client/resources/cross.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/common/client/resources/cross.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/common/client/resources/kune-close-grey.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/common/client/resources/kune-close-grey.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/common/client/resources/kune-close-greylight.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/common/client/resources/kune-close-greylight.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/common/client/resources/kune-close.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/common/client/resources/kune-close.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -32,6 +32,7 @@
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HasDirectionalText;
import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
+import com.google.gwt.user.client.ui.PushButton;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;
@@ -45,6 +46,8 @@
@UiField
FlowPanel btnPanel;
@UiField
+ PushButton closeBtn;
+ @UiField
Button firstBtn;
@UiField
Button secondBtn;
@@ -79,6 +82,11 @@
}
@Override
+ public HasClickHandlers getCloseBtn() {
+ return closeBtn;
+ }
+
+ @Override
public HasClickHandlers getFirstBtn() {
return firstBtn;
}
@@ -98,6 +106,11 @@
return title;
}
+ @Override
+ public void setCloseBtnVisible(final boolean visible) {
+ closeBtn.setVisible(visible);
+ }
+
public void setFirstBtnEnabled(final boolean enabled) {
firstBtn.setEnabled(enabled);
}
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.ui.xml 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.ui.xml 2011-08-10 17:09:53 UTC (rev 1487)
@@ -1,19 +1,28 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:k="urn:import:cc.kune.common.client.ui" xmlns:g="urn:import:com.google.gwt.user.client.ui">
+ <ui:with field='res' type='cc.kune.common.client.resources.CommonIconResources'/>
<g:VerticalPanel addStyleNames="k-dialog-outerp, k-bottom-10corners">
<g:FlowPanel>
- <g:FlowPanel addStyleNames="k-dialog-innerp, k-3corners">
- <k:IconLabel ui:field="title" addStyleNames="k-dialog-title, " />
- <g:FlowPanel ui:field="vp" addStyleNames="kune-Margin-Medium-trbl" />
- <g:VerticalPanel ui:field="bottomPanel" width="100%"></g:VerticalPanel>
+ <g:PushButton visible="false" ui:field="closeBtn"
+ addStyleNames="k-dialog-btn, k-fr, k-dialog-secondBtn, k-5corners, k-btn-min,k-button-left, k-dialog-close-btn">
+ <g:upFace image="{res.kuneCloseGrey}" />
+ <g:upHoveringFace image="{res.kuneCloseGreylight}" />
+ <g:downFace image="{res.kuneClose}" />
+ </g:PushButton>
+ <g:FlowPanel>
+ <g:FlowPanel addStyleNames="k-dialog-innerp, k-3corners">
+ <k:IconLabel ui:field="title" addStyleNames="k-dialog-title, "/>
+ <g:FlowPanel ui:field="vp" addStyleNames="kune-Margin-Medium-trbl"/>
+ <g:VerticalPanel ui:field="bottomPanel" width="100%"></g:VerticalPanel>
+ </g:FlowPanel>
</g:FlowPanel>
+ <g:FlowPanel ui:field="btnPanel" addStyleNames="k-dialog-btn-area, k-clear">
+ <g:Button ui:field="firstBtn"
+ addStyleNames="k-dialog-btn, k-dialog-firstBtn, k-5corners, k-button "/>
+ <g:Button ui:field="secondBtn"
+ addStyleNames="k-dialog-btn,k-dialog-secondBtn, k-5corners, k-button"/>
+ </g:FlowPanel>
</g:FlowPanel>
- <g:FlowPanel ui:field="btnPanel" addStyleNames="k-dialog-btn-area">
- <g:Button ui:field="firstBtn"
- addStyleNames="k-dialog-btn, k-dialog-firstBtn, k-5corners, k-button " />
- <g:Button ui:field="secondBtn"
- addStyleNames="k-dialog-btn,k-dialog-secondBtn, k-5corners, k-button" />
- </g:FlowPanel>
</g:VerticalPanel>
-</ui:UiBinder>
\ No newline at end of file
+</ui:UiBinder>
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialogView.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialogView.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialogView.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -33,6 +33,8 @@
HasClickHandlers getSecondBtn();
+ HasClickHandlers getCloseBtn();
+
HasDirectionalText getTitleText();
void setFirstBtnText(String text);
@@ -41,10 +43,12 @@
void setFirstBtnVisible(boolean visible);
+ void setCloseBtnVisible(boolean visible);
+
void setSecondBtnText(String text);
void setSecondBtnTitle(String title);
void setSecondBtnVisible(boolean visible);
-}
\ No newline at end of file
+}
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -22,9 +22,12 @@
import cc.kune.common.client.ui.PopupTopPanel;
import cc.kune.common.client.utils.TextUtils;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.logical.shared.HasCloseHandlers;
import com.google.gwt.event.logical.shared.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler;
+import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.UIObject;
@@ -34,6 +37,7 @@
public static class Builder {
private final boolean autohide;
private boolean autoscroll = false;
+ private boolean closeBtn = true;
private final String dialogId;
private String firstButtonId;
private String firstButtonTitle;
@@ -63,6 +67,11 @@
return new BasicTopDialog(this);
}
+ public Builder closeBtn(final boolean closeBtn) {
+ this.closeBtn = closeBtn;
+ return this;
+ }
+
public Builder firstButtonId(final String firstButtonId) {
this.firstButtonId = firstButtonId;
return this;
@@ -122,6 +131,7 @@
}
+ private HandlerRegistration closeClickHandler;
private String height;
private final PopupTopPanel popup;
private String width;
@@ -134,6 +144,7 @@
if (TextUtils.notEmpty(builder.icon)) {
super.setTitleIcon(builder.icon);
}
+ setCloseBtn(builder.closeBtn);
super.setFirstBtnText(builder.firstButtonTitle);
super.setFirstBtnId(builder.firstButtonId);
super.setFirstBtnTabIndex(builder.tabIndexStart);
@@ -164,6 +175,24 @@
popup.hide();
}
+ private void setCloseBtn(final boolean closeBtn) {
+ setCloseBtnVisible(closeBtn);
+ if (closeBtn) {
+ if (closeClickHandler == null) {
+ closeClickHandler = super.getCloseBtn().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ popup.hide();
+ }
+ });
+ }
+ } else {
+ if (closeClickHandler != null) {
+ closeClickHandler.removeHandler();
+ }
+ }
+ }
+
@Override
public void setFirstBtnTitle(final String title) {
super.setFirstBtnTitle(title);
Modified: trunk/src/main/java/cc/kune/common/public/kune-common.css
===================================================================
--- trunk/src/main/java/cc/kune/common/public/kune-common.css 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/common/public/kune-common.css 2011-08-10 17:09:53 UTC (rev 1487)
@@ -21,21 +21,24 @@
}
.k-opacity80 {
- kfilter: alpha(opacity = 80);
+ kfilter: alpha(opacity = 80
+ );
-moz-opacity: 0.80;
-khtml-opacity: 0.80;
opacity: 0.80;
}
.k-opacity90 {
- kfilter: alpha(opacity = 90);
+ kfilter: alpha(opacity = 90
+ );
-moz-opacity: 0.90;
-khtml-opacity: 0.90;
opacity: 0.90;
}
.k-opacity95 {
- kfilter: alpha(opacity = 95);
+ kfilter: alpha(opacity = 95
+ );
-moz-opacity: 0.95;
-khtml-opacity: 0.95;
opacity: 0.95;
@@ -43,8 +46,8 @@
.gwt-PopupPanelGlass {
background-color: #f7ebe3 !important;
- kfilter: alpha(opacity = 68)
- !important;
+ kfilter: alpha(opacity = 68
+ ) !important;
-moz-opacity: 0.68 !important;
-khtml-opacity: 0.68 !important;
opacity: 0.68 !important;
@@ -173,6 +176,16 @@
-khtml-user-select: none;
}
+.k-dialog-close-btn {
+ background-color: #a05a2c !important;
+ color: #181817 !important;
+ border: 0 none !important;
+ position: relative;
+ top: -26px;
+ height: 17px !important;
+ left: 1px;
+}
+
.k-dialog-firstBtn {
float: left;
}
@@ -295,7 +308,7 @@
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-bottomleft: 5px;
border-bottom-left-radius: 5px;
- kfilter: alpha(opacity = 90);
+ kfilter: alpha(opacity = 90);
-moz-opacity: 0.90;
-khtml-opacity: 0.90;
opacity: 0.90;
@@ -538,7 +551,7 @@
_border-left-color: pink;
_border-bottom-color: pink;
_border-right-color: pink;
- _filter: chroma(color = pink);
+ _filter: chroma(color = pink);
}
/* end tooltip */
@@ -681,4 +694,10 @@
padding: 10px;
background-color: #F2F0F0;
border: 1px solid #D0D0D0;
-}
\ No newline at end of file
+}
+
+.k-line-through {
+ text-decoration: line-through;
+ color: gray;
+}
+
Modified: trunk/src/main/java/cc/kune/core/client/actions/ActionRegistryByType.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/actions/ActionRegistryByType.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/core/client/actions/ActionRegistryByType.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -29,6 +29,8 @@
import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
import cc.kune.common.client.actions.ui.descrip.GuiActionDescProviderCollection;
import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.core.client.registry.IdGenerator;
+import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.domain.utils.AccessRights;
import com.google.inject.Provider;
@@ -74,6 +76,14 @@
}
public void addAction(@Nonnull final String actionsGroupId,
+ final @Nonnull Provider<? extends GuiActionDescrip> action, final ContentStatus status,
+ @Nonnull final String... typeIds) {
+ for (final String typeId : typeIds) {
+ addAction(actionsGroupId, action, IdGenerator.generate(typeId, status.toString()));
+ }
+ }
+
+ public void addAction(@Nonnull final String actionsGroupId,
final @Nonnull Provider<? extends GuiActionDescrip> action, @Nonnull final String... typeIds) {
for (final String typeId : typeIds) {
final GuiActionDescProviderCollection actionColl = getActions(actionsGroupId, typeId);
@@ -97,11 +107,6 @@
}
public GuiActionDescCollection getCurrentActions(final Object targetItem, final boolean isLogged,
- final AccessRights rights) {
- return getCurrentActions(targetItem, GENERIC_TYPE_ID, isLogged, rights, null);
- }
-
- public GuiActionDescCollection getCurrentActions(final Object targetItem, final boolean isLogged,
final AccessRights rights, @Nullable final String actionsGroup) {
return getCurrentActions(targetItem, GENERIC_TYPE_ID, isLogged, rights, actionsGroup);
}
@@ -128,6 +133,16 @@
return collection;
}
+ public <T> GuiActionDescCollection getCurrentActions(final Object targetItem, final String typeId,
+ final ContentStatus status, final boolean isLogged, final AccessRights rights,
+ @Nullable final String actionsGroupId) {
+ final GuiActionDescCollection collection = new GuiActionDescCollection();
+ collection.addAll(getCurrentActions(targetItem, typeId, isLogged, rights, actionsGroupId));
+ collection.addAll(getCurrentActions(targetItem, IdGenerator.generate(typeId, status.toString()),
+ isLogged, rights, actionsGroupId));
+ return collection;
+ }
+
private boolean mustAdd(final RolAction action, final boolean isLogged, final AccessRights rights) {
if (action.isAuthNeed()) {
if (!isLogged) {
@@ -144,4 +159,5 @@
return rights.isVisible();
}
}
+
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -37,6 +37,7 @@
private final PublishModerableRegistry publishModerable;
private final RateableRegistry rateable;
private final RenamableRegistry renamable;
+ private final ShowDeletedRegistry showDeleted;
private final TageableRegistry tageable;
private final TranslatableRegistry translatable;
private final VersionableRegistry versionable;
@@ -53,7 +54,8 @@
final RateableRegistry rateable, final TageableRegistry tageable,
final RenamableRegistry renamable, final TranslatableRegistry translatable,
final VersionableRegistry versionable, final EmptyMessagesRegistry emptyMessagesRegistry,
- final XmppComentableRegistry xmppComentable, final XmppNotifyCapableRegistry xmppNotifyCapable) {
+ final XmppComentableRegistry xmppComentable, final XmppNotifyCapableRegistry xmppNotifyCapable,
+ final ShowDeletedRegistry showDeleted) {
this.authorable = authorableRegistry;
this.newMenus = newMenus;
this.aclEditable = aclEditableRegistry;
@@ -73,6 +75,7 @@
this.emptyMessagesRegistry = emptyMessagesRegistry;
this.xmppComentable = xmppComentable;
this.xmppNotifyCapable = xmppNotifyCapable;
+ this.showDeleted = showDeleted;
}
public boolean canBeHomepage(final String typeId) {
@@ -135,6 +138,10 @@
return renamable;
}
+ public ShowDeletedRegistry getShowDeleted() {
+ return showDeleted;
+ }
+
public TageableRegistry getTageable() {
return tageable;
}
@@ -215,4 +222,8 @@
return xmppNotifyCapable.contains(typeId);
}
+ public boolean showDeleted(final String typeId) {
+ return showDeleted.contains(typeId);
+ }
+
}
Modified: trunk/src/main/java/cc/kune/core/client/registry/IconsRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/registry/IconsRegistry.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/core/client/registry/IconsRegistry.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -22,57 +22,62 @@
import java.util.HashMap;
import java.util.Map;
+import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.dto.BasicMimeTypeDTO;
public class IconsRegistry {
- private final Map<String, Object> contentTypesIcons;
+ private final Map<String, Object> contentTypesIcons;
- public IconsRegistry() {
- contentTypesIcons = new HashMap<String, Object>();
- }
+ public IconsRegistry() {
+ contentTypesIcons = new HashMap<String, Object>();
+ }
- private String concatenate(final String typeId, final BasicMimeTypeDTO mimeType) {
- if (mimeType != null) {
- return typeId + "|" + mimeType;
- } else {
- return typeId;
- }
- }
+ public Object getContentTypeIcon(final String typeId) {
+ return contentTypesIcons.get(typeId);
+ }
- public Object getContentTypeIcon(final String typeId) {
- return contentTypesIcons.get(typeId);
+ /**
+ * If there is a specific icon for a type/subtype pair or a generic type icon
+ * in defect
+ *
+ * @param typeId
+ * the kune typeId (see *ClientTool)
+ * @param mimeType
+ * @return
+ */
+ public Object getContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType) {
+ Object icon = getContentTypeIcon(IdGenerator.generate(typeId,
+ mimeType == null ? null : mimeType.toString()));
+ if (icon == null) {
+ if (mimeType == null) {
+ return getContentTypeIcon(typeId);
+ }
+ } else {
+ return icon;
}
-
- /**
- * If there is a specific icon for a type/subtype pair or a generic type
- * icon in defect
- *
- * @param typeId
- * the kune typeId (see *ClientTool)
- * @param mimeType
- * @return
- */
- public Object getContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType) {
- Object icon = getContentTypeIcon(concatenate(typeId, mimeType));
- if (icon == null) {
- if (mimeType == null) {
- return getContentTypeIcon(typeId);
- }
- } else {
- return icon;
- }
- final String subtype = mimeType.getSubtype();
- if (subtype != null && subtype.length() > 0) {
- icon = getContentTypeIcon(typeId, new BasicMimeTypeDTO(mimeType.getType()));
- }
- return icon == null ? getContentTypeIcon(typeId) : icon;
+ final String subtype = mimeType.getSubtype();
+ if (subtype != null && subtype.length() > 0) {
+ icon = getContentTypeIcon(typeId, new BasicMimeTypeDTO(mimeType.getType()));
}
+ return icon == null ? getContentTypeIcon(typeId) : icon;
+ }
- public void registerContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType, final Object icon) {
- registerContentTypeIcon(concatenate(typeId, mimeType), icon);
- }
+ public Object getContentTypeIcon(final String typeId, final ContentStatus contentStatus) {
+ final Object icon = getContentTypeIcon(IdGenerator.generate(typeId, contentStatus.toString()));
+ return (icon == null ? getContentTypeIcon(typeId) : icon);
+ }
- public void registerContentTypeIcon(final String contentTypeId, final Object icon) {
- contentTypesIcons.put(contentTypeId, icon);
- }
+ public void registerContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType,
+ final Object icon) {
+ registerContentTypeIcon(IdGenerator.generate(typeId, mimeType.toString()), icon);
+ }
+
+ public void registerContentTypeIcon(final String typeId, final ContentStatus contentStatus,
+ final Object icon) {
+ registerContentTypeIcon(IdGenerator.generate(typeId, contentStatus.toString()), icon);
+ }
+
+ public void registerContentTypeIcon(final String contentTypeId, final Object icon) {
+ contentTypesIcons.put(contentTypeId, icon);
+ }
}
Added: trunk/src/main/java/cc/kune/core/client/registry/IdGenerator.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/registry/IdGenerator.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/registry/IdGenerator.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -0,0 +1,26 @@
+package cc.kune.core.client.registry;
+
+import cc.kune.common.client.utils.TextUtils;
+
+import com.google.gxp.com.google.common.base.Nullable;
+
+public class IdGenerator {
+ protected static final String SEPARATOR = "|";
+
+ /**
+ * Generates a id concatenating two strings
+ *
+ * @param one
+ * String
+ * @param two
+ * String
+ * @return
+ */
+ public static String generate(@Nullable final String one, @Nullable final String two) {
+ if (TextUtils.empty(one)) {
+ return TextUtils.empty(two) ? "" : two;
+ } else {
+ return TextUtils.empty(two) ? one : one + SEPARATOR + two;
+ }
+ }
+}
Added: trunk/src/main/java/cc/kune/core/client/registry/ShowDeletedRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/registry/ShowDeletedRegistry.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/registry/ShowDeletedRegistry.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.client.registry;
+
+/**
+ * Conents registered here will be showed as deleted in
+ * {@link FolderVieverPresenter}
+ *
+ */
+public class ShowDeletedRegistry extends AbstractContentRegistry {
+}
Modified: trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -114,6 +114,15 @@
@Source("taskadd.png")
ImageResource taskadd();
+ @Source("taskdone.png")
+ ImageResource taskdone();
+
+ @Source("taskfolder.png")
+ ImageResource taskfolder();
+
+ @Source("taskfolderadd.png")
+ ImageResource taskfolderadd();
+
@Source("upload.png")
ImageResource upload();
Modified: trunk/src/main/java/cc/kune/core/client/resources/nav/task.png
===================================================================
(Binary files differ)
Modified: trunk/src/main/java/cc/kune/core/client/resources/nav/taskadd.png
===================================================================
(Binary files differ)
Copied: trunk/src/main/java/cc/kune/core/client/resources/nav/taskdone.png (from rev 1485, trunk/src/main/java/cc/kune/core/client/resources/nav/task.png)
===================================================================
(Binary files differ)
Added: trunk/src/main/java/cc/kune/core/client/resources/nav/taskfolder.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nav/taskfolder.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/resources/nav/taskfolderadd.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nav/taskfolderadd.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/core/server/rpc/ContentRPC.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -48,7 +48,6 @@
import cc.kune.core.server.state.StateContainer;
import cc.kune.core.server.state.StateContent;
import cc.kune.core.server.state.StateService;
-import cc.kune.core.server.xmpp.XmppManager;
import cc.kune.core.shared.domain.AccessRol;
import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.domain.RateResult;
@@ -84,15 +83,14 @@
private final StateService stateService;
private final TagUserContentManager tagManager;
private final Provider<UserSession> userSessionProvider;
- private final XmppManager xmppManager;
@Inject
public ContentRPC(final FinderService finderService, final Provider<UserSession> userSessionProvider,
final AccessService accessService, final AccessRightsService rightsService,
final StateService stateService, final CreationService creationService,
- final GroupManager groupManager, final XmppManager xmppManager,
- final ContentManager contentManager, final ContainerManager containerManager,
- final TagUserContentManager tagManager, final Mapper mapper, final ChatManager chatManager) {
+ final GroupManager groupManager, final ContentManager contentManager,
+ final ContainerManager containerManager, final TagUserContentManager tagManager,
+ final Mapper mapper, final ChatManager chatManager) {
this.finderService = finderService;
this.userSessionProvider = userSessionProvider;
this.accessService = accessService;
@@ -100,7 +98,6 @@
this.stateService = stateService;
this.creationService = creationService;
this.groupManager = groupManager;
- this.xmppManager = xmppManager;
this.contentManager = contentManager;
this.containerManager = containerManager;
this.tagManager = tagManager;
Modified: trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -53,7 +53,7 @@
public DocsClientActions(final I18nUITranslationService i18n, final Session session,
final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
final Provider<GoParentFolderBtn> folderGoUp, final Provider<NewDocMenuItem> newDocMenuItem,
- final Provider<NewDocIconBtn> newDocIconBtn, final Provider<NewFolderMenuItem> newFolderBtn,
+ final Provider<NewDocIconBtn> newDocIconBtn, final Provider<NewFolderMenuItem> newFolderMenuItem,
final Provider<OpenDocMenuItem> openContentMenuItem,
final Provider<DelDocMenuItem> delContentMenuItem,
final Provider<ContentViewerOptionsMenu> optionsMenuContent,
@@ -71,7 +71,7 @@
actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, containers);
actionsRegistry.addAction(ActionGroups.TOOLBAR, participateBtn, contents);
- actionsRegistry.addAction(ActionGroups.TOOLBAR, newFolderBtn, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newFolderMenuItem, containers);
actionsRegistry.addAction(ActionGroups.TOOLBAR, chatAbout, contents);
actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, contents);
actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, containersNoRoot);
Added: trunk/src/main/java/cc/kune/gspace/client/actions/SetContentStatusAsAdminMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/actions/SetContentStatusAsAdminMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/actions/SetContentStatusAsAdminMenuItem.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -0,0 +1,120 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.notify.ConfirmAskEvent;
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.common.client.utils.OnAcceptCallback;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.domain.ContentStatus;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.AbstractContentSimpleDTO;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.viewers.FolderViewerPresenter;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class SetContentStatusAsAdminMenuItem extends MenuItemDescriptor {
+
+ public static class SetContentStatusAsAdminAction extends RolAction {
+
+ private final Provider<ContentServiceAsync> contentService;
+ private final EventBus eventBus;
+ private final I18nTranslationService i18n;
+ private final Provider<FolderViewerPresenter> presenter;
+ private final Session session;
+ private final StateManager stateManager;
+
+ @Inject
+ public SetContentStatusAsAdminAction(final EventBus eventBus, final StateManager stateManager,
+ final Session session, final Provider<ContentServiceAsync> contentService,
+ final I18nTranslationService i18n, final Provider<FolderViewerPresenter> presenter) {
+ super(AccessRolDTO.Administrator, true);
+ this.eventBus = eventBus;
+ this.stateManager = stateManager;
+ this.session = session;
+ this.contentService = contentService;
+ this.i18n = i18n;
+ this.presenter = presenter;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ final Boolean confirm = (Boolean) getValue(CONFIRM);
+ if (confirm) {
+ ConfirmAskEvent.fire(eventBus, i18n.t("Please confirm"), i18n.t("Are you sure?"), i18n.t("Yes"),
+ i18n.t("No"), null, null, new OnAcceptCallback() {
+ @Override
+ public void onSuccess() {
+ doAction(event);
+ }
+ });
+ } else {
+ doAction(event);
+ }
+ }
+
+ private void doAction(final ActionEvent event) {
+ NotifyUser.showProgress();
+ final ContentStatus status = (ContentStatus) getValue(STATUS);
+ final StateToken token = ((AbstractContentSimpleDTO) event.getTarget()).getStateToken();
+ contentService.get().setStatusAsAdmin(session.getUserHash(), token, status,
+ new AsyncCallbackSimple<StateAbstractDTO>() {
+ @Override
+ public void onSuccess(final StateAbstractDTO state) {
+ // Is this necessary?
+ // session.setCurrentState(state);
+ final StateToken parent = token.copy().clearDocument();
+ if (session.getCurrentStateToken().equals(parent)) {
+ stateManager.refreshCurrentStateWithoutCache();
+ // Warning: the previous action
+ // is asynchronous (it gets a
+ // content)
+ presenter.get().refreshState();
+ } else {
+ stateManager.gotoStateToken(parent, false);
+ }
+ NotifyUser.hideProgress();
+ }
+ });
+ }
+
+ }
+ private static final String CONFIRM = "setctnconfirm";
+ private static final String STATUS = "setctnstatus";
+
+ public SetContentStatusAsAdminMenuItem(final SetContentStatusAsAdminAction action,
+ final ContentStatus status, final Boolean confirm) {
+ super(action);
+ action.putValue(CONFIRM, confirm);
+ action.putValue(STATUS, status);
+ }
+
+}
Modified: trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -22,10 +22,13 @@
import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.dto.BasicMimeTypeDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.tool.selector.ToolSelector;
+import com.google.gwt.resources.client.ImageResource;
+
public abstract class FoldableAbstractClientTool extends AbstractClientTool {
protected final ContentCapabilitiesRegistry contentCapabilitiesRegistry;
@@ -58,6 +61,12 @@
contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(typeId, mimeType, iconUrl);
}
+ public void registerContentTypeIcon(final String typeId, final ContentStatus contentStatus,
+ final ImageResource imageResource) {
+ contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(typeId, contentStatus,
+ imageResource);
+ }
+
public void registerContentTypeIcon(final String contentTypeId, final Object icon) {
contentCapabilitiesRegistry.getIconsRegistry().registerContentTypeIcon(contentTypeId, icon);
}
@@ -98,6 +107,10 @@
contentCapabilitiesRegistry.getRenamable().register(typeIds);
}
+ protected void registerShowDeleted(final String... typeIds) {
+ contentCapabilitiesRegistry.getShowDeleted().register(typeIds);
+ }
+
protected void registerTageableTypes(final String... typeIds) {
contentCapabilitiesRegistry.getTageable().register(typeIds);
}
Modified: trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPanel.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPanel.ui.xml 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/gspace/client/tool/selector/ToolSelectorItemPanel.ui.xml 2011-08-10 17:09:53 UTC (rev 1487)
@@ -20,7 +20,7 @@
.flow {
min-height: 30px;
- padding: 5px 10px;
+ padding: 1px 10px;
-moz-user-select: none;
-khtml-user-select: none;
outline: 0;
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -30,6 +30,7 @@
import cc.kune.core.client.dnd.KuneDragController;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.dto.StateContainerDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.GSpaceArmor;
@@ -102,6 +103,9 @@
selected = itemWidget;
}
});
+ if (ContentStatus.inTheDustbin.equals(item.getContentStatus())) {
+ itemWidget.getTitleWidget().addStyleName("k-line-through");
+ }
itemWidget.getRowDoubleClick().addDoubleClickHandler(doubleClickHandler);
itemWidget.getRowMouse().addMouseOutHandler(new MouseOutHandler() {
@Override
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -136,18 +136,20 @@
final StateToken stateToken = content.getStateToken();
final String typeId = content.getTypeId();
final String name = content.getName();
- final Object icon = getIcon(stateToken, typeId, mimeType);
+ final Object icon = mimeType != null ? getIcon(stateToken, typeId, mimeType) : getIcon(stateToken,
+ typeId, status);
final String tooltip = getTooltip(stateToken, mimeType);
- final FolderItemDescriptor item = new FolderItemDescriptor(genId(stateToken),
- genId(parentStateToken), icon, name, tooltip, status, stateToken, modifiedOn,
- capabilitiesRegistry.isDragable(typeId) && rights.isAdministrable(),
- capabilitiesRegistry.isDropable(typeId) && rights.isAdministrable(),
- actionsRegistry.getCurrentActions(content, typeId, session.isLogged(), rights,
- ActionGroups.ITEM_MENU));
- if (status.equals(ContentStatus.inTheDustbin) && !session.getShowDeletedContent()) {
+ if (status.equals(ContentStatus.inTheDustbin)
+ && (!capabilitiesRegistry.showDeleted(typeId) && !session.getShowDeletedContent())) {
// Don't show
// NotifyUser.info("Deleted, don't show");
} else {
+ final FolderItemDescriptor item = new FolderItemDescriptor(genId(stateToken),
+ genId(parentStateToken), icon, name, tooltip, status, stateToken, modifiedOn,
+ capabilitiesRegistry.isDragable(typeId) && rights.isAdministrable(),
+ capabilitiesRegistry.isDropable(typeId) && rights.isAdministrable(),
+ actionsRegistry.getCurrentActions(content, typeId, status, session.isLogged(), rights,
+ ActionGroups.ITEM_MENU));
getView().addItem(item, new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
@@ -232,6 +234,10 @@
}
}
+ private Object getIcon(final StateToken stateToken, final String typeId, final ContentStatus status) {
+ return iconsRegistry.getContentTypeIcon(typeId, status);
+ }
+
private String getTooltip(final StateToken token, final BasicMimeTypeDTO mimeType) {
if (mimeType != null && (mimeType.isImage() || mimeType.isPdf())) {
// Used for previews
Modified: trunk/src/main/java/cc/kune/tasks/client/TasksClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/TasksClientTool.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/tasks/client/TasksClientTool.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -26,6 +26,7 @@
import static cc.kune.tasks.shared.TasksConstants.TYPE_TASK;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
import cc.kune.gspace.client.tool.selector.ToolSelector;
@@ -57,12 +58,14 @@
}
private void registerIcons() {
- registerContentTypeIcon(TYPE_ROOT, navResources.folder());
- registerContentTypeIcon(TYPE_FOLDER, navResources.folder());
+ registerContentTypeIcon(TYPE_ROOT, navResources.taskfolder());
+ registerContentTypeIcon(TYPE_FOLDER, navResources.taskfolder());
registerContentTypeIcon(TYPE_TASK, navResources.task());
+ registerContentTypeIcon(TYPE_TASK, ContentStatus.inTheDustbin, navResources.taskdone());
final String noTask = i18n.t("There isn't any task, create one");
registerEmptyMessages(TYPE_ROOT, noTask);
registerEmptyMessages(TYPE_FOLDER, noTask);
+ registerShowDeleted(TYPE_FOLDER, TYPE_ROOT, TYPE_TASK);
}
}
Deleted: trunk/src/main/java/cc/kune/tasks/client/actions/DelTaskMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/DelTaskMenuItem.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/DelTaskMenuItem.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -1,36 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.tasks.client.actions;
-
-import cc.kune.core.client.resources.CoreResources;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.actions.DelContentMenuItem;
-
-import com.google.inject.Inject;
-
-public class DelTaskMenuItem extends DelContentMenuItem {
-
- @Inject
- public DelTaskMenuItem(final I18nTranslationService i18n, final DelContentAction action,
- final CoreResources res) {
- super(i18n, action, res);
- this.withText(i18n.t("Mark as done"));
- }
-}
Copied: trunk/src/main/java/cc/kune/tasks/client/actions/MarkAsDoneTaskMenuItem.java (from rev 1485, trunk/src/main/java/cc/kune/tasks/client/actions/DelTaskMenuItem.java)
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/MarkAsDoneTaskMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/MarkAsDoneTaskMenuItem.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -0,0 +1,37 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.domain.ContentStatus;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.SetContentStatusAsAdminMenuItem;
+
+import com.google.inject.Inject;
+
+public class MarkAsDoneTaskMenuItem extends SetContentStatusAsAdminMenuItem {
+
+ @Inject
+ public MarkAsDoneTaskMenuItem(final I18nTranslationService i18n,
+ final SetContentStatusAsAdminAction action, final NavResources res) {
+ super(action, ContentStatus.inTheDustbin, false);
+ withText(i18n.t("Mark as done")).withIcon(res.taskdone());
+ }
+}
Added: trunk/src/main/java/cc/kune/tasks/client/actions/MarkAsNotDoneTaskMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/MarkAsNotDoneTaskMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/MarkAsNotDoneTaskMenuItem.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -0,0 +1,37 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.domain.ContentStatus;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.SetContentStatusAsAdminMenuItem;
+
+import com.google.inject.Inject;
+
+public class MarkAsNotDoneTaskMenuItem extends SetContentStatusAsAdminMenuItem {
+
+ @Inject
+ public MarkAsNotDoneTaskMenuItem(final I18nTranslationService i18n,
+ final SetContentStatusAsAdminAction action, final NavResources res) {
+ super(action, ContentStatus.publishedOnline, false);
+ withText(i18n.t("Mark as not done")).withIcon(res.task());
+ }
+}
Deleted: trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderBtn.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderBtn.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -1,38 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.tasks.client.actions;
-
-import cc.kune.core.client.resources.nav.NavResources;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.actions.NewContainerBtn;
-import cc.kune.tasks.shared.TasksConstants;
-
-import com.google.inject.Inject;
-
-public class NewFolderBtn extends NewContainerBtn {
-
- @Inject
- public NewFolderBtn(final I18nTranslationService i18n, final NewContainerAction action,
- final NavResources res) {
- super(i18n, action, res.taskadd(), i18n.t("New folder"), i18n.t("Create a new folder"),
- i18n.t("New folder"), TasksConstants.TYPE_FOLDER);
- }
-
-}
Copied: trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderMenuItem.java (from rev 1485, trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderBtn.java)
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderMenuItem.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.NewContainerMenuItem;
+import cc.kune.tasks.shared.TasksConstants;
+
+import com.google.inject.Inject;
+
+public class NewFolderMenuItem extends NewContainerMenuItem {
+
+ @Inject
+ public NewFolderMenuItem(final I18nTranslationService i18n, final NewContainerAction action,
+ final NavResources res, final TasksNewMenu newMenu) {
+ super(i18n, action, res.taskfolderadd(), i18n.t("New task folder"), i18n.t("Create a new folder"),
+ i18n.t("New task folder"), TasksConstants.TYPE_FOLDER, newMenu.get());
+ }
+
+}
Modified: trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -29,6 +29,7 @@
import cc.kune.core.client.resources.CoreResources;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.gspace.client.actions.AbstractFoldableToolActions;
import cc.kune.gspace.client.actions.ActionGroups;
import cc.kune.gspace.client.actions.ContentViewerOptionsMenu;
@@ -51,9 +52,11 @@
public TasksClientActions(final I18nUITranslationService i18n, final Session session,
final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
final Provider<GoParentFolderBtn> folderGoUp, final Provider<NewTaskMenuItem> newTaskItem,
- final Provider<NewTaskIconBtn> newTaskIconBtn, final Provider<NewFolderBtn> newFolderBtn,
+ final Provider<NewTaskIconBtn> newTaskIconBtn,
+ final Provider<NewFolderMenuItem> newFolderMenuItem,
final Provider<OpenFolderMenuItem> openContentMenuItem,
- final Provider<DelTaskMenuItem> delContentMenuItem,
+ final Provider<MarkAsDoneTaskMenuItem> marksAsDoneMenuItem,
+ final Provider<MarkAsNotDoneTaskMenuItem> marksAsNotDoneMenuItem,
final Provider<RefreshContentMenuItem> refresh,
final Provider<ContentViewerOptionsMenu> optionsMenuContent,
final Provider<ParticipateInContentBtn> participateBtn, final TasksNewMenu taskNewMenu,
@@ -66,15 +69,17 @@
actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
actionsRegistry.addAction(ActionGroups.TOOLBAR, newTaskItem, containers);
actionsRegistry.addAction(ActionGroups.TOOLBAR, newTaskIconBtn, all);
- // actionsRegistry.addAction(ActionGroups.TOOLBAR, newFolderBtn,
- // containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newFolderMenuItem, containers);
actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, containers);
actionsRegistry.addAction(ActionGroups.TOOLBAR, participateBtn, contents);
actionsRegistry.addAction(ActionGroups.TOOLBAR, chatAbout, contents);
actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, contents);
actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, containersNoRoot);
- actionsRegistry.addAction(ActionGroups.ITEM_MENU, delContentMenuItem, contents);
+ actionsRegistry.addAction(ActionGroups.ITEM_MENU, marksAsDoneMenuItem,
+ ContentStatus.publishedOnline, TYPE_TASK);
+ actionsRegistry.addAction(ActionGroups.ITEM_MENU, marksAsNotDoneMenuItem,
+ ContentStatus.inTheDustbin, TYPE_TASK);
actionsRegistry.addAction(ActionGroups.ITEM_MENU, delFolderMenuItem, containersNoRoot);
newMenusRegistry.register(TYPE_FOLDER, taskNewMenu.get());
newMenusRegistry.register(TYPE_ROOT, taskNewMenu.get());
Modified: trunk/src/main/java/cc/kune/tasks/server/TaskServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/server/TaskServerTool.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/main/java/cc/kune/tasks/server/TaskServerTool.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -26,12 +26,14 @@
import static cc.kune.tasks.shared.TasksConstants.TYPE_TASK;
import java.util.Arrays;
+import java.util.Date;
import cc.kune.core.server.AbstractServerTool;
import cc.kune.core.server.content.ContainerManager;
import cc.kune.core.server.content.ContentManager;
import cc.kune.core.server.manager.ToolConfigurationManager;
import cc.kune.core.server.tool.ServerToolTarget;
+import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.domain.Container;
import cc.kune.domain.Content;
@@ -80,4 +82,10 @@
createTask(user, group, shortTerm, "A short-term task sample");
return group;
}
+
+ @Override
+ public void onCreateContent(final Content content, final Container parent) {
+ content.setStatus(ContentStatus.publishedOnline);
+ content.setPublishedOn(new Date());
+ }
}
Added: trunk/src/test/java/cc/kune/core/client/registry/IdGeneratorTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/client/registry/IdGeneratorTest.java (rev 0)
+++ trunk/src/test/java/cc/kune/core/client/registry/IdGeneratorTest.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -0,0 +1,21 @@
+package cc.kune.core.client.registry;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class IdGeneratorTest {
+
+ @Test
+ public void testBasic() {
+ assertEquals("", IdGenerator.generate("", ""));
+ assertEquals("", IdGenerator.generate(null, ""));
+ assertEquals("", IdGenerator.generate("", null));
+ assertEquals("", IdGenerator.generate(null, null));
+ assertEquals("a", IdGenerator.generate("a", null));
+ assertEquals("a", IdGenerator.generate("a", ""));
+ assertEquals("b", IdGenerator.generate("", "b"));
+ assertEquals("b", IdGenerator.generate(null, "b"));
+ assertEquals("a" + IdGenerator.SEPARATOR + "b", IdGenerator.generate("a", "b"));
+ }
+}
Modified: trunk/src/test/java/org/ourproject/kune/platf/client/actions/IconsRegistryTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/actions/IconsRegistryTest.java 2011-08-08 00:02:51 UTC (rev 1486)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/actions/IconsRegistryTest.java 2011-08-10 17:09:53 UTC (rev 1487)
@@ -25,78 +25,92 @@
import org.junit.Test;
import cc.kune.core.client.registry.IconsRegistry;
+import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.dto.BasicMimeTypeDTO;
public class IconsRegistryTest {
- private static final String CONTENT_TYPE_TEST = "somecontenttype";
- private static final String ICON = "someicon";
- private static final String JUSTANOTHERICON = "justanothericon";
- private static final String OTHERICON = "othericon";
+ private static final String CONTENT_TYPE_TEST = "somecontenttype";
+ private static final String ICON = "someicon";
+ private static final String JUSTANOTHERICON = "justanothericon";
+ private static final String OTHERICON = "othericon";
- private IconsRegistry reg;
+ private IconsRegistry reg;
- @Before
- public void before() {
- reg = new IconsRegistry();
- }
+ @Before
+ public void before() {
+ reg = new IconsRegistry();
+ }
- @Test
- public void testBasic() {
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, ICON);
- assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST));
- }
+ @Test
+ public void testBasic() {
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, ICON);
+ assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST));
+ }
- @Test
- public void testBasicMimeType() {
- final BasicMimeTypeDTO mimeType = new BasicMimeTypeDTO("image/png");
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, mimeType, ICON);
- assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, mimeType));
- assertEquals(null, reg.getContentTypeIcon(CONTENT_TYPE_TEST));
- }
+ @Test
+ public void testBasicMimeType() {
+ final BasicMimeTypeDTO mimeType = new BasicMimeTypeDTO("image/png");
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, mimeType, ICON);
+ assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, mimeType));
+ assertEquals(null, reg.getContentTypeIcon(CONTENT_TYPE_TEST));
+ }
- @Test
- public void testBasicMimeTypeWithDef() {
- final BasicMimeTypeDTO mimeType = new BasicMimeTypeDTO("image/png");
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, mimeType, ICON);
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, OTHERICON);
- assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, mimeType));
- assertEquals(OTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST));
- }
+ @Test
+ public void testBasicMimeTypeWithDef() {
+ final BasicMimeTypeDTO mimeType = new BasicMimeTypeDTO("image/png");
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, mimeType, ICON);
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, OTHERICON);
+ assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, mimeType));
+ assertEquals(OTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST));
+ }
- @Test
- public void testBasicMimeTypeWithDefType() {
- final BasicMimeTypeDTO mimeType = new BasicMimeTypeDTO("image/png");
- final BasicMimeTypeDTO genericMimeType = new BasicMimeTypeDTO("image");
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, mimeType, ICON);
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, genericMimeType, OTHERICON);
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, JUSTANOTHERICON);
- assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, mimeType));
- assertEquals(OTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, genericMimeType));
- assertEquals(JUSTANOTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST));
- }
+ @Test
+ public void testBasicMimeTypeWithDefType() {
+ final BasicMimeTypeDTO mimeType = new BasicMimeTypeDTO("image/png");
+ final BasicMimeTypeDTO genericMimeType = new BasicMimeTypeDTO("image");
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, mimeType, ICON);
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, genericMimeType, OTHERICON);
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, JUSTANOTHERICON);
+ assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, mimeType));
+ assertEquals(OTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, genericMimeType));
+ assertEquals(JUSTANOTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST));
+ }
- @Test
- public void testBasicMimeTypeWithOnlyDefType() {
- final BasicMimeTypeDTO mimeType = new BasicMimeTypeDTO("image/png");
- final BasicMimeTypeDTO genericMimeType = new BasicMimeTypeDTO("image");
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, genericMimeType, OTHERICON);
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, JUSTANOTHERICON);
- assertEquals(OTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, mimeType));
- assertEquals(OTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, genericMimeType));
- assertEquals(JUSTANOTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST));
- }
+ @Test
+ public void testBasicMimeTypeWithOnlyDefType() {
+ final BasicMimeTypeDTO mimeType = new BasicMimeTypeDTO("image/png");
+ final BasicMimeTypeDTO genericMimeType = new BasicMimeTypeDTO("image");
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, genericMimeType, OTHERICON);
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, JUSTANOTHERICON);
+ assertEquals(OTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, mimeType));
+ assertEquals(OTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, genericMimeType));
+ assertEquals(JUSTANOTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST));
+ }
- @Test
- public void testNoResult() {
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, new BasicMimeTypeDTO("text", "plain"), ICON);
- assertEquals(null, reg.getContentTypeIcon(CONTENT_TYPE_TEST, new BasicMimeTypeDTO("text", "rtf")));
- }
+ @Test
+ public void testContentStatus() {
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, ContentStatus.inTheDustbin, ICON);
+ assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, ContentStatus.inTheDustbin));
+ }
- @Test
- public void testNullBasicMimeType() {
- final BasicMimeTypeDTO mimeType = null;
- reg.registerContentTypeIcon(CONTENT_TYPE_TEST, ICON);
- assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, mimeType));
- }
+ @Test
+ public void testNoContentStatus() {
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, ContentStatus.inTheDustbin, ICON);
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, OTHERICON);
+ assertEquals(OTHERICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, ContentStatus.editingInProgress));
+ }
+
+ @Test
+ public void testNoResult() {
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, new BasicMimeTypeDTO("text", "plain"), ICON);
+ assertEquals(null, reg.getContentTypeIcon(CONTENT_TYPE_TEST, new BasicMimeTypeDTO("text", "rtf")));
+ }
+
+ @Test
+ public void testNullBasicMimeType() {
+ final BasicMimeTypeDTO mimeType = null;
+ reg.registerContentTypeIcon(CONTENT_TYPE_TEST, ICON);
+ assertEquals(ICON, reg.getContentTypeIcon(CONTENT_TYPE_TEST, mimeType));
+ }
}
1
0
08 Aug '11
Author: vjrj_
Date: 2011-08-08 02:02:51 +0200 (Mon, 08 Aug 2011)
New Revision: 1486
Modified:
trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java
Log:
CLOSED - # 90: Truncate long names in folder path
http://kune.ourproject.org/issues/ticket/90
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java 2011-08-07 23:07:04 UTC (rev 1485)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java 2011-08-08 00:02:51 UTC (rev 1486)
@@ -2,6 +2,7 @@
import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
+import cc.kune.common.client.utils.TextUtils;
import cc.kune.core.client.dnd.FolderViewerDropController;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.registry.IconsRegistry;
@@ -71,9 +72,13 @@
private ButtonDescriptor createPathButton(final ContainerSimpleDTO container, final int length,
final int pos) {
final String style = calculateStyle(pos, length);
+ final String title = container.getName();
final ButtonDescriptor btn = new ButtonDescriptor(new GotoTokenAction(
- iconsRegistry.getContentTypeIcon(container.getTypeId()), container.getName(),
+ iconsRegistry.getContentTypeIcon(container.getTypeId()), TextUtils.ellipsis(title, 15),
container.getStateToken(), style, stateManager, eventBus));
+ if (title.length() > 15) {
+ btn.withToolTip(title);
+ }
return btn;
}
}
1
0
Author: vjrj_
Date: 2011-08-08 01:07:04 +0200 (Mon, 08 Aug 2011)
New Revision: 1485
Added:
trunk/src/main/java/cc/kune/core/client/resources/nav/task.png
trunk/src/main/java/cc/kune/core/client/resources/nav/taskadd.png
trunk/src/main/java/cc/kune/core/server/AbstractServerTool.java
trunk/src/main/java/cc/kune/tasks/
trunk/src/main/java/cc/kune/tasks/KuneTasks.gwt.xml
trunk/src/main/java/cc/kune/tasks/client/
trunk/src/main/java/cc/kune/tasks/client/TasksClientTool.java
trunk/src/main/java/cc/kune/tasks/client/TasksGinModule.java
trunk/src/main/java/cc/kune/tasks/client/TasksGinjector.java
trunk/src/main/java/cc/kune/tasks/client/TasksParts.java
trunk/src/main/java/cc/kune/tasks/client/actions/
trunk/src/main/java/cc/kune/tasks/client/actions/AbstractOptionsMenu.java
trunk/src/main/java/cc/kune/tasks/client/actions/DelFolderMenuItem.java
trunk/src/main/java/cc/kune/tasks/client/actions/DelTaskMenuItem.java
trunk/src/main/java/cc/kune/tasks/client/actions/GoParentFolderBtn.java
trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderBtn.java
trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskIconBtn.java
trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskMenuItem.java
trunk/src/main/java/cc/kune/tasks/client/actions/OpenFolderMenuItem.java
trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java
trunk/src/main/java/cc/kune/tasks/client/actions/TasksNewMenu.java
trunk/src/main/java/cc/kune/tasks/server/
trunk/src/main/java/cc/kune/tasks/server/TaskServerModule.java
trunk/src/main/java/cc/kune/tasks/server/TaskServerTool.java
trunk/src/main/java/cc/kune/tasks/shared/
trunk/src/main/java/cc/kune/tasks/shared/TasksConstants.java
trunk/src/test/java/cc/kune/blogs/server/TaskServerToolTest.java
Removed:
trunk/src/test/java/cc/kune/blogs/server/BlogServerToolTest.java
Modified:
trunk/img/icons-base.svg
trunk/src/main/java/cc/kune/Kune.gwt.xml
trunk/src/main/java/cc/kune/barters/client/BartersClientTool.java
trunk/src/main/java/cc/kune/barters/server/BarterServerTool.java
trunk/src/main/java/cc/kune/blogs/client/BlogsClientTool.java
trunk/src/main/java/cc/kune/blogs/server/BlogServerTool.java
trunk/src/main/java/cc/kune/blogs/shared/BlogsConstants.java
trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java
trunk/src/main/java/cc/kune/chat/server/ChatServerModule.java
trunk/src/main/java/cc/kune/chat/server/ChatServerTool.java
trunk/src/main/java/cc/kune/chat/shared/ChatConstants.java
trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
trunk/src/main/java/cc/kune/client/KuneGinjector.java
trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java
trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
trunk/src/main/java/cc/kune/docs/client/DocsClientTool.java
trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java
trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java
trunk/src/main/java/cc/kune/domain/Content.java
trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java
trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java
trunk/src/main/java/cc/kune/meets/server/MeetingServerTool.java
trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java
trunk/src/main/java/cc/kune/wiki/server/WikiServerTool.java
trunk/src/test/java/cc/kune/docs/server/DocumentServerToolTest.java
trunk/src/test/java/cc/kune/wiki/server/WikiServerToolTest.java
Log:
NEW - # 79: I18n refactorization
http://kune.ourproject.org/issues/ticket/79
NEW - # 88: Task tool
http://kune.ourproject.org/issues/ticket/88
Modified: trunk/img/icons-base.svg
===================================================================
--- trunk/img/icons-base.svg 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/img/icons-base.svg 2011-08-07 23:07:04 UTC (rev 1485)
@@ -14,7 +14,7 @@
height="297mm"
id="svg21019"
sodipodi:version="0.32"
- inkscape:version="0.48.0 r9654"
+ inkscape:version="0.48.1 r9760"
sodipodi:docname="icons-base.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/tmp/buttons.png"
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
- inkscape:cx="71"
- inkscape:cy="807.5"
+ inkscape:cx="268"
+ inkscape:cy="359"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:window-width="1278"
@@ -56,7 +56,8 @@
type="xygrid"
id="GridFromPre046Settings"
visible="true"
- enabled="true" />
+ enabled="true"
+ snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<defs
id="defs21021">
@@ -4692,11 +4693,11 @@
<image
sodipodi:absref="/home/vjrj/proyectos/dev/kune/trunk/img/icons/lock_break.png"
xlink:href="icons/lock_break.png"
- y="450.82797"
+ width="16"
+ height="16"
+ id="image2972"
x="330.84604"
- id="image2972"
- height="16"
- width="16" />
+ y="450.82797" />
<use
x="0"
y="0"
@@ -4787,12 +4788,12 @@
<image
sodipodi:absref="/home/vjrj/proyectos/dev/kune/trunk/img/icons/lock_break.png"
xlink:href="icons/lock_break.png"
- y="432.36218"
+ transform="scale(-1,1)"
+ width="16"
+ height="16"
+ id="image3958"
x="-371"
- id="image3958"
- height="16"
- width="16"
- transform="scale(-1,1)" />
+ y="432.36218" />
<g
id="g3962"
transform="translate(-43.509019,-21.462476)">
@@ -5368,5 +5369,120 @@
width="8.7500134"
id="rect3579"
style="fill:url(#radialGradient4374);fill-opacity:1;stroke:#c83737;stroke-width:1.24998641000000021;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <image
+ y="520.36218"
+ x="445"
+ id="image4719"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAdNJREFU
+OI2Vk7FrU1EUxn/3vbSCJDGN1JQMhSIGXFy0amIE0RJwdtAhOBRFbR3ExUGXgjgIjvoPNIO7m6hL
+1S66OCmRUqjRSEJeb2zQRu85DqGPvMRAPdO937nnx/k+uIaBKpfLxve9587JXL/u+94L56RUqVS0
+XzcAN+fMFQMPFSYUDzt1iXz+CJ5nABBRVlc/sK/+FIMAtFT11uOXLJuFs8R8zwQXzhyMf+lmeRfk
+aNkuMzPTGLMDENbXN0glxzma+syUv8Gz12tWVNMxIO55Zmw85vO+kWPp/iOCIKBarUaszc8fIp1O
+c+/ubS5mvyGqcWA81v+osw3JZBJVYXb22GA8JBIJtv+AUxNqIUA1kg0rb95G7sVCfggYAQzW6VOF
+8KwqiLjRAP1HY2cDVUVFyJ88/n8bFAt5RAQRQVWw1jI5mdkdoH9QpDfc/tHe/QYiLoTUvtZoNhtD
+IUcBAz3neoB229JsNCiVzo9yijdqA2s3qX+vIyKhfn3hKpenV0Zb2DumtIIWmUyWTCZLLncYazdR
+FW4sXguHfaMRwJaI/u78cntOpD7yYOkOP91wNMX9n1jrHAAgpTWMMVuq2jUAi+d6vxHDxEizfaXa
++41PXrH8F0/m4ZhJIciYAAAAAElFTkSuQmCC
+"
+ height="16"
+ width="16" />
+ <path
+ inkscape:connector-curvature="0"
+ style="color:#000000;fill:#d40000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.0625;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 460.54725,523.36218 -5.61351,5.05002 -1.81751,-2.09221 -2.22424,2.28085 c 1.60629,1.4242 2.80319,2.43911 4.13653,3.80876 2.24198,-2.10143 4.53857,-3.76628 6.97148,-5.34924 -0.3707,-1.58182 -0.85095,-2.67256 -1.45275,-3.69818 z"
+ id="path3563-5"
+ sodipodi:nodetypes="ccccccc"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/checked.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <path
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/checked.png"
+ sodipodi:nodetypes="ccccccc"
+ id="path5217"
+ d="m 272.19758,498.71675 -5.61351,5.05002 -1.81751,-2.09221 -2.22424,2.28085 c 1.60629,1.4242 2.80319,2.43911 4.13653,3.80876 2.24198,-2.10143 4.53857,-3.76628 6.97148,-5.34924 -0.3707,-1.58182 -0.85095,-2.67256 -1.45275,-3.69818 z"
+ style="color:#000000;fill:#ff2a2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.06250000000000000;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
+ <rect
+ style="fill:none;stroke:#c83737;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;opacity:0.71000002"
+ id="rect5219"
+ width="14"
+ height="13.999999"
+ x="261"
+ y="496.36218"
+ ry="2.5"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/checked.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ rx="2.5" />
+ <image
+ y="504.36218"
+ x="268"
+ id="image7247"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAQZJREFU
+OI1j/P//PwMlgIki3cPDABZsggVTo2r+M/wv+/HrO+/nbx8/f/jyrmtb+8UWbGoZ0WMhc0JQg6SM
+QL2xpgmDjJAqw/6rGxhOXDnM8ODOm94TU56VEPTC1x+fyw009Bn+Mv1l0Jd0ZfjL+JvBQteKgYGB
+IRubCzAMeP/lLQcrIw+Dn2YuAwMDA0Ox8ywGZTE9BgYGBg6iDHj78dWPq8+OMXTsTmRgYGBg6NiV
+yHD31SUGBgaGH0QZ8O//v94Tl44xsDGwMGy+PI2BjZGF4ciFgwwMDAxTsRmAEYgMDAwMFjlSHQwM
+DFkMDAy8DAwMnxkYGKadmPKsgmgDSAEDnxIpNgAAJ+ZYJkBPdSwAAAAASUVORK5CYII=
+"
+ height="16"
+ width="16" />
+ <path
+ inkscape:connector-curvature="0"
+ style="color:#000000;fill:#ff2a2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.0625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="m 272.19758,658.71675 -5.61351,5.05002 -1.81751,-2.09221 -2.22424,2.28085 c 1.60629,1.4242 2.80319,2.43911 4.13653,3.80876 2.24198,-2.10143 4.53857,-3.76628 6.97148,-5.34924 -0.3707,-1.58182 -0.85095,-2.67256 -1.45275,-3.69818 z"
+ id="path7250"
+ sodipodi:nodetypes="ccccccc"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/img/icons/checked.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90" />
+ <rect
+ rx="2.5"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/taskadd.png"
+ ry="2.5"
+ y="656.36218"
+ x="261"
+ height="13.999999"
+ width="14"
+ id="rect7252"
+ style="opacity:1;fill:none;stroke:#aa4400;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
+ <image
+ width="16"
+ height="16"
+ xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAQZJREFU
+OI1j/P//PwMlgIki3cPDABZsggVTo2r+M/wv+/HrO+/nbx8/f/jyrmtb+8UWbGoZ0WMhc0JQg6SM
+QL2xpgmDjJAqw/6rGxhOXDnM8ODOm94TU56VEPTC1x+fyw009Bn+Mv1l0Jd0ZfjL+JvBQteKgYGB
+IRubCzAMeP/lLQcrIw+Dn2YuAwMDA0Ox8ywGZTE9BgYGBg6iDHj78dWPq8+OMXTsTmRgYGBg6NiV
+yHD31SUGBgaGH0QZ8O//v94Tl44xsDGwMGy+PI2BjZGF4ciFgwwMDAxTsRmAEYgMDAwMFjlSHQwM
+DFkMDAy8DAwMnxkYGKadmPKsgmgDSAEDnxIpNgAAJ+ZYJkBPdSwAAAAASUVORK5CYII=
+"
+ id="image7254"
+ x="265"
+ y="659.36218" />
+ <path
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/task.png"
+ sodipodi:nodetypes="ccccccc"
+ id="path7256"
+ d="m 272.19758,688.71675 -5.61351,5.05002 -1.81751,-2.09221 -2.22424,2.28085 c 1.60629,1.4242 2.80319,2.43911 4.13653,3.80876 2.24198,-2.10143 4.53857,-3.76628 6.97148,-5.34924 -0.3707,-1.58182 -0.85095,-2.67256 -1.45275,-3.69818 z"
+ style="color:#000000;fill:#ff2a2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.0625;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
+ <rect
+ style="fill:none;stroke:#aa4400;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ id="rect7258"
+ width="14"
+ height="13.999999"
+ x="261"
+ y="686.36218"
+ ry="2.5"
+ inkscape:export-filename="/home/vjrj/proyectos/dev/kune/trunk/src/main/java/cc/kune/core/client/resources/nav/task.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ rx="2.5" />
</g>
</svg>
Modified: trunk/src/main/java/cc/kune/Kune.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-08-07 23:07:04 UTC (rev 1485)
@@ -11,6 +11,7 @@
<inherits name="cc.kune.docs.KuneDocs"/>
<inherits name="cc.kune.wiki.KuneWiki"/>
<inherits name="cc.kune.meets.KuneMeets"/>
+ <inherits name="cc.kune.tasks.KuneTasks"/>
<inherits name="cc.kune.pspace.PSpace"/>
<inherits name="com.calclab.suco.Suco"/>
<inherits name="org.adamtacy.GWTEffects"></inherits>
Modified: trunk/src/main/java/cc/kune/barters/client/BartersClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/barters/client/BartersClientTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/barters/client/BartersClientTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -23,9 +23,9 @@
import static cc.kune.barters.shared.BartersConstants.TYPE_BARTER;
import static cc.kune.barters.shared.BartersConstants.TYPE_FOLDER;
import static cc.kune.barters.shared.BartersConstants.TYPE_ROOT;
-import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
import cc.kune.gspace.client.tool.selector.ToolSelector;
@@ -33,13 +33,10 @@
public class BartersClientTool extends FoldableAbstractClientTool {
- private final NavResources navResources;
-
@Inject
- public BartersClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
+ public BartersClientTool(final I18nTranslationService i18n, final ToolSelector toolSelector,
final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources) {
- super(NAME, i18n.t("barters"), toolSelector, cntCapRegistry);
- this.navResources = navResources;
+ super(NAME, i18n.t("barters"), toolSelector, cntCapRegistry, i18n, navResources);
// registerAclEditableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE);
registerAuthorableTypes(TYPE_BARTER);
@@ -62,8 +59,8 @@
registerContentTypeIcon(TYPE_FOLDER, navResources.folder());
registerContentTypeIcon(TYPE_ROOT, navResources.folder());
registerContentTypeIcon(TYPE_BARTER, navResources.barter());
- registerEmptyMessages(TYPE_FOLDER, "There folder is empty");
- registerEmptyMessages(TYPE_ROOT, "There isn't any barter");
+ registerEmptyMessages(TYPE_FOLDER, i18n.t("There folder is empty"));
+ registerEmptyMessages(TYPE_ROOT, i18n.t("There isn't any barter"));
}
}
Modified: trunk/src/main/java/cc/kune/barters/server/BarterServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/barters/server/BarterServerTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/barters/server/BarterServerTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -26,14 +26,13 @@
import static cc.kune.barters.shared.BartersConstants.TYPE_ROOT;
import java.net.URL;
+import java.util.Arrays;
import java.util.Date;
-import cc.kune.core.client.errors.ContainerNotPermittedException;
-import cc.kune.core.client.errors.ContentNotPermittedException;
+import cc.kune.core.server.AbstractServerTool;
import cc.kune.core.server.content.ContainerManager;
import cc.kune.core.server.content.ContentManager;
import cc.kune.core.server.manager.ToolConfigurationManager;
-import cc.kune.core.server.tool.ServerToolRegistry;
import cc.kune.core.server.tool.ServerToolTarget;
import cc.kune.core.server.tool.ServerWaveTool;
import cc.kune.core.server.utils.UrlUtils;
@@ -44,128 +43,54 @@
import cc.kune.domain.Container;
import cc.kune.domain.Content;
import cc.kune.domain.Group;
-import cc.kune.domain.ToolConfiguration;
import cc.kune.domain.User;
import com.google.inject.Inject;
-public class BarterServerTool implements ServerWaveTool {
+public class BarterServerTool extends AbstractServerTool implements ServerWaveTool {
private static final String BARTER_GADGET = "http://troco.ourproject.org/gadget/org.ourproject.troco.client.TrocoWaveGad…";
- private final ToolConfigurationManager configurationManager;
- private final ContainerManager containerManager;
- private final ContentManager contentManager;
private final URL gadgetUrl;
- private final I18nTranslationService i18n;
@Inject
public BarterServerTool(final ContentManager contentManager, final ContainerManager containerManager,
- final ToolConfigurationManager configurationManager,
- final I18nTranslationService translationService) {
- this.contentManager = contentManager;
- this.containerManager = containerManager;
- this.configurationManager = configurationManager;
- this.i18n = translationService;
+ final ToolConfigurationManager configurationManager, final I18nTranslationService i18n) {
+ super(NAME, ROOT_NAME, TYPE_ROOT, Arrays.asList(TYPE_BARTER), Arrays.asList(TYPE_ROOT, TYPE_FOLDER),
+ Arrays.asList(TYPE_FOLDER), Arrays.asList(TYPE_ROOT, TYPE_FOLDER), contentManager,
+ containerManager, configurationManager, i18n, ServerToolTarget.forUsers);
gadgetUrl = UrlUtils.of(BARTER_GADGET);
}
- void checkContainerTypeId(final String parentTypeId, final String typeId) {
- if (typeId.equals(TYPE_FOLDER)) {
- // ok valid container
- if ((typeId.equals(TYPE_FOLDER) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))) {
- // ok
- } else {
- throw new ContainerNotPermittedException();
- }
- } else {
- throw new ContainerNotPermittedException();
- }
- }
-
- void checkContentTypeId(final String parentTypeId, final String typeId) {
- if (typeId.equals(TYPE_BARTER)) {
- // ok valid content
- final boolean parentIsFolderOrRoot = parentTypeId.equals(TYPE_ROOT)
- || parentTypeId.equals(TYPE_FOLDER);
- if ((typeId.equals(TYPE_BARTER) && parentIsFolderOrRoot)) {
- // ok
- } else {
- throw new ContentNotPermittedException();
- }
- } else {
- throw new ContentNotPermittedException();
- }
- }
-
@Override
- public void checkTypesBeforeContainerCreation(final String parentTypeId, final String typeId) {
- checkContainerTypeId(parentTypeId, typeId);
- }
-
- @Override
- public void checkTypesBeforeContentCreation(final String parentTypeId, final String typeId) {
- checkContentTypeId(parentTypeId, typeId);
- }
-
- @Override
public URL getGadgetUrl() {
return gadgetUrl;
}
@Override
- public String getName() {
- return NAME;
- }
-
- @Override
- public String getRootName() {
- return ROOT_NAME;
- }
-
- @Override
- public ServerToolTarget getTarget() {
- return ServerToolTarget.forUsers;
- }
-
- @Override
public Group initGroup(final User user, final Group group, final Object... otherVars) {
- final ToolConfiguration config = new ToolConfiguration();
- final Container rootFolder = containerManager.createRootFolder(group, NAME, ROOT_NAME, TYPE_ROOT);
- setContainerBartersAcl(rootFolder);
- config.setRoot(rootFolder);
- group.setToolConfig(NAME, config);
- configurationManager.persist(config);
- final Content content = contentManager.createContent(
- i18n.t("Barter sample"),
- i18n.t("This is only a barter sample. You can invite other participants to this barter, but also publish to the general public allowing you to share services, goods, etc."),
- user, rootFolder, TYPE_BARTER, gadgetUrl);
- content.addAuthor(user);
- content.setLanguage(user.getLanguage());
- content.setTypeId(TYPE_BARTER);
- content.setStatus(ContentStatus.publishedOnline);
+ final Container rootFolder = createRoot(group);
+ setContainerAcl(rootFolder);
+ final Content content = createInitialContent(user, group, rootFolder, i18n.t("Barter sample"),
+ i18n.t("This is only a barter sample. You can invite other participants to this barter, "
+ + "but also publish to the general public allowing you to share services, goods, etc."),
+ TYPE_BARTER, gadgetUrl);
contentManager.save(content);
return group;
}
@Override
public void onCreateContainer(final Container container, final Container parent) {
- setContainerBartersAcl(container);
+ setContainerAcl(container);
}
@Override
public void onCreateContent(final Content content, final Container parent) {
- // addGadget(content);
content.setStatus(ContentStatus.publishedOnline);
content.setPublishedOn(new Date());
}
@Override
- @Inject
- public void register(final ServerToolRegistry registry) {
- registry.register(this);
- }
-
- private void setContainerBartersAcl(final Container container) {
+ protected void setContainerAcl(final Container container) {
final AccessLists bartersAcl = new AccessLists();
bartersAcl.getAdmins().setMode(GroupListMode.NORMAL);
bartersAcl.getAdmins().add(container.getOwner());
Modified: trunk/src/main/java/cc/kune/blogs/client/BlogsClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/client/BlogsClientTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/blogs/client/BlogsClientTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -24,9 +24,10 @@
import static cc.kune.blogs.shared.BlogsConstants.TYPE_POST;
import static cc.kune.blogs.shared.BlogsConstants.TYPE_ROOT;
import static cc.kune.blogs.shared.BlogsConstants.TYPE_UPLOADEDFILE;
-import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.blogs.shared.BlogsConstants;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
import cc.kune.gspace.client.tool.selector.ToolSelector;
@@ -34,13 +35,10 @@
public class BlogsClientTool extends FoldableAbstractClientTool {
- private final NavResources navResources;
-
@Inject
- public BlogsClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
+ public BlogsClientTool(final I18nTranslationService i18n, final ToolSelector toolSelector,
final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources) {
- super(NAME, i18n.t("blogs"), toolSelector, cntCapRegistry);
- this.navResources = navResources;
+ super(NAME, i18n.t(BlogsConstants.ROOT_NAME), toolSelector, cntCapRegistry, i18n, navResources);
// registerAclEditableTypes();
registerAuthorableTypes(TYPE_POST, TYPE_UPLOADEDFILE);
@@ -64,8 +62,8 @@
registerContentTypeIcon(TYPE_BLOG, navResources.blog());
registerContentTypeIcon(TYPE_POST, navResources.post());
registerUploadTypesAndMimes(TYPE_UPLOADEDFILE);
- registerEmptyMessages(TYPE_ROOT, "There isn't any blog, create one");
- registerEmptyMessages(TYPE_BLOG, "This blog hasn't any post, create one");
+ registerEmptyMessages(TYPE_ROOT, i18n.t("There isn't any blog, create one"));
+ registerEmptyMessages(TYPE_BLOG, i18n.t("This blog hasn't any post, create one"));
}
}
Modified: trunk/src/main/java/cc/kune/blogs/server/BlogServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/server/BlogServerTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/blogs/server/BlogServerTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -20,136 +20,49 @@
package cc.kune.blogs.server;
import static cc.kune.blogs.shared.BlogsConstants.NAME;
+import static cc.kune.blogs.shared.BlogsConstants.ROOT_NAME;
import static cc.kune.blogs.shared.BlogsConstants.TYPE_BLOG;
import static cc.kune.blogs.shared.BlogsConstants.TYPE_POST;
import static cc.kune.blogs.shared.BlogsConstants.TYPE_ROOT;
import static cc.kune.blogs.shared.BlogsConstants.TYPE_UPLOADEDFILE;
-import cc.kune.core.client.errors.ContainerNotPermittedException;
-import cc.kune.core.client.errors.ContentNotPermittedException;
+
+import java.util.Arrays;
+
+import cc.kune.core.server.AbstractServerTool;
import cc.kune.core.server.content.ContainerManager;
import cc.kune.core.server.content.ContentManager;
import cc.kune.core.server.manager.ToolConfigurationManager;
-import cc.kune.core.server.tool.ServerTool;
-import cc.kune.core.server.tool.ServerToolRegistry;
import cc.kune.core.server.tool.ServerToolTarget;
-import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.domain.Container;
import cc.kune.domain.Content;
import cc.kune.domain.Group;
import cc.kune.domain.I18nLanguage;
-import cc.kune.domain.ToolConfiguration;
import cc.kune.domain.User;
import com.google.inject.Inject;
-public class BlogServerTool implements ServerTool {
+public class BlogServerTool extends AbstractServerTool {
- public static final String ROOT_NAME = "blogs";
-
- private final ToolConfigurationManager configurationManager;
- private final ContainerManager containerManager;
- private final ContentManager contentManager;
- private final I18nTranslationService i18n;
-
@Inject
public BlogServerTool(final ContentManager contentManager, final ContainerManager containerManager,
- final ToolConfigurationManager configurationManager,
- final I18nTranslationService translationService) {
- this.contentManager = contentManager;
- this.containerManager = containerManager;
- this.configurationManager = configurationManager;
- this.i18n = translationService;
+ final ToolConfigurationManager configurationManager, final I18nTranslationService i18n) {
+ super(NAME, ROOT_NAME, TYPE_ROOT, Arrays.asList(TYPE_POST, TYPE_UPLOADEDFILE),
+ Arrays.asList(TYPE_BLOG), Arrays.asList(TYPE_BLOG), Arrays.asList(TYPE_ROOT), contentManager,
+ containerManager, configurationManager, i18n, ServerToolTarget.forBoth);
}
- void checkContainerTypeId(final String parentTypeId, final String typeId) {
- if (typeId.equals(TYPE_BLOG)) {
- // ok valid container
- if ((typeId.equals(TYPE_BLOG) && parentTypeId.equals(TYPE_ROOT))) {
- // ok
- } else {
- throw new ContainerNotPermittedException();
- }
- } else {
- throw new ContainerNotPermittedException();
- }
- }
-
- void checkContentTypeId(final String parentTypeId, final String typeId) {
- if (typeId.equals(TYPE_UPLOADEDFILE) || typeId.equals(TYPE_POST)) {
- // ok valid content
- if ((typeId.equals(TYPE_UPLOADEDFILE) && parentTypeId.equals(TYPE_BLOG))
- || (typeId.equals(TYPE_POST) && parentTypeId.equals(TYPE_BLOG))) {
- // ok
- } else {
- throw new ContentNotPermittedException();
- }
-
- } else {
- throw new ContentNotPermittedException();
- }
- }
-
@Override
- public void checkTypesBeforeContainerCreation(final String parentTypeId, final String typeId) {
- checkContainerTypeId(parentTypeId, typeId);
- }
-
- @Override
- public void checkTypesBeforeContentCreation(final String parentTypeId, final String typeId) {
- checkContentTypeId(parentTypeId, typeId);
- }
-
- @Override
- public String getName() {
- return NAME;
- }
-
- @Override
- public String getRootName() {
- return ROOT_NAME;
- }
-
- @Override
- public ServerToolTarget getTarget() {
- return ServerToolTarget.forBoth;
- }
-
- @Override
public Group initGroup(final User user, final Group group, final Object... otherVars) {
- final ToolConfiguration config = new ToolConfiguration();
- final Container rootFolder = containerManager.createRootFolder(group, NAME, ROOT_NAME, TYPE_ROOT);
- config.setRoot(rootFolder);
- group.setToolConfig(NAME, config);
- configurationManager.persist(config);
+ final Container rootFolder = createRoot(group);
final I18nLanguage language = user.getLanguage();
final Container blog = containerManager.createFolder(group, rootFolder, i18n.t("Blog sample"),
language, TYPE_BLOG);
- final Content content = contentManager.createContent(i18n.t("A post sample"),
- i18n.t("This is only a post sample. You can edit it, rename the post and this blog"), user,
- blog, TYPE_POST);
- content.addAuthor(user);
- content.setLanguage(language);
- content.setTypeId(TYPE_POST);
- content.setStatus(ContentStatus.publishedOnline);
-
+ final Content content = createInitialContent(user, group, blog, i18n.t("A post sample"),
+ i18n.t("This is only a post sample. You can edit it, rename the post and this blog"), TYPE_POST);
contentManager.save(content);
return group;
}
-
- @Override
- public void onCreateContainer(final Container container, final Container parent) {
- }
-
- @Override
- public void onCreateContent(final Content content, final Container parent) {
- }
-
- @Override
- @Inject
- public void register(final ServerToolRegistry registry) {
- registry.register(this);
- }
}
Modified: trunk/src/main/java/cc/kune/blogs/shared/BlogsConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/shared/BlogsConstants.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/blogs/shared/BlogsConstants.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -23,12 +23,13 @@
public final class BlogsConstants {
- public static final String NAME = "blogs";
- public static final String TYPE_BLOG = NAME + "." + "blog";
- public static final String TYPE_POST = NAME + "." + "post";
- public static final String TYPE_ROOT = NAME + "." + "root";
- public static final String TYPE_UPLOADEDFILE = NAME + "." + ToolConstants.UPLOADEDFILE_SUFFIX;
+ public static final String NAME = "blogs";
+ public static final String ROOT_NAME = "blogs";
+ public static final String TYPE_BLOG = NAME + "." + "blog";
+ public static final String TYPE_POST = NAME + "." + "post";
+ public static final String TYPE_ROOT = NAME + "." + "root";
+ public static final String TYPE_UPLOADEDFILE = NAME + "." + ToolConstants.UPLOADEDFILE_SUFFIX;
- private BlogsConstants() {
- }
+ private BlogsConstants() {
+ }
}
Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -23,9 +23,9 @@
import static cc.kune.chat.shared.ChatConstants.TYPE_ROOM;
import cc.kune.chat.client.resources.ChatResources;
import cc.kune.common.client.utils.TextUtils;
-import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
import cc.kune.gspace.client.tool.selector.ToolSelector;
@@ -33,15 +33,13 @@
public class ChatClientTool extends FoldableAbstractClientTool {
- private final NavResources navResources;
private final ChatResources res;
@Inject
- public ChatClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
+ public ChatClientTool(final I18nTranslationService i18n, final ToolSelector toolSelector,
final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources,
final ChatResources res) {
- super(NAME, i18n.t("chatrooms"), toolSelector, cntCapRegistry);
- this.navResources = navResources;
+ super(NAME, i18n.t("chatrooms"), toolSelector, cntCapRegistry, i18n, navResources);
this.res = res;
registerIcons();
}
@@ -53,8 +51,8 @@
private void registerIcons() {
registerContentTypeIcon(TYPE_ROOM, res.groupChat());
- registerEmptyMessages(TYPE_ROOM, "Here you will see the archive of old conversations"
- + TextUtils.IN_DEVELOPMENT_P);
+ registerEmptyMessages(TYPE_ROOM,
+ i18n.t("Here you will see the archive of old conversations" + TextUtils.IN_DEVELOPMENT_P));
}
}
Modified: trunk/src/main/java/cc/kune/chat/server/ChatServerModule.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/server/ChatServerModule.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/chat/server/ChatServerModule.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -23,13 +23,11 @@
public class ChatServerModule extends AbstractModule {
- @Override
- public void configure() {
- // To debug Smack, descomment this
- // XMPPConnection.DEBUG_ENABLED = true;
+ @Override
+ public void configure() {
+ // To debug Smack, descomment this
+ // XMPPConnection.DEBUG_ENABLED = true;
+ bind(ChatServerTool.class).asEagerSingleton();
+ }
- bind(ChatServerTool.class).asEagerSingleton();
-
- }
-
}
Modified: trunk/src/main/java/cc/kune/chat/server/ChatServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/server/ChatServerTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/chat/server/ChatServerTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -19,104 +19,47 @@
*/
package cc.kune.chat.server;
-import cc.kune.chat.shared.ChatConstants;
-import cc.kune.core.client.errors.ContainerNotPermittedException;
+import static cc.kune.chat.shared.ChatConstants.NAME;
+import static cc.kune.chat.shared.ChatConstants.ROOT_NAME;
+import static cc.kune.chat.shared.ChatConstants.TYPE_ROOM;
+import static cc.kune.chat.shared.ChatConstants.TYPE_ROOT;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+import cc.kune.core.server.AbstractServerTool;
import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
import cc.kune.core.server.manager.ToolConfigurationManager;
-import cc.kune.core.server.tool.ServerTool;
-import cc.kune.core.server.tool.ServerToolRegistry;
import cc.kune.core.server.tool.ServerToolTarget;
import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.domain.Container;
-import cc.kune.domain.Content;
import cc.kune.domain.Group;
-import cc.kune.domain.ToolConfiguration;
import cc.kune.domain.User;
import com.google.inject.Inject;
-public class ChatServerTool implements ServerTool {
+public class ChatServerTool extends AbstractServerTool {
private final ChatManagerDefault chatManager;
- private final ToolConfigurationManager configurationManager;
- private final ContainerManager containerManager;
- private final I18nTranslationService i18n;
@Inject
public ChatServerTool(final ToolConfigurationManager configurationManager,
- final ContainerManager containerManager, final ChatManagerDefault chatManager,
- final I18nTranslationService i18n) {
- this.configurationManager = configurationManager;
- this.containerManager = containerManager;
+ final ContentManager contentManager, final ContainerManager containerManager,
+ final ChatManagerDefault chatManager, final I18nTranslationService i18n) {
+ super(NAME, ROOT_NAME, TYPE_ROOT, Collections.<String> emptyList(),
+ Collections.<String> emptyList(), Arrays.asList(TYPE_ROOM), Arrays.asList(TYPE_ROOT),
+ contentManager, containerManager, configurationManager, i18n, ServerToolTarget.forGroups);
this.chatManager = chatManager;
- this.i18n = i18n;
}
- private void checkContainerTypeId(final String parentTypeId, final String typeId) {
- if (typeId.equals(ChatConstants.TYPE_ROOM)) {
- if (!parentTypeId.equals(ChatConstants.TYPE_ROOT)) {
- throw new ContainerNotPermittedException();
- }
- // ok valid container
- } else {
- throw new ContainerNotPermittedException();
- }
- }
-
@Override
- public void checkTypesBeforeContainerCreation(final String parentTypeId, final String typeId) {
- checkContainerTypeId(parentTypeId, typeId);
- }
-
- @Override
- public void checkTypesBeforeContentCreation(final String parentTypeId, final String typeId) {
- if (!parentTypeId.equals(ChatConstants.TYPE_ROOM)) {
- throw new ContainerNotPermittedException();
- }
- // in the future chat history checks
- }
-
- @Override
- public String getName() {
- return ChatConstants.NAME;
- }
-
- @Override
- public String getRootName() {
- return ChatConstants.NAME;
- }
-
- @Override
- public ServerToolTarget getTarget() {
- return ServerToolTarget.forGroups;
- }
-
- @Override
public Group initGroup(final User user, final Group group, final Object... otherVars) {
- final ToolConfiguration config = new ToolConfiguration();
- final Container container = containerManager.createRootFolder(group, ChatConstants.NAME,
- ChatConstants.NAME, ChatConstants.TYPE_ROOT);
- config.setRoot(container);
+ final Container rootFolder = createRoot(group);
final String groupShortName = group.getShortName();
- chatManager.addRoom("none", user, container.getStateToken(), groupShortName,
+ chatManager.addRoom("none", user, rootFolder.getStateToken(), groupShortName,
i18n.t("Welcome to the [%s] public chat room", groupShortName));
- group.setToolConfig(ChatConstants.NAME, config);
- configurationManager.persist(config);
return group;
}
- @Override
- public void onCreateContainer(final Container container, final Container parent) {
- }
-
- @Override
- public void onCreateContent(final Content content, final Container parent) {
- }
-
- @Override
- @Inject
- public void register(final ServerToolRegistry registry) {
- registry.register(this);
- }
-
}
Modified: trunk/src/main/java/cc/kune/chat/shared/ChatConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/shared/ChatConstants.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/chat/shared/ChatConstants.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -22,6 +22,7 @@
public final class ChatConstants {
public static final String NAME = "chats";
+ public static final String ROOT_NAME = "chats";
public static final String TYPE_CHAT = NAME + "." + "chat";
public static final String TYPE_ROOM = NAME + "." + "room";
public static final String TYPE_ROOT = NAME + "." + "root";
Modified: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -84,6 +84,7 @@
ginjector.getChatParts();
ginjector.getBartersParts();
ginjector.getMeetingsParts();
+ ginjector.getTasksParts();
ginjector.getSiteLogoPresenter();
ginjector.getSpacesTabPresenter();
Modified: trunk/src/main/java/cc/kune/client/KuneGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -61,6 +61,8 @@
import cc.kune.pspace.client.PSpaceGinModule;
import cc.kune.pspace.client.PSpaceParts;
import cc.kune.pspace.client.PSpacePresenter;
+import cc.kune.tasks.client.TasksGinModule;
+import cc.kune.tasks.client.TasksGinjector;
import cc.kune.wave.client.WaveGinModule;
import cc.kune.wave.client.WaveParts;
import cc.kune.wiki.client.WikiGinModule;
@@ -75,9 +77,9 @@
@GinModules({ KuneGinModule.class, CoreGinModule.class, WaveGinModule.class, PSpaceGinModule.class,
GSpaceGinModule.class, DocsGinModule.class, BlogsGinModule.class, ChatGinModule.class,
- WikiGinModule.class, BartersGinModule.class, MeetingsGinModule.class })
+ WikiGinModule.class, BartersGinModule.class, MeetingsGinModule.class, TasksGinModule.class })
public interface KuneGinjector extends Ginjector, GSpaceGinjector, DocsGinjector, BlogsGinjector,
- WikiGinjector, BartersGinjector, MeetingsGinjector, ChatGinjector {
+ WikiGinjector, BartersGinjector, MeetingsGinjector, ChatGinjector, TasksGinjector {
/*
* You have to add here all the GWTPresenters (as Provider or AsyncProvider)
Modified: trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/core/client/resources/nav/NavResources.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -108,6 +108,12 @@
@Source("room_add.png")
ImageResource roomAdd();
+ @Source("task.png")
+ ImageResource task();
+
+ @Source("taskadd.png")
+ ImageResource taskadd();
+
@Source("upload.png")
ImageResource upload();
Added: trunk/src/main/java/cc/kune/core/client/resources/nav/task.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nav/task.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/resources/nav/taskadd.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nav/taskadd.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/server/AbstractServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/AbstractServerTool.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/AbstractServerTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,142 @@
+package cc.kune.core.server;
+
+import java.net.URL;
+import java.util.Date;
+import java.util.List;
+
+import cc.kune.core.client.errors.ContainerNotPermittedException;
+import cc.kune.core.client.errors.ContentNotPermittedException;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.ToolConfigurationManager;
+import cc.kune.core.server.tool.ServerTool;
+import cc.kune.core.server.tool.ServerToolRegistry;
+import cc.kune.core.server.tool.ServerToolTarget;
+import cc.kune.core.shared.domain.ContentStatus;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.domain.Container;
+import cc.kune.domain.Content;
+import cc.kune.domain.Group;
+import cc.kune.domain.ToolConfiguration;
+import cc.kune.domain.User;
+
+import com.google.inject.Inject;
+
+public abstract class AbstractServerTool implements ServerTool {
+
+ protected final ToolConfigurationManager configurationManager;
+ protected final ContainerManager containerManager;
+ protected final ContentManager contentManager;
+ protected final I18nTranslationService i18n;
+ private final String name;
+ private final String rootName;
+ private final ServerToolTarget target;
+ private final String typeRoot;
+ private final List<String> validContainerParents;
+ private final List<String> validContainers;
+ private final List<String> validContentParents;
+ private final List<String> validContents;
+
+ public AbstractServerTool(final String name, final String rootName, final String typeRoot,
+ final List<String> validContents, final List<String> validContentParents,
+ final List<String> validContainers, final List<String> validContainerParents,
+ final ContentManager contentManager, final ContainerManager containerManager,
+ final ToolConfigurationManager configurationManager, final I18nTranslationService i18n,
+ final ServerToolTarget target) {
+ this.name = name;
+ this.rootName = rootName;
+ this.typeRoot = typeRoot;
+ this.validContents = validContents;
+ this.validContainers = validContainers;
+ this.validContentParents = validContentParents;
+ this.validContainerParents = validContainerParents;
+ this.contentManager = contentManager;
+ this.containerManager = containerManager;
+ this.configurationManager = configurationManager;
+ this.i18n = i18n;
+ this.target = target;
+ }
+
+ @Override
+ public void checkTypesBeforeContainerCreation(final String parentTypeId, final String typeId) {
+ if (validContainers.contains(typeId) && validContainerParents.contains(parentTypeId)) {
+ // ok
+ } else {
+ throw new ContainerNotPermittedException();
+ }
+ }
+
+ @Override
+ public void checkTypesBeforeContentCreation(final String parentTypeId, final String typeId) {
+ if (validContents.contains(typeId) && validContentParents.contains(parentTypeId)) {
+ // ok
+ } else {
+ throw new ContentNotPermittedException();
+ }
+ }
+
+ protected Content createInitialContent(final User user, final Group group, final Container rootFolder,
+ final String title, final String body, final String contentType) {
+ final Content content = contentManager.createContent(title, body, user, rootFolder, contentType);
+ setContentValues(content, contentType, user);
+ return content;
+ }
+
+ protected Content createInitialContent(final User user, final Group group, final Container rootFolder,
+ final String title, final String body, final String contentType, final URL gadgetUrl) {
+ final Content content = contentManager.createContent(title, body, user, rootFolder, contentType,
+ gadgetUrl);
+ setContentValues(content, contentType, user);
+ return content;
+ }
+
+ protected Container createRoot(final Group group) {
+ final ToolConfiguration config = new ToolConfiguration();
+ final Container rootFolder = containerManager.createRootFolder(group, name, rootName, typeRoot);
+ setContainerAcl(rootFolder);
+ config.setRoot(rootFolder);
+ group.setToolConfig(name, config);
+ configurationManager.persist(config);
+ return rootFolder;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String getRootName() {
+ return rootName;
+ }
+
+ @Override
+ public ServerToolTarget getTarget() {
+ return target;
+ }
+
+ @Override
+ public void onCreateContainer(final Container container, final Container parent) {
+ }
+
+ @Override
+ public void onCreateContent(final Content content, final Container parent) {
+ }
+
+ @Override
+ @Inject
+ public void register(final ServerToolRegistry registry) {
+ registry.register(this);
+ }
+
+ protected void setContainerAcl(final Container container) {
+ }
+
+ private void setContentValues(final Content content, final String contentType, final User author) {
+ content.addAuthor(author);
+ content.setLanguage(author.getLanguage());
+ content.setTypeId(contentType);
+ content.setStatus(ContentStatus.publishedOnline);
+ content.setPublishedOn(new Date());
+ }
+}
Modified: trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -56,6 +56,7 @@
import cc.kune.core.server.rest.UserJSONService;
import cc.kune.docs.server.DocumentServerModule;
import cc.kune.meets.server.MeetingServerModule;
+import cc.kune.tasks.server.TaskServerModule;
import cc.kune.wiki.server.WikiServerModule;
import com.google.inject.AbstractModule;
@@ -165,6 +166,7 @@
builder.use(new ChatServerModule());
builder.use(new BarterServerModule());
builder.use(new MeetingServerModule());
+ builder.use(new TaskServerModule());
// builder.use(new GalleryServerModule());
builder.use(new RESTServicesModule());
builder.use(configModule);
Modified: trunk/src/main/java/cc/kune/docs/client/DocsClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/client/DocsClientTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/docs/client/DocsClientTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -24,9 +24,10 @@
import static cc.kune.docs.shared.DocsConstants.TYPE_FOLDER;
import static cc.kune.docs.shared.DocsConstants.TYPE_ROOT;
import static cc.kune.docs.shared.DocsConstants.TYPE_UPLOADEDFILE;
-import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.docs.shared.DocsConstants;
import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
import cc.kune.gspace.client.tool.selector.ToolSelector;
@@ -34,13 +35,10 @@
public class DocsClientTool extends FoldableAbstractClientTool {
- private final NavResources navResources;
-
@Inject
- public DocsClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
+ public DocsClientTool(final I18nTranslationService i18n, final ToolSelector toolSelector,
final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources) {
- super(NAME, i18n.t("documents"), toolSelector, cntCapRegistry);
- this.navResources = navResources;
+ super(NAME, i18n.t(DocsConstants.ROOT_NAME), toolSelector, cntCapRegistry, i18n, navResources);
// registerAclEditableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE);
registerAuthorableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE);
@@ -64,8 +62,8 @@
registerContentTypeIcon(TYPE_ROOT, navResources.folder());
registerContentTypeIcon(TYPE_DOCUMENT, navResources.page());
registerUploadTypesAndMimes(TYPE_UPLOADEDFILE);
- registerEmptyMessages(TYPE_FOLDER, "This folder is empty");
- registerEmptyMessages(TYPE_ROOT, "This folder is empty");
+ registerEmptyMessages(TYPE_FOLDER, i18n.t("This folder is empty"));
+ registerEmptyMessages(TYPE_ROOT, i18n.t("This folder is empty"));
}
}
Modified: trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -61,10 +61,10 @@
final Provider<DelFolderMenuItem> delFolderMenuItem,
final Provider<ChatAboutContentBtn> chatAbout, final Provider<RefreshContentMenuItem> refresh,
final Provider<SetAsHomePageMenuItem> setAsHomePage,
- final NewMenusForTypeIdsRegistry newMenusRegistry, final DocsFolderNewMenu folderNewMenu) {
+ final NewMenusForTypeIdsRegistry newMenusRegistry, final DocsFolderNewMenu docsNewMenu) {
super(session, stateManager, i18n, registry);
actionsRegistry.addAction(ActionGroups.TOOLBAR, optionsMenuContent, all);
- actionsRegistry.addAction(ActionGroups.TOOLBAR, folderNewMenu, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, docsNewMenu, containers);
actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
actionsRegistry.addAction(ActionGroups.TOOLBAR, newDocMenuItem, containers);
actionsRegistry.addAction(ActionGroups.TOOLBAR, newDocIconBtn, all);
@@ -78,8 +78,8 @@
actionsRegistry.addAction(ActionGroups.ITEM_MENU, delContentMenuItem, contents);
actionsRegistry.addAction(ActionGroups.ITEM_MENU, delFolderMenuItem, containersNoRoot);
actionsRegistry.addAction(ActionGroups.ITEM_MENU, setAsHomePage, contents);
- newMenusRegistry.register(TYPE_FOLDER, folderNewMenu.get());
- newMenusRegistry.register(TYPE_ROOT, folderNewMenu.get());
+ newMenusRegistry.register(TYPE_FOLDER, docsNewMenu.get());
+ newMenusRegistry.register(TYPE_ROOT, docsNewMenu.get());
}
@Override
Modified: trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -26,130 +26,45 @@
import static cc.kune.docs.shared.DocsConstants.TYPE_ROOT;
import static cc.kune.docs.shared.DocsConstants.TYPE_UPLOADEDFILE;
-import java.util.Date;
+import java.util.Arrays;
-import cc.kune.core.client.errors.ContainerNotPermittedException;
-import cc.kune.core.client.errors.ContentNotPermittedException;
+import cc.kune.core.server.AbstractServerTool;
import cc.kune.core.server.content.ContainerManager;
import cc.kune.core.server.content.ContentManager;
import cc.kune.core.server.manager.ToolConfigurationManager;
-import cc.kune.core.server.tool.ServerTool;
-import cc.kune.core.server.tool.ServerToolRegistry;
import cc.kune.core.server.tool.ServerToolTarget;
-import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.docs.shared.DocsConstants;
import cc.kune.domain.Container;
import cc.kune.domain.Content;
import cc.kune.domain.Group;
-import cc.kune.domain.ToolConfiguration;
import cc.kune.domain.User;
import com.google.inject.Inject;
-public class DocumentServerTool implements ServerTool {
- private final ToolConfigurationManager configurationManager;
- private final ContainerManager containerManager;
- private final ContentManager contentManager;
- private final I18nTranslationService i18n;
+public class DocumentServerTool extends AbstractServerTool {
@Inject
public DocumentServerTool(final ContentManager contentManager,
final ContainerManager containerManager, final ToolConfigurationManager configurationManager,
- final I18nTranslationService translationService) {
- this.contentManager = contentManager;
- this.containerManager = containerManager;
- this.configurationManager = configurationManager;
- this.i18n = translationService;
+ final I18nTranslationService i18n) {
+ super(NAME, ROOT_NAME, TYPE_ROOT, Arrays.asList(TYPE_DOCUMENT, TYPE_UPLOADEDFILE), Arrays.asList(
+ TYPE_ROOT, TYPE_FOLDER), Arrays.asList(TYPE_FOLDER), Arrays.asList(TYPE_ROOT, TYPE_FOLDER),
+ contentManager, containerManager, configurationManager, i18n, ServerToolTarget.forBoth);
}
- void checkContainerTypeId(final String parentTypeId, final String typeId) {
- if (typeId.equals(TYPE_FOLDER)) {
- // ok valid container
- if ((typeId.equals(TYPE_FOLDER) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))) {
- // ok
- } else {
- throw new ContainerNotPermittedException();
- }
- } else {
- throw new ContainerNotPermittedException();
- }
- }
-
- void checkContentTypeId(final String parentTypeId, final String typeId) {
- if (typeId.equals(TYPE_DOCUMENT) || typeId.equals(TYPE_UPLOADEDFILE)) {
- // ok valid content
- if ((typeId.equals(TYPE_DOCUMENT) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))
- || (typeId.equals(TYPE_UPLOADEDFILE) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))) {
- // ok
- } else {
- throw new ContentNotPermittedException();
- }
-
- } else {
- throw new ContentNotPermittedException();
- }
- }
-
@Override
- public void checkTypesBeforeContainerCreation(final String parentTypeId, final String typeId) {
- checkContainerTypeId(parentTypeId, typeId);
- }
-
- @Override
- public void checkTypesBeforeContentCreation(final String parentTypeId, final String typeId) {
- checkContentTypeId(parentTypeId, typeId);
- }
-
- @Override
- public String getName() {
- return NAME;
- }
-
- @Override
- public String getRootName() {
- return ROOT_NAME;
- }
-
- @Override
- public ServerToolTarget getTarget() {
- return ServerToolTarget.forBoth;
- }
-
- @Override
public Group initGroup(final User user, final Group group, final Object... otherVars) {
- final ToolConfiguration config = new ToolConfiguration();
- final Container rootFolder = containerManager.createRootFolder(group, NAME, ROOT_NAME, TYPE_ROOT);
- config.setRoot(rootFolder);
- group.setToolConfig(NAME, config);
- configurationManager.persist(config);
+ final Container rootFolder = createRoot(group);
final boolean hasVars = otherVars.length >= 2;
final String title = hasVars ? (String) otherVars[0] : i18n.t("Document sample");
final String body = hasVars ? (String) otherVars[1] : i18n.t("This is only a sample of document");
+ final String contentType = DocsConstants.TYPE_DOCUMENT;
- final Content content = contentManager.createContent(title, body, user, rootFolder,
- DocsConstants.TYPE_DOCUMENT);
- content.addAuthor(user);
- content.setLanguage(user.getLanguage());
- content.setTypeId(TYPE_DOCUMENT);
- content.setStatus(ContentStatus.publishedOnline);
- content.setPublishedOn(new Date());
+ final Content content = createInitialContent(user, group, rootFolder, title, body, contentType);
group.setDefaultContent(content);
return group;
}
- @Override
- public void onCreateContainer(final Container container, final Container parent) {
- }
-
- @Override
- public void onCreateContent(final Content content, final Container parent) {
- }
-
- @Override
- @Inject
- public void register(final ServerToolRegistry registry) {
- registry.register(this);
- }
}
Modified: trunk/src/main/java/cc/kune/domain/Content.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/Content.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/domain/Content.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -59,6 +59,7 @@
import cc.kune.docs.shared.DocsConstants;
import cc.kune.domain.utils.HasStateToken;
import cc.kune.meets.shared.MeetingsConstants;
+import cc.kune.tasks.shared.TasksConstants;
import cc.kune.wiki.shared.WikiConstants;
@Entity
@@ -264,6 +265,7 @@
@Transient
public boolean isWave() {
return (typeId.equals(DocsConstants.TYPE_DOCUMENT))
+ || typeId.equals(TasksConstants.TYPE_TASK)
|| typeId.equals(WikiConstants.TYPE_WIKIPAGE)
|| (typeId.equals(BlogsConstants.TYPE_POST) || typeId.equals(BartersConstants.TYPE_BARTER) || typeId.equals(MeetingsConstants.TYPE_MEETING));
}
Modified: trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -21,17 +21,24 @@
import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.resources.nav.NavResources;
import cc.kune.core.shared.dto.BasicMimeTypeDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.tool.selector.ToolSelector;
public abstract class FoldableAbstractClientTool extends AbstractClientTool {
protected final ContentCapabilitiesRegistry contentCapabilitiesRegistry;
+ protected final I18nTranslationService i18n;
+ protected final NavResources navResources;
public FoldableAbstractClientTool(final String shortName, final String longName,
- final ToolSelector toolSelector, final ContentCapabilitiesRegistry contentCapabilitiesRegistry) {
+ final ToolSelector toolSelector, final ContentCapabilitiesRegistry contentCapabilitiesRegistry,
+ final I18nTranslationService i18n, final NavResources navResources) {
super(shortName, longName, toolSelector);
this.contentCapabilitiesRegistry = contentCapabilitiesRegistry;
+ this.i18n = i18n;
+ this.navResources = navResources;
}
protected void registerAclEditableTypes(final String... typeIds) {
Modified: trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -22,9 +22,9 @@
import static cc.kune.meets.shared.MeetingsConstants.NAME;
import static cc.kune.meets.shared.MeetingsConstants.TYPE_MEETING;
import static cc.kune.meets.shared.MeetingsConstants.TYPE_ROOT;
-import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
import cc.kune.gspace.client.tool.selector.ToolSelector;
@@ -32,13 +32,10 @@
public class MeetingsClientTool extends FoldableAbstractClientTool {
- private final NavResources navResources;
-
@Inject
- public MeetingsClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
+ public MeetingsClientTool(final I18nTranslationService i18n, final ToolSelector toolSelector,
final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources) {
- super(NAME, i18n.t("meets"), toolSelector, cntCapRegistry);
- this.navResources = navResources;
+ super(NAME, i18n.t("meets"), toolSelector, cntCapRegistry, i18n, navResources);
// registerAclEditableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE);
registerAuthorableTypes(TYPE_MEETING);
@@ -61,7 +58,7 @@
private void registerIcons() {
registerContentTypeIcon(TYPE_ROOT, navResources.folder());
registerContentTypeIcon(TYPE_MEETING, navResources.calendar());
- registerEmptyMessages(TYPE_ROOT, "There isn't any meeting");
+ registerEmptyMessages(TYPE_ROOT, i18n.t("There isn't any meeting"));
}
}
Modified: trunk/src/main/java/cc/kune/meets/server/MeetingServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/server/MeetingServerTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/meets/server/MeetingServerTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -25,14 +25,14 @@
import static cc.kune.meets.shared.MeetingsConstants.TYPE_ROOT;
import java.net.URL;
+import java.util.Arrays;
+import java.util.Collections;
import java.util.Date;
-import cc.kune.core.client.errors.ContainerNotPermittedException;
-import cc.kune.core.client.errors.ContentNotPermittedException;
+import cc.kune.core.server.AbstractServerTool;
import cc.kune.core.server.content.ContainerManager;
import cc.kune.core.server.content.ContentManager;
import cc.kune.core.server.manager.ToolConfigurationManager;
-import cc.kune.core.server.tool.ServerToolRegistry;
import cc.kune.core.server.tool.ServerToolTarget;
import cc.kune.core.server.tool.ServerWaveTool;
import cc.kune.core.server.utils.UrlUtils;
@@ -43,102 +43,44 @@
import cc.kune.domain.Container;
import cc.kune.domain.Content;
import cc.kune.domain.Group;
-import cc.kune.domain.ToolConfiguration;
import cc.kune.domain.User;
import com.google.inject.Inject;
-public class MeetingServerTool implements ServerWaveTool {
+public class MeetingServerTool extends AbstractServerTool implements ServerWaveTool {
private static final String MEETING_GADGET = "http://mass-mob.appspot.com/massmob/org.ourproject.massmob.client.MassmobGa…";
- private final ToolConfigurationManager configurationManager;
- private final ContainerManager containerManager;
- private final ContentManager contentManager;
private final URL gadgetUrl;
- private final I18nTranslationService i18n;
@Inject
public MeetingServerTool(final ContentManager contentManager, final ContainerManager containerManager,
- final ToolConfigurationManager configurationManager,
- final I18nTranslationService translationService) {
- this.contentManager = contentManager;
- this.containerManager = containerManager;
- this.configurationManager = configurationManager;
- this.i18n = translationService;
+ final ToolConfigurationManager configurationManager, final I18nTranslationService i18n) {
+ super(NAME, ROOT_NAME, TYPE_ROOT, Arrays.asList(TYPE_MEETING), Arrays.asList(TYPE_ROOT),
+ Collections.<String> emptyList(), Arrays.asList(TYPE_ROOT), contentManager, containerManager,
+ configurationManager, i18n, ServerToolTarget.forGroups);
gadgetUrl = UrlUtils.of(MEETING_GADGET);
}
- void checkContainerTypeId(final String parentTypeId, final String typeId) {
- throw new ContainerNotPermittedException();
- }
-
- void checkContentTypeId(final String parentTypeId, final String typeId) {
- if (typeId.equals(TYPE_MEETING)) {
- // ok valid content
- final boolean parentIsFolderOrRoot = parentTypeId.equals(TYPE_ROOT);
- if ((typeId.equals(TYPE_MEETING) && parentIsFolderOrRoot)) {
- // ok
- } else {
- throw new ContentNotPermittedException();
- }
- } else {
- throw new ContentNotPermittedException();
- }
- }
-
@Override
- public void checkTypesBeforeContainerCreation(final String parentTypeId, final String typeId) {
- checkContainerTypeId(parentTypeId, typeId);
- }
-
- @Override
- public void checkTypesBeforeContentCreation(final String parentTypeId, final String typeId) {
- checkContentTypeId(parentTypeId, typeId);
- }
-
- @Override
public URL getGadgetUrl() {
return gadgetUrl;
}
@Override
- public String getName() {
- return NAME;
- }
-
- @Override
- public String getRootName() {
- return ROOT_NAME;
- }
-
- @Override
- public ServerToolTarget getTarget() {
- return ServerToolTarget.forGroups;
- }
-
- @Override
public Group initGroup(final User user, final Group group, final Object... otherVars) {
- final ToolConfiguration config = new ToolConfiguration();
- final Container rootFolder = containerManager.createRootFolder(group, NAME, ROOT_NAME, TYPE_ROOT);
- setContainerMeetingsAcl(rootFolder);
- config.setRoot(rootFolder);
- group.setToolConfig(NAME, config);
- configurationManager.persist(config);
- final Content content = contentManager.createContent(
- i18n.t("Meeting sample"),
- i18n.t("This is only a meet sample. You can invite other participants to this meeting, but also publish to the general public allowing you to to help in the organization, call and speed-up of events."),
- user, rootFolder, TYPE_MEETING, gadgetUrl);
- content.addAuthor(user);
- content.setLanguage(user.getLanguage());
- content.setTypeId(TYPE_MEETING);
- content.setStatus(ContentStatus.publishedOnline);
+ final Container rootFolder = createRoot(group);
+
+ final Content content = createInitialContent(user, group, rootFolder, i18n.t("Meeting sample"),
+ i18n.t("This is only a meet sample. You can invite other participants to this meeting, "
+ + "but also publish to the general public allowing you to to help in the organization, "
+ + "call and speed-up of events."), TYPE_MEETING, gadgetUrl);
contentManager.save(content);
return group;
}
@Override
public void onCreateContainer(final Container container, final Container parent) {
- setContainerMeetingsAcl(container);
+ setContainerAcl(container);
}
@Override
@@ -148,12 +90,7 @@
}
@Override
- @Inject
- public void register(final ServerToolRegistry registry) {
- registry.register(this);
- }
-
- private void setContainerMeetingsAcl(final Container container) {
+ protected void setContainerAcl(final Container container) {
final AccessLists meetsAcl = new AccessLists();
meetsAcl.getAdmins().setMode(GroupListMode.NORMAL);
meetsAcl.getAdmins().add(container.getOwner());
Added: trunk/src/main/java/cc/kune/tasks/KuneTasks.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/tasks/KuneTasks.gwt.xml (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/KuneTasks.gwt.xml 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,6 @@
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.1.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.1.0/distro-source/core/…">
+<module>
+ <inherits name="cc.kune.core.KuneCore" />
+ <source path="client" />
+ <source path="shared" />
+</module>
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/tasks/client/TasksClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/TasksClientTool.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/TasksClientTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,68 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client;
+
+import static cc.kune.tasks.shared.TasksConstants.NAME;
+import static cc.kune.tasks.shared.TasksConstants.ROOT_NAME;
+import static cc.kune.tasks.shared.TasksConstants.TYPE_FOLDER;
+import static cc.kune.tasks.shared.TasksConstants.TYPE_ROOT;
+import static cc.kune.tasks.shared.TasksConstants.TYPE_TASK;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
+import cc.kune.gspace.client.tool.selector.ToolSelector;
+
+import com.google.inject.Inject;
+
+public class TasksClientTool extends FoldableAbstractClientTool {
+
+ @Inject
+ public TasksClientTool(final I18nTranslationService i18n, final ToolSelector toolSelector,
+ final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources) {
+ super(NAME, i18n.t(ROOT_NAME), toolSelector, cntCapRegistry, i18n, navResources);
+
+ // registerAclEditableTypes();
+ registerAuthorableTypes(TYPE_TASK);
+ registerDragableTypes(TYPE_TASK, TYPE_FOLDER);
+ registerDropableTypes(TYPE_ROOT, TYPE_FOLDER);
+ registerPublishModerableTypes(TYPE_TASK);
+ registerRateableTypes(TYPE_TASK);
+ registerRenamableTypes(TYPE_FOLDER, TYPE_TASK);
+ registerTageableTypes(TYPE_FOLDER, TYPE_TASK);
+ // registerTranslatableTypes();
+ registerIcons();
+ }
+
+ @Override
+ public String getName() {
+ return NAME;
+ }
+
+ private void registerIcons() {
+ registerContentTypeIcon(TYPE_ROOT, navResources.folder());
+ registerContentTypeIcon(TYPE_FOLDER, navResources.folder());
+ registerContentTypeIcon(TYPE_TASK, navResources.task());
+ final String noTask = i18n.t("There isn't any task, create one");
+ registerEmptyMessages(TYPE_ROOT, noTask);
+ registerEmptyMessages(TYPE_FOLDER, noTask);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/tasks/client/TasksGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/TasksGinModule.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/TasksGinModule.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client;
+
+import cc.kune.common.client.ExtendedGinModule;
+import cc.kune.tasks.client.actions.TasksClientActions;
+import cc.kune.tasks.client.actions.TasksNewMenu;
+
+public class TasksGinModule extends ExtendedGinModule {
+
+ @Override
+ protected void configure() {
+ s(TasksNewMenu.class);
+ s(TasksClientTool.class);
+ s(TasksClientActions.class);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/tasks/client/TasksGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/TasksGinjector.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/TasksGinjector.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client;
+
+import com.google.gwt.inject.client.Ginjector;
+
+public interface TasksGinjector extends Ginjector {
+
+ TasksParts getTasksParts();
+
+}
Added: trunk/src/main/java/cc/kune/tasks/client/TasksParts.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/TasksParts.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/TasksParts.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client;
+
+import cc.kune.core.client.state.Session;
+import cc.kune.gspace.client.tool.ContentViewerSelector;
+import cc.kune.gspace.client.viewers.ContentViewerPresenter;
+import cc.kune.gspace.client.viewers.FolderViewerPresenter;
+import cc.kune.tasks.client.actions.TasksClientActions;
+import cc.kune.tasks.shared.TasksConstants;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class TasksParts {
+
+ @Inject
+ public TasksParts(final Session session, final Provider<TasksClientTool> clientTool,
+ final ContentViewerSelector viewerSelector, final TasksClientActions tasksActions,
+ final ContentViewerPresenter contentViewer, final FolderViewerPresenter folderViewer) {
+ clientTool.get();
+ viewerSelector.register(contentViewer, true, TasksConstants.TYPE_TASK);
+ viewerSelector.register(folderViewer, true, TasksConstants.TYPE_ROOT, TasksConstants.TYPE_FOLDER);
+ }
+}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/tasks/client/actions/AbstractOptionsMenu.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/AbstractOptionsMenu.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/AbstractOptionsMenu.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,32 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
+import cc.kune.core.client.resources.CoreResources;
+
+public abstract class AbstractOptionsMenu extends MenuDescriptor {
+
+ public AbstractOptionsMenu(final CoreResources res) {
+ super();
+ this.withIcon(res.arrowDownBlack()).withStyles("k-fr");
+ }
+
+}
Added: trunk/src/main/java/cc/kune/tasks/client/actions/DelFolderMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/DelFolderMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/DelFolderMenuItem.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.DelContainerMenuItem;
+
+import com.google.inject.Inject;
+
+public class DelFolderMenuItem extends DelContainerMenuItem {
+
+ @Inject
+ public DelFolderMenuItem(final I18nTranslationService i18n, final DelContainerAction action, final CoreResources res) {
+ super(i18n, action, res);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/tasks/client/actions/DelTaskMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/DelTaskMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/DelTaskMenuItem.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.DelContentMenuItem;
+
+import com.google.inject.Inject;
+
+public class DelTaskMenuItem extends DelContentMenuItem {
+
+ @Inject
+ public DelTaskMenuItem(final I18nTranslationService i18n, final DelContentAction action,
+ final CoreResources res) {
+ super(i18n, action, res);
+ this.withText(i18n.t("Mark as done"));
+ }
+}
Added: trunk/src/main/java/cc/kune/tasks/client/actions/GoParentFolderBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/GoParentFolderBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/GoParentFolderBtn.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.GoParentContainerBtn;
+import cc.kune.tasks.shared.TasksConstants;
+
+import com.google.inject.Inject;
+
+public class GoParentFolderBtn extends GoParentContainerBtn {
+
+ @Inject
+ public GoParentFolderBtn(final I18nTranslationService i18n, final GoParentContainerAction action,
+ final CoreResources res, final Session session) {
+ super(i18n, action, res, session, TasksConstants.TYPE_ROOT);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/NewFolderBtn.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.NewContainerBtn;
+import cc.kune.tasks.shared.TasksConstants;
+
+import com.google.inject.Inject;
+
+public class NewFolderBtn extends NewContainerBtn {
+
+ @Inject
+ public NewFolderBtn(final I18nTranslationService i18n, final NewContainerAction action,
+ final NavResources res) {
+ super(i18n, action, res.taskadd(), i18n.t("New folder"), i18n.t("Create a new folder"),
+ i18n.t("New folder"), TasksConstants.TYPE_FOLDER);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskIconBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskIconBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskIconBtn.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.NewContentAction;
+import cc.kune.gspace.client.actions.NewContentBtn;
+import cc.kune.tasks.shared.TasksConstants;
+
+import com.google.inject.Inject;
+
+public class NewTaskIconBtn extends NewContentBtn {
+
+ @Inject
+ public NewTaskIconBtn(final I18nTranslationService i18n, final NewContentAction action,
+ final NavResources res, final GlobalShortcutRegister shorcutReg) {
+ super(i18n, action, res.taskadd(), shorcutReg, "", i18n.t("Create a new task"), i18n.t("New task"),
+ TasksConstants.TYPE_TASK);
+ withStyles("k-btn-min, k-fl");
+ }
+
+}
Added: trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskMenuItem.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.NewContentAction;
+import cc.kune.gspace.client.actions.NewContentMenuItem;
+import cc.kune.tasks.shared.TasksConstants;
+
+import com.google.inject.Inject;
+
+public class NewTaskMenuItem extends NewContentMenuItem {
+
+ @Inject
+ public NewTaskMenuItem(final I18nTranslationService i18n, final NewContentAction action,
+ final NavResources res, final GlobalShortcutRegister shorcutReg, final TasksNewMenu tasksNewMenu) {
+ super(i18n, action, res.taskadd(), shorcutReg, i18n.t("New task"), i18n.t("Create a new task"),
+ i18n.t("New task"), TasksConstants.TYPE_TASK, tasksNewMenu.get());
+ }
+
+}
Added: trunk/src/main/java/cc/kune/tasks/client/actions/OpenFolderMenuItem.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/OpenFolderMenuItem.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/OpenFolderMenuItem.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.OpenContentMenuItem;
+
+import com.google.inject.Inject;
+
+public class OpenFolderMenuItem extends OpenContentMenuItem {
+
+ @Inject
+ public OpenFolderMenuItem(final I18nTranslationService i18n, final OpenContentAction action, final NavResources res) {
+ super(i18n, action, res);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,86 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.tasks.client.actions;
+
+import static cc.kune.tasks.shared.TasksConstants.TYPE_FOLDER;
+import static cc.kune.tasks.shared.TasksConstants.TYPE_ROOT;
+import static cc.kune.tasks.shared.TasksConstants.TYPE_TASK;
+import cc.kune.chat.client.actions.ChatAboutContentBtn;
+import cc.kune.core.client.actions.ActionRegistryByType;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.registry.NewMenusForTypeIdsRegistry;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.gspace.client.actions.AbstractFoldableToolActions;
+import cc.kune.gspace.client.actions.ActionGroups;
+import cc.kune.gspace.client.actions.ContentViewerOptionsMenu;
+import cc.kune.gspace.client.actions.ParticipateInContentBtn;
+import cc.kune.gspace.client.actions.RefreshContentMenuItem;
+import cc.kune.gspace.client.actions.SetAsHomePageMenuItem;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class TasksClientActions extends AbstractFoldableToolActions {
+
+ final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_TASK };
+ final String[] containers = { TYPE_ROOT, TYPE_FOLDER };
+ final String[] containersNoRoot = { TYPE_FOLDER };
+ final String[] contents = { TYPE_TASK };
+ final String[] noRoot = { TYPE_FOLDER, TYPE_TASK };
+
+ @Inject
+ public TasksClientActions(final I18nUITranslationService i18n, final Session session,
+ final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
+ final Provider<GoParentFolderBtn> folderGoUp, final Provider<NewTaskMenuItem> newTaskItem,
+ final Provider<NewTaskIconBtn> newTaskIconBtn, final Provider<NewFolderBtn> newFolderBtn,
+ final Provider<OpenFolderMenuItem> openContentMenuItem,
+ final Provider<DelTaskMenuItem> delContentMenuItem,
+ final Provider<RefreshContentMenuItem> refresh,
+ final Provider<ContentViewerOptionsMenu> optionsMenuContent,
+ final Provider<ParticipateInContentBtn> participateBtn, final TasksNewMenu taskNewMenu,
+ final NewMenusForTypeIdsRegistry newMenusRegistry, final Provider<ChatAboutContentBtn> chatAbout,
+ final Provider<DelFolderMenuItem> delFolderMenuItem,
+ final Provider<SetAsHomePageMenuItem> setAsHomePage) {
+ super(session, stateManager, i18n, registry);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, optionsMenuContent, all);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, taskNewMenu, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newTaskItem, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, newTaskIconBtn, all);
+ // actionsRegistry.addAction(ActionGroups.TOOLBAR, newFolderBtn,
+ // containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, participateBtn, contents);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, chatAbout, contents);
+ actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, contents);
+ actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, containersNoRoot);
+ actionsRegistry.addAction(ActionGroups.ITEM_MENU, delContentMenuItem, contents);
+ actionsRegistry.addAction(ActionGroups.ITEM_MENU, delFolderMenuItem, containersNoRoot);
+ newMenusRegistry.register(TYPE_FOLDER, taskNewMenu.get());
+ newMenusRegistry.register(TYPE_ROOT, taskNewMenu.get());
+ }
+
+ @Override
+ protected void createPostSessionInitActions() {
+ }
+}
Added: trunk/src/main/java/cc/kune/tasks/client/actions/TasksNewMenu.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/TasksNewMenu.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/TasksNewMenu.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,34 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.client.actions;
+
+import cc.kune.gspace.client.actions.AbstractNewMenu;
+import cc.kune.gspace.client.actions.NewMenuProvider;
+
+import com.google.inject.Inject;
+
+public class TasksNewMenu extends NewMenuProvider {
+
+ @Inject
+ public TasksNewMenu(final AbstractNewMenu menu) {
+ super(menu);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/tasks/server/TaskServerModule.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/server/TaskServerModule.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/server/TaskServerModule.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,29 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.server;
+
+import com.google.inject.Binder;
+import com.google.inject.Module;
+
+public class TaskServerModule implements Module {
+ public void configure(final Binder binder) {
+ binder.bind(TaskServerTool.class).asEagerSingleton();
+ }
+}
Added: trunk/src/main/java/cc/kune/tasks/server/TaskServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/server/TaskServerTool.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/server/TaskServerTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,83 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.server;
+
+import static cc.kune.tasks.shared.TasksConstants.NAME;
+import static cc.kune.tasks.shared.TasksConstants.ROOT_NAME;
+import static cc.kune.tasks.shared.TasksConstants.TYPE_FOLDER;
+import static cc.kune.tasks.shared.TasksConstants.TYPE_ROOT;
+import static cc.kune.tasks.shared.TasksConstants.TYPE_TASK;
+
+import java.util.Arrays;
+
+import cc.kune.core.server.AbstractServerTool;
+import cc.kune.core.server.content.ContainerManager;
+import cc.kune.core.server.content.ContentManager;
+import cc.kune.core.server.manager.ToolConfigurationManager;
+import cc.kune.core.server.tool.ServerToolTarget;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.domain.Container;
+import cc.kune.domain.Content;
+import cc.kune.domain.Group;
+import cc.kune.domain.I18nLanguage;
+import cc.kune.domain.User;
+
+import com.google.inject.Inject;
+
+public class TaskServerTool extends AbstractServerTool {
+
+ @Inject
+ public TaskServerTool(final ContentManager contentManager, final ContainerManager containerManager,
+ final ToolConfigurationManager configurationManager, final I18nTranslationService i18n) {
+ super(NAME, ROOT_NAME, TYPE_ROOT, Arrays.asList(TYPE_TASK), Arrays.asList(TYPE_FOLDER, TYPE_ROOT),
+ Arrays.asList(TYPE_FOLDER), Arrays.asList(TYPE_ROOT, TYPE_FOLDER), contentManager,
+ containerManager, configurationManager, i18n, ServerToolTarget.forBoth);
+ }
+
+ private Container createFolder(final Group group, final Container rootFolder,
+ final I18nLanguage language, final String title) {
+ final Container shortTerm = containerManager.createFolder(group, rootFolder, i18n.t(title),
+ language, TYPE_FOLDER);
+ return shortTerm;
+ }
+
+ private void createTask(final User user, final Group group, final Container shortTerm,
+ final String text) {
+ final Content content = createInitialContent(user, group, shortTerm, i18n.t(text),
+ i18n.t("This is only a task sample. You can edit it, rename it"), TYPE_TASK);
+ contentManager.save(content);
+ }
+
+ @Override
+ public Group initGroup(final User user, final Group group, final Object... otherVars) {
+ final Container rootFolder = createRoot(group);
+
+ final I18nLanguage language = user.getLanguage();
+
+ final Container longTerm = createFolder(group, rootFolder, language, "Long-term tasks");
+ final Container midTerm = createFolder(group, rootFolder, language, "Mid-term tasks");
+ final Container shortTerm = createFolder(group, rootFolder, language, "Short-term (urgent) tasks");
+
+ createTask(user, group, longTerm, "A long-term task sample");
+ createTask(user, group, midTerm, "A mid-term task sample");
+ createTask(user, group, shortTerm, "A short-term task sample");
+ return group;
+ }
+}
Added: trunk/src/main/java/cc/kune/tasks/shared/TasksConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/shared/TasksConstants.java (rev 0)
+++ trunk/src/main/java/cc/kune/tasks/shared/TasksConstants.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,32 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.tasks.shared;
+
+public final class TasksConstants {
+
+ public static final String NAME = "tasks";
+ public static final String ROOT_NAME = "tasks";
+ public static final String TYPE_FOLDER = NAME + "." + "folder";
+ public static final String TYPE_ROOT = NAME + "." + "root";
+ public static final String TYPE_TASK = NAME + "." + "task";
+
+ private TasksConstants() {
+ }
+}
Modified: trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -24,9 +24,9 @@
import static cc.kune.wiki.shared.WikiConstants.TYPE_ROOT;
import static cc.kune.wiki.shared.WikiConstants.TYPE_UPLOADEDFILE;
import static cc.kune.wiki.shared.WikiConstants.TYPE_WIKIPAGE;
-import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
import cc.kune.gspace.client.tool.selector.ToolSelector;
@@ -34,19 +34,14 @@
public class WikiClientTool extends FoldableAbstractClientTool {
- private final NavResources navResources;
-
@Inject
- public WikiClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
+ public WikiClientTool(final I18nTranslationService i18n, final ToolSelector toolSelector,
final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources) {
- super(NAME, i18n.t("wiki"), toolSelector, cntCapRegistry);
- this.navResources = navResources;
+ super(NAME, i18n.t("wiki"), toolSelector, cntCapRegistry, i18n, navResources);
- // registerAclEditableTypes(TYPE_DOCUMENT, TYPE_UPLOADEDFILE);
registerAuthorableTypes(TYPE_WIKIPAGE, TYPE_UPLOADEDFILE);
registerDragableTypes(TYPE_WIKIPAGE, TYPE_FOLDER, TYPE_UPLOADEDFILE);
registerDropableTypes(TYPE_ROOT, TYPE_FOLDER);
- // registerPublishModerableTypes();
registerRateableTypes(TYPE_UPLOADEDFILE, TYPE_WIKIPAGE);
registerRenamableTypes(TYPE_FOLDER, TYPE_UPLOADEDFILE, TYPE_WIKIPAGE);
registerTageableTypes(TYPE_UPLOADEDFILE, TYPE_WIKIPAGE);
@@ -65,8 +60,8 @@
registerContentTypeIcon(TYPE_ROOT, navResources.folder());
registerContentTypeIcon(TYPE_WIKIPAGE, navResources.wikipage());
registerUploadTypesAndMimes(TYPE_UPLOADEDFILE);
- registerEmptyMessages(TYPE_FOLDER, "There folder is empty");
- registerEmptyMessages(TYPE_ROOT, "This wiki is empty");
+ registerEmptyMessages(TYPE_FOLDER, i18n.t("There folder is empty"));
+ registerEmptyMessages(TYPE_ROOT, i18n.t("This wiki is empty"));
}
}
Modified: trunk/src/main/java/cc/kune/wiki/server/WikiServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/wiki/server/WikiServerTool.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/main/java/cc/kune/wiki/server/WikiServerTool.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -26,15 +26,13 @@
import static cc.kune.wiki.shared.WikiConstants.TYPE_UPLOADEDFILE;
import static cc.kune.wiki.shared.WikiConstants.TYPE_WIKIPAGE;
+import java.util.Arrays;
import java.util.Date;
-import cc.kune.core.client.errors.ContainerNotPermittedException;
-import cc.kune.core.client.errors.ContentNotPermittedException;
+import cc.kune.core.server.AbstractServerTool;
import cc.kune.core.server.content.ContainerManager;
import cc.kune.core.server.content.ContentManager;
import cc.kune.core.server.manager.ToolConfigurationManager;
-import cc.kune.core.server.tool.ServerTool;
-import cc.kune.core.server.tool.ServerToolRegistry;
import cc.kune.core.server.tool.ServerToolTarget;
import cc.kune.core.shared.domain.ContentStatus;
import cc.kune.core.shared.domain.GroupListMode;
@@ -43,105 +41,32 @@
import cc.kune.domain.Container;
import cc.kune.domain.Content;
import cc.kune.domain.Group;
-import cc.kune.domain.ToolConfiguration;
import cc.kune.domain.User;
import com.google.inject.Inject;
-public class WikiServerTool implements ServerTool {
+public class WikiServerTool extends AbstractServerTool {
- private final ToolConfigurationManager configurationManager;
- private final ContainerManager containerManager;
- private final ContentManager contentManager;
- private final I18nTranslationService i18n;
-
@Inject
public WikiServerTool(final ContentManager contentManager, final ContainerManager containerManager,
- final ToolConfigurationManager configurationManager,
- final I18nTranslationService translationService) {
- this.contentManager = contentManager;
- this.containerManager = containerManager;
- this.configurationManager = configurationManager;
- this.i18n = translationService;
+ final ToolConfigurationManager configurationManager, final I18nTranslationService i18n) {
+ super(NAME, ROOT_NAME, TYPE_ROOT, Arrays.asList(TYPE_WIKIPAGE, TYPE_UPLOADEDFILE), Arrays.asList(
+ TYPE_ROOT, TYPE_FOLDER), Arrays.asList(TYPE_FOLDER), Arrays.asList(TYPE_ROOT, TYPE_FOLDER),
+ contentManager, containerManager, configurationManager, i18n, ServerToolTarget.forBoth);
}
- void checkContainerTypeId(final String parentTypeId, final String typeId) {
- if (typeId.equals(TYPE_FOLDER)) {
- // ok valid container
- if ((typeId.equals(TYPE_FOLDER) && (parentTypeId.equals(TYPE_ROOT) || parentTypeId.equals(TYPE_FOLDER)))) {
- // ok
- } else {
- throw new ContainerNotPermittedException();
- }
- } else {
- throw new ContainerNotPermittedException();
- }
- }
-
- void checkContentTypeId(final String parentTypeId, final String typeId) {
- if (typeId.equals(TYPE_WIKIPAGE) || typeId.equals(TYPE_UPLOADEDFILE)) {
- // ok valid content
- final boolean parentIsFolderOrRoot = parentTypeId.equals(TYPE_ROOT)
- || parentTypeId.equals(TYPE_FOLDER);
- if ((typeId.equals(TYPE_UPLOADEDFILE) && parentIsFolderOrRoot)
- || (typeId.equals(TYPE_WIKIPAGE) && parentIsFolderOrRoot)) {
- // ok
- } else {
- throw new ContentNotPermittedException();
- }
- } else {
- throw new ContentNotPermittedException();
- }
- }
-
@Override
- public void checkTypesBeforeContainerCreation(final String parentTypeId, final String typeId) {
- checkContainerTypeId(parentTypeId, typeId);
- }
-
- @Override
- public void checkTypesBeforeContentCreation(final String parentTypeId, final String typeId) {
- checkContentTypeId(parentTypeId, typeId);
- }
-
- @Override
- public String getName() {
- return NAME;
- }
-
- @Override
- public String getRootName() {
- return ROOT_NAME;
- }
-
- @Override
- public ServerToolTarget getTarget() {
- return ServerToolTarget.forBoth;
- }
-
- @Override
public Group initGroup(final User user, final Group group, final Object... otherVars) {
- final ToolConfiguration config = new ToolConfiguration();
- final Container rootFolder = containerManager.createRootFolder(group, NAME, ROOT_NAME, TYPE_ROOT);
- setContainerWikiAcl(rootFolder);
- config.setRoot(rootFolder);
- group.setToolConfig(NAME, config);
- configurationManager.persist(config);
- final Content content = contentManager.createContent(i18n.t("Wiki page sample"),
- i18n.t("This is only a wiki page sample. You can edit or rename it, but also any other user."),
- user, rootFolder, TYPE_WIKIPAGE);
- content.addAuthor(user);
- content.setLanguage(user.getLanguage());
- content.setTypeId(TYPE_WIKIPAGE);
- content.setStatus(ContentStatus.publishedOnline);
+ final Container rootFolder = createRoot(group);
+ final Content content = super.createInitialContent(user, group, rootFolder, i18n.t("Wiki page sample"), i18n.t("This is only a wiki page sample. You can edit or rename it, but also any other user."), TYPE_WIKIPAGE);
contentManager.save(content);
return group;
}
@Override
public void onCreateContainer(final Container container, final Container parent) {
- setContainerWikiAcl(container);
+ setContainerAcl(container);
}
@Override
@@ -151,12 +76,7 @@
}
@Override
- @Inject
- public void register(final ServerToolRegistry registry) {
- registry.register(this);
- }
-
- private void setContainerWikiAcl(final Container container) {
+ protected void setContainerAcl(final Container container) {
final AccessLists wikiAcl = new AccessLists();
wikiAcl.getAdmins().setMode(GroupListMode.NORMAL);
wikiAcl.getAdmins().add(container.getOwner());
Deleted: trunk/src/test/java/cc/kune/blogs/server/BlogServerToolTest.java
===================================================================
--- trunk/src/test/java/cc/kune/blogs/server/BlogServerToolTest.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/test/java/cc/kune/blogs/server/BlogServerToolTest.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -1,67 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.blogs.server;
-
-import static cc.kune.blogs.shared.BlogsConstants.TYPE_BLOG;
-import static cc.kune.blogs.shared.BlogsConstants.TYPE_POST;
-import static cc.kune.blogs.shared.BlogsConstants.TYPE_ROOT;
-import static cc.kune.blogs.shared.BlogsConstants.TYPE_UPLOADEDFILE;
-
-import org.junit.Before;
-import org.junit.Test;
-
-import cc.kune.core.client.errors.ContainerNotPermittedException;
-import cc.kune.core.client.errors.ContentNotPermittedException;
-
-public class BlogServerToolTest { // extends PersistenceTest {
-
- private BlogServerTool serverTool;
-
- @Before
- public void before() {
- serverTool = new BlogServerTool(null, null, null, null);
- }
-
- @Test
- public void testCreateContainerInCorrectContainer() {
- serverTool.checkContainerTypeId(TYPE_ROOT, TYPE_BLOG);
- }
-
- @Test(expected = ContainerNotPermittedException.class)
- public void testCreateContainerInIncorrectContainer7() {
- serverTool.checkContainerTypeId(TYPE_BLOG, TYPE_BLOG);
- }
-
- @Test
- public void testCreateContentInCorrectContainer() {
- serverTool.checkContentTypeId(TYPE_BLOG, TYPE_POST);
- serverTool.checkContentTypeId(TYPE_BLOG, TYPE_UPLOADEDFILE);
- }
-
- @Test(expected = ContentNotPermittedException.class)
- public void testCreateContentInIncorrectContainer1() {
- serverTool.checkContentTypeId(TYPE_ROOT, TYPE_POST);
- }
-
- @Test(expected = ContentNotPermittedException.class)
- public void testCreateContentInIncorrectContainer8() {
- serverTool.checkContentTypeId(TYPE_ROOT, TYPE_UPLOADEDFILE);
- }
-}
\ No newline at end of file
Copied: trunk/src/test/java/cc/kune/blogs/server/TaskServerToolTest.java (from rev 1481, trunk/src/test/java/cc/kune/blogs/server/BlogServerToolTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/blogs/server/TaskServerToolTest.java (rev 0)
+++ trunk/src/test/java/cc/kune/blogs/server/TaskServerToolTest.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -0,0 +1,67 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.blogs.server;
+
+import static cc.kune.blogs.shared.BlogsConstants.TYPE_BLOG;
+import static cc.kune.blogs.shared.BlogsConstants.TYPE_POST;
+import static cc.kune.blogs.shared.BlogsConstants.TYPE_ROOT;
+import static cc.kune.blogs.shared.BlogsConstants.TYPE_UPLOADEDFILE;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import cc.kune.core.client.errors.ContainerNotPermittedException;
+import cc.kune.core.client.errors.ContentNotPermittedException;
+
+public class TaskServerToolTest { // extends PersistenceTest {
+
+ private BlogServerTool serverTool;
+
+ @Before
+ public void before() {
+ serverTool = new BlogServerTool(null, null, null, null);
+ }
+
+ @Test
+ public void testCreateContainerInCorrectContainer() {
+ serverTool.checkTypesBeforeContainerCreation(TYPE_ROOT, TYPE_BLOG);
+ }
+
+ @Test(expected = ContainerNotPermittedException.class)
+ public void testCreateContainerInIncorrectContainer7() {
+ serverTool.checkTypesBeforeContainerCreation(TYPE_BLOG, TYPE_BLOG);
+ }
+
+ @Test
+ public void testCreateContentInCorrectContainer() {
+ serverTool.checkTypesBeforeContentCreation(TYPE_BLOG, TYPE_POST);
+ serverTool.checkTypesBeforeContentCreation(TYPE_BLOG, TYPE_UPLOADEDFILE);
+ }
+
+ @Test(expected = ContentNotPermittedException.class)
+ public void testCreateContentInIncorrectContainer1() {
+ serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_POST);
+ }
+
+ @Test(expected = ContentNotPermittedException.class)
+ public void testCreateContentInIncorrectContainer8() {
+ serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_UPLOADEDFILE);
+ }
+}
\ No newline at end of file
Modified: trunk/src/test/java/cc/kune/docs/server/DocumentServerToolTest.java
===================================================================
--- trunk/src/test/java/cc/kune/docs/server/DocumentServerToolTest.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/test/java/cc/kune/docs/server/DocumentServerToolTest.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -29,25 +29,25 @@
public class DocumentServerToolTest { // extends PersistenceTest {
- private DocumentServerTool serverTool;
+ private DocumentServerTool serverTool;
- @Before
- public void before() {
- serverTool = new DocumentServerTool(null, null, null, null);
- }
+ @Before
+ public void before() {
+ serverTool = new DocumentServerTool(null, null, null, null);
+ }
- @Test
- public void testCreateContainerInCorrectContainer() {
- serverTool.checkContainerTypeId(TYPE_ROOT, TYPE_FOLDER);
- serverTool.checkContainerTypeId(TYPE_FOLDER, TYPE_FOLDER);
- }
+ @Test
+ public void testCreateContainerInCorrectContainer() {
+ serverTool.checkTypesBeforeContainerCreation(TYPE_ROOT, TYPE_FOLDER);
+ serverTool.checkTypesBeforeContainerCreation(TYPE_FOLDER, TYPE_FOLDER);
+ }
- @Test
- public void testCreateContentInCorrectContainer() {
- serverTool.checkContentTypeId(TYPE_ROOT, TYPE_DOCUMENT);
- serverTool.checkContentTypeId(TYPE_ROOT, TYPE_UPLOADEDFILE);
- serverTool.checkContentTypeId(TYPE_FOLDER, TYPE_DOCUMENT);
- serverTool.checkContentTypeId(TYPE_FOLDER, TYPE_UPLOADEDFILE);
- }
+ @Test
+ public void testCreateContentInCorrectContainer() {
+ serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_DOCUMENT);
+ serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_UPLOADEDFILE);
+ serverTool.checkTypesBeforeContentCreation(TYPE_FOLDER, TYPE_DOCUMENT);
+ serverTool.checkTypesBeforeContentCreation(TYPE_FOLDER, TYPE_UPLOADEDFILE);
+ }
}
\ No newline at end of file
Modified: trunk/src/test/java/cc/kune/wiki/server/WikiServerToolTest.java
===================================================================
--- trunk/src/test/java/cc/kune/wiki/server/WikiServerToolTest.java 2011-08-06 18:27:37 UTC (rev 1484)
+++ trunk/src/test/java/cc/kune/wiki/server/WikiServerToolTest.java 2011-08-07 23:07:04 UTC (rev 1485)
@@ -27,8 +27,6 @@
import org.junit.Before;
import org.junit.Test;
-import cc.kune.wiki.server.WikiServerTool;
-
public class WikiServerToolTest { // extends PersistenceTest {
private WikiServerTool serverTool;
@@ -40,16 +38,16 @@
@Test
public void testCreateContainerInCorrectContainer() {
- serverTool.checkContainerTypeId(TYPE_ROOT, TYPE_FOLDER);
- serverTool.checkContainerTypeId(TYPE_FOLDER, TYPE_FOLDER);
+ serverTool.checkTypesBeforeContainerCreation(TYPE_ROOT, TYPE_FOLDER);
+ serverTool.checkTypesBeforeContainerCreation(TYPE_FOLDER, TYPE_FOLDER);
}
@Test
public void testCreateContentInCorrectContainer() {
- serverTool.checkContentTypeId(TYPE_ROOT, TYPE_WIKIPAGE);
- serverTool.checkContentTypeId(TYPE_ROOT, TYPE_UPLOADEDFILE);
- serverTool.checkContentTypeId(TYPE_FOLDER, TYPE_WIKIPAGE);
- serverTool.checkContentTypeId(TYPE_FOLDER, TYPE_UPLOADEDFILE);
+ serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_WIKIPAGE);
+ serverTool.checkTypesBeforeContentCreation(TYPE_ROOT, TYPE_UPLOADEDFILE);
+ serverTool.checkTypesBeforeContentCreation(TYPE_FOLDER, TYPE_WIKIPAGE);
+ serverTool.checkTypesBeforeContentCreation(TYPE_FOLDER, TYPE_UPLOADEDFILE);
}
}
\ No newline at end of file
1
0
06 Aug '11
Author: vjrj_
Date: 2011-08-06 20:27:37 +0200 (Sat, 06 Aug 2011)
New Revision: 1484
Added:
trunk/src/main/java/cc/kune/core/public/i18n-recom.html
trunk/src/main/java/cc/kune/gspace/client/i18n/I18nToTranslateGridPanel.java
trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslateRecomendPanel.java
trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatedGridPanel.java
Removed:
trunk/src/main/java/org/ourproject/kune/app/public/html/i18n-recom.html
Modified:
trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java
trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java
trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java
trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPanel.java
trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPresenter.java
trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslator.java
trunk/src/main/java/cc/kune/gspace/client/i18n/LanguageSelectorPanel.java
trunk/src/main/java/cc/kune/gspace/client/i18n/SiteOptionsI18nTranslatorAction.java
trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java
trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java
Log:
NEW - # 79: I18n refactorization
http://kune.ourproject.org/issues/ticket/79
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -114,7 +114,7 @@
@Override
public void setEnabled(final boolean enabled) {
button.setEnabled(enabled);
- button.getElement().getStyle().setOpacity(enabled ? 1d : 0.5d);
+ button.getElement().getStyle().setOpacity(enabled ? 1d : 0.6d);
}
@Override
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -32,10 +32,12 @@
import com.google.gwt.event.logical.shared.HasCloseHandlers;
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.ui.DecoratedTabPanel;
+import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.Widget;
public abstract class AbstractTabbedDialogPanel implements AbstractTabbedDialogView {
+ private final boolean authohide;
private BasicTopDialog dialog;
private final String dialogId;
private final String errorLabelId;
@@ -54,9 +56,9 @@
private int width;
public AbstractTabbedDialogPanel(final String dialogId, final String title, final boolean modal,
- final NotifyLevelImages images, final String errorLabelId, final String firstBtnTitle,
- final String firstBtnId, final String sndBtnTitle, final String sndBtnId,
- final ProvidersCollection provCollection) {
+ final boolean authoHide, final NotifyLevelImages images, final String errorLabelId,
+ final String firstBtnTitle, final String firstBtnId, final String sndBtnTitle,
+ final String sndBtnId, final ProvidersCollection provCollection) {
this.dialogId = dialogId;
this.title = title;
this.modal = modal;
@@ -67,16 +69,33 @@
this.sndBtnTitle = sndBtnTitle;
this.sndBtnId = sndBtnId;
this.provCollection = provCollection;
+ this.authohide = authoHide;
}
+ public AbstractTabbedDialogPanel(final String dialogId, final String title, final boolean modal,
+ final NotifyLevelImages images, final String errorLabelId, final String firstBtnTitle,
+ final String firstBtnId, final String sndBtnTitle, final String sndBtnId,
+ final ProvidersCollection provCollection) {
+ this(dialogId, title, modal, false, images, errorLabelId, firstBtnTitle, firstBtnId, sndBtnTitle,
+ sndBtnId, provCollection);
+ }
+
public AbstractTabbedDialogPanel(final String dialogId, final String title, final int width,
+ final int height, final boolean modal, final boolean autoHide, final NotifyLevelImages images,
+ final String errorLabelId, final String firstBtnTitle, final String firstBtnId,
+ final String sndBtnTitle, final String sndBtnId, final ProvidersCollection provCollection) {
+ this(dialogId, title, modal, autoHide, images, errorLabelId, firstBtnTitle, firstBtnId, sndBtnTitle,
+ sndBtnId, provCollection);
+ this.width = width;
+ this.height = height;
+ }
+
+ public AbstractTabbedDialogPanel(final String dialogId, final String title, final int width,
final int height, final boolean modal, final NotifyLevelImages images, final String errorLabelId,
final String firstBtnTitle, final String firstBtnId, final String sndBtnTitle,
final String sndBtnId, final ProvidersCollection provCollection) {
- this(dialogId, title, modal, images, errorLabelId, firstBtnTitle, firstBtnId, sndBtnTitle, sndBtnId,
- provCollection);
- this.width = width;
- this.height = height;
+ this(dialogId, title, width, height, modal, false, images, errorLabelId, firstBtnTitle, firstBtnId,
+ sndBtnTitle, sndBtnId, provCollection);
}
@Override
@@ -98,11 +117,12 @@
}
private void createDialog() {
- dialog = new BasicTopDialog.Builder(dialogId, true, modal).autoscroll(true).width(width).height(
+ dialog = new BasicTopDialog.Builder(dialogId, authohide, modal).autoscroll(true).width(width).height(
height).icon(iconCls).firstButtonId(firstBtnId).firstButtonTitle(firstBtnTitle).sndButtonId(
dialogId).sndButtonTitle(sndBtnTitle).sndButtonId(sndBtnId).title(title).build();
messageErrorBar = new MessageToolbar(images, errorLabelId);
tabPanel = new DecoratedTabPanel();
+ provCollection.createAll();
tabPanel.getDeckPanel().setSize(String.valueOf(width), String.valueOf(height));
dialog.getInnerPanel().add(tabPanel);
dialog.getFirstBtn().addClickHandler(new ClickHandler() {
@@ -111,7 +131,6 @@
hide();
}
});
- provCollection.createAll();
}
private void createDialogIfNecessary() {
@@ -138,6 +157,11 @@
return dialog.getFirstBtn();
}
+ public ForIsWidget getInnerPanel() {
+ createDialogIfNecessary();
+ return dialog.getInnerPanel();
+ }
+
public HasClickHandlers getSecondBtn() {
createDialogIfNecessary();
return dialog.getSecondBtn();
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -107,7 +107,8 @@
participant.setTarget(group);
participant.putValue(Action.NAME, group.getLongName());
participant.putValue(Action.SMALL_ICON, logoImageUrl);
- participant.setParent(partiMenu);
+ participant.setParent(partiMenu, false);
+ siteOptions.getRightToolbar().add(participant);
}
private void createActions() {
Modified: trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -27,67 +27,79 @@
import cc.kune.core.client.sitebar.AboutKuneDialog;
import cc.kune.core.client.sitebar.spaces.Space;
import cc.kune.core.client.sitebar.spaces.SpaceSelectEvent;
+import cc.kune.gspace.client.i18n.I18nTranslator;
import com.google.gwt.event.shared.EventBus;
import com.google.inject.Inject;
import com.google.inject.Provider;
+@SuppressWarnings("serial")
public class SiteTokenListeners extends HashMap<String, HistoryTokenCallback> {
- private final Provider<AboutKuneDialog> aboutKuneDialog;
- private final EventBus eventBus;
- private final Provider<NewGroup> newGroup;
- private final Provider<Register> register;
- private final Provider<SignIn> signIn;
+ private final Provider<AboutKuneDialog> aboutKuneDialog;
+ private final EventBus eventBus;
+ private final Provider<NewGroup> newGroup;
+ private final Provider<Register> register;
+ private final Provider<SignIn> signIn;
+ private final Provider<I18nTranslator> translator;
- @Inject
- public SiteTokenListeners(final Session session, final EventBus eventBus, final Provider<SignIn> signIn,
- final Provider<Register> register, final Provider<NewGroup> newGroup,
- final Provider<AboutKuneDialog> aboutKuneDialog) {
- this.eventBus = eventBus;
- this.signIn = signIn;
- this.register = register;
- this.newGroup = newGroup;
- this.aboutKuneDialog = aboutKuneDialog;
- init();
- }
+ @Inject
+ public SiteTokenListeners(final Session session, final EventBus eventBus,
+ final Provider<SignIn> signIn, final Provider<Register> register,
+ final Provider<NewGroup> newGroup, final Provider<AboutKuneDialog> aboutKuneDialog,
+ final Provider<I18nTranslator> translator) {
+ this.eventBus = eventBus;
+ this.signIn = signIn;
+ this.register = register;
+ this.newGroup = newGroup;
+ this.aboutKuneDialog = aboutKuneDialog;
+ this.translator = translator;
+ putValues();
+ }
- private void init() {
- put(SiteTokens.HOME, new HistoryTokenCallback() {
- @Override
- public void onHistoryToken() {
- SpaceSelectEvent.fire(eventBus, Space.homeSpace);
- }
- });
- put(SiteTokens.WAVEINBOX, new HistoryTokenCallback() {
- @Override
- public void onHistoryToken() {
- SpaceSelectEvent.fire(eventBus, Space.userSpace);
- }
- });
- put(SiteTokens.SIGNIN, new HistoryTokenCallback() {
- @Override
- public void onHistoryToken() {
- signIn.get().showSignInDialog();
- }
- });
- put(SiteTokens.REGISTER, new HistoryTokenCallback() {
- @Override
- public void onHistoryToken() {
- register.get().doRegister();
- }
- });
- put(SiteTokens.NEWGROUP, new HistoryTokenCallback() {
- @Override
- public void onHistoryToken() {
- newGroup.get().doNewGroup();
- }
- });
- put(SiteTokens.ABOUTKUNE, new HistoryTokenCallback() {
- @Override
- public void onHistoryToken() {
- // FIXME, something to come back
- aboutKuneDialog.get().showCentered();
- }
- });
- }
+ private void putValues() {
+ put(SiteTokens.HOME, new HistoryTokenCallback() {
+ @Override
+ public void onHistoryToken() {
+ SpaceSelectEvent.fire(eventBus, Space.homeSpace);
+ }
+ });
+ put(SiteTokens.WAVEINBOX, new HistoryTokenCallback() {
+ @Override
+ public void onHistoryToken() {
+ SpaceSelectEvent.fire(eventBus, Space.userSpace);
+ }
+ });
+ put(SiteTokens.SIGNIN, new HistoryTokenCallback() {
+ @Override
+ public void onHistoryToken() {
+ signIn.get().showSignInDialog();
+ }
+ });
+ put(SiteTokens.REGISTER, new HistoryTokenCallback() {
+ @Override
+ public void onHistoryToken() {
+ register.get().doRegister();
+ }
+ });
+ put(SiteTokens.NEWGROUP, new HistoryTokenCallback() {
+ @Override
+ public void onHistoryToken() {
+ newGroup.get().doNewGroup();
+ }
+ });
+ put(SiteTokens.ABOUTKUNE, new HistoryTokenCallback() {
+ @Override
+ public void onHistoryToken() {
+ // FIXME, something to come back
+ aboutKuneDialog.get().showCentered();
+ }
+ });
+ put(SiteTokens.TRANSLATE, new HistoryTokenCallback() {
+ // FIXME, something to come back
+ @Override
+ public void onHistoryToken() {
+ translator.get().show();
+ }
+ });
+ }
}
Copied: trunk/src/main/java/cc/kune/core/public/i18n-recom.html (from rev 1481, trunk/src/main/java/org/ourproject/kune/app/public/html/i18n-recom.html)
===================================================================
--- trunk/src/main/java/cc/kune/core/public/i18n-recom.html (rev 0)
+++ trunk/src/main/java/cc/kune/core/public/i18n-recom.html 2011-08-06 18:27:37 UTC (rev 1484)
@@ -0,0 +1,120 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Common Translation Erros</title>
+<meta name="generator" content="HTML::TextToHTML v2.51"/>
+<link rel="stylesheet" type="text/css" href="frame-def.css"/>
+</head>
+<body>
+<script src="//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
+<script>
+ WebFont.load({
+ google : {
+ families : [ 'Ubuntu' ]
+ }
+ });
+</script>
+<h1><a name="common_translation_errors" id=
+"common_translation_errors">Common Translation Errors</a></h1>
+<div>
+<p>Translators - even professional translators - usually make these
+error when translating computer software.</p>
+</div>
+<h2><a name="overview_of_common_errors" id=
+"overview_of_common_errors">Overview of common errors</a></h2>
+<h3><a name="capitalisation" id=
+"capitalisation">Capitalisation</a></h3>
+<div>
+<p><strong>Wrong</strong>: no capitalisation in translation<br />
+<strong>Correct</strong>: translation follows translation language
+capitalisation convention</p>
+</div>
+<h3><a name="double_words" id="double_words">Double words</a></h3>
+<div>
+<p><em>Translator could not decide which word was more
+appropriate</em></p>
+<p><strong>Wrong</strong>: two translated words for one original
+word<br />
+<strong>Correct</strong>: choose one word if you have two
+options</p>
+</div>
+<h3><a name="translated_things_that_should_stay_in_english" id=
+"translated_things_that_should_stay_in_english">Translated things
+that should stay in English</a></h3>
+<div>
+<p><strong>Wrong</strong>: translating program function name like
+get_file_attributes()<br />
+<strong>Correct</strong>: leave program syntax or function names
+untranslated</p>
+</div>
+<h3><a name="variables" id="variables">Variables</a></h3>
+<div>
+<p><strong>Wrong</strong>: variables left out of translation<br />
+<strong>Correct</strong>: variable in translation in the correct
+order for the language</p>
+<p><strong>Wrong</strong>: environment variable names (eg. EDITOR)
+and possible fixed values (eg. COLOR, TRANSPARENT) translated<br />
+<strong>Correct</strong>: left in English and perhaps surrounded by
+single quotes to indicate that they are not in the target language
+on purpose.</p>
+</div>
+<h3><a name="punctuation" id="punctuation">Punctuation</a></h3>
+<div>
+<p><strong>Wrong</strong>: leaving out end punctuation and
+whitespace (eg. <code>“File: ”</code>)<br />
+<strong>Correct</strong>: copying end punctuation and whitespace
+almost exactly as the original into the translation.</p>
+<p><strong>Wrong</strong>: adding missing fullstops to translated
+sentence<br />
+<strong>Correct</strong>: if full sentences do not contain a
+fullstop in the original do not add one to the translation.</p>
+<p><strong>Wrong</strong>: adding exclamation marks (!) to the
+translation when they occur in the original<br />
+<strong>Correct</strong>: use exclamation marks to correspond with
+the tone of the application and the convention of the translated
+language. Ie you may leave them out of the translation.</p>
+<p><strong>Wrong</strong>: leaving out ellipses (…)<br />
+<strong>Correct</strong>: always add ellipses to the
+translation</p>
+</div>
+<h3><a name="accelerators" id="accelerators">Accelerators</a></h3>
+<div>
+<p><strong>Wrong</strong>: leaving out accelerators (either _&~
+depending on the application)<br />
+<strong>Correct</strong>: if the original has an accelerator so
+should the translation</p>
+<p><strong>Wrong</strong>: placing the accelerator exactly in the
+same position as the original<br />
+<strong>Correct</strong>: place the accelerator on the word /
+syllable / part of the sentence that is accented in its
+pronunciation or is the focus of the sentence.</p>
+<p><strong>Wrong</strong>: using the same letter for accelerator
+keys<br />
+<strong>Correct</strong>: try to vary the letters chosen as the
+accelerator key (in some languages almost all words start with U or
+I. In this case make an effort to choose other letters)</p>
+</div>
+<h3><a name="html" id="html">HTML</a></h3>
+<div>
+<p><strong>Wrong</strong>: <acronym title=
+"HyperText Markup Language">HTML</acronym> tags are
+translated<br />
+<strong>Correct</strong>: <acronym title=
+"HyperText Markup Language">HTML</acronym> tags are not
+translated</p>
+<p><strong>Wrong</strong>: translatable <acronym title=
+"HyperText Markup Language">HTML</acronym> entities are not
+translated<br />
+<strong>Correct</strong>: translate items that will be viewable. Eg
+<acronym title="HyperText Markup Language">HTML</acronym> img tag's
+alt entity <img alt=“translate me”>, a tag's title entity
+<a href=blah title=“translate me”>.</p>
+<p>This recommendations are from <a href=
+"http://translate.sourceforge.net">Translate Toolkit & Pootle
+Project</a> under <a href=
+"http://creativecommons.org/licenses/by-sa/3.0/">cc-by-sa
+license</a>.</p>
+</div>
+</body>
+</html>
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-08-06 18:27:37 UTC (rev 1484)
@@ -923,11 +923,16 @@
outline: 0 none;
}
-button[disabled]:active,button[disabled],input[type="reset"][disabled]:active,input[type="reset"][disabled],input[type="button"][disabled]:active,input[type="button"][disabled],select[disabled]>input[type="button"],select[disabled]>input[type="button"]:active,input[type="submit"][disabled]:active,input[type="submit"][disabled],.k-button-disabled
+button[disabled]:active,button[disabled],input[type="reset"][disabled]:active,input[type="reset"][disabled],input[type="button"][disabled]:active,input[type="button"][disabled],select[disabled]>input[type="button"],select[disabled]>input[type="button"]:active,input[type="submit"][disabled]:active,input[type="submit"][disabled],.k-button-disabled, button.k-button-disabled
{
color: gray !important;
border-color: #CCCCCC !important;
background: inherits !important;
+ kfilter: alpha(opacity = 60
+ ) !important;
+ -moz-opacity: 0.60 !important;
+ -khtml-opacity: 0.60 !important;
+ opacity: 0.60 !important;
}
/* end buttons */
@@ -1470,3 +1475,7 @@
background-image: url(images/colors.gif) !important;
}
+.k-i18n-recommend {
+ border: 1px solid gray;
+ background-color: #F2F2F2;
+}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -27,7 +27,9 @@
import cc.kune.gspace.client.i18n.I18nNewTranslatorPanel;
import cc.kune.gspace.client.i18n.I18nNewTranslatorPresenter;
import cc.kune.gspace.client.i18n.I18nNewTranslatorPresenter.I18nNewTranslatorView;
+import cc.kune.gspace.client.i18n.I18nTranslator;
import cc.kune.gspace.client.i18n.SiteOptionsI18nTranslatorAction;
+import cc.kune.gspace.client.i18n.TranslatorTabsCollection;
import cc.kune.gspace.client.licensewizard.LicenseChangeAction;
import cc.kune.gspace.client.licensewizard.LicenseWizard;
import cc.kune.gspace.client.licensewizard.LicenseWizardPanel;
@@ -140,6 +142,7 @@
s(UserOptionsCollection.class);
s(GroupOptionsCollection.class);
+ s(TranslatorTabsCollection.class);
s(GroupOptDefLicense.class, GroupOptDefLicensePresenter.class);
s(GroupOptDefLicenseView.class, GroupOptDefLicensePanel.class);
@@ -179,7 +182,7 @@
// I18nTranslator
s(I18nNewTranslatorView.class, I18nNewTranslatorPanel.class);
- s(I18nNewTranslatorPresenter.class);
+ s(I18nTranslator.class, I18nNewTranslatorPresenter.class);
s(SiteOptionsI18nTranslatorAction.class);
}
}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -23,7 +23,9 @@
import cc.kune.core.client.init.AppStartEvent.AppStartHandler;
import cc.kune.core.client.sitebar.search.SitebarSearchPresenter;
import cc.kune.core.client.state.Session;
+import cc.kune.gspace.client.i18n.I18nToTranslateGridPanel;
import cc.kune.gspace.client.i18n.SiteOptionsI18nTranslatorAction;
+import cc.kune.gspace.client.i18n.TranslatorTabsCollection;
import cc.kune.gspace.client.options.GroupOptions;
import cc.kune.gspace.client.options.GroupOptionsCollection;
import cc.kune.gspace.client.options.UserOptions;
@@ -61,7 +63,9 @@
final Provider<GroupOptTools> gtc, final Provider<UserOptDefLicense> udl,
final Provider<UserOptStyle> ups, final Provider<UserOptLogo> ul,
final Provider<UserOptTools> utc, final Provider<SitebarSearchPresenter> siteSearch,
- final Provider<SiteOptionsI18nTranslatorAction> transAction) {
+ final Provider<SiteOptionsI18nTranslatorAction> transAction,
+ final Provider<I18nToTranslateGridPanel> toTrans,
+ final Provider<TranslatorTabsCollection> gtranslator) {
session.onAppStart(true, new AppStartHandler() {
@Override
@@ -90,6 +94,7 @@
// i18n
transAction.get();
+ gtranslator.get().add(toTrans);
}
});
}
Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPanel.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPanel.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -1,8 +1,8 @@
package cc.kune.gspace.client.i18n;
-
import cc.kune.common.client.notify.NotifyLevelImages;
import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+import cc.kune.core.shared.dto.I18nLanguageDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.i18n.I18nNewTranslatorPresenter.I18nNewTranslatorView;
@@ -13,21 +13,45 @@
private static final int HEIGHT = 400;
private static final String TRANSLATOR_ERROR_ID = "i18n-trans-panel-error";
private static final String TRANSLATOR_PANEL_ID = "i18n-trans-panel";
- private static final int WIDTH = 270;
+ private static final int WIDTH = 400;
+ private final LanguageSelectorPanel lanSelectorPanel;
+ private final I18nToTranslateGridPanel toTranslateGrid;
+ private final I18nTranslatedGridPanel translatedGrid;
+ private final I18nTranslateRecomendPanel transRecommend;
@Inject
public I18nNewTranslatorPanel(final I18nTranslationService i18n, final NotifyLevelImages images,
- final TranslatorTabsCollection transGroup) {
- super(TRANSLATOR_PANEL_ID, "", WIDTH, HEIGHT + 80, false, images, TRANSLATOR_ERROR_ID,
+ final TranslatorTabsCollection transGroup, final LanguageSelectorPanel lanSelectorPanel,
+ final I18nToTranslateGridPanel toTranslateGrid, final I18nTranslatedGridPanel translatedGrid,
+ final I18nTranslateRecomendPanel transRecommend) {
+ super(TRANSLATOR_PANEL_ID, "", WIDTH, HEIGHT + 80, false, false, images, TRANSLATOR_ERROR_ID,
i18n.t("Close"), null, null, null, transGroup);
+ this.lanSelectorPanel = lanSelectorPanel;
+ this.toTranslateGrid = toTranslateGrid;
+ this.translatedGrid = translatedGrid;
+ this.transRecommend = transRecommend;
super.setIconCls("k-options-icon");
super.setTitle(i18n.t("Help to translate kune"));
+ super.getInnerPanel().insert(lanSelectorPanel, 0);
+ lanSelectorPanel.setLangTitle(i18n.t(""));
+ lanSelectorPanel.setLangSeparator("");
}
@Override
- public void hideTranslatorAndIcon() {
- // TODO Auto-generated method stub
+ public void init() {
+ addTab(toTranslateGrid, toTranslateGrid.getTabTitle());
+ addTab(translatedGrid, translatedGrid.getTabTitle());
+ addTab(transRecommend, transRecommend.getTabTitle());
+ }
+ @Override
+ public void setLanguage(final I18nLanguageDTO currentLanguage) {
+ lanSelectorPanel.setLanguage(currentLanguage.getCode());
}
+ @Override
+ public void show() {
+ super.show();
+ }
+
}
Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPresenter.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nNewTranslatorPresenter.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -1,10 +1,17 @@
package cc.kune.gspace.client.i18n;
-
+import cc.kune.common.client.notify.NotifyUser;
import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialog;
import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.I18nServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.dto.I18nLanguageDTO;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.ui.IsWidget;
import com.google.inject.Inject;
+import com.google.inject.Provider;
public class I18nNewTranslatorPresenter extends AbstractTabbedDialogPresenter implements
AbstractTabbedDialog, I18nTranslator {
@@ -14,24 +21,75 @@
@Override
void hide();
- void hideTranslatorAndIcon();
+ void init();
+ void setLanguage(I18nLanguageDTO currentLanguage);
+
@Override
void show();
}
+ private final I18nUITranslationService i18n;
+ private final Provider<I18nServiceAsync> i18nService;
+ private final Session session;
private I18nNewTranslatorView view;
@Inject
- public I18nNewTranslatorPresenter() {
+ public I18nNewTranslatorPresenter(final Session session, final I18nUITranslationService i18n,
+ final I18nNewTranslatorView view, final Provider<I18nServiceAsync> i18nService) {
+ this.session = session;
+ this.i18n = i18n;
+ this.i18nService = i18nService;
+ init(view);
}
+ public void doClose() {
+ view.hide();
+ }
+
+ public void doTranslation(final String id, final String trKey, final String translation) {
+ NotifyUser.showProgress(i18n.t("Saving"));
+ i18nService.get().setTranslation(session.getUserHash(), id, translation,
+ new AsyncCallback<String>() {
+ @Override
+ public void onFailure(final Throwable caught) {
+ NotifyUser.hideProgress();
+ NotifyUser.error(i18n.t("Server error saving the translation"));
+ }
+
+ @Override
+ public void onSuccess(final String result) {
+ NotifyUser.hideProgress();
+ i18n.setTranslationAfterSave(trKey, result);
+ }
+ });
+ }
+
@Override
- public void doShowTranslator() {
- view.show();
+ public IsWidget getView() {
+ return view;
}
+ @Override
+ public void hide() {
+ view.hide();
+ }
+
public void init(final I18nNewTranslatorView view) {
super.init(view);
this.view = view;
+ view.init();
}
+
+ @Override
+ public void show() {
+ NotifyUser.showProgressLoading();
+ if (session.isLogged()) {
+ view.setLanguage(session.getCurrentLanguage());
+ view.show();
+ } else {
+ NotifyUser.info(i18n.t("Sign in or register to help with the translation"));
+ }
+ NotifyUser.hideProgress();
+ }
+
}
Added: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nToTranslateGridPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nToTranslateGridPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nToTranslateGridPanel.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -0,0 +1,25 @@
+package cc.kune.gspace.client.i18n;
+
+import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Label;
+import com.google.inject.Inject;
+
+public class I18nToTranslateGridPanel extends Composite {
+
+ private final Label tabTitle;
+
+ @Inject
+ public I18nToTranslateGridPanel(final I18nTranslationService i18n) {
+ tabTitle = new Label(i18n.t("Untranslated"));
+ initWidget(new Label(TextUtils.IN_DEVELOPMENT));
+
+ }
+
+ public IsWidget getTabTitle() {
+ return tabTitle;
+ }
+}
Added: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslateRecomendPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslateRecomendPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslateRecomendPanel.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -0,0 +1,27 @@
+package cc.kune.gspace.client.i18n;
+
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Frame;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Label;
+import com.google.inject.Inject;
+
+public class I18nTranslateRecomendPanel extends Composite {
+
+ private final Label tabTitle;
+
+ @Inject
+ public I18nTranslateRecomendPanel(final I18nTranslationService i18n) {
+ tabTitle = new Label(i18n.t("Recommendations"));
+ final Frame recommFrame = new Frame("i18n-recom.html");
+ recommFrame.setHeight("auto");
+ recommFrame.setStyleName("k-i18n-recommend");
+ initWidget(recommFrame);
+ }
+
+ public IsWidget getTabTitle() {
+ return tabTitle;
+ }
+}
Added: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatedGridPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatedGridPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatedGridPanel.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -0,0 +1,25 @@
+package cc.kune.gspace.client.i18n;
+
+import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Label;
+import com.google.inject.Inject;
+
+public class I18nTranslatedGridPanel extends Composite {
+
+ private final Label tabTitle;
+
+ @Inject
+ public I18nTranslatedGridPanel(final I18nTranslationService i18n) {
+ tabTitle = new Label(i18n.t("Translated"));
+ initWidget(new Label(TextUtils.IN_DEVELOPMENT));
+
+ }
+
+ public IsWidget getTabTitle() {
+ return tabTitle;
+ }
+}
Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslator.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslator.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslator.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -21,6 +21,6 @@
public interface I18nTranslator {
- void doShowTranslator();
+ void show();
}
Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/LanguageSelectorPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/LanguageSelectorPanel.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/LanguageSelectorPanel.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -68,8 +68,11 @@
this.i18n = i18n;
this.session = session;
setBorders(false);
+ setFrame(false);
+ setHeaderVisible(false);
createLangCombo();
super.add(langCombo);
+ setBodyBorder(false);
}
public void addChangeListener(final SimpleCallback onChange) {
@@ -125,6 +128,10 @@
langCombo.reset();
}
+ public void setLangSeparator(final String separator) {
+ langCombo.setLabelSeparator(separator);
+ }
+
public void setLangTitle(final String langFieldTitle) {
if (langFieldTitle == null) {
setHideLabels(true);
Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/SiteOptionsI18nTranslatorAction.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/SiteOptionsI18nTranslatorAction.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/SiteOptionsI18nTranslatorAction.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -46,7 +46,7 @@
this.translatorPanel = translatorPanel;
putValue(Action.NAME, i18n.t("Help with the translation"));
putValue(Action.SMALL_ICON, img.language());
- final MenuItemDescriptor item = new MenuItemDescriptor(siteOptions.getOptionsMenu(), this);
+ MenuItemDescriptor.build(siteOptions.getOptionsMenu(), this);
// item.setPosition(1);
}
@@ -57,6 +57,6 @@
presenter.init(translatorPanel.get());
translator = presenter;
}
- translator.doShowTranslator();
+ translator.show();
}
}
Modified: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -37,7 +37,7 @@
@Inject
public GroupOptionsPanel(final EntityHeader entityHeader, final I18nTranslationService i18n,
final NotifyLevelImages images, final GroupOptionsCollection entityOptionsGroup) {
- super(GROUP_OP_PANEL_ID, "", WIDTH, HEIGHT + 80, false, images, GROUP_OPTIONS_ERROR_ID,
+ super(GROUP_OP_PANEL_ID, "", WIDTH, HEIGHT + 80, false, false, images, GROUP_OPTIONS_ERROR_ID,
i18n.t("Close"), null, null, null, entityOptionsGroup);
this.entityHeader = entityHeader;
super.setIconCls("k-options-icon");
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPresenter.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPresenter.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -166,7 +166,7 @@
if (stateContent.isParticipant()) {
// is already participant, show wave editor
if (org.waveprotocol.box.webclient.client.Session.get().isLoggedIn()) {
- final String typeId = stateContent.getTypeId();
+ // final String typeId = stateContent.getTypeId();
// if (typeId.equals(BartersConstants.TYPE_BARTER)
// || typeId.equals(MeetingsConstants.TYPE_MEETING)) {
// NotifyUser.important("Currently we are experiencing problems with this tool. We'll fix ASAP...");
Deleted: trunk/src/main/java/org/ourproject/kune/app/public/html/i18n-recom.html
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/html/i18n-recom.html 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/org/ourproject/kune/app/public/html/i18n-recom.html 2011-08-06 18:27:37 UTC (rev 1484)
@@ -1,117 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
-dir="ltr">
-<head>
-<meta name="generator" content=
-"HTML Tidy for MkLinux (vers 6 November 2007), see www.w3.org" />
-<meta http-equiv="Content-Type" content=
-"text/html; charset=utf-8" />
-<title>Common Translation Erros</title>
-<link rel="stylesheet" type="text/css" href=
-"http://yui.yahooapis.com/2.4.1/build/base/base-min.css" />
-</head>
-<body>
-<h1><a name="common_translation_errors" id=
-"common_translation_errors">Common Translation Errors</a></h1>
-<div>
-<p>Translators - even professional translators - usually make these
-error when translating computer software.</p>
-</div>
-<h2><a name="overview_of_common_errors" id=
-"overview_of_common_errors">Overview of common errors</a></h2>
-<h3><a name="capitalisation" id=
-"capitalisation">Capitalisation</a></h3>
-<div>
-<p><strong>Wrong</strong>: no capitalisation in translation<br />
-<strong>Correct</strong>: translation follows translation language
-capitalisation convention</p>
-</div>
-<h3><a name="double_words" id="double_words">Double words</a></h3>
-<div>
-<p><em>Translator could not decide which word was more
-appropriate</em></p>
-<p><strong>Wrong</strong>: two translated words for one original
-word<br />
-<strong>Correct</strong>: choose one word if you have two
-options</p>
-</div>
-<h3><a name="translated_things_that_should_stay_in_english" id=
-"translated_things_that_should_stay_in_english">Translated things
-that should stay in English</a></h3>
-<div>
-<p><strong>Wrong</strong>: translating program function name like
-get_file_attributes()<br />
-<strong>Correct</strong>: leave program syntax or function names
-untranslated</p>
-</div>
-<h3><a name="variables" id="variables">Variables</a></h3>
-<div>
-<p><strong>Wrong</strong>: variables left out of translation<br />
-<strong>Correct</strong>: variable in translation in the correct
-order for the language</p>
-<p><strong>Wrong</strong>: environment variable names (eg. EDITOR)
-and possible fixed values (eg. COLOR, TRANSPARENT) translated<br />
-<strong>Correct</strong>: left in English and perhaps surrounded by
-single quotes to indicate that they are not in the target language
-on purpose.</p>
-</div>
-<h3><a name="punctuation" id="punctuation">Punctuation</a></h3>
-<div>
-<p><strong>Wrong</strong>: leaving out end punctuation and
-whitespace (eg. <code>“File: ”</code>)<br />
-<strong>Correct</strong>: copying end punctuation and whitespace
-almost exactly as the original into the translation.</p>
-<p><strong>Wrong</strong>: adding missing fullstops to translated
-sentence<br />
-<strong>Correct</strong>: if full sentences do not contain a
-fullstop in the original do not add one to the translation.</p>
-<p><strong>Wrong</strong>: adding exclamation marks (!) to the
-translation when they occur in the original<br />
-<strong>Correct</strong>: use exclamation marks to correspond with
-the tone of the application and the convention of the translated
-language. Ie you may leave them out of the translation.</p>
-<p><strong>Wrong</strong>: leaving out ellipses (…)<br />
-<strong>Correct</strong>: always add ellipses to the
-translation</p>
-</div>
-<h3><a name="accelerators" id="accelerators">Accelerators</a></h3>
-<div>
-<p><strong>Wrong</strong>: leaving out accelerators (either _&~
-depending on the application)<br />
-<strong>Correct</strong>: if the original has an accelerator so
-should the translation</p>
-<p><strong>Wrong</strong>: placing the accelerator exactly in the
-same position as the original<br />
-<strong>Correct</strong>: place the accelerator on the word /
-syllable / part of the sentence that is accented in its
-pronunciation or is the focus of the sentence.</p>
-<p><strong>Wrong</strong>: using the same letter for accelerator
-keys<br />
-<strong>Correct</strong>: try to vary the letters chosen as the
-accelerator key (in some languages almost all words start with U or
-I. In this case make an effort to choose other letters)</p>
-</div>
-<h3><a name="html" id="html">HTML</a></h3>
-<div>
-<p><strong>Wrong</strong>: <acronym title=
-"HyperText Markup Language">HTML</acronym> tags are
-translated<br />
-<strong>Correct</strong>: <acronym title=
-"HyperText Markup Language">HTML</acronym> tags are not
-translated</p>
-<p><strong>Wrong</strong>: translatable <acronym title=
-"HyperText Markup Language">HTML</acronym> entities are not
-translated<br />
-<strong>Correct</strong>: translate items that will be viewable. Eg
-<acronym title="HyperText Markup Language">HTML</acronym> img tag's
-alt entity <img alt=“translate me”>, a tag's title entity
-<a href=blah title=“translate me”>.</p>
-<p>This recommendations are from <a href=
-"http://translate.sourceforge.net">Translate Toolkit & Pootle
-Project</a> under <a href=
-"http://creativecommons.org/licenses/by-sa/3.0/">cc-by-sa
-license</a>.</p>
-</div>
-</body>
-</html>
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java 2011-08-06 10:41:10 UTC (rev 1483)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java 2011-08-06 18:27:37 UTC (rev 1484)
@@ -53,7 +53,7 @@
view.hide();
}
- public void doShowTranslator() {
+ public void show() {
OldNotifyUser.showProgressLoading();
if (session.isLogged()) {
view.show();
1
0