r1055 - in trunk/src: main/java/org/ourproject/kune/blogs/client main/java/org/ourproject/kune/blogs/client/cnt main/java/org/ourproject/kune/chat/client main/java/org/ourproject/kune/chat/client/cnt main/java/org/ourproject/kune/docs/client main/java/org/ourproject/kune/docs/client/cnt main/java/org/ourproject/kune/gallery/client main/java/org/ourproject/kune/gallery/client/cnt main/java/org/ourproject/kune/platf/client/actions main/java/org/ourproject/kune/platf/client/actions/toolbar main/
Author: vjrj Date: 2009-03-03 02:35:36 +0100 (Tue, 03 Mar 2009) New Revision: 1055 Added: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionSndToolbar.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionSndToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionTopToolbar.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionTopToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ActionContentToolbar.java trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ActionContentToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentActionRegistry.java trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentIconsRegistry.java trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextToolbar.java trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextActionRegistry.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupActionRegistry.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserActionRegistry.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionBuddiesSummaryToolbar.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionBuddiesSummaryToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionGroupSummaryToolbar.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionGroupSummaryToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionParticipationSummaryToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionParticipationToolbar.java Removed: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentActionRegistry.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentEditorActionRegistry.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistry.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContextActionRegistry.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/GroupActionRegistry.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/UserActionRegistry.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbar.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbar.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbar.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbar.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationSummaryToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationToolbar.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/CustomPushButton.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/RoundedBorderDecorator.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/TitledPanel.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/UIConstants.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/UnknowComponent.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/upload/ Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentPresenter.java trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerPresenter.java trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomPresenter.java trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocFolderContentPresenter.java trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentViewerPresenter.java trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentPresenter.java trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerPresenter.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionShortcut.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbar.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java trunk/src/main/java/org/ourproject/kune/platf/client/registry/ContentCapabilitiesRegistry.java trunk/src/main/java/org/ourproject/kune/platf/client/services/KunePlatformModule.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditor.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorPanel.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorPresenter.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorView.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/TestRTEDialog.java trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPresenter.java trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java trunk/src/main/java/org/ourproject/kune/workspace/client/KuneRegistryModule.java trunk/src/main/java/org/ourproject/kune/workspace/client/KuneWorkspaceModule.java trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/hello/HelloWorldModule.java trunk/src/main/java/org/ourproject/kune/workspace/client/skel/ActionCntCtxToolbarPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePresenter.java trunk/src/test/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistryTest.java Log: Incomplete - task Better RTE (Rich Text Editor) support Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -25,8 +25,6 @@ import static org.ourproject.kune.blogs.client.BlogClientTool.TYPE_UPLOADEDFILE; import org.ourproject.kune.blogs.client.cnt.BlogViewer; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; import org.ourproject.kune.platf.client.rpc.ContentServiceAsync; import org.ourproject.kune.platf.client.rpc.GroupServiceAsync; @@ -36,7 +34,9 @@ import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; import org.ourproject.kune.workspace.client.AbstractFoldableContentActions; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; 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.TextEditor; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -29,9 +29,6 @@ import org.ourproject.kune.blogs.client.cnt.BlogViewerView; import org.ourproject.kune.blogs.client.ctx.BlogContext; import org.ourproject.kune.blogs.client.ctx.BlogContextPresenter; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.app.ToolGroup; import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; @@ -43,7 +40,10 @@ import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; 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.TextEditor; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -21,13 +21,13 @@ import org.ourproject.kune.blogs.client.BlogClientTool; import org.ourproject.kune.platf.client.actions.ActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.dto.StateContainerDTO; import org.ourproject.kune.platf.client.dto.StateToken; import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; import com.calclab.suco.client.ioc.Provider; Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -20,13 +20,13 @@ package org.ourproject.kune.blogs.client.cnt; import org.ourproject.kune.blogs.client.BlogClientTool; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.dto.StateContentDTO; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; import com.calclab.suco.client.ioc.Provider; Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientActions.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -27,14 +27,14 @@ import org.ourproject.kune.platf.client.actions.ActionToolbarButtonDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarButtonSeparator; import org.ourproject.kune.platf.client.actions.ActionToolbarPosition; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; import org.ourproject.kune.platf.client.dto.AccessRolDTO; import org.ourproject.kune.platf.client.dto.ContentStatusDTO; import org.ourproject.kune.platf.client.dto.StateToken; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.wiki.client.WikiClientTool; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; +import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry; import com.calclab.suco.client.events.Listener; import com.calclab.suco.client.ioc.Provider; Modified: trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/chat/client/ChatClientModule.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -27,9 +27,6 @@ import org.ourproject.kune.chat.client.ctx.room.AddRoom; import org.ourproject.kune.chat.client.ctx.room.AddRoomPanel; import org.ourproject.kune.chat.client.ctx.room.AddRoomPresenter; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.app.Application; import org.ourproject.kune.platf.client.app.ToolGroup; import org.ourproject.kune.platf.client.i18n.I18nTranslationService; @@ -39,7 +36,10 @@ import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator; +import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry; import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; import org.ourproject.kune.workspace.client.themes.WsThemePresenter; import org.ourproject.kune.workspace.client.tool.ToolSelector; Modified: trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -21,7 +21,6 @@ import org.ourproject.kune.chat.client.ChatClientTool; import org.ourproject.kune.platf.client.actions.ActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.dto.StateContainerDTO; import org.ourproject.kune.platf.client.dto.StateToken; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; @@ -29,6 +28,7 @@ import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.TextUtils; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; import com.calclab.suco.client.ioc.Provider; Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -25,8 +25,6 @@ import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_UPLOADEDFILE; import org.ourproject.kune.docs.client.cnt.DocumentViewer; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; import org.ourproject.kune.platf.client.rpc.ContentServiceAsync; import org.ourproject.kune.platf.client.rpc.GroupServiceAsync; @@ -36,7 +34,9 @@ import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; import org.ourproject.kune.workspace.client.AbstractFoldableContentActions; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; 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.TextEditor; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -29,9 +29,6 @@ import org.ourproject.kune.docs.client.cnt.DocumentViewerView; import org.ourproject.kune.docs.client.ctx.DocumentContext; import org.ourproject.kune.docs.client.ctx.DocumentContextPresenter; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.app.ToolGroup; import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; @@ -43,7 +40,10 @@ import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; 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.TextEditor; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; Modified: trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocFolderContentPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocFolderContentPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocFolderContentPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -21,12 +21,12 @@ import org.ourproject.kune.docs.client.DocumentClientTool; import org.ourproject.kune.platf.client.actions.ActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.dto.StateToken; import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; import com.calclab.suco.client.ioc.Provider; Modified: trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentViewerPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentViewerPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentViewerPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -20,13 +20,13 @@ package org.ourproject.kune.docs.client.cnt; import org.ourproject.kune.docs.client.DocumentClientTool; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.dto.StateContentDTO; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; import com.calclab.suco.client.ioc.Provider; Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -24,8 +24,6 @@ import static org.ourproject.kune.gallery.client.GalleryClientTool.TYPE_UPLOADEDFILE; import org.ourproject.kune.gallery.client.cnt.GalleryViewer; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; import org.ourproject.kune.platf.client.rpc.ContentServiceAsync; import org.ourproject.kune.platf.client.rpc.GroupServiceAsync; @@ -35,7 +33,9 @@ import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; import org.ourproject.kune.workspace.client.AbstractFoldableContentActions; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; 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.TextEditor; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -29,9 +29,6 @@ import org.ourproject.kune.gallery.client.cnt.GalleryViewerView; import org.ourproject.kune.gallery.client.ctx.GalleryContext; import org.ourproject.kune.gallery.client.ctx.GalleryContextPresenter; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.app.ToolGroup; import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; @@ -43,7 +40,10 @@ import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; 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.TextEditor; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -21,7 +21,6 @@ import org.ourproject.kune.gallery.client.GalleryClientTool; import org.ourproject.kune.platf.client.actions.ActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.dto.ContainerDTO; import org.ourproject.kune.platf.client.dto.ContentSimpleDTO; import org.ourproject.kune.platf.client.dto.StateContainerDTO; @@ -31,6 +30,7 @@ import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.ui.download.ImageSize; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; import com.calclab.suco.client.ioc.Provider; Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -20,13 +20,13 @@ package org.ourproject.kune.gallery.client.cnt; import org.ourproject.kune.gallery.client.GalleryClientTool; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.dto.StateContentDTO; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; import com.calclab.suco.client.ioc.Provider; Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -20,6 +20,7 @@ package org.ourproject.kune.platf.client.actions; import org.ourproject.kune.platf.client.dto.AccessRolDTO; +import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import org.ourproject.kune.platf.client.services.ImageDescriptor; import com.calclab.suco.client.events.Listener; @@ -222,8 +223,8 @@ return shortcut; } - public String getShortcutToS() { - return shortcut == null ? "" : shortcut.toString(); + public String getShortcutToS(I18nTranslationService i18n) { + return shortcut == null ? "" : shortcut.toString(i18n); } /** @@ -244,6 +245,10 @@ return toolTip; } + public boolean hasShortcut() { + return shortcut != null; + } + /** * Checks if is must be confirmed. * Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionShortcut.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionShortcut.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionShortcut.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -6,9 +6,14 @@ public class ActionShortcut { + private static boolean has(int modifiers, int modifier) { + return ((modifiers & modifier) == modifier); + } + final boolean alt; final boolean ctrl; final boolean shift; + final char key; public ActionShortcut(boolean alt, boolean ctrl, boolean shift, char key) { @@ -26,6 +31,49 @@ this(false, ctrl, false, key); } + public ActionShortcut(char key, int modifiers) { + this(has(modifiers, KeyboardListener.MODIFIER_ALT), has(modifiers, KeyboardListener.MODIFIER_CTRL), has( + modifiers, KeyboardListener.MODIFIER_SHIFT), key); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + ActionShortcut other = (ActionShortcut) obj; + if (alt != other.alt) { + return false; + } + if (ctrl != other.ctrl) { + return false; + } + if (key != other.key) { + return false; + } + if (shift != other.shift) { + return false; + } + return true; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + (alt ? 1231 : 1237); + result = prime * result + (ctrl ? 1231 : 1237); + result = prime * result + key; + result = prime * result + (shift ? 1231 : 1237); + return result; + } + public boolean is(char keyCode, int modifiers) { return (keyCode == keyCode && same(modifiers, KeyboardListener.MODIFIER_ALT, alt) && same(modifiers, KeyboardListener.MODIFIER_CTRL, ctrl) && same(modifiers, @@ -33,7 +81,7 @@ } public boolean same(int modifiers, int modifier, boolean keyValue) { - return (((modifiers & modifier) == modifier) == keyValue); + return (has(modifiers, modifier) == keyValue); } public String toString(I18nTranslationService i18n) { Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentActionRegistry.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentActionRegistry.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentActionRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,25 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public class ContentActionRegistry extends ActionRegistry<StateToken> { -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentEditorActionRegistry.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentEditorActionRegistry.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentEditorActionRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,6 +0,0 @@ -package org.ourproject.kune.platf.client.actions; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public class ContentEditorActionRegistry extends ActionRegistry<StateToken> { -} \ No newline at end of file Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistry.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistry.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,78 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions; - -import java.util.HashMap; - -import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO; - -public class ContentIconsRegistry { - private final HashMap<String, String> contentTypesIcons; - - public ContentIconsRegistry() { - contentTypesIcons = new HashMap<String, String>(); - } - - public String getContentTypeIcon(final String typeId) { - final String icon = contentTypesIcons.get(typeId); - return icon == null ? "" : 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 String getContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType) { - String icon = getContentTypeIcon(concatenate(typeId, mimeType)); - if (icon.equals("")) { - 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.equals("") ? getContentTypeIcon(typeId) : icon; - } - - public void registerContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType, final String iconUrl) { - registerContentTypeIcon(concatenate(typeId, mimeType), iconUrl); - } - - public void registerContentTypeIcon(final String contentTypeId, final String iconUrl) { - contentTypesIcons.put(contentTypeId, iconUrl); - } - - private String concatenate(final String typeId, final BasicMimeTypeDTO mimeType) { - if (mimeType != null) { - return typeId + "|" + mimeType; - } else { - return typeId; - } - } -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContextActionRegistry.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContextActionRegistry.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContextActionRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,25 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public class ContextActionRegistry extends ActionRegistry<StateToken> { -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/GroupActionRegistry.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/GroupActionRegistry.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/GroupActionRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,28 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions; - -import org.ourproject.kune.platf.client.dto.StateToken; - -/** - * The Class GroupActionRegistry stores actions over groups (mainly used in SN) - */ -public class GroupActionRegistry extends ActionRegistry<StateToken> { -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/UserActionRegistry.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/UserActionRegistry.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/UserActionRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,31 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions; - -import org.ourproject.kune.platf.client.dto.UserSimpleDTO; - -/** - * The Class UserActionRegistry. - * - * List of actions over a user (initially used for buddies actions) - * - */ -public class UserActionRegistry extends ActionRegistry<UserSimpleDTO> { -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbar.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,26 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions.toolbar; - -import org.ourproject.kune.platf.client.dto.UserSimpleDTO; - -public interface ActionBuddiesSummaryToolbar extends ActionToolbar<UserSimpleDTO> { - -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbarPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,31 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions.toolbar; - -import org.ourproject.kune.platf.client.dto.UserSimpleDTO; - -public class ActionBuddiesSummaryToolbarPresenter extends ActionToolbarPresenter<UserSimpleDTO> implements - ActionBuddiesSummaryToolbar { - - public ActionBuddiesSummaryToolbarPresenter(ActionToolbarView<UserSimpleDTO> toolbar) { - super(toolbar); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbar.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,26 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions.toolbar; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public interface ActionContentToolbar extends ActionToolbar<StateToken> { - -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbarPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,30 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions.toolbar; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public class ActionContentToolbarPresenter extends ActionToolbarPresenter<StateToken> implements ActionContentToolbar { - - public ActionContentToolbarPresenter(ActionToolbarView<StateToken> toolbar) { - super(toolbar); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbar.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,26 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions.toolbar; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public interface ActionContextToolbar extends ActionToolbar<StateToken> { - -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbarPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,30 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions.toolbar; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public class ActionContextToolbarPresenter extends ActionToolbarPresenter<StateToken> implements ActionContextToolbar { - - public ActionContextToolbarPresenter(ActionToolbarView<StateToken> toolbar) { - super(toolbar); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbar.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,26 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions.toolbar; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public interface ActionGroupSummaryToolbar extends ActionToolbar<StateToken> { - -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbarPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,30 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions.toolbar; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public class ActionGroupSummaryToolbarPresenter extends ActionToolbarPresenter<StateToken> implements - ActionGroupSummaryToolbar { - - public ActionGroupSummaryToolbarPresenter(ActionToolbarView<StateToken> toolbar) { - super(toolbar); - } -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationSummaryToolbarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationSummaryToolbarPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationSummaryToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,31 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions.toolbar; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public class ActionParticipationSummaryToolbarPresenter extends ActionToolbarPresenter<StateToken> implements - ActionParticipationToolbar { - - public ActionParticipationSummaryToolbarPresenter(ActionToolbarView<StateToken> toolbar) { - super(toolbar); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationToolbar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationToolbar.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,26 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.actions.toolbar; - -import org.ourproject.kune.platf.client.dto.StateToken; - -public interface ActionParticipationToolbar extends ActionToolbar<StateToken> { - -} Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbar.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -33,6 +33,6 @@ ActionToolbarView<T> getView(); - void setActions(ActionItemCollection<T> actionItemCollection); + void addActions(ActionItemCollection<T> actionItemCollection); } Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPanel.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -24,6 +24,8 @@ import org.ourproject.kune.platf.client.actions.ActionDescriptor; import org.ourproject.kune.platf.client.actions.ActionItem; import org.ourproject.kune.platf.client.actions.ActionManager; +import org.ourproject.kune.platf.client.actions.ActionPressedCondition; +import org.ourproject.kune.platf.client.actions.ActionShortcut; import org.ourproject.kune.platf.client.actions.ActionToolbarButtonDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarButtonSeparator; import org.ourproject.kune.platf.client.actions.ActionToolbarDescriptor; @@ -32,6 +34,7 @@ import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarPosition; import org.ourproject.kune.platf.client.actions.ActionToolbarPushButtonDescriptor; +import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import org.ourproject.kune.platf.client.ui.SimpleToolbar; import com.allen_sauer.gwt.log.client.Log; @@ -56,8 +59,10 @@ private final Provider<ActionManager> actionManagerProvider; protected final SimpleToolbar topbar; protected final SimpleToolbar bottombar; + private final I18nTranslationService i18n; - public ActionToolbarPanel(final Provider<ActionManager> actionManagerProvider) { + public ActionToolbarPanel(final Provider<ActionManager> actionManagerProvider, I18nTranslationService i18n) { + this.i18n = i18n; topbar = new SimpleToolbar(); bottombar = new SimpleToolbar(); topbar.setWidth("100%"); @@ -86,8 +91,8 @@ } if (action instanceof ActionToolbarPushButtonDescriptor) { button.setEnableToggle(true); - button.setPressed(((ActionToolbarPushButtonDescriptor<T>) action).getMustInitialyPressed().mustBePressed( - item)); + ActionPressedCondition<T> mustInitialyPressed = ((ActionToolbarPushButtonDescriptor<T>) action).getMustInitialyPressed(); + button.setPressed(mustInitialyPressed != null && mustInitialyPressed.mustBePressed(item)); } button.addListener(new ButtonListenerAdapter() { @Override @@ -101,7 +106,9 @@ if (iconCls != null) { button.setIconCls(iconCls); } - button.setTooltip(action.getToolTip()); + String toolTip = action.getToolTip(); + ActionShortcut shortcut = action.getShortcut(); + button.setTooltip((toolTip == null ? "" : toolTip) + (shortcut != null ? shortcut.toString(i18n) : "")); setEnableButton(button, enable); final SimpleToolbar toolbar = getToolbar(pos); @@ -192,18 +199,18 @@ final ActionToolbarMenuDescriptor<T> action = (ActionToolbarMenuDescriptor<T>) actionItem.getAction(); final Item item; if (action instanceof ActionToolbarMenuRadioDescriptor) { - CheckItem checkItem = new CheckItem(action.getText() + action.getShortcutToS()); + CheckItem checkItem = new CheckItem(action.getText() + action.getShortcutToS(i18n)); ActionToolbarMenuRadioDescriptor<T> radioDescriptor = (ActionToolbarMenuRadioDescriptor<T>) action; checkItem.setGroup(radioDescriptor.getGroup()); checkItem.setChecked(radioDescriptor.mustBeChecked()); item = checkItem; } else if (action instanceof ActionToolbarMenuCheckItemDescriptor) { - CheckItem checkItem = new CheckItem(action.getText() + action.getShortcutToS()); + CheckItem checkItem = new CheckItem(action.getText() + action.getShortcutToS(i18n)); ActionToolbarMenuCheckItemDescriptor<T> checkItemDescriptor = (ActionToolbarMenuCheckItemDescriptor<T>) action; checkItem.setChecked(checkItemDescriptor.getMustBeChecked().mustBeChecked()); item = checkItem; } else { - item = new Item(action.getText() + action.getShortcutToS()); + item = new Item(action.getText() + action.getShortcutToS(i18n)); } BaseItemListenerAdapter clickListener = new BaseItemListenerAdapter() { @Override Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -56,7 +56,7 @@ return view; } - public void setActions(final ActionItemCollection<T> actions) { + public void addActions(final ActionItemCollection<T> actions) { for (final ActionItem<T> actionItem : actions) { final ActionDescriptor<T> action = actionItem.getAction(); if (actionItem.mustBeAdded()) { Modified: trunk/src/main/java/org/ourproject/kune/platf/client/registry/ContentCapabilitiesRegistry.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/registry/ContentCapabilitiesRegistry.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/registry/ContentCapabilitiesRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -19,7 +19,7 @@ */ package org.ourproject.kune.platf.client.registry; -import org.ourproject.kune.platf.client.actions.ContentIconsRegistry; +import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry; public class ContentCapabilitiesRegistry { Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/KunePlatformModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/services/KunePlatformModule.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/services/KunePlatformModule.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -19,7 +19,8 @@ \*/ package org.ourproject.kune.platf.client.services; -import org.ourproject.kune.platf.client.actions.ContentEditorActionRegistry; +import org.ourproject.kune.platf.client.actions.ActionManager; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel; import org.ourproject.kune.platf.client.app.Application; import org.ourproject.kune.platf.client.app.ApplicationComponentGroup; import org.ourproject.kune.platf.client.app.ApplicationDefault; @@ -46,13 +47,19 @@ import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalette; import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalettePanel; import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalettePresenter; +import org.ourproject.kune.platf.client.ui.rte.RTEActionSndToolbar; +import org.ourproject.kune.platf.client.ui.rte.RTEActionSndToolbarPresenter; +import org.ourproject.kune.platf.client.ui.rte.RTEActionTopToolbar; +import org.ourproject.kune.platf.client.ui.rte.RTEActionTopToolbarPresenter; import org.ourproject.kune.platf.client.ui.rte.RTEditor; import org.ourproject.kune.platf.client.ui.rte.RTEditorPanel; import org.ourproject.kune.platf.client.ui.rte.RTEditorPresenter; +import org.ourproject.kune.platf.client.ui.rte.TestRTEDialog; import org.ourproject.kune.platf.client.ui.rte.img.RTEImgResources; import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; import com.calclab.suco.client.events.Listener0; +import com.calclab.suco.client.ioc.decorator.NoDecoration; import com.calclab.suco.client.ioc.decorator.Singleton; import com.calclab.suco.client.ioc.module.AbstractModule; import com.calclab.suco.client.ioc.module.Factory; @@ -202,19 +209,42 @@ } }); - register(Singleton.class, new Factory<RTEditor>(RTEditor.class) { + register(NoDecoration.class, new Factory<RTEActionTopToolbar>(RTEActionTopToolbar.class) { @Override + public RTEActionTopToolbar create() { + final ActionToolbarPanel<Object> panel = new ActionToolbarPanel<Object>($$(ActionManager.class), i18n); + final RTEActionTopToolbarPresenter toolbar = new RTEActionTopToolbarPresenter(panel); + return toolbar; + } + }, new Factory<RTEActionSndToolbar>(RTEActionSndToolbar.class) { + @Override + public RTEActionSndToolbar create() { + final ActionToolbarPanel<Object> panel = new ActionToolbarPanel<Object>($$(ActionManager.class), i18n); + final RTEActionSndToolbarPresenter toolbar = new RTEActionSndToolbarPresenter(panel); + return toolbar; + } + }); + + register(NoDecoration.class, new Factory<RTEditor>(RTEditor.class) { + @Override public RTEditor create() { - final RTEditorPresenter presenter = new RTEditorPresenter($(ContentEditorActionRegistry.class), - $(I18nTranslationService.class), $(Session.class), RTEImgResources.INSTANCE); - final RTEditorPanel panel = new RTEditorPanel(presenter, $(I18nUITranslationService.class)); + RTEActionTopToolbar topBar = $(RTEActionTopToolbar.class); + RTEActionSndToolbar sndBar = $(RTEActionSndToolbar.class); + final RTEditorPresenter presenter = new RTEditorPresenter($(I18nTranslationService.class), + $(Session.class), topBar, sndBar, RTEImgResources.INSTANCE); + final RTEditorPanel panel = new RTEditorPanel(presenter, $(I18nUITranslationService.class), + $(ActionManager.class)); presenter.init(panel); return presenter; } }); + register(NoDecoration.class, new Factory<TestRTEDialog>(TestRTEDialog.class) { + @Override + public TestRTEDialog create() { + return new TestRTEDialog($(RTEditor.class)); + } + }); - // ew TestRTEDialog($(RTEditor.class)); - register(ApplicationComponentGroup.class, new Factory<NotifyUser>(NotifyUser.class) { @Override public NotifyUser create() { @@ -227,5 +257,9 @@ $(Application.class).start(); // $(HelloWorld.class); + // $(TestRTEDialog.class); + // $(TestRTEDialog.class); + // $(TestRTEDialog.class); + } } \ No newline at end of file Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/CustomPushButton.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/CustomPushButton.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/CustomPushButton.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,52 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.ui; - -import com.google.gwt.user.client.ui.ClickListener; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.PushButton; - -public class CustomPushButton extends Composite { - - private final PushButton button; - - public CustomPushButton(final String text, final ClickListener listener) { - button = new PushButton(text, listener); - RoundedBorderDecorator roundedButton = new RoundedBorderDecorator(button, RoundedBorderDecorator.ALL, - RoundedBorderDecorator.SIMPLE); - initWidget(roundedButton); - roundedButton.setColor("#AAA"); - button.setStyleName("kune-CustomPushButton"); - this.addStyleName("kune-CustomPushButton-space"); - } - - public boolean isEnabled() { - return button.isEnabled(); - } - - public void setEnabled(final boolean enabled) { - button.setEnabled(enabled); - } - - public void setText(final String text) { - button.setText(text); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/RoundedBorderDecorator.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/RoundedBorderDecorator.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/RoundedBorderDecorator.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,284 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.ui; - -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Element; -import com.google.gwt.user.client.ui.ComplexPanel; -import com.google.gwt.user.client.ui.Widget; - -/** - * <p> - * A Panel to create rounded corners similar to other known Google(tm) - * applications. Basically the html of the rounded corners looks as follows - * (with some extra styling to make it really work): - * </p> - * - * <pre> - * <div> - * <div style="margin:0 2px"></div> - * <div style="margin:0 1px"></div> - * <div>your widget</div> - * <div style="margin:0 1px"></div> - * <div style="margin:0 2px"></div> - * </div> - * </pre> - * - * <p> - * Use the class as follows: - * </p> - * <p> - * Create panel with all corners rounded: - * </p> - * - * <pre> - * // all 4 corners are rounded. - * RoundedPanel rp = new RoundedPanel(); - * </pre> - * - * <p> - * or with custom set corners, like only on the left - * </p> - * - * <pre> - * // custom set corners - * RoundedPanel rp = new RoundedPanel(corners); - * </pre> - * - * <p> - * By default the classname assigned to the rounded corners is "rp". You need - * this to set the color of the rounded corners to match the rest of you widget. - * e.g. <code>.rp { background-color:#c3d9ff; }</code> If you want another class - * name, use the method <code>setLineStyleName</code>. - * </p> - * - * @author Hilbrand Bouwkamp([email protected]) - * @version 1.2 - * - * adapted by Vicente J. Ruiz Jurado and danigb for kune - */ - -public class RoundedBorderDecorator extends ComplexPanel implements HasColor { - /** - * <code>TOPLEFT</code> top left rounded corner - */ - public final static int TOPLEFT = 1; - /** - * <code>TOPRIGHT</code> top right rounded corner - */ - public final static int TOPRIGHT = 2; - /** - * <code>BOTTOMLEFT</code> bottom left rounded corner - */ - public final static int BOTTOMLEFT = 4; - /** - * <code>BOTTOMRIGHT</code> bottom right rounded corner - */ - public final static int BOTTOMRIGHT = 8; - /** - * <code>BOTTOM</code> rounded corners at the top - */ - public final static int TOP = TOPLEFT | TOPRIGHT; - /** - * <code>TOP</code> rounded corners at the bottom - */ - public final static int BOTTOM = BOTTOMLEFT | BOTTOMRIGHT; - /** - * <code>LEFT</code> rounded corners on the left side - */ - public final static int LEFT = TOPLEFT | BOTTOMLEFT; - /** - * <code>RIGHT</code> rounded corners on the right side - */ - public final static int RIGHT = TOPRIGHT | BOTTOMRIGHT; - /** - * <code>ALL</code> rounded corners on all sides - */ - public final static int ALL = TOP | BOTTOM; - - /** - * <code>ALL</code> rounded corners of size 1px - */ - public final static int SIMPLE = 1; - - /** - * <code>DOUBLE</code> rounded corners of size 2px - */ - public final static int DOUBLE = 2; - - // private Element variables - private final Element body; // body of widget - private Element div2t; // margin 2 top line - private Element div1t; // margin 1 top line - private final Element divElement; // div element containing widget - private Element div1b; // margin 1 bottom line - private Element div2b; // margin 2 bottom line - private String color; - - /** - * <p> - * Creates a new <code>RoundedPanel</code> with custom rounded corners on - * the given widget <code>w</code>. Every combination of corners can be set - * via the <code>corners</code> argument. Use the static constants to set - * the corners. For example if you want to create a panel with only rounded - * corners at the left, use:<br> - * <code>new RoundedPanel(yourWidget, RoundedPanel.LEFT);</code> - * </p> - * - * @param corners - * set custom rounded corners. - * @param decorated - * widget to add corners to. - * - * @param size - * size of the corners: DOUBLE (2px) or SIMPLE (1px) - */ - public RoundedBorderDecorator(final Widget decorated, final int corners, final int size) { - body = DOM.createDiv(); - if (is(corners, TOP)) { - if (is(size, DOUBLE)) { - div2t = createLine(corners & TOP, '2'); - DOM.appendChild(body, div2t); - } - div1t = createLine(corners & TOP, '1'); - DOM.appendChild(body, div1t); - } - divElement = DOM.createDiv(); - DOM.appendChild(body, divElement); - if (is(corners, BOTTOM)) { - div1b = createLine(corners & BOTTOM, '1'); - DOM.appendChild(body, div1b); - if (is(size, DOUBLE)) { - div2b = createLine(corners & BOTTOM, '2'); - DOM.appendChild(body, div2b); - } - } - setElement(body); - add(decorated, divElement); - setColor("CCC"); - } - - public RoundedBorderDecorator(final Widget decorated, final int corners) { - this(decorated, corners, DOUBLE); - } - - /** - * <p> - * Creates div element representing part of the rounded corner. - * </p> - * - * @param corner - * corner mask to set rounded corner. - * @param width - * margin width for line. - */ - private Element createLine(final int corner, final char width) { - // margin 2 fields : top/bottom right/left => "0 <width>px" - // margin 4 fields : top right bottom left => "0 <width>px 0 - // <width>px" - final String margin = corner == TOP || corner == BOTTOM ? "0 " + width + "px" : is(corner, LEFT) ? "0 0 0 " - + width + "px" : "0 " + width + "px 0 0"; - final Element div = DOM.createDiv(); - DOM.setStyleAttribute(div, "fontSize", "0px"); - DOM.setStyleAttribute(div, "height", "1px"); - DOM.setStyleAttribute(div, "lineHeight", "1px"); - DOM.setStyleAttribute(div, "margin", margin); - DOM.setInnerHTML(div, " "); - return div; - } - - // convience method for mask test - private boolean is(final int input, final int mask) { - return (input & mask) > 0; - } - - /** - * <p> - * Set the style of the RoundedPanel. In most cases this is not necessary - * and setting the style on the widget to which the - * <code>RoundedPanel</code> is applied should be set, as is done when not - * using the RoundedPanel</code> - * </p> - * - * @param style - * css style name - */ - public void setStyleName(final String style) { - DOM.setElementProperty(body, "className", style); - } - - /** - * <p> - * Set the css style name of the rounded corners div's. Default the css - * stylename is <code>rp</code>. Use it to set the colors of the corner. For - * example: <code>.rp { background-color:#c3d9ff; }</code>. - * </p> - * <p> - * A custom style might be needed when the corners are visible only when a - * panel is selected. Use this method to set the custom style name and add - * something like the following to the stylesheet:<br> - * .selected .rp { background-color:#c3d9ff; } - * </p> - * - * @param style - * css style name. - */ - public void setCornerStyleName(final String style) { - if (null != div2t) { - DOM.setElementProperty(div2t, "className", style); - } - if (null != div1t) { - DOM.setElementProperty(div1t, "className", style); - } - if (null != div1b) { - DOM.setElementProperty(div1b, "className", style); - } - if (null != div2b) { - DOM.setElementProperty(div2b, "className", style); - } - if (null != divElement) { - DOM.setElementProperty(divElement, "className", style); - } - } - - public void setColor(final String color) { - this.color = color; - if (null != div2t) { - DOM.setStyleAttribute(div2t, "backgroundColor", color); - } - if (null != div1t) { - DOM.setStyleAttribute(div1t, "backgroundColor", color); - } - if (null != div1b) { - DOM.setStyleAttribute(div1b, "backgroundColor", color); - } - if (null != div2b) { - DOM.setStyleAttribute(div2b, "backgroundColor", color); - } - if (null != divElement) { - DOM.setStyleAttribute(divElement, "backgroundColor", color); - } - } - - public String getColor() { - return color; - } - -} \ No newline at end of file Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/TitledPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/TitledPanel.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/TitledPanel.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,122 +0,0 @@ - -/* - * Copyright 2007 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not - * use this file except in compliance with the License. You may obtain a copy of - * the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations under - * the License. - \*/ -package org.ourproject.kune.platf.client.ui; - -import com.google.gwt.core.client.GWT; -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.Element; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.Widget; - -/** - * A panel that wraps its contents in a border with a title that appears in the - * upper left corner of the border. This is an implementation of the fieldset - * HTML element. - */ -public class TitledPanel extends SimplePanel { - /** - * Implementation class for TitledPanel. - */ - public static class TitledPanelImpl { - /** - * Set the title of a fieldset element. - */ - public void setTitle(final Element fieldset, final Element legend, final String title) { - if (title != "" && title != null) { - DOM.setInnerHTML(legend, title); - DOM.insertChild(fieldset, legend, 0); - } else if (DOM.getParent(legend) != null) { - DOM.removeChild(fieldset, legend); - } - } - } - - /** - * Implementation class for TitledPanel that handles Mozilla rendering - * issues. - */ - public static class TitledPanelImplMozilla extends TitledPanelImpl { - public void setTitle(final Element fieldset, final Element legend, final String title) { - DOM.setStyleAttribute(fieldset, "display", "none"); - super.setTitle(fieldset, legend, title); - DOM.setStyleAttribute(fieldset, "display", ""); - } - } - - /** - * The implementation instance. - */ - private static TitledPanelImpl impl = (TitledPanelImpl) GWT.create(TitledPanelImpl.class); - - /** - * The legend used as the title. - */ - private final Element legend; - - /** - * The title. - */ - private String title; - - /** - * Constructor. - * - * @param title - * the title to display - */ - public TitledPanel(final String title) { - super(DOM.createElement("fieldset")); - legend = DOM.createElement("legend"); - DOM.appendChild(getElement(), legend); - setTitle(title); - } - - /** - * Constructor. - * - * @param title - * the title to display - * @param w - * the widget to add to the panel - */ - public TitledPanel(final String title, final Widget w) { - this(title); - setWidget(w); - } - - /** - * Get the current title. - * - * @return the title of the panel - */ - public String getTitle() { - return this.title; - } - - /** - * Set the title in the border. Pass in null or an empty string to remove - * the title completely, leaving just a box. - * - * @param title - * the new title - */ - public void setTitle(final String title) { - this.title = title; - impl.setTitle(getElement(), legend, title); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/UIConstants.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/UIConstants.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/UIConstants.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,27 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.ui; - -public interface UIConstants { - - String ICON_HORIZ_ALIGN_RIGHT = "right"; - String ICON_HORIZ_ALIGN_LEFT = "left"; - -} \ No newline at end of file Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/UnknowComponent.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/UnknowComponent.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/UnknowComponent.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,38 +0,0 @@ -/* - * - * 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 org.ourproject.kune.platf.client.ui; - -import org.ourproject.kune.platf.client.View; - -import com.google.gwt.user.client.ui.Label; - -public class UnknowComponent extends Label implements View { - - public static final UnknowComponent instance = new UnknowComponent(); - - public UnknowComponent() { - super("programming error: unknown component!! please contact [email protected]"); - } - - public View getView() { - return this; - } - -} Added: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionSndToolbar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionSndToolbar.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionSndToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,7 @@ +package org.ourproject.kune.platf.client.ui.rte; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; + +public interface RTEActionSndToolbar extends ActionToolbar<Object> { + +} \ No newline at end of file Added: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionSndToolbarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionSndToolbarPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionSndToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,12 @@ +package org.ourproject.kune.platf.client.ui.rte; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView; + +public class RTEActionSndToolbarPresenter extends ActionToolbarPresenter<Object> implements RTEActionSndToolbar { + + public RTEActionSndToolbarPresenter(ActionToolbarView<Object> toolbar) { + super(toolbar); + } + +} \ No newline at end of file Added: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionTopToolbar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionTopToolbar.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionTopToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,7 @@ +package org.ourproject.kune.platf.client.ui.rte; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; + +public interface RTEActionTopToolbar extends ActionToolbar<Object> { + +} \ No newline at end of file Added: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionTopToolbarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionTopToolbarPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEActionTopToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,12 @@ +package org.ourproject.kune.platf.client.ui.rte; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView; + +public class RTEActionTopToolbarPresenter extends ActionToolbarPresenter<Object> implements RTEActionTopToolbar { + + public RTEActionTopToolbarPresenter(ActionToolbarView<Object> toolbar) { + super(toolbar); + } + +} \ No newline at end of file Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditor.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditor.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditor.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -3,19 +3,21 @@ import org.ourproject.kune.platf.client.View; import org.ourproject.kune.platf.client.actions.ActionCollection; import org.ourproject.kune.platf.client.actions.ActionDescriptor; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; import org.ourproject.kune.platf.client.dto.AccessRolDTO; +import org.ourproject.kune.platf.client.ui.rte.RTEditorPresenter.ActionPosition; public interface RTEditor { - void addBasicAction(ActionDescriptor<Object> action); + void addAction(ActionDescriptor<Object> action, boolean basic, ActionPosition position); - void addBasicActions(ActionCollection<Object> actions); + void addActions(ActionCollection<Object> actions, boolean basic, ActionPosition position); - void addExtendedAction(ActionDescriptor<Object> action); + void editContent(String content); - void addExtendedActions(ActionCollection<Object> actions); + ActionToolbar<Object> getSndBar(); - void editContent(String content); + ActionToolbar<Object> getTopBar(); View getView(); Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorPanel.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorPanel.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,9 +1,15 @@ package org.ourproject.kune.platf.client.ui.rte; import java.util.Date; +import java.util.HashMap; -import org.ourproject.kune.platf.client.actions.ActionCollection; +import org.ourproject.kune.platf.client.actions.ActionDescriptor; +import org.ourproject.kune.platf.client.actions.ActionItem; +import org.ourproject.kune.platf.client.actions.ActionItemCollection; +import org.ourproject.kune.platf.client.actions.ActionManager; +import org.ourproject.kune.platf.client.actions.ActionShortcut; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; +import org.ourproject.kune.platf.client.ui.noti.NotifyUser; import org.ourproject.kune.platf.client.ui.rte.RichTextArea.BasicFormatter; import org.ourproject.kune.platf.client.ui.rte.RichTextArea.ExtendedFormatter; import org.ourproject.kune.platf.client.ui.rte.RichTextArea.FontSize; @@ -13,6 +19,7 @@ import com.google.gwt.dom.client.Element; import com.google.gwt.libideas.client.StyleInjector; import com.google.gwt.user.client.DOM; +import com.google.gwt.user.client.ui.KeyboardListener; import com.google.gwt.user.client.ui.Widget; public class RTEditorPanel implements RTEditorView { @@ -21,19 +28,34 @@ private final RichTextArea rta; private final BasicFormatter basic; private final ExtendedFormatter extended; + private final HashMap<ActionShortcut, ActionItem<Object>> shortcuts; + private final ActionManager actionManager; - public RTEditorPanel(final RTEditorPresenter presenter, I18nUITranslationService i18n) { + public RTEditorPanel(final RTEditorPresenter presenter, I18nUITranslationService i18n, ActionManager actionManager) { this.i18n = i18n; + this.actionManager = actionManager; rta = new RichTextArea(); basic = rta.getBasicFormatter(); extended = rta.getExtendedFormatter(); StyleInjector.injectStylesheet(RTEImgResources.INSTANCE.css().getText()); + shortcuts = new HashMap<ActionShortcut, ActionItem<Object>>(); + createListeners(); } + public void addActions(ActionItemCollection<Object> actionItems) { + for (ActionItem<Object> actionItem : actionItems) { + ActionDescriptor<Object> action = actionItem.getAction(); + if (action.hasShortcut()) { + ActionShortcut shortcut = action.getShortcut(); + shortcuts.put(shortcut, actionItem); + } + } + } + public void addComment(String userName) { String time = i18n.formatDateWithLocale(new Date()); Element span = DOM.createSpan(); - span.setInnerText(i18n.t("type here") + " -" + userName + time); + span.setInnerText(i18n.t("type here") + " -" + userName + " " + time); DOM.setElementAttribute((com.google.gwt.user.client.Element) span, "backgroundColor", "rgb(255,255,215"); // FIXME: addCustomStyle insertHtml(span.getString()); @@ -88,27 +110,27 @@ } public boolean isBold() { - return basic.isBold(); + return rta.isAttached() && basic.isBold(); } public boolean isItalic() { - return basic.isItalic(); + return rta.isAttached() && basic.isItalic(); } public boolean isStrikethrough() { - return extended.isStrikethrough(); + return rta.isAttached() && extended.isStrikethrough(); } public boolean isSubscript() { - return basic.isSubscript(); + return rta.isAttached() && basic.isSubscript(); } public boolean isSuperscript() { - return basic.isSuperscript(); + return rta.isAttached() && basic.isSuperscript(); } public boolean isUnderlined() { - return basic.isUnderlined(); + return rta.isAttached() && basic.isUnderlined(); } public void justifyCenter() { @@ -147,10 +169,6 @@ basic.selectAll(); } - public void setActions(ActionCollection<Object> actions) { - // TODO Auto-generated method stub - } - public void setFontName(String name) { basic.setFontName(name); } @@ -216,4 +234,34 @@ public void unlink() { extended.removeLink(); } + + private void createListeners() { + rta.addKeyboardListener(new KeyboardListener() { + public void onKeyDown(final Widget sender, final char keyCode, final int modifiers) { + } + + public void onKeyPress(final Widget sender, final char keyCode, final int modifiers) { + } + + public void onKeyUp(final Widget sender, final char keyCode, final int modifiers) { + if (sender == rta) { + // We use the RichTextArea's onKeyUp event to update the + // toolbar status. + // This will catch any cases where the user moves the cursor + // using the keyboard, or uses one of the browser's built-in + // keyboard shortcuts. + + // updateStatus(); + // fireEdit(); + if (modifiers != 0) { + ActionItem<Object> actionItem = shortcuts.get(new ActionShortcut(keyCode, modifiers)); + if (actionItem != null) { + NotifyUser.info("Shortcut"); + actionManager.doAction(actionItem); + } + } + } + } + }); + } } Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -4,12 +4,14 @@ import org.ourproject.kune.platf.client.actions.ActionCollection; import org.ourproject.kune.platf.client.actions.ActionDescriptor; import org.ourproject.kune.platf.client.actions.ActionEnableCondition; +import org.ourproject.kune.platf.client.actions.ActionItem; +import org.ourproject.kune.platf.client.actions.ActionItemCollection; import org.ourproject.kune.platf.client.actions.ActionPressedCondition; import org.ourproject.kune.platf.client.actions.ActionShortcut; import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarPosition; import org.ourproject.kune.platf.client.actions.ActionToolbarPushButtonDescriptor; -import org.ourproject.kune.platf.client.actions.ContentEditorActionRegistry; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; import org.ourproject.kune.platf.client.dto.AccessRolDTO; import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import org.ourproject.kune.platf.client.state.Session; @@ -17,9 +19,14 @@ import org.ourproject.kune.platf.client.ui.rte.img.RTEImgResources; import com.calclab.suco.client.events.Listener0; +import com.google.gwt.libideas.resources.client.ImageResource; public class RTEditorPresenter implements RTEditor { + public enum ActionPosition { + top, snd + }; + private static final String EDIT_MENU = "Edit"; private static final String INSERT_MENU = "Insert"; private RTEditorView view; @@ -27,39 +34,77 @@ private AccessRolDTO accessRol; private final I18nTranslationService i18n; private final Session session; - private final ActionCollection<Object> extendedActions; - private final ActionCollection<Object> basicActions; + private final ActionItemCollection<Object> basicTopActions; + private final ActionItemCollection<Object> basicSndActions; + private final ActionItemCollection<Object> extendedTopActions; + private final ActionItemCollection<Object> extendedSndActions; private final RTEImgResources imgResources; + private final RTEActionTopToolbar topBar; + private final RTEActionSndToolbar sndBar; - public RTEditorPresenter(ContentEditorActionRegistry contentEditorActionRegistry, I18nTranslationService i18n, - Session session, RTEImgResources imgResources) { + public RTEditorPresenter(I18nTranslationService i18n, Session session, RTEActionTopToolbar topBar, + RTEActionSndToolbar sndBar, RTEImgResources imgResources) { this.i18n = i18n; this.session = session; + this.topBar = topBar; + this.sndBar = sndBar; + sndBar.attach(); this.imgResources = imgResources; extended = true; accessRol = AccessRolDTO.Editor; - extendedActions = createDefExtendedActions(); - basicActions = createDefBasicActions(); + basicTopActions = new ActionItemCollection<Object>(); + basicSndActions = new ActionItemCollection<Object>(); + extendedTopActions = new ActionItemCollection<Object>(); + extendedSndActions = new ActionItemCollection<Object>(); } - public void addBasicAction(ActionDescriptor<Object> action) { - basicActions.add(action); + public void addAction(ActionDescriptor<Object> action, boolean basic, ActionPosition position) { + switch (position) { + case top: + if (basic) { + basicTopActions.add(withNoItem(action)); + } else { + extendedTopActions.add(withNoItem(action)); + } + break; + case snd: + if (basic) { + basicSndActions.add(withNoItem(action)); + } else { + extendedSndActions.add(withNoItem(action)); + } + break; + } } - public void addBasicActions(ActionCollection<Object> actions) { - basicActions.addAll(actions); + public void addActions(ActionCollection<Object> actions, boolean basic, ActionPosition position) { + switch (position) { + case top: + if (basic) { + basicTopActions.addAll(withNoItem(actions)); + } else { + extendedTopActions.addAll(withNoItem(actions)); + } + break; + case snd: + if (basic) { + basicSndActions.addAll(withNoItem(actions)); + } else { + extendedSndActions.addAll(withNoItem(actions)); + } + break; + } } - public void addExtendedAction(ActionDescriptor<Object> action) { - extendedActions.add(action); + public void editContent(String content) { } - public void addExtendedActions(ActionCollection<Object> actions) { - extendedActions.addAll(actions); + public ActionToolbar<Object> getSndBar() { + return sndBar; } - public void editContent(String content) { - view.setActions(extendedActions); + public ActionToolbar<Object> getTopBar() { + return topBar; } public View getView() { @@ -68,6 +113,18 @@ public void init(RTEditorView view) { this.view = view; + createDefBasicActions(); + topBar.addActions(basicTopActions); + sndBar.addActions(basicSndActions); + view.addActions(basicTopActions); + view.addActions(basicSndActions); + if (isExtended()) { + createDefExtendedActions(); + view.addActions(extendedTopActions); + view.addActions(extendedSndActions); + topBar.addActions(extendedTopActions); + sndBar.addActions(extendedSndActions); + } } public void setAccessRol(AccessRolDTO accessRol) { @@ -78,9 +135,7 @@ this.extended = extended; } - private ActionCollection<Object> createDefBasicActions() { - ActionCollection<Object> actions = new ActionCollection<Object>(); - + private void createDefBasicActions() { ActionToolbarMenuDescriptor<Object> selectAll = new ActionToolbarMenuDescriptor<Object>(accessRol, ActionToolbarPosition.topbar, new Listener0() { public void onEvent() { @@ -97,13 +152,14 @@ view.toggleBold(); } }); - bold.setIconCls(imgResources.bold().getName()); + bold.setIconCls(getCssName(imgResources.bold())); bold.setToolTip(i18n.t("Toggle Bold")); bold.setMustInitialyPressed(new ActionPressedCondition<Object>() { public boolean mustBePressed(Object param) { return view.isBold(); } }); + bold.setShortcut(new ActionShortcut(true, 'B')); ActionToolbarPushButtonDescriptor<Object> italic = new ActionToolbarPushButtonDescriptor<Object>(accessRol, ActionToolbarPosition.topbar, new Listener0() { @@ -111,13 +167,14 @@ view.toggleItalic(); } }); - italic.setIconCls(imgResources.italic().getName()); + italic.setIconCls(getCssName(imgResources.italic())); italic.setToolTip(i18n.t("Toggle Italic")); italic.setMustInitialyPressed(new ActionPressedCondition<Object>() { public boolean mustBePressed(Object param) { return view.isItalic(); } }); + italic.setShortcut(new ActionShortcut(true, 'I')); ActionToolbarPushButtonDescriptor<Object> underline = new ActionToolbarPushButtonDescriptor<Object>(accessRol, ActionToolbarPosition.topbar, new Listener0() { @@ -133,17 +190,13 @@ } }); - actions.add(bold); - actions.add(italic); - actions.add(underline); - actions.add(selectAll); - - return actions; + basicTopActions.add(withNoItem(selectAll)); + basicSndActions.add(withNoItem(bold)); + basicSndActions.add(withNoItem(italic)); + basicSndActions.add(withNoItem(underline)); } - private ActionCollection<Object> createDefExtendedActions() { - ActionCollection<Object> actions = new ActionCollection<Object>(); - + private void createDefExtendedActions() { ActionToolbarMenuDescriptor<Object> undo = new ActionToolbarMenuDescriptor<Object>(accessRol, ActionToolbarPosition.topbar, new Listener0() { public void onEvent() { @@ -209,6 +262,11 @@ view.addComment(session.getCurrentUser().getShortName()); } }); + comment.setEnableCondition(new ActionEnableCondition<Object>() { + public boolean mustBeEnabled(Object param) { + return session.isLogged(); + } + }); comment.setShortcut(new ActionShortcut(true, 'M')); comment.setTextDescription(i18n.t("Comment...")); comment.setParentMenuTitle(i18n.t(INSERT_MENU)); @@ -220,10 +278,8 @@ view.insertHorizontalRule(); } }); - hr.setShortcut(new ActionShortcut(true, 'M')); hr.setTextDescription(i18n.t("Horizontal line")); hr.setParentMenuTitle(i18n.t(INSERT_MENU)); - hr.setEnableCondition(isExtended()); ActionToolbarPushButtonDescriptor<Object> strikethrough = new ActionToolbarPushButtonDescriptor<Object>( accessRol, ActionToolbarPosition.topbar, new Listener0() { @@ -231,7 +287,7 @@ view.toggleStrikethrough(); } }); - strikethrough.setIconCls(imgResources.strikeout().getName()); + strikethrough.setIconCls(getCssName(imgResources.strikeout())); strikethrough.setToolTip(i18n.t("Toggle Strikethrough")); strikethrough.setMustInitialyPressed(new ActionPressedCondition<Object>() { public boolean mustBePressed(Object param) { @@ -239,25 +295,23 @@ } }); - actions.add(undo); - actions.add(redo); - actions.add(copy); - actions.add(cut); - actions.add(paste); - actions.add(editHtml); - actions.add(comment); - actions.add(hr); - actions.add(strikethrough); + extendedTopActions.add(withNoItem(undo)); + extendedTopActions.add(withNoItem(redo)); + extendedTopActions.add(withNoItem(copy)); + extendedTopActions.add(withNoItem(cut)); + extendedTopActions.add(withNoItem(paste)); + extendedTopActions.add(withNoItem(editHtml)); + extendedTopActions.add(withNoItem(hr)); + extendedTopActions.add(withNoItem(comment)); + extendedSndActions.add(withNoItem(strikethrough)); + } - return actions; + private String getCssName(ImageResource imageResource) { + return ".k-rte-" + imageResource.getName(); } - private ActionEnableCondition<Object> isExtended() { - return new ActionEnableCondition<Object>() { - public boolean mustBeEnabled(Object param) { - return extended && view.canBeExtended(); - } - }; + private boolean isExtended() { + return extended && view.canBeExtended(); } private ActionEnableCondition<Object> isInsertHtmlSupported() { @@ -267,4 +321,17 @@ } }; } + + private ActionItemCollection<Object> withNoItem(ActionCollection<Object> actions) { + ActionItemCollection<Object> collection = new ActionItemCollection<Object>(); + for (ActionDescriptor<Object> action : actions) { + // this action don't have a associated item + collection.add(withNoItem(action)); + } + return collection; + } + + private ActionItem<Object> withNoItem(ActionDescriptor<Object> action) { + return new ActionItem<Object>(action, null); + } } Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorView.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/RTEditorView.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,10 +1,12 @@ package org.ourproject.kune.platf.client.ui.rte; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.actions.ActionCollection; +import org.ourproject.kune.platf.client.actions.ActionItemCollection; public interface RTEditorView extends View { + void addActions(ActionItemCollection<Object> extendedTopActions); + void addComment(String userName); boolean canBeExtended(); @@ -57,8 +59,6 @@ void selectAll(); - void setActions(ActionCollection<Object> actions); - void setFontName(String name); void setFontSize(int size); Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/TestRTEDialog.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/TestRTEDialog.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/TestRTEDialog.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -1,12 +1,21 @@ package org.ourproject.kune.platf.client.ui.rte; +import org.ourproject.kune.platf.client.actions.ActionToolbarPosition; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel; import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog; +import com.google.gwt.user.client.ui.VerticalPanel; + public class TestRTEDialog { public TestRTEDialog(RTEditor editor) { BasicDialog dialog = new BasicDialog("Testing RTE", false); - dialog.add(((RTEditorPanel) editor.getView()).getRTE()); + VerticalPanel vp = new VerticalPanel(); + + vp.add(((ActionToolbarPanel<Object>) editor.getTopBar().getView()).getToolbar(ActionToolbarPosition.topbar)); + vp.add(((ActionToolbarPanel<Object>) editor.getSndBar().getView()).getToolbar(ActionToolbarPosition.topbar)); + vp.add(((RTEditorPanel) editor.getView()).getRTE()); + dialog.add(vp); dialog.show(); } } Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -24,8 +24,6 @@ import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_UPLOADEDFILE; import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_WIKIPAGE; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; import org.ourproject.kune.platf.client.rpc.ContentServiceAsync; import org.ourproject.kune.platf.client.rpc.GroupServiceAsync; @@ -36,7 +34,9 @@ import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; import org.ourproject.kune.wiki.client.cnt.WikiViewer; import org.ourproject.kune.workspace.client.AbstractFoldableContentActions; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; 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.TextEditor; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -19,9 +19,6 @@ \*/ package org.ourproject.kune.wiki.client; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.app.ToolGroup; import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; @@ -43,7 +40,10 @@ import org.ourproject.kune.wiki.client.cnt.WikiViewerView; import org.ourproject.kune.wiki.client.ctx.WikiContext; import org.ourproject.kune.wiki.client.ctx.WikiContextPresenter; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; 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.TextEditor; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -20,7 +20,6 @@ package org.ourproject.kune.wiki.client.cnt; import org.ourproject.kune.platf.client.actions.ActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.dto.ContainerDTO; import org.ourproject.kune.platf.client.dto.StateContainerDTO; import org.ourproject.kune.platf.client.dto.StateToken; @@ -29,6 +28,7 @@ import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.wiki.client.WikiClientTool; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; import com.calclab.suco.client.ioc.Provider; Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -19,14 +19,14 @@ */ package org.ourproject.kune.wiki.client.cnt; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.dto.StateContentDTO; import org.ourproject.kune.platf.client.i18n.I18nUITranslationService; import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.wiki.client.WikiClientTool; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter; import com.calclab.suco.client.ioc.Provider; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -30,8 +30,6 @@ import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarPosition; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; import org.ourproject.kune.platf.client.actions.RadioMustBeChecked; import org.ourproject.kune.platf.client.dto.AccessRolDTO; import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO; @@ -54,8 +52,10 @@ import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.ui.noti.NotifyUser; import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; import org.ourproject.kune.workspace.client.cnt.FoldableContent; 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.TextEditor; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/KuneRegistryModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/KuneRegistryModule.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/KuneRegistryModule.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -19,12 +19,6 @@ */ package org.ourproject.kune.workspace.client; -import org.ourproject.kune.platf.client.actions.ContentActionRegistry; -import org.ourproject.kune.platf.client.actions.ContentEditorActionRegistry; -import org.ourproject.kune.platf.client.actions.ContentIconsRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; -import org.ourproject.kune.platf.client.actions.GroupActionRegistry; -import org.ourproject.kune.platf.client.actions.UserActionRegistry; import org.ourproject.kune.platf.client.registry.AclEditableRegistry; import org.ourproject.kune.platf.client.registry.AuthorableRegistry; import org.ourproject.kune.platf.client.registry.CanBeHomepageRegistry; @@ -42,6 +36,11 @@ import org.ourproject.kune.platf.client.registry.VersionableRegistry; import org.ourproject.kune.platf.client.registry.XmppComentableRegistry; import org.ourproject.kune.platf.client.registry.XmppNotifyCapableRegistry; +import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry; +import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry; +import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry; +import org.ourproject.kune.workspace.client.socialnet.GroupActionRegistry; +import org.ourproject.kune.workspace.client.socialnet.UserActionRegistry; import com.calclab.suco.client.ioc.decorator.Singleton; import com.calclab.suco.client.ioc.module.AbstractModule; @@ -189,13 +188,6 @@ } }); - register(Singleton.class, new Factory<ContentEditorActionRegistry>(ContentEditorActionRegistry.class) { - @Override - public ContentEditorActionRegistry create() { - return new ContentEditorActionRegistry(); - } - }); - register(Singleton.class, new Factory<ContentActionRegistry>(ContentActionRegistry.class) { @Override public ContentActionRegistry create() { Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/KuneWorkspaceModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/KuneWorkspaceModule.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/KuneWorkspaceModule.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -21,20 +21,6 @@ import org.ourproject.kune.chat.client.ChatEngine; import org.ourproject.kune.platf.client.actions.ActionManager; -import org.ourproject.kune.platf.client.actions.ContentIconsRegistry; -import org.ourproject.kune.platf.client.actions.ContextActionRegistry; -import org.ourproject.kune.platf.client.actions.GroupActionRegistry; -import org.ourproject.kune.platf.client.actions.UserActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionBuddiesSummaryToolbar; -import org.ourproject.kune.platf.client.actions.toolbar.ActionBuddiesSummaryToolbarPresenter; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbarPresenter; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContextToolbar; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContextToolbarPresenter; -import org.ourproject.kune.platf.client.actions.toolbar.ActionGroupSummaryToolbar; -import org.ourproject.kune.platf.client.actions.toolbar.ActionGroupSummaryToolbarPresenter; -import org.ourproject.kune.platf.client.actions.toolbar.ActionParticipationSummaryToolbarPresenter; -import org.ourproject.kune.platf.client.actions.toolbar.ActionParticipationToolbar; import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel; import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter; @@ -64,9 +50,15 @@ import org.ourproject.kune.platf.client.ui.noti.NotifyUser; import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalette; import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar; +import org.ourproject.kune.workspace.client.cnt.ActionContentToolbarPresenter; +import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry; import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator; import org.ourproject.kune.workspace.client.ctxnav.ContextNavigatorPanel; import org.ourproject.kune.workspace.client.ctxnav.ContextNavigatorPresenter; +import org.ourproject.kune.workspace.client.cxt.ActionContextToolbar; +import org.ourproject.kune.workspace.client.cxt.ActionContextToolbarPresenter; +import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry; import org.ourproject.kune.workspace.client.cxt.ContextPropEditor; import org.ourproject.kune.workspace.client.cxt.ContextPropEditorPanel; import org.ourproject.kune.workspace.client.cxt.ContextPropEditorPresenter; @@ -195,6 +187,7 @@ import org.ourproject.kune.workspace.client.socialnet.BuddiesSummary; import org.ourproject.kune.workspace.client.socialnet.BuddiesSummaryPanel; import org.ourproject.kune.workspace.client.socialnet.BuddiesSummaryPresenter; +import org.ourproject.kune.workspace.client.socialnet.GroupActionRegistry; import org.ourproject.kune.workspace.client.socialnet.GroupMembersSummary; import org.ourproject.kune.workspace.client.socialnet.GroupMembersSummaryPanel; import org.ourproject.kune.workspace.client.socialnet.GroupMembersSummaryPresenter; @@ -203,9 +196,16 @@ import org.ourproject.kune.workspace.client.socialnet.ParticipationSummaryPanel; import org.ourproject.kune.workspace.client.socialnet.ParticipationSummaryPresenter; import org.ourproject.kune.workspace.client.socialnet.ParticipationSummaryView; +import org.ourproject.kune.workspace.client.socialnet.UserActionRegistry; import org.ourproject.kune.workspace.client.socialnet.other.AddAsBuddie; import org.ourproject.kune.workspace.client.socialnet.other.AddAsBuddiePanel; import org.ourproject.kune.workspace.client.socialnet.other.AddAsBuddiePresenter; +import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionBuddiesSummaryToolbar; +import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionBuddiesSummaryToolbarPresenter; +import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionGroupSummaryToolbar; +import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionGroupSummaryToolbarPresenter; +import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionParticipationSummaryToolbarPresenter; +import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionParticipationToolbar; import org.ourproject.kune.workspace.client.tags.TagsSummary; import org.ourproject.kune.workspace.client.tags.TagsSummaryPanel; import org.ourproject.kune.workspace.client.tags.TagsSummaryPresenter; @@ -480,14 +480,16 @@ register(Singleton.class, new Factory<ActionGroupSummaryToolbar>(ActionGroupSummaryToolbar.class) { @Override public ActionGroupSummaryToolbar create() { - final ActionToolbarPanel<StateToken> panel = new ActionToolbarPanel<StateToken>($$(ActionManager.class)); + final ActionToolbarPanel<StateToken> panel = new ActionToolbarPanel<StateToken>( + $$(ActionManager.class), $(I18nTranslationService.class)); final ActionGroupSummaryToolbarPresenter toolbar = new ActionGroupSummaryToolbarPresenter(panel); return toolbar; } }, new Factory<ActionParticipationToolbar>(ActionParticipationToolbar.class) { @Override public ActionParticipationToolbar create() { - final ActionToolbarPanel<StateToken> panel = new ActionToolbarPanel<StateToken>($$(ActionManager.class)); + final ActionToolbarPanel<StateToken> panel = new ActionToolbarPanel<StateToken>( + $$(ActionManager.class), $(I18nTranslationService.class)); final ActionParticipationSummaryToolbarPresenter toolbar = new ActionParticipationSummaryToolbarPresenter( panel); return toolbar; @@ -496,7 +498,7 @@ @Override public ActionBuddiesSummaryToolbar create() { final ActionToolbarPanel<UserSimpleDTO> panel = new ActionToolbarPanel<UserSimpleDTO>( - $$(ActionManager.class)); + $$(ActionManager.class), $(I18nTranslationService.class)); final ActionBuddiesSummaryToolbarPresenter toolbar = new ActionBuddiesSummaryToolbarPresenter(panel); return toolbar; } @@ -867,7 +869,8 @@ @Override public TextEditor create() { final ActionCntCtxToolbarPanel<StateToken> contentNavigatorToolbar = new ActionCntCtxToolbarPanel<StateToken>( - ActionCntCtxToolbarPanel.Position.content, $$(ActionManager.class), $(WorkspaceSkeleton.class)); + ActionCntCtxToolbarPanel.Position.content, $$(ActionManager.class), $(WorkspaceSkeleton.class), + $(I18nTranslationService.class)); final ActionToolbar<StateToken> toolbar = new ActionToolbarPresenter<StateToken>( contentNavigatorToolbar); @@ -921,7 +924,8 @@ @Override public ActionContentToolbar create() { final ActionCntCtxToolbarPanel<StateToken> contentNavigatorToolbar = new ActionCntCtxToolbarPanel<StateToken>( - ActionCntCtxToolbarPanel.Position.content, $$(ActionManager.class), $(WorkspaceSkeleton.class)); + ActionCntCtxToolbarPanel.Position.content, $$(ActionManager.class), $(WorkspaceSkeleton.class), + $(I18nTranslationService.class)); final ActionContentToolbar toolbar = new ActionContentToolbarPresenter(contentNavigatorToolbar); return toolbar; } @@ -931,7 +935,8 @@ @Override public ActionContextToolbar create() { final ActionCntCtxToolbarPanel<StateToken> contentNavigatorToolbar = new ActionCntCtxToolbarPanel<StateToken>( - ActionCntCtxToolbarPanel.Position.context, $$(ActionManager.class), $(WorkspaceSkeleton.class)); + ActionCntCtxToolbarPanel.Position.context, $$(ActionManager.class), $(WorkspaceSkeleton.class), + $(I18nTranslationService.class)); final ActionContextToolbar toolbar = new ActionContextToolbarPresenter(contentNavigatorToolbar); return toolbar; } Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ActionContentToolbar.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbar.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbar.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ActionContentToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,27 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.cnt; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; +import org.ourproject.kune.platf.client.dto.StateToken; + +public interface ActionContentToolbar extends ActionToolbar<StateToken> { + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ActionContentToolbarPresenter.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbarPresenter.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContentToolbarPresenter.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ActionContentToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,32 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.cnt; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView; +import org.ourproject.kune.platf.client.dto.StateToken; + +public class ActionContentToolbarPresenter extends ActionToolbarPresenter<StateToken> implements ActionContentToolbar { + + public ActionContentToolbarPresenter(ActionToolbarView<StateToken> toolbar) { + super(toolbar); + } + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentActionRegistry.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentActionRegistry.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentActionRegistry.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentActionRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,26 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.cnt; + +import org.ourproject.kune.platf.client.actions.ActionRegistry; +import org.ourproject.kune.platf.client.dto.StateToken; + +public class ContentActionRegistry extends ActionRegistry<StateToken> { +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentIconsRegistry.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistry.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistry.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/ContentIconsRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,78 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.cnt; + +import java.util.HashMap; + +import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO; + +public class ContentIconsRegistry { + private final HashMap<String, String> contentTypesIcons; + + public ContentIconsRegistry() { + contentTypesIcons = new HashMap<String, String>(); + } + + public String getContentTypeIcon(final String typeId) { + final String icon = contentTypesIcons.get(typeId); + return icon == null ? "" : 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 String getContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType) { + String icon = getContentTypeIcon(concatenate(typeId, mimeType)); + if (icon.equals("")) { + 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.equals("") ? getContentTypeIcon(typeId) : icon; + } + + public void registerContentTypeIcon(final String typeId, final BasicMimeTypeDTO mimeType, final String iconUrl) { + registerContentTypeIcon(concatenate(typeId, mimeType), iconUrl); + } + + public void registerContentTypeIcon(final String contentTypeId, final String iconUrl) { + contentTypesIcons.put(contentTypeId, iconUrl); + } + + private String concatenate(final String typeId, final BasicMimeTypeDTO mimeType) { + if (mimeType != null) { + return typeId + "|" + mimeType; + } else { + return typeId; + } + } +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -21,7 +21,6 @@ import org.ourproject.kune.platf.client.actions.ActionItemCollection; import org.ourproject.kune.platf.client.actions.ActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionContentToolbar; import org.ourproject.kune.platf.client.dto.AccessRightsDTO; import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO; import org.ourproject.kune.platf.client.dto.StateAbstractDTO; @@ -139,7 +138,7 @@ private void setToolbar(ActionItemCollection<StateToken> collection) { toolbar.disableMenusAndClearButtons(); - toolbar.setActions(collection); + toolbar.addActions(collection); toolbar.attach(); } 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 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -25,7 +25,6 @@ import org.ourproject.kune.platf.client.actions.ActionItemCollection; import org.ourproject.kune.platf.client.actions.ActionRegistry; -import org.ourproject.kune.platf.client.actions.ContentIconsRegistry; import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; import org.ourproject.kune.platf.client.dto.AccessRightsDTO; import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO; @@ -45,6 +44,7 @@ import org.ourproject.kune.platf.client.ui.KuneUiUtils; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.ui.download.ImageSize; +import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry; import org.ourproject.kune.workspace.client.title.RenameAction; import org.ourproject.kune.workspace.client.upload.FileUploader; @@ -140,7 +140,7 @@ public void selectItem(final StateToken stateToken) { view.selectItem(genId(stateToken)); toolbar.disableMenusAndClearButtons(); - toolbar.setActions(actionsByItem.get(stateToken)); + toolbar.addActions(actionsByItem.get(stateToken)); } public void setEditOnNextStateChange(final boolean edit) { Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextToolbar.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbar.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbar.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,27 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.cxt; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; +import org.ourproject.kune.platf.client.dto.StateToken; + +public interface ActionContextToolbar extends ActionToolbar<StateToken> { + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextToolbarPresenter.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbarPresenter.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionContextToolbarPresenter.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ActionContextToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,32 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.cxt; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView; +import org.ourproject.kune.platf.client.dto.StateToken; + +public class ActionContextToolbarPresenter extends ActionToolbarPresenter<StateToken> implements ActionContextToolbar { + + public ActionContextToolbarPresenter(ActionToolbarView<StateToken> toolbar) { + super(toolbar); + } + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextActionRegistry.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContextActionRegistry.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ContextActionRegistry.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextActionRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,26 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.cxt; + +import org.ourproject.kune.platf.client.actions.ActionRegistry; +import org.ourproject.kune.platf.client.dto.StateToken; + +public class ContextActionRegistry extends ActionRegistry<StateToken> { +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -200,7 +200,7 @@ final ActionItemCollection<StateToken> collection = new ActionItemCollection<StateToken>(); collection.add(new ActionItem<StateToken>(save, null)); collection.add(new ActionItem<StateToken>(close, null)); - toolbar.setActions(collection); + toolbar.addActions(collection); } private void reset() { Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/hello/HelloWorldModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/hello/HelloWorldModule.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/hello/HelloWorldModule.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -22,13 +22,13 @@ import org.ourproject.kune.platf.client.View; import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarPosition; -import org.ourproject.kune.platf.client.actions.UserActionRegistry; import org.ourproject.kune.platf.client.dto.AccessRolDTO; import org.ourproject.kune.platf.client.dto.UserSimpleDTO; import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import org.ourproject.kune.platf.client.i18n.I18nTranslationServiceMocked; import org.ourproject.kune.platf.client.ui.noti.NotifyUser; import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; +import org.ourproject.kune.workspace.client.socialnet.UserActionRegistry; import com.allen_sauer.gwt.log.client.Log; import com.calclab.suco.client.events.Listener; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/skel/ActionCntCtxToolbarPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/skel/ActionCntCtxToolbarPanel.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/skel/ActionCntCtxToolbarPanel.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -21,6 +21,7 @@ import org.ourproject.kune.platf.client.actions.ActionManager; import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel; +import org.ourproject.kune.platf.client.i18n.I18nTranslationService; import com.calclab.suco.client.ioc.Provider; @@ -34,8 +35,8 @@ private final WorkspaceSkeleton ws; public ActionCntCtxToolbarPanel(final Position position, final Provider<ActionManager> actionManagerProvider, - final WorkspaceSkeleton ws) { - super(actionManagerProvider); + final WorkspaceSkeleton ws, I18nTranslationService i18n) { + super(actionManagerProvider, i18n); this.position = position; this.ws = ws; } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -28,10 +28,7 @@ import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarPosition; -import org.ourproject.kune.platf.client.actions.GroupActionRegistry; import org.ourproject.kune.platf.client.actions.RadioMustBeChecked; -import org.ourproject.kune.platf.client.actions.UserActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionBuddiesSummaryToolbar; import org.ourproject.kune.platf.client.dto.AccessRightsDTO; import org.ourproject.kune.platf.client.dto.AccessRolDTO; import org.ourproject.kune.platf.client.dto.SocialNetworkDataDTO; @@ -48,6 +45,7 @@ import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.ui.noti.NotifyUser; +import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionBuddiesSummaryToolbar; import com.calclab.suco.client.events.Listener; import com.calclab.suco.client.ioc.Provider; @@ -135,7 +133,7 @@ } } toolbar.disableMenusAndClearButtons(); - toolbar.setActions(actionRegistry.getCurrentActions(session.getCurrentUser(), session.isLogged(), + toolbar.addActions(actionRegistry.getCurrentActions(session.getCurrentUser(), session.isLogged(), state.getGroupRights(), true)); toolbar.attach(); view.show(); Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupActionRegistry.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/GroupActionRegistry.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/GroupActionRegistry.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupActionRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -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 org.ourproject.kune.workspace.client.socialnet; + +import org.ourproject.kune.platf.client.actions.ActionRegistry; +import org.ourproject.kune.platf.client.dto.StateToken; + +/** + * The Class GroupActionRegistry stores actions over groups (mainly used in SN) + */ +public class GroupActionRegistry extends ActionRegistry<StateToken> { +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -25,9 +25,7 @@ import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarPosition; -import org.ourproject.kune.platf.client.actions.GroupActionRegistry; import org.ourproject.kune.platf.client.actions.RadioMustBeChecked; -import org.ourproject.kune.platf.client.actions.toolbar.ActionGroupSummaryToolbar; import org.ourproject.kune.platf.client.dto.AccessListsDTO; import org.ourproject.kune.platf.client.dto.AccessRightsDTO; import org.ourproject.kune.platf.client.dto.AccessRolDTO; @@ -53,6 +51,7 @@ import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup; import org.ourproject.kune.platf.client.ui.noti.NotifyUser; import org.ourproject.kune.workspace.client.search.GroupLiveSearcher; +import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionGroupSummaryToolbar; import org.ourproject.kune.workspace.client.themes.WsTheme; import org.ourproject.kune.workspace.client.themes.WsThemePresenter; @@ -97,7 +96,7 @@ public void onEvent(StateAbstractDTO state) { setState(state); toolbar.disableMenusAndClearButtons(); - toolbar.setActions(groupActionRegistry.getCurrentActions(state.getGroup().getStateToken(), + toolbar.addActions(groupActionRegistry.getCurrentActions(state.getGroup().getStateToken(), session.isLogged(), state.getGroupRights(), true)); toolbar.attach(); } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -21,8 +21,6 @@ import java.util.List; -import org.ourproject.kune.platf.client.actions.GroupActionRegistry; -import org.ourproject.kune.platf.client.actions.toolbar.ActionParticipationToolbar; import org.ourproject.kune.platf.client.dto.AccessRightsDTO; import org.ourproject.kune.platf.client.dto.GroupDTO; import org.ourproject.kune.platf.client.dto.ParticipationDataDTO; @@ -34,6 +32,7 @@ import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup; +import org.ourproject.kune.workspace.client.socialnet.toolbar.ActionParticipationToolbar; import org.ourproject.kune.workspace.client.themes.WsTheme; import org.ourproject.kune.workspace.client.themes.WsThemePresenter; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -23,7 +23,6 @@ import org.ourproject.kune.platf.client.actions.ActionToolbarButtonDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor; import org.ourproject.kune.platf.client.actions.ActionToolbarPosition; -import org.ourproject.kune.platf.client.actions.GroupActionRegistry; import org.ourproject.kune.platf.client.dto.AccessRightsDTO; import org.ourproject.kune.platf.client.dto.AccessRolDTO; import org.ourproject.kune.platf.client.dto.GroupDTO; Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserActionRegistry.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/UserActionRegistry.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/UserActionRegistry.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserActionRegistry.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,32 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.socialnet; + +import org.ourproject.kune.platf.client.actions.ActionRegistry; +import org.ourproject.kune.platf.client.dto.UserSimpleDTO; + +/** + * The Class UserActionRegistry. + * + * List of actions over a user (initially used for buddies actions) + * + */ +public class UserActionRegistry extends ActionRegistry<UserSimpleDTO> { +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionBuddiesSummaryToolbar.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbar.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbar.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionBuddiesSummaryToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,27 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.socialnet.toolbar; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; +import org.ourproject.kune.platf.client.dto.UserSimpleDTO; + +public interface ActionBuddiesSummaryToolbar extends ActionToolbar<UserSimpleDTO> { + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionBuddiesSummaryToolbarPresenter.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbarPresenter.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionBuddiesSummaryToolbarPresenter.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionBuddiesSummaryToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,33 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.socialnet.toolbar; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView; +import org.ourproject.kune.platf.client.dto.UserSimpleDTO; + +public class ActionBuddiesSummaryToolbarPresenter extends ActionToolbarPresenter<UserSimpleDTO> implements + ActionBuddiesSummaryToolbar { + + public ActionBuddiesSummaryToolbarPresenter(ActionToolbarView<UserSimpleDTO> toolbar) { + super(toolbar); + } + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionGroupSummaryToolbar.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbar.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbar.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionGroupSummaryToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,27 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.socialnet.toolbar; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; +import org.ourproject.kune.platf.client.dto.StateToken; + +public interface ActionGroupSummaryToolbar extends ActionToolbar<StateToken> { + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionGroupSummaryToolbarPresenter.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbarPresenter.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionGroupSummaryToolbarPresenter.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionGroupSummaryToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,32 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.socialnet.toolbar; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView; +import org.ourproject.kune.platf.client.dto.StateToken; + +public class ActionGroupSummaryToolbarPresenter extends ActionToolbarPresenter<StateToken> implements + ActionGroupSummaryToolbar { + + public ActionGroupSummaryToolbarPresenter(ActionToolbarView<StateToken> toolbar) { + super(toolbar); + } +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionParticipationSummaryToolbarPresenter.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationSummaryToolbarPresenter.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationSummaryToolbarPresenter.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionParticipationSummaryToolbarPresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,33 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.socialnet.toolbar; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter; +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView; +import org.ourproject.kune.platf.client.dto.StateToken; + +public class ActionParticipationSummaryToolbarPresenter extends ActionToolbarPresenter<StateToken> implements + ActionParticipationToolbar { + + public ActionParticipationSummaryToolbarPresenter(ActionToolbarView<StateToken> toolbar) { + super(toolbar); + } + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionParticipationToolbar.java (from rev 1053, trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationToolbar.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/actions/toolbar/ActionParticipationToolbar.java 2009-03-02 13:25:37 UTC (rev 1053) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/ActionParticipationToolbar.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -0,0 +1,27 @@ +/* + * + * 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 org.ourproject.kune.workspace.client.socialnet.toolbar; + +import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar; +import org.ourproject.kune.platf.client.dto.StateToken; + +public interface ActionParticipationToolbar extends ActionToolbar<StateToken> { + +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePresenter.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/title/EntityTitlePresenter.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -20,7 +20,6 @@ package org.ourproject.kune.workspace.client.title; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.actions.ContentIconsRegistry; import org.ourproject.kune.platf.client.dto.StateAbstractDTO; import org.ourproject.kune.platf.client.dto.StateContainerDTO; import org.ourproject.kune.platf.client.dto.StateContentDTO; @@ -28,6 +27,7 @@ import org.ourproject.kune.platf.client.registry.RenamableRegistry; import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; +import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry; import com.calclab.suco.client.events.Listener; import com.calclab.suco.client.events.Listener2; Modified: trunk/src/test/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistryTest.java =================================================================== --- trunk/src/test/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistryTest.java 2009-03-02 19:32:02 UTC (rev 1054) +++ trunk/src/test/java/org/ourproject/kune/platf/client/actions/ContentIconsRegistryTest.java 2009-03-03 01:35:36 UTC (rev 1055) @@ -5,6 +5,7 @@ import org.junit.Before; import org.junit.Test; import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO; +import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry; public class ContentIconsRegistryTest {
participants (1)
-
vjrj