[kune-commits] r1425 - in trunk: img img/screenshots src/main/java/org/ourproject/kune/gallery/client src/main/java/org/ourproject/kune/gallery/client/ctx src/main/java/org/ourproject/kune/wiki src/main/java/org/ourproject/kune/wiki/client src/main/java/org/ourproject/kune/workspace/client src/main/java/org/ourproject/kune/workspace/client/ctxnav src/main/java/org/ourproject/kune/workspace/client/editor src/main/java/org/ourproject/kune/workspace/client/site src/main/java/org/ourproject/kune/workspace/client/sitebar
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Mon Jun 27 03:10:50 CEST 2011
Author: vjrj_
Date: 2011-06-27 03:10:49 +0200 (Mon, 27 Jun 2011)
New Revision: 1425
Added:
trunk/img/screenshots/
trunk/img/screenshots/apachewave-powered.png
trunk/img/screenshots/chat-rooms.png
trunk/img/screenshots/chat-with-buddies-2.png
trunk/img/screenshots/chat-with-buddies.png
trunk/img/screenshots/concurrent-edit-and-chat.png
trunk/img/screenshots/creating-new-content.png
trunk/img/screenshots/group-creation.png
trunk/img/screenshots/group-just-created.png
trunk/img/screenshots/group-public-space.png
trunk/img/screenshots/group-style-2.png
trunk/img/screenshots/group-style.png
trunk/img/screenshots/group-styled.png
trunk/img/screenshots/group-tools.png
trunk/img/screenshots/inbox.png
trunk/img/screenshots/license-wizard.png
trunk/img/screenshots/managin-content.png
trunk/img/screenshots/personal-options.png
trunk/img/screenshots/personal-spaces.png
trunk/img/screenshots/social-net-of-a-group.png
trunk/img/screenshots/wave-gadgets.png
Removed:
trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContextPresenter.java
trunk/src/main/java/org/ourproject/kune/wiki/KuneWiki.gwt.xml
trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java
trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java
trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/
trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/
trunk/src/main/java/org/ourproject/kune/wiki/public/
trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/
trunk/src/main/java/org/ourproject/kune/workspace/client/site/WorkspaceNotifyUser.java
trunk/src/main/java/org/ourproject/kune/workspace/client/site/msg/
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitelogo/
trunk/src/main/java/org/ourproject/kune/workspace/client/title/
Modified:
trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
trunk/src/main/java/org/ourproject/kune/workspace/client/OldAbstractFoldableContentActions.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditorPresenter.java
Log:
screenshots & deletions
Added: trunk/img/screenshots/apachewave-powered.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/apachewave-powered.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/chat-rooms.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/chat-rooms.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/chat-with-buddies-2.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/chat-with-buddies-2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/chat-with-buddies.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/chat-with-buddies.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/concurrent-edit-and-chat.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/concurrent-edit-and-chat.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/creating-new-content.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/creating-new-content.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/group-creation.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/group-creation.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/group-just-created.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/group-just-created.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/group-public-space.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/group-public-space.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/group-style-2.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/group-style-2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/group-style.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/group-style.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/group-styled.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/group-styled.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/group-tools.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/group-tools.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/inbox.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/inbox.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/license-wizard.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/license-wizard.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/managin-content.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/managin-content.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/personal-options.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/personal-options.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/personal-spaces.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/personal-spaces.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/social-net-of-a-group.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/social-net-of-a-group.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/img/screenshots/wave-gadgets.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/wave-gadgets.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2011-06-26 22:30:12 UTC (rev 1424)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2011-06-27 01:10:49 UTC (rev 1425)
@@ -26,8 +26,6 @@
import org.ourproject.kune.gallery.client.cnt.GalleryViewer;
import org.ourproject.kune.workspace.client.OldAbstractFoldableContentActions;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
import org.ourproject.kune.workspace.client.editor.ContentEditor;
import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
import org.ourproject.kune.workspace.client.upload.FileUploader;
@@ -53,15 +51,12 @@
final Provider<GroupServiceAsync> groupServiceProvider,
final Provider<FileUploader> fileUploaderProvider,
final ContentActionRegistry contentActionRegistry,
- final ContextActionRegistry contextActionRegistry,
final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
- final GalleryViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
- final GSpaceBackManager wsBackManager) {
+ final GalleryViewer documentViewer, final GSpaceBackManager wsBackManager) {
super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
- contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
- documentViewer, entityLogo, wsBackManager);
+ fileDownloadProvider, textEditorProvider, documentViewer, entityLogo, wsBackManager);
}
@Override
Deleted: trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContextPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContextPresenter.java 2011-06-26 22:30:12 UTC (rev 1424)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContextPresenter.java 2011-06-27 01:10:49 UTC (rev 1425)
@@ -1,37 +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 org.ourproject.kune.gallery.client.ctx;
-
-import org.ourproject.kune.gallery.client.GalleryClientTool;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.cxt.FoldableContextPresenter;
-
-import cc.kune.core.client.state.StateManager;
-
-import com.calclab.suco.client.ioc.Provider;
-
-public class GalleryContextPresenter extends FoldableContextPresenter implements GalleryContext {
- public GalleryContextPresenter(final StateManager stateManager,
- final Provider<ContextNavigator> contextNavigatorProvider,
- final Provider<ContextPropEditor> contextPropEditorProvider) {
- super(GalleryClientTool.NAME, stateManager, contextNavigatorProvider, contextPropEditorProvider);
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/wiki/KuneWiki.gwt.xml
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/KuneWiki.gwt.xml 2011-06-26 22:30:12 UTC (rev 1424)
+++ trunk/src/main/java/org/ourproject/kune/wiki/KuneWiki.gwt.xml 2011-06-27 01:10:49 UTC (rev 1425)
@@ -1,7 +0,0 @@
-<!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/src/gwt-module.dtd">
-<module>
- <inherits name="cc.kune.core.Core" />
- <inherits name='org.ourproject.kune.platf.KunePlatform' />
- <inherits name='org.ourproject.kune.workspace.KuneWorkspace' />
- <source path="client" />
-</module>
\ No newline at end of file
Deleted: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2011-06-26 22:30:12 UTC (rev 1424)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2011-06-27 01:10:49 UTC (rev 1425)
@@ -1,118 +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 org.ourproject.kune.wiki.client;
-
-import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_FOLDER;
-import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_ROOT;
-import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_UPLOADEDFILE;
-import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_WIKIPAGE;
-
-import org.ourproject.kune.wiki.client.cnt.WikiViewer;
-import org.ourproject.kune.workspace.client.OldAbstractFoldableContentActions;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.core.client.cnt.ContentActionRegistry;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.gspace.client.style.GSpaceBackManager;
-
-import com.calclab.suco.client.ioc.Provider;
-
-public class WikiClientActions extends OldAbstractFoldableContentActions {
- public WikiClientActions(final I18nUITranslationService i18n, final ContextNavigator contextNavigator,
- final Session session, final StateManager stateManager,
- final SchedulerManager deferredCommandWrapper,
- final Provider<ContentServiceAsync> contentServiceProvider,
- final Provider<GroupServiceAsync> groupServiceProvider,
- final Provider<FileUploader> fileUploaderProvider,
- final ContentActionRegistry contentActionRegistry,
- final ContextActionRegistry contextActionRegistry,
- final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
- final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
- final WikiViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
- final GSpaceBackManager wsBackManager) {
- super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
- contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
- contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
- documentViewer, entityLogo, wsBackManager);
- }
-
- @Override
- protected void createActions() {
- final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_WIKIPAGE, TYPE_UPLOADEDFILE };
- final String[] containers = { TYPE_ROOT, TYPE_FOLDER };
- // final String[] contentsModerated = { };
- final String[] containersNoRoot = { TYPE_FOLDER };
- final String[] contents = { TYPE_WIKIPAGE, TYPE_UPLOADEDFILE };
-
- final String parentMenuTitle = i18n.t("Wikipage");
- final String parentMenuTitleCtx = i18n.t("Wiki");
-
- createNewContainerAction(TYPE_FOLDER, "images/nav/folder_add.png", i18n.t("New folder"),
- parentMenuTitleCtx, i18n.t("New"), i18n.t("New folder"), Position.ctx, TYPE_ROOT, TYPE_FOLDER);
-
- createNewContentAction(TYPE_WIKIPAGE, "images/nav/wikipage_add.png", i18n.t("New wikipage"),
- parentMenuTitleCtx, Position.ctx, TYPE_ROOT, TYPE_FOLDER);
-
- // createContentModeratedActions(parentMenuTitle, contentsModerated);
- createTranslateAction(parentMenuTitle, TYPE_FOLDER, TYPE_WIKIPAGE);
- createContentRenameAction(parentMenuTitle, i18n.t("Rename"), contents);
- createRenameContentInCtxAction(parentMenuTitleCtx, i18n.t("Rename"), containersNoRoot);
- createEditAction(parentMenuTitle, TYPE_WIKIPAGE);
-
- // final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupCxt =
- // createSetAsDefContent(parentMenuTitleCtx);
-
- createRefreshCntAction(parentMenuTitle, contents);
- createRefreshCxtAction(parentMenuTitleCtx, containers);
-
- createSetAsDefContent(parentMenuTitle, contents);
- // createSetGroupBackImageAction(parentMenuTitle, TYPE_UPLOADEDFILE);
-
- createUploadAction(i18n.t("Upload file"), "images/nav/upload.png",
- i18n.t("Upload some files (images, PDFs, ...)"), null, containers);
-
- createDownloadActions(TYPE_UPLOADEDFILE);
-
- createGoAction(all);
-
- createGoHomeAction(containers);
-
- createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot);
- createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
- createShowDeletedItems(parentMenuTitleCtx, all);
- }
-
- @Override
- protected void createPostSessionInitActions() {
- // super.createUploadMediaAction();
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java 2011-06-26 22:30:12 UTC (rev 1424)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java 2011-06-27 01:10:49 UTC (rev 1425)
@@ -1,68 +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 org.ourproject.kune.wiki.client;
-
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.tool.OldFoldableAbstractClientTool;
-
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
-import cc.kune.gspace.client.themes.GSpaceThemeManager;
-import cc.kune.gspace.client.tool.selector.ToolSelector;
-
-public class WikiClientTool extends OldFoldableAbstractClientTool {
- public static final String NAME = "wiki";
- public static final String TYPE_FOLDER = NAME + "." + "folder";
- public static final String TYPE_ROOT = NAME + "." + "root";
- public static final String TYPE_UPLOADEDFILE = NAME + "."
- + OldFoldableAbstractClientTool.UPLOADEDFILE_SUFFIX;
- public static final String TYPE_WIKIPAGE = NAME + "." + "wikipage";
-
- public WikiClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
- final GSpaceThemeManager wsThemePresenter, final WorkspaceSkeleton ws,
- final ContentCapabilitiesRegistry cntCapabReg) {
- super(NAME, i18n.t("wiki"), toolSelector, wsThemePresenter, ws, cntCapabReg);
-
- // 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);
- registerTranslatableTypes(TYPE_FOLDER, TYPE_WIKIPAGE);
-
- registerIcons();
- }
-
- @Override
- public String getName() {
- return NAME;
- }
-
- private void registerIcons() {
- registerContentTypeIcon(TYPE_FOLDER, "images/nav/folder.png");
- // registerContentTypeIcon(TYPE_FOLDER, "images/nav/wiki.png");
- registerContentTypeIcon(TYPE_WIKIPAGE, "images/nav/wikipage.png");
- registerUploadTypesAndMimes(TYPE_UPLOADEDFILE);
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java 2011-06-26 22:30:12 UTC (rev 1424)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java 2011-06-27 01:10:49 UTC (rev 1425)
@@ -1,23 +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 org.ourproject.kune.wiki.client;
-
-public interface WikiMessages {
-}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/OldAbstractFoldableContentActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/OldAbstractFoldableContentActions.java 2011-06-26 22:30:12 UTC (rev 1424)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/OldAbstractFoldableContentActions.java 2011-06-27 01:10:49 UTC (rev 1425)
@@ -33,8 +33,6 @@
import org.ourproject.kune.platf.client.actions.RadioMustBeChecked;
import org.ourproject.kune.platf.client.ui.noti.OldNotifyUser;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
import org.ourproject.kune.workspace.client.editor.ContentEditor;
import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
import org.ourproject.kune.workspace.client.upload.FileUploader;
@@ -84,9 +82,9 @@
protected final ContentActionRegistry contentActionRegistry;
protected final Provider<ContentServiceAsync> contentServiceProvider;
- protected final ContextActionRegistry contextActionRegistry;
+ // protected final ContextActionRegistry contextActionRegistry;
protected final ContextNavigator contextNavigator;
- protected final Provider<ContextPropEditor> contextPropEditorProvider;
+ // protected final Provider<ContextPropEditor> contextPropEditorProvider;
protected final SchedulerManager deferredCommandWrapper;
protected final EntityHeader entityLogo;
protected final ErrorHandler errorHandler;
@@ -107,12 +105,13 @@
final SchedulerManager deferredCommandWrapper,
final Provider<GroupServiceAsync> groupServiceProvider,
final Provider<ContentServiceAsync> contentServiceProvider,
- final Provider<FileUploader> fileUploaderProvider, final ContextNavigator contextNavigator,
+ final Provider<FileUploader> fileUploaderProvider,
+ final ContextNavigator contextNavigator,
final ContentActionRegistry contentActionRegistry,
- final ContextActionRegistry contextActionRegistry,
+ // final ContextActionRegistry contextActionRegistry,
final Provider<FileDownloadUtils> fileDownloadProvider,
final Provider<ContentEditor> textEditorProvider,
- final Provider<ContextPropEditor> contextPropEditorProvider,
+ // final Provider<ContextPropEditor> contextPropEditorProvider,
final FoldableContent foldableContent, final EntityHeader entityLogo,
final GSpaceBackManager wsBackManager) {
this.session = session;
@@ -125,10 +124,10 @@
this.fileUploaderProvider = fileUploaderProvider;
this.contextNavigator = contextNavigator;
this.contentActionRegistry = contentActionRegistry;
- this.contextActionRegistry = contextActionRegistry;
+ // this.contextActionRegistry = contextActionRegistry;
this.fileDownloadProvider = fileDownloadProvider;
this.textEditorProvider = textEditorProvider;
- this.contextPropEditorProvider = contextPropEditorProvider;
+ // this.contextPropEditorProvider = contextPropEditorProvider;
this.foldableContent = foldableContent;
this.entityLogo = entityLogo;
this.wsBackManager = wsBackManager;
@@ -187,7 +186,7 @@
delContainer.setMustBeConfirmed(true);
delContainer.setConfirmationTitle(i18n.t("Please confirm"));
delContainer.setConfirmationText(i18n.t("You will delete it with all its contents. Are you sure?"));
- contextActionRegistry.addAction(delContainer, registerInTypes);
+ // contextActionRegistry.addAction(delContainer, registerInTypes);
}
protected void createDelContentAction(final String parentMenuTitle, final String textDescription,
@@ -243,7 +242,7 @@
downloadCtx.setIconUrl("images/nav/download.png");
// contentActionRegistry.addAction(download, typeUploadedfile);
- contextActionRegistry.addAction(downloadCtx, typeUploadedfile);
+ // contextActionRegistry.addAction(downloadCtx, typeUploadedfile);
}
protected ActionToolbarButtonDescriptor<StateToken> createEditAction(final String fileMenuTitle,
@@ -259,7 +258,7 @@
final ContentEditor editor = textEditorProvider.get();
foldableContent.detach();
contextNavigator.detach();
- contextPropEditorProvider.get().attach();
+ // contextPropEditorProvider.get().attach();
editor.edit(session.getContentState().getContent(), new Listener<String>() {
@Override
public void onEvent(final String html) {
@@ -294,7 +293,7 @@
@Override
public void execute() {
foldableContent.attach();
- contextPropEditorProvider.get().detach();
+ // contextPropEditorProvider.get().detach();
contextNavigator.attach();
if (session.inSameToken(stateToken)) {
contextNavigator.refreshState();
@@ -329,7 +328,7 @@
go.setMustBeAuthenticated(false);
go.setTextDescription(i18n.t("Open"));
go.setIconUrl("images/nav/go.png");
- contextActionRegistry.addAction(go, registerInTypes);
+ // contextActionRegistry.addAction(go, registerInTypes);
return go;
}
@@ -351,7 +350,7 @@
}
});
goGroupHome.setLeftSeparator(ActionToolbarButtonSeparator.fill);
- contextActionRegistry.addAction(goGroupHome, registerInTypes);
+ // contextActionRegistry.addAction(goGroupHome, registerInTypes);
return goGroupHome;
}
@@ -442,7 +441,7 @@
refreshCtx.setParentMenuTitle(parentMenuTitleCtx);
refreshCtx.setTextDescription(i18n.t("Refresh"));
refreshCtx.setIconUrl("images/nav/refresh.png");
- contextActionRegistry.addAction(refreshCtx, registerInTypes);
+ // contextActionRegistry.addAction(refreshCtx, registerInTypes);
return refreshCtx;
}
@@ -457,7 +456,7 @@
});
renameCtx.setTextDescription(textDescription);
renameCtx.setParentMenuTitle(parentMenuTitleCtx);
- contextActionRegistry.addAction(renameCtx, registerInTypes);
+ // contextActionRegistry.addAction(renameCtx, registerInTypes);
return renameCtx;
}
@@ -571,7 +570,7 @@
showDeletedItems.setParentMenuTitle(parentMenuTitle);
showDeletedItems.setTextDescription("Show deleted items");
showDeletedItems.setMustBeAuthenticated(true);
- contextActionRegistry.addAction(showDeletedItems, registerInTypes);
+ // contextActionRegistry.addAction(showDeletedItems, registerInTypes);
}
protected ActionToolbarMenuDescriptor<StateToken> createTranslateAction(final String fileMenuTitle,
@@ -613,7 +612,7 @@
uploadFile.setTextDescription(textDescription);
uploadFile.setIconUrl(iconUrl);
uploadFile.setToolTip(toolTip);
- contextActionRegistry.addAction(uploadFile, registerInTypes);
+ // contextActionRegistry.addAction(uploadFile, registerInTypes);
return uploadFile;
}
@@ -622,7 +621,7 @@
final ActionToolbarButtonAndItemDescriptor<StateToken> uploadMedia = createUploadAction(
i18n.t("Upload media"), "images/nav/upload.png",
i18n.t("Upload some media (images, videos...)"), session.getGalleryPermittedExtensions());
- contextActionRegistry.addAction(uploadMedia, registerInTypes);
+ // contextActionRegistry.addAction(uploadMedia, registerInTypes);
return uploadMedia;
}
@@ -655,7 +654,7 @@
private void register(final ActionToolbarMenuAndItemDescriptor<StateToken> action,
final Position position, final String... registerInTypes) {
if (position.equals(Position.ctx)) {
- contextActionRegistry.addAction(action, registerInTypes);
+ // contextActionRegistry.addAction(action, registerInTypes);
} else if (position.equals(Position.cnt)) {
// contentActionRegistry.addAction(action, registerInTypes);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java 2011-06-26 22:30:12 UTC (rev 1424)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java 2011-06-27 01:10:49 UTC (rev 1425)
@@ -28,8 +28,6 @@
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
import org.ourproject.kune.platf.client.ui.KuneUiUtils;
import org.ourproject.kune.workspace.client.OldAbstractFoldableContentActions;
-import org.ourproject.kune.workspace.client.cxt.ActionContextBottomToolbar;
-import org.ourproject.kune.workspace.client.title.RenameAction;
import org.ourproject.kune.workspace.client.upload.FileUploader;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
@@ -58,315 +56,320 @@
public class ContextNavigatorPresenter implements ContextNavigator {
- private final ActionRegistry<StateToken> actionRegistry;
- private final HashMap<StateToken, ActionItemCollection<StateToken>> actionsByItem;
- private final ActionContextBottomToolbar bottomToolbar;
- private final ContentCapabilitiesRegistry capabilitiesRegistry;
- private final IconsRegistry contentIconsRegistry;
- private final Provider<FileDownloadUtils> downloadUtilsProvider;
- private boolean editOnNextStateChange;
- private final I18nTranslationService i18n;
- private final RenameAction renameAction;
- private final Session session;
- private final StateManager stateManager;
- private final ActionToolbar<StateToken> topToolbar;
- private final boolean useGenericImageIcon;
- private ContextNavigatorView view;
+ private final ActionRegistry<StateToken> actionRegistry;
+ private final HashMap<StateToken, ActionItemCollection<StateToken>> actionsByItem;
+ // private final ActionContextBottomToolbar bottomToolbar;
+ private final ContentCapabilitiesRegistry capabilitiesRegistry;
+ private final IconsRegistry contentIconsRegistry;
+ private final Provider<FileDownloadUtils> downloadUtilsProvider;
+ private boolean editOnNextStateChange;
+ private final I18nTranslationService i18n;
+ // private final RenameAction renameAction;
+ private final Session session;
+ private final StateManager stateManager;
+ private final ActionToolbar<StateToken> topToolbar;
+ private final boolean useGenericImageIcon;
+ private ContextNavigatorView view;
- public ContextNavigatorPresenter(final StateManager stateManager, final Session session,
- final I18nTranslationService i18n, final IconsRegistry contentIconsRegistry,
- final ContentCapabilitiesRegistry capabilitiesRegistry, final ActionToolbar<StateToken> toolbar,
- final ActionContextBottomToolbar bottomToolbar, final ActionRegistry<StateToken> actionRegistry,
- final Provider<FileDownloadUtils> downloadUtilsProvider, final boolean useGenericImageIcon,
- final RenameAction renameAction) {
- this.stateManager = stateManager;
- this.session = session;
- this.i18n = i18n;
- this.contentIconsRegistry = contentIconsRegistry;
- this.capabilitiesRegistry = capabilitiesRegistry;
- this.topToolbar = toolbar;
- this.bottomToolbar = bottomToolbar;
- this.actionRegistry = actionRegistry;
- this.downloadUtilsProvider = downloadUtilsProvider;
- this.useGenericImageIcon = useGenericImageIcon;
- this.renameAction = renameAction;
- actionsByItem = new HashMap<StateToken, ActionItemCollection<StateToken>>();
- editOnNextStateChange = false;
- addRenameListener();
- }
+ public ContextNavigatorPresenter(final StateManager stateManager, final Session session,
+ final I18nTranslationService i18n, final IconsRegistry contentIconsRegistry,
+ final ContentCapabilitiesRegistry capabilitiesRegistry, final ActionToolbar<StateToken> toolbar,
+ final ActionRegistry<StateToken> actionRegistry,
+ final Provider<FileDownloadUtils> downloadUtilsProvider, final boolean useGenericImageIcon) {
+ this.stateManager = stateManager;
+ this.session = session;
+ this.i18n = i18n;
+ this.contentIconsRegistry = contentIconsRegistry;
+ this.capabilitiesRegistry = capabilitiesRegistry;
+ this.topToolbar = toolbar;
+ // this.bottomToolbar = bottomToolbar;
+ this.actionRegistry = actionRegistry;
+ this.downloadUtilsProvider = downloadUtilsProvider;
+ this.useGenericImageIcon = useGenericImageIcon;
+ // this.renameAction = renameAction;
+ actionsByItem = new HashMap<StateToken, ActionItemCollection<StateToken>>();
+ editOnNextStateChange = false;
+ addRenameListener();
+ }
- @Override
- public void addFileUploaderListener(final FileUploader uploader) {
- uploader.addOnUploadCompleteListener(new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken currentUploadStateToken) {
- if (currentUploadStateToken.hasSameContainer(session.getCurrentStateToken())) {
- stateManager.reload();
- }
- }
- });
- }
+ @Override
+ public void addFileUploaderListener(final FileUploader uploader) {
+ uploader.addOnUploadCompleteListener(new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken currentUploadStateToken) {
+ if (currentUploadStateToken.hasSameContainer(session.getCurrentStateToken())) {
+ stateManager.reload();
+ }
+ }
+ });
+ }
- private ActionItemCollection<StateToken> addItem(final String title, final String contentTypeId,
- final BasicMimeTypeDTO mimeType, final ContentStatus status, final StateToken stateToken,
- final StateToken parentStateToken, final AccessRights rights, final boolean isNodeSelected) {
- final ActionItemCollection<StateToken> toolbarActions = actionRegistry.getCurrentActions(stateToken,
- contentTypeId, session.isLogged(), rights, true);
+ private ActionItemCollection<StateToken> addItem(final String title, final String contentTypeId,
+ final BasicMimeTypeDTO mimeType, final ContentStatus status, final StateToken stateToken,
+ final StateToken parentStateToken, final AccessRights rights, final boolean isNodeSelected) {
+ final ActionItemCollection<StateToken> toolbarActions = actionRegistry.getCurrentActions(stateToken,
+ contentTypeId, session.isLogged(), rights, true);
- final String contentTypeIcon = getIcon(stateToken, contentTypeId, mimeType);
- final String tooltip = getTooltip(stateToken, mimeType);
- final ContextNavigatorItem item = new ContextNavigatorItem(genId(stateToken), genId(parentStateToken),
- contentTypeIcon, title, tooltip, status, stateToken, capabilitiesRegistry.isDragable(contentTypeId)
- && rights.isAdministrable(), capabilitiesRegistry.isDropable(contentTypeId)
- && rights.isAdministrable(), actionRegistry.getCurrentActions(stateToken, contentTypeId,
- session.isLogged(), rights, false));
- if (status.equals(ContentStatus.inTheDustbin) && !session.getShowDeletedContent()) {
- // Don't show
- } else {
- view.addItem(item);
- }
- return toolbarActions;
+ final String contentTypeIcon = getIcon(stateToken, contentTypeId, mimeType);
+ final String tooltip = getTooltip(stateToken, mimeType);
+ final ContextNavigatorItem item = new ContextNavigatorItem(genId(stateToken),
+ genId(parentStateToken), contentTypeIcon, title, tooltip, status, stateToken,
+ capabilitiesRegistry.isDragable(contentTypeId) && rights.isAdministrable(),
+ capabilitiesRegistry.isDropable(contentTypeId) && rights.isAdministrable(),
+ actionRegistry.getCurrentActions(stateToken, contentTypeId, session.isLogged(), rights, false));
+ if (status.equals(ContentStatus.inTheDustbin) && !session.getShowDeletedContent()) {
+ // Don't show
+ } else {
+ view.addItem(item);
}
+ return toolbarActions;
+ }
- private void addListeners() {
- session.onUserSignIn(new Listener<UserInfoDTO>() {
- @Override
- public void onEvent(final UserInfoDTO parameter) {
- clear();
- }
- });
- session.onUserSignOut(new Listener0() {
- @Override
- public void onEvent() {
- clear();
- }
- });
- }
+ private void addListeners() {
+ session.onUserSignIn(new Listener<UserInfoDTO>() {
+ @Override
+ public void onEvent(final UserInfoDTO parameter) {
+ clear();
+ }
+ });
+ session.onUserSignOut(new Listener0() {
+ @Override
+ public void onEvent() {
+ clear();
+ }
+ });
+ }
- private void addRenameListener() {
- final Listener2<StateToken, String> onSuccess = new Listener2<StateToken, String>() {
- @Override
- public void onEvent(final StateToken token, final String newName) {
- setItemText(token, newName);
- }
- };
- final Listener2<StateToken, String> onFail = new Listener2<StateToken, String>() {
- @Override
- public void onEvent(final StateToken token, final String oldName) {
- setItemText(token, oldName);
- }
- };
- renameAction.onSuccess(onSuccess);
- renameAction.onFail(onFail);
- }
+ private void addRenameListener() {
+ final Listener2<StateToken, String> onSuccess = new Listener2<StateToken, String>() {
+ @Override
+ public void onEvent(final StateToken token, final String newName) {
+ setItemText(token, newName);
+ }
+ };
+ final Listener2<StateToken, String> onFail = new Listener2<StateToken, String>() {
+ @Override
+ public void onEvent(final StateToken token, final String oldName) {
+ setItemText(token, oldName);
+ }
+ };
+ // renameAction.onSuccess(onSuccess);
+ // renameAction.onFail(onFail);
+ }
- @Override
- public void attach() {
- // FIXME At the moment detach (removeFromParent) destroy the gwt-ext
- // TreePanel and the widget must be recreated (cannot be attached again
- // like in gwt)
- topToolbar.attach();
- bottomToolbar.attach();
- }
+ @Override
+ public void attach() {
+ // FIXME At the moment detach (removeFromParent) destroy the gwt-ext
+ // TreePanel and the widget must be recreated (cannot be attached again
+ // like in gwt)
+ topToolbar.attach();
+ // bottomToolbar.attach();
+ }
- @Override
- public void clear() {
- topToolbar.clear();
- bottomToolbar.clear();
- view.clear();
- actionsByItem.clear();
- }
+ @Override
+ public void clear() {
+ topToolbar.clear();
+ // bottomToolbar.clear();
+ view.clear();
+ actionsByItem.clear();
+ }
- private void createChildItems(final ContainerDTO container, final AccessRights containerRights) {
- for (final ContainerSimpleDTO siblingFolder : container.getChilds()) {
- addItem(siblingFolder.getName(), siblingFolder.getTypeId(), null, ContentStatus.publishedOnline,
- siblingFolder.getStateToken(),
- siblingFolder.getStateToken().copy().setFolder(siblingFolder.getParentFolderId()), containerRights,
- false);
- }
- for (final ContentSimpleDTO content : container.getContents()) {
- addItem(content.getTitle(), content.getTypeId(), content.getMimeType(), content.getStatus(),
- content.getStateToken(), content.getStateToken().copy().clearDocument(), content.getRights(), false);
- }
+ private void createChildItems(final ContainerDTO container, final AccessRights containerRights) {
+ for (final ContainerSimpleDTO siblingFolder : container.getChilds()) {
+ addItem(siblingFolder.getName(), siblingFolder.getTypeId(), null, ContentStatus.publishedOnline,
+ siblingFolder.getStateToken(),
+ siblingFolder.getStateToken().copy().setFolder(siblingFolder.getParentFolderId()),
+ containerRights, false);
}
+ for (final ContentSimpleDTO content : container.getContents()) {
+ addItem(content.getTitle(), content.getTypeId(), content.getMimeType(), content.getStatus(),
+ content.getStateToken(), content.getStateToken().copy().clearDocument(), content.getRights(),
+ false);
+ }
+ }
- private void createTreePath(final StateToken state, final ContainerSimpleDTO[] absolutePath,
- final AccessRights rights) {
- for (final ContainerSimpleDTO folder : absolutePath) {
- final StateToken folderStateToken = folder.getStateToken();
- final StateToken parentStateToken = state.copy().clearDocument().setFolder(folder.getParentFolderId());
+ private void createTreePath(final StateToken state, final ContainerSimpleDTO[] absolutePath,
+ final AccessRights rights) {
+ for (final ContainerSimpleDTO folder : absolutePath) {
+ final StateToken folderStateToken = folder.getStateToken();
+ final StateToken parentStateToken = state.copy().clearDocument().setFolder(
+ folder.getParentFolderId());
- if (folder.getParentFolderId() != null) {
- addItem(folder.getName(), folder.getTypeId(), null, ContentStatus.publishedOnline, folderStateToken,
- parentStateToken, rights, false);
- } else {
- // Root must be already created
- }
- }
+ if (folder.getParentFolderId() != null) {
+ addItem(folder.getName(), folder.getTypeId(), null, ContentStatus.publishedOnline,
+ folderStateToken, parentStateToken, rights, false);
+ } else {
+ // Root must be already created
+ }
}
+ }
- @Override
- public void detach() {
- view.detach();
- topToolbar.detach();
- bottomToolbar.detach();
- }
+ @Override
+ public void detach() {
+ view.detach();
+ topToolbar.detach();
+ // bottomToolbar.detach();
+ }
- @Override
- public void editItem(final StateToken stateToken) {
- view.editItem(genId(stateToken));
- }
+ @Override
+ public void editItem(final StateToken stateToken) {
+ view.editItem(genId(stateToken));
+ }
- private String genId(final StateToken token) {
- return "k-cnav-" + token.toString().replace(StateToken.SEPARATOR, "-");
- }
+ private String genId(final StateToken token) {
+ return "k-cnav-" + token.toString().replace(StateToken.SEPARATOR, "-");
+ }
- private String getIcon(final StateToken token, final String contentTypeId, final BasicMimeTypeDTO mimeType) {
- if (contentTypeId.equals(TYPE_FOLDER)) {
- return null;
- } else if (!useGenericImageIcon && mimeType != null && mimeType.getType().equals("image")) {
- return downloadUtilsProvider.get().getImageResizedUrl(token, ImageSize.ico);
- } else {
- return (String) contentIconsRegistry.getContentTypeIcon(contentTypeId, mimeType);
- }
+ private String getIcon(final StateToken token, final String contentTypeId,
+ final BasicMimeTypeDTO mimeType) {
+ if (contentTypeId.equals(TYPE_FOLDER)) {
+ return null;
+ } else if (!useGenericImageIcon && mimeType != null && mimeType.getType().equals("image")) {
+ return downloadUtilsProvider.get().getImageResizedUrl(token, ImageSize.ico);
+ } else {
+ return (String) contentIconsRegistry.getContentTypeIcon(contentTypeId, mimeType);
}
+ }
- private String getTooltip(final StateToken token, final BasicMimeTypeDTO mimeType) {
- if (mimeType != null && (mimeType.isImage() || mimeType.isPdf())) {
- return KuneUiUtils.genQuickTipWithImage(
- downloadUtilsProvider.get().getImageResizedUrl(token, ImageSize.thumb), session.getImgCropsize());
- } else {
- return null;
- }
+ private String getTooltip(final StateToken token, final BasicMimeTypeDTO mimeType) {
+ if (mimeType != null && (mimeType.isImage() || mimeType.isPdf())) {
+ return KuneUiUtils.genQuickTipWithImage(
+ downloadUtilsProvider.get().getImageResizedUrl(token, ImageSize.thumb),
+ session.getImgCropsize());
+ } else {
+ return null;
}
+ }
- protected void gotoToken(final String token) {
- stateManager.gotoHistoryToken(token);
- }
+ protected void gotoToken(final String token) {
+ stateManager.gotoHistoryToken(token);
+ }
- public void init(final ContextNavigatorView view) {
- this.view = view;
- addListeners();
- }
+ public void init(final ContextNavigatorView view) {
+ this.view = view;
+ addListeners();
+ }
- @Override
- public boolean isSelected(final StateToken stateToken) {
- return view.isSelected(genId(stateToken));
- }
+ @Override
+ public boolean isSelected(final StateToken stateToken) {
+ return view.isSelected(genId(stateToken));
+ }
- protected void onItemRename(final String token, final String newName, final String oldName) {
- renameAction.rename(new StateToken(token), oldName, newName);
- }
+ protected void onItemRename(final String token, final String newName, final String oldName) {
+ // renameAction.rename(new StateToken(token), oldName, newName);
+ }
- @Override
- public void refreshState() {
- final StateAbstractDTO currentState = session.getCurrentState();
- if (currentState instanceof StateContainerDTO) {
- setState((StateContainerDTO) currentState, true);
- }
+ @Override
+ public void refreshState() {
+ final StateAbstractDTO currentState = session.getCurrentState();
+ if (currentState instanceof StateContainerDTO) {
+ setState((StateContainerDTO) currentState, true);
}
+ }
- @Override
- public void selectItem(final StateToken stateToken) {
- view.selectItem(genId(stateToken));
- topToolbar.disableMenusAndClearButtons();
- bottomToolbar.disableMenusAndClearButtons();
- final ActionItemCollection<StateToken> itemCollection = actionsByItem.get(stateToken);
- topToolbar.addActions(itemCollection, OldAbstractFoldableContentActions.CONTEXT_TOPBAR);
- bottomToolbar.addActions(itemCollection, OldAbstractFoldableContentActions.CONTEXT_BOTTOMBAR);
- }
+ @Override
+ public void selectItem(final StateToken stateToken) {
+ view.selectItem(genId(stateToken));
+ topToolbar.disableMenusAndClearButtons();
+ // bottomToolbar.disableMenusAndClearButtons();
+ final ActionItemCollection<StateToken> itemCollection = actionsByItem.get(stateToken);
+ topToolbar.addActions(itemCollection, OldAbstractFoldableContentActions.CONTEXT_TOPBAR);
+ // bottomToolbar.addActions(itemCollection,
+ // OldAbstractFoldableContentActions.CONTEXT_BOTTOMBAR);
+ }
- private void selectOrEditNode(final boolean select, final StateToken stateToken) {
- // Finaly
- if (editOnNextStateChange) {
- // Code smell
- selectItem(stateToken);
- editItem(stateToken);
- setEditOnNextStateChange(false);
- } else {
- if (select) {
- selectItem(stateToken);
- }
- }
+ private void selectOrEditNode(final boolean select, final StateToken stateToken) {
+ // Finaly
+ if (editOnNextStateChange) {
+ // Code smell
+ selectItem(stateToken);
+ editItem(stateToken);
+ setEditOnNextStateChange(false);
+ } else {
+ if (select) {
+ selectItem(stateToken);
+ }
}
+ }
- @Override
- public void setEditOnNextStateChange(final boolean edit) {
- editOnNextStateChange = edit;
- }
+ @Override
+ public void setEditOnNextStateChange(final boolean edit) {
+ editOnNextStateChange = edit;
+ }
- @Override
- public void setItemStatus(final StateToken stateToken, final ContentStatus status) {
- clear();
- refreshState();
- }
+ @Override
+ public void setItemStatus(final StateToken stateToken, final ContentStatus status) {
+ clear();
+ refreshState();
+ }
- private void setItemText(final StateToken stateToken, final String name) {
- if (view.isAttached()) {
- view.setItemText(genId(stateToken), name);
- }
+ private void setItemText(final StateToken stateToken, final String name) {
+ if (view.isAttached()) {
+ view.setItemText(genId(stateToken), name);
}
+ }
- @Override
- public void setState(final StateContainerDTO state, final boolean select) {
- setStateContainer(state, select);
- }
+ @Override
+ public void setState(final StateContainerDTO state, final boolean select) {
+ setStateContainer(state, select);
+ }
- private void setStateContainer(final StateContainerDTO state, final boolean select) {
- final StateToken stateToken = state.getStateToken();
- final boolean isContent = state instanceof StateContentDTO;
- StateContentDTO stateContent = null;
+ private void setStateContainer(final StateContainerDTO state, final boolean select) {
+ final StateToken stateToken = state.getStateToken();
+ final boolean isContent = state instanceof StateContentDTO;
+ StateContentDTO stateContent = null;
- final ContainerDTO container = state.getContainer();
- final AccessRights containerRights = state.getContainerRights();
- AccessRights rights;
+ final ContainerDTO container = state.getContainer();
+ final AccessRights containerRights = state.getContainerRights();
+ AccessRights rights;
- showRootFolder(state, containerRights);
+ showRootFolder(state, containerRights);
- // Do the path to our current content
- createTreePath(stateToken, container.getAbsolutePath(), containerRights);
+ // Do the path to our current content
+ createTreePath(stateToken, container.getAbsolutePath(), containerRights);
- // Process our current content/container
- final ActionItemCollection<StateToken> actionItems = new ActionItemCollection<StateToken>();
+ // Process our current content/container
+ final ActionItemCollection<StateToken> actionItems = new ActionItemCollection<StateToken>();
- if (isContent) {
- stateContent = (StateContentDTO) state;
- rights = stateContent.getContentRights();
- final ActionItemCollection<StateToken> contentActions = addItem(state.getTitle(), state.getTypeId(),
- stateContent.getMimeType(), stateContent.getStatus(), stateToken, container.getStateToken(),
- rights, false);
- final ActionItemCollection<StateToken> containerActions = actionRegistry.getCurrentActions(
- container.getStateToken(), container.getTypeId(), session.isLogged(), containerRights, true);
- actionItems.addAll(containerActions);
- actionItems.addAll(contentActions);
- } else {
- rights = containerRights;
- final ActionItemCollection<StateToken> containerActions = addItem(container.getName(),
- container.getTypeId(), null, ContentStatus.publishedOnline, container.getStateToken(),
- container.getStateToken().copy().setFolder(container.getParentFolderId()), containerRights, false);
- actionItems.addAll(containerActions);
- }
- view.setEditable(rights.isEditable());
+ if (isContent) {
+ stateContent = (StateContentDTO) state;
+ rights = stateContent.getContentRights();
+ final ActionItemCollection<StateToken> contentActions = addItem(state.getTitle(),
+ state.getTypeId(), stateContent.getMimeType(), stateContent.getStatus(), stateToken,
+ container.getStateToken(), rights, false);
+ final ActionItemCollection<StateToken> containerActions = actionRegistry.getCurrentActions(
+ container.getStateToken(), container.getTypeId(), session.isLogged(), containerRights, true);
+ actionItems.addAll(containerActions);
+ actionItems.addAll(contentActions);
+ } else {
+ rights = containerRights;
+ final ActionItemCollection<StateToken> containerActions = addItem(container.getName(),
+ container.getTypeId(), null, ContentStatus.publishedOnline, container.getStateToken(),
+ container.getStateToken().copy().setFolder(container.getParentFolderId()), containerRights,
+ false);
+ actionItems.addAll(containerActions);
+ }
+ view.setEditable(rights.isEditable());
- actionsByItem.put(stateToken, actionItems);
+ actionsByItem.put(stateToken, actionItems);
- // Process container childs
- createChildItems(container, containerRights);
+ // Process container childs
+ createChildItems(container, containerRights);
- selectOrEditNode(select, stateToken);
+ selectOrEditNode(select, stateToken);
- topToolbar.attach();
- bottomToolbar.attach();
- }
+ topToolbar.attach();
+ // bottomToolbar.attach();
+ }
- private void showRootFolder(final StateContainerDTO state, final AccessRights containerRights) {
- // If container is not a root folder process root (add
- // childs to view)
- final ContainerDTO root = state.getRootContainer();
- if (root != null) {
- // container is not root
- view.setRootItem(genId(root.getStateToken()), i18n.t(root.getName()), root.getStateToken());
- createChildItems(root, containerRights);
- }
+ private void showRootFolder(final StateContainerDTO state, final AccessRights containerRights) {
+ // If container is not a root folder process root (add
+ // childs to view)
+ final ContainerDTO root = state.getRootContainer();
+ if (root != null) {
+ // container is not root
+ view.setRootItem(genId(root.getStateToken()), i18n.t(root.getName()), root.getStateToken());
+ createChildItems(root, containerRights);
}
+ }
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditorPresenter.java 2011-06-26 22:30:12 UTC (rev 1424)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditorPresenter.java 2011-06-27 01:10:49 UTC (rev 1425)
@@ -42,7 +42,6 @@
import org.ourproject.kune.platf.client.ui.rte.saving.RTESavingEditorPresenter;
import org.ourproject.kune.workspace.client.skel.Toolbar;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.title.EntityTitle;
import cc.kune.common.client.utils.SchedulerManager;
import cc.kune.common.client.utils.TimerWrapper;
@@ -63,111 +62,113 @@
public class ContentEditorPresenter extends RTESavingEditorPresenter implements ContentEditor {
- public class RenameAction extends AbstractExtendedAction {
- public RenameAction(final String text, final String tooltip, final ImageResource icon) {
- super(text, tooltip, icon);
- }
+ public class RenameAction extends AbstractExtendedAction {
+ public RenameAction(final String text, final String tooltip, final ImageResource icon) {
+ super(text, tooltip, icon);
+ }
- @Override
- public void actionPerformed(final ActionEvent actionEvent) {
- entityTitle.edit();
- }
+ @Override
+ public void actionPerformed(final ActionEvent actionEvent) {
+ // entityTitle.edit();
}
+ }
- private RTEditorPanel editorPanel;
- private final EntityTitle entityTitle;
- // private final SiteSignOutLink siteSignOutLink;
- private final I18nTranslationService i18n;
- private ComplexToolbar sndbar;
- private ComplexToolbar topbar;
- private VerticalPanel vpanel;
- private final WorkspaceSkeleton wspace;
+ private RTEditorPanel editorPanel;
+ // private final EntityTitle entityTitle;
+ // private final SiteSignOutLink siteSignOutLink;
+ private final I18nTranslationService i18n;
+ private ComplexToolbar sndbar;
+ private ComplexToolbar topbar;
+ private VerticalPanel vpanel;
+ private final WorkspaceSkeleton wspace;
- public ContentEditorPresenter(final I18nTranslationService i18n, final Session session,
- final RTEImgResources imgResources, final Provider<InsertLinkDialog> insLinkDialog,
- final Provider<ColorWebSafePalette> palette, final Provider<EditHtmlDialog> editHtmlDialog,
- final Provider<InsertImageDialog> insertImageDialog, final Provider<InsertMediaDialog> insertMediaDialog,
- final Provider<InsertTableDialog> insertTableDialog, final Provider<InsertSpecialCharDialog> insCharDialog,
- final SchedulerManager deferred, final boolean autoSave, final StateManager stateManager,
- final WorkspaceSkeleton wspace, final TimerWrapper timer, final EntityTitle entityTitle) {
- super(i18n, session, imgResources, insLinkDialog, palette, editHtmlDialog, insertImageDialog,
- insertMediaDialog, insertTableDialog, insCharDialog, deferred, autoSave, stateManager, timer);
- super.setExtended(true);
- this.i18n = i18n;
+ public ContentEditorPresenter(final I18nTranslationService i18n, final Session session,
+ final RTEImgResources imgResources, final Provider<InsertLinkDialog> insLinkDialog,
+ final Provider<ColorWebSafePalette> palette, final Provider<EditHtmlDialog> editHtmlDialog,
+ final Provider<InsertImageDialog> insertImageDialog,
+ final Provider<InsertMediaDialog> insertMediaDialog,
+ final Provider<InsertTableDialog> insertTableDialog,
+ final Provider<InsertSpecialCharDialog> insCharDialog, final SchedulerManager deferred,
+ final boolean autoSave, final StateManager stateManager, final WorkspaceSkeleton wspace,
+ final TimerWrapper timer) {
+ super(i18n, session, imgResources, insLinkDialog, palette, editHtmlDialog, insertImageDialog,
+ insertMediaDialog, insertTableDialog, insCharDialog, deferred, autoSave, stateManager, timer);
+ super.setExtended(true);
+ this.i18n = i18n;
- this.entityTitle = entityTitle;
- this.wspace = wspace;
- Window.addWindowClosingHandler(new ClosingHandler() {
- @Override
- public void onWindowClosing(final ClosingEvent event) {
- if (isSavePending()) {
- event.setMessage(i18n.t("You have changes without save. Are you sure?"));
- }
- // onDoSaveAndClose();
- }
- });
- wspace.getEntityWorkspace().addContentListener(new ContainerListenerAdapter() {
- @Override
- public void onResize(final BoxComponent component, final int adjWidth, final int adjHeight,
- final int rawWidth, final int rawHeight) {
- adjHeight(adjHeight);
- }
- });
+ // this.entityTitle = entityTitle;
+ this.wspace = wspace;
+ Window.addWindowClosingHandler(new ClosingHandler() {
+ @Override
+ public void onWindowClosing(final ClosingEvent event) {
+ if (isSavePending()) {
+ event.setMessage(i18n.t("You have changes without save. Are you sure?"));
+ }
+ // onDoSaveAndClose();
+ }
+ });
+ wspace.getEntityWorkspace().addContentListener(new ContainerListenerAdapter() {
+ @Override
+ public void onResize(final BoxComponent component, final int adjWidth, final int adjHeight,
+ final int rawWidth, final int rawHeight) {
+ adjHeight(adjHeight);
+ }
+ });
- }
+ }
- private void addContentActions() {
- final RenameAction renameAction = new RenameAction(i18n.t("Rename"), NO_TEXT, NO_ICON);
- final OldMenuItemDescriptor renameItem = new OldMenuItemDescriptor(super.getFileMenu(), renameAction);
- renameItem.setLocation(RTEditor.TOPBAR);
- final KeyStroke key = KeyStroke.getKeyStroke(Keyboard.KEY_F2, 0);
- renameAction.putValue(Action.ACCELERATOR_KEY, key);
- super.setActionShortcut(key, renameAction);
- addAction(renameItem);
- }
+ private void addContentActions() {
+ final RenameAction renameAction = new RenameAction(i18n.t("Rename"), NO_TEXT, NO_ICON);
+ final OldMenuItemDescriptor renameItem = new OldMenuItemDescriptor(super.getFileMenu(), renameAction);
+ renameItem.setLocation(RTEditor.TOPBAR);
+ final KeyStroke key = KeyStroke.getKeyStroke(Keyboard.KEY_F2, 0);
+ renameAction.putValue(Action.ACCELERATOR_KEY, key);
+ super.setActionShortcut(key, renameAction);
+ addAction(renameItem);
+ }
- private void adjHeight(final int height) {
- final int barHeight = sndbar.getOffsetHeight();
- final int newHeight = height - 20 - barHeight;
- // Log.debug("Sndbar height: " + barHeight + " new height: " +
- // newHeight);
- editorPanel.adjustSize(newHeight);
- vpanel.setCellHeight(editorPanel, String.valueOf(newHeight));
- }
+ private void adjHeight(final int height) {
+ final int barHeight = sndbar.getOffsetHeight();
+ final int newHeight = height - 20 - barHeight;
+ // Log.debug("Sndbar height: " + barHeight + " new height: " +
+ // newHeight);
+ editorPanel.adjustSize(newHeight);
+ vpanel.setCellHeight(editorPanel, String.valueOf(newHeight));
+ }
- @Override
- public void edit(final String html, final Listener<String> onSave, final Listener0 onEditCancelled) {
- super.edit(html, onSave, onEditCancelled);
- final Toolbar contentTopBar = wspace.getEntityWorkspace().getContentTopBar();
- contentTopBar.removeAll();
- contentTopBar.add(topbar);
- wspace.getEntityWorkspace().setContent(vpanel);
- adjHeight(wspace.getEntityWorkspace().getContentHeight());
- // siteSignOutLink.addBeforeSignOut(getBeforeSavingListener());
- }
+ @Override
+ public void edit(final String html, final Listener<String> onSave, final Listener0 onEditCancelled) {
+ super.edit(html, onSave, onEditCancelled);
+ final Toolbar contentTopBar = wspace.getEntityWorkspace().getContentTopBar();
+ contentTopBar.removeAll();
+ contentTopBar.add(topbar);
+ wspace.getEntityWorkspace().setContent(vpanel);
+ adjHeight(wspace.getEntityWorkspace().getContentHeight());
+ // siteSignOutLink.addBeforeSignOut(getBeforeSavingListener());
+ }
- public void init(final ContentEditorView view) {
- super.init(view);
- addContentActions();
- vpanel = new VerticalPanel();
- editorPanel = (RTEditorPanel) super.getEditorArea();
- topbar = ((ComplexToolbar) super.getTopBar());
- sndbar = ((ComplexToolbar) super.getSndBar());
- vpanel.add(sndbar);
- vpanel.add(editorPanel);
- vpanel.setWidth("100%");
- }
+ public void init(final ContentEditorView view) {
+ super.init(view);
+ addContentActions();
+ vpanel = new VerticalPanel();
+ editorPanel = (RTEditorPanel) super.getEditorArea();
+ topbar = ((ComplexToolbar) super.getTopBar());
+ sndbar = ((ComplexToolbar) super.getSndBar());
+ vpanel.add(sndbar);
+ vpanel.add(editorPanel);
+ vpanel.setWidth("100%");
+ }
- @Override
- protected void onCancelConfirmed() {
- wspace.getEntityWorkspace().clearContent();
- super.onCancelConfirmed();
- // siteSignOutLink.addBeforeSignOut(getBeforeSavingListener());
- }
+ @Override
+ protected void onCancelConfirmed() {
+ wspace.getEntityWorkspace().clearContent();
+ super.onCancelConfirmed();
+ // siteSignOutLink.addBeforeSignOut(getBeforeSavingListener());
+ }
- @Override
- public void setFileMenuTitle(final String fileMenuTitleNew) {
- super.getFileMenu().setText(fileMenuTitleNew);
- }
+ @Override
+ public void setFileMenuTitle(final String fileMenuTitleNew) {
+ super.getFileMenu().setText(fileMenuTitleNew);
+ }
}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/site/WorkspaceNotifyUser.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/site/WorkspaceNotifyUser.java 2011-06-26 22:30:12 UTC (rev 1424)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/site/WorkspaceNotifyUser.java 2011-06-27 01:10:49 UTC (rev 1425)
@@ -1,86 +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 org.ourproject.kune.workspace.client.site;
-
-import org.ourproject.kune.platf.client.ui.noti.ConfirmationAsk;
-import org.ourproject.kune.platf.client.ui.noti.OldNotifyUser;
-import org.ourproject.kune.platf.client.ui.noti.OldNotifyUser.Level;
-import org.ourproject.kune.workspace.client.site.msg.ToastMessage;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener0;
-import com.calclab.suco.client.events.Listener2;
-import com.calclab.suco.client.ioc.Provider;
-
-public class WorkspaceNotifyUser {
-
- public WorkspaceNotifyUser(final OldNotifyUser notifyUser, final I18nTranslationService i18n,
- final Provider<ToastMessage> toaster, final Provider<WorkspaceSkeleton> ws) {
- notifyUser.addProgressNotifier(new Listener<String>() {
- @Override
- public void onEvent(final String message) {
-
- }
- });
- notifyUser.addHideProgressNotifier(new Listener0() {
- @Override
- public void onEvent() {
- // siteProgress.hideProgress();
- }
- });
- notifyUser.addNotifier(new Listener2<Level, String>() {
- @Override
- public void onEvent(final Level level, final String msg) {
- String title = "";
- switch (level) {
- case error:
- title = i18n.t("Error");
- break;
- case important:
- title = i18n.t("Important");
- break;
- case veryImportant:
- title = i18n.t("Alert");
- break;
- case info:
- title = i18n.t("Info");
- break;
- }
- toaster.get().showMessage(title, msg, level);
- }
- });
- notifyUser.addAlerter(new Listener2<String, String>() {
- @Override
- public void onEvent(final String title, final String msg) {
- ws.get().showAlertMessage(title, msg);
- }
- });
- notifyUser.addConfirmationAsker(new Listener<ConfirmationAsk>() {
- @Override
- public void onEvent(final ConfirmationAsk ask) {
- ws.get().askConfirmation(ask.getTitle(), ask.getMessage(), ask.getOnConfirmed(), ask.getOnCancel());
- }
- });
- }
-
-}
More information about the kune-commits
mailing list