[kune-commits] r1243 - in trunk: script src/main/java/cc src/main/java/cc/kune src/main/java/cc/kune/chat/client src/main/java/cc/kune/client src/main/java/cc/kune/common/client src/main/java/cc/kune/common/client/actions src/main/java/cc/kune/common/client/actions/gwtui src/main/java/cc/kune/common/client/actions/gxtui src/main/java/cc/kune/common/client/actions/ui src/main/java/cc/kune/common/client/actions/ui/bind src/main/java/cc/kune/common/client/actions/ui/descrip src/main/java/cc/kune/common/client/noti src/main/java/cc/kune/common/client/ui src/main/java/cc/kune/common/client/utils src/main/java/cc/kune/core/client src/main/java/cc/kune/core/client/auth src/main/java/cc/kune/core/client/errors src/main/java/cc/kune/core/client/groups/newgroup src/main/java/cc/kune/core/client/i18n src/main/java/cc/kune/core/client/notify src/main/java/cc/kune/core/client/notify/confirm src/main/java/cc/kune/core/client/resources src/main/java/cc/kune/core/client/services src/main/java/cc/kune/core/client/sitebar src/main/java/cc/kune/core/client/sn src/main/java/cc/kune/core/client/sn/actions src/main/java/cc/kune/core/client/sn/actions/conditions src/main/java/cc/kune/core/client/sn/actions/registry src/main/java/cc/kune/core/client/state src/main/java/cc/kune/core/client/ui/dialogs src/main/java/cc/kune/core/public src/main/java/cc/kune/gspace/client/resources src/main/java/cc/kune/gspace/public src/main/java/cc/ourproject src/main/java/cc/ourproject/kune src/main/java/cc/ourproject/kune/core src/main/java/cc/ourproject/kune/core/client src/main/java/org/ourproject/kune/app/public/css src/main/java/org/ourproject/kune/blogs/client src/main/java/org/ourproject/kune/blogs/client/cnt src/main/java/org/ourproject/kune/blogs/client/ctx src/main/java/org/ourproject/kune/chat/client/cnt src/main/java/org/ourproject/kune/docs/client src/main/java/org/ourproject/kune/docs/client/cnt src/main/java/org/ourproject/kune/gallery/client src/main/java/org/ourproject/kune/gallery/client/cnt src/main/java/org/ourproject/kune/gallery/client/ctx src/main/java/org/ourproject/kune/platf/client/actions src/main/java/org/ourproject/kune/platf/client/actions/ui src/main/java/org/ourproject/kune/platf/client/services src/main/java/org/ourproject/kune/platf/client/shortcuts src/main/java/org/ourproject/kune/platf/client/ui src/main/java/org/ourproject/kune/platf/client/ui/download src/main/java/org/ourproject/kune/platf/client/ui/rte/basic src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia src/main/java/org/ourproject/kune/platf/client/ui/rte/saving src/main/java/org/ourproject/kune/platf/server/init src/main/java/org/ourproject/kune/platf/server/manager/file src/main/java/org/ourproject/kune/wiki/client src/main/java/org/ourproject/kune/wiki/client/cnt src/main/java/org/ourproject/kune/wiki/client/ctx src/main/java/org/ourproject/kune/workspace/client src/main/java/org/ourproject/kune/workspace/client/cnt src/main/java/org/ourproject/kune/workspace/client/ctxnav src/main/java/org/ourproject/kune/workspace/client/editor src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia src/main/java/org/ourproject/kune/workspace/client/entityheader src/main/java/org/ourproject/kune/workspace/client/entityheader/maxmin src/main/java/org/ourproject/kune/workspace/client/hello src/main/java/org/ourproject/kune/workspace/client/i18n src/main/java/org/ourproject/kune/workspace/client/oldsn src/main/java/org/ourproject/kune/workspace/client/oldsn/other src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar src/main/java/org/ourproject/kune/workspace/client/options src/main/java/org/ourproject/kune/workspace/client/options/logo src/main/java/org/ourproject/kune/workspace/client/options/pscape src/main/java/org/ourproject/kune/workspace/client/search src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu src/main/java/org/ourproject/kune/workspace/client/socialnet src/main/java/org/ourproject/kune/workspace/client/themes src/main/java/org/ourproject/kune/workspace/client/upload src/main/webapp/WEB-INF/publicspace/public/templates/basic src/test/java/org/ourproject/kune/platf/server/manager/file src/test/java/org/ourproject/kune/workspace/client/socialnet
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Thu Feb 10 04:07:30 CET 2011
Author: vjrj_
Date: 2011-02-10 04:07:28 +0100 (Thu, 10 Feb 2011)
New Revision: 1243
Added:
trunk/src/main/java/cc/kune/common/client/actions/ActionCollection.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescProviderCollection.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java
trunk/src/main/java/cc/kune/common/client/ui/BasicThumb.java
trunk/src/main/java/cc/kune/common/client/utils/OnAcceptCallback.java
trunk/src/main/java/cc/kune/core/client/CoreParts.java
trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPanel.java
trunk/src/main/java/cc/kune/core/client/resources/new-chat.gif
trunk/src/main/java/cc/kune/core/client/services/
trunk/src/main/java/cc/kune/core/client/services/FileConstants.java
trunk/src/main/java/cc/kune/core/client/services/FileDownloadUtils.java
trunk/src/main/java/cc/kune/core/client/services/ImageDescriptor.java
trunk/src/main/java/cc/kune/core/client/services/ImageSize.java
trunk/src/main/java/cc/kune/core/client/services/ImageUtils.java
trunk/src/main/java/cc/kune/core/client/sn/
trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPanel.java
trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPanel.ui.xml
trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPresenter.java
trunk/src/main/java/cc/kune/core/client/sn/actions/
trunk/src/main/java/cc/kune/core/client/sn/actions/AcceptJoinGroupAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToAdminAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToCollabAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/DenyJoinGroupAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/GotoGroupAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/GotoMemberAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/RemoveMemberAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithUserAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/UnJoinGroupAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/AdministrableGroupWhenLoggedCondition.java
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/AdministrablePersonWhenLoggedCondition.java
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/GroupWhenLoggedCondition.java
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsAdministrableCondition.java
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsGroupCondition.java
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsPersonCondition.java
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/PersonWhenLoggedCondition.java
trunk/src/main/java/cc/kune/core/client/sn/actions/registry/
trunk/src/main/java/cc/kune/core/client/sn/actions/registry/AbstractSocialNetworActionsRegistry.java
trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNAdminsMenuItemsRegistry.java
trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNCollabsMenuItemsRegistry.java
trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNPendingsMenuItemsRegistry.java
trunk/src/main/java/cc/kune/gspace/public/kune-gspace.css
trunk/src/main/java/cc/ourproject/
trunk/src/main/java/cc/ourproject/kune/
trunk/src/main/java/cc/ourproject/kune/core/
trunk/src/main/java/cc/ourproject/kune/core/client/
trunk/src/main/java/cc/ourproject/kune/core/client/services/
trunk/src/main/java/org/ourproject/kune/platf/client/actions/OldAbstractAction.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/OldGuiActionDescrip.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/OldMenuItemDescriptor.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummary.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupActionRegistry.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummary.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipateAction.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummary.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/RolAction.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/RolComparator.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/SocialNetworkPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UIStatus.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UnjoinButtonAction.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UserActionRegistry.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/other/
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/other/AddAsBuddieHeaderButton.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionBuddiesSummaryToolbar.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionBuddiesSummaryToolbarPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionGroupSummaryToolbar.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionGroupSummaryToolbarPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionParticipationSummaryToolbarPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionParticipationToolbar.java
Removed:
trunk/src/main/java/cc/kune/common/client/noti/AlertEvent.java
trunk/src/main/java/cc/kune/core/client/notify/alerts/
trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmViewImpl2.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractAction.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescrip.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/ImageDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/ImageUtils.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/BasicThumb.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileConstants.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileDownloadUtils.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/ImageSize.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummary.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupActionRegistry.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummary.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipateAction.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummary.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolAction.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolComparator.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UIStatus.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UnjoinAction.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserActionRegistry.java
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/other/
trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/toolbar/
Modified:
trunk/script/css-update.sh
trunk/src/main/java/cc/kune/Kune.gwt.xml
trunk/src/main/java/cc/kune/chat/client/ChatClient.java
trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
trunk/src/main/java/cc/kune/client/KuneGinjector.java
trunk/src/main/java/cc/kune/common/client/SampleEntryPoint.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuSeparatorGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarSeparatorGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuItemGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuSeparatorGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtPushButtonGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtSubMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java
trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractActionExtensiblePresenter.java
trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractChildGuiItem.java
trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractComposedGuiItem.java
trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java
trunk/src/main/java/cc/kune/common/client/actions/ui/ActionExtensibleView.java
trunk/src/main/java/cc/kune/common/client/actions/ui/ActionSimplePanel.java
trunk/src/main/java/cc/kune/common/client/actions/ui/IsActionExtensible.java
trunk/src/main/java/cc/kune/common/client/actions/ui/bind/AbstractGuiBinding.java
trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiBinding.java
trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiChildBinding.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescCollection.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiAddCondition.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiAddConditionAdapter.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuDescriptor.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuItemDescriptor.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/SubMenuDescriptor.java
trunk/src/main/java/cc/kune/common/client/noti/ConfirmAskEvent.java
trunk/src/main/java/cc/kune/common/client/noti/NotifyUser.java
trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java
trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java
trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
trunk/src/main/java/cc/kune/core/client/i18n/I18nReadyEvent.java
trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPresenter.java
trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
trunk/src/main/java/cc/kune/core/client/state/ContentProvider.java
trunk/src/main/java/cc/kune/core/client/state/ContentProviderDefault.java
trunk/src/main/java/cc/kune/core/client/state/HistoryWrapper.java
trunk/src/main/java/cc/kune/core/client/state/HistoryWrapperDefault.java
trunk/src/main/java/cc/kune/core/client/state/Session.java
trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java
trunk/src/main/java/cc/kune/core/client/state/StateManager.java
trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java
trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialogView.java
trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css
trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
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/BlogClientTool.java
trunk/src/main/java/org/ourproject/kune/blogs/client/BlogsMessages.java
trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContent.java
trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentPanel.java
trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentPresenter.java
trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentView.java
trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewer.java
trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerPanel.java
trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerPresenter.java
trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerView.java
trunk/src/main/java/org/ourproject/kune/blogs/client/ctx/BlogContext.java
trunk/src/main/java/org/ourproject/kune/blogs/client/ctx/BlogContextPresenter.java
trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoom.java
trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomPanel.java
trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomPresenter.java
trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomView.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/GalleryClientTool.java
trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryMessages.java
trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContent.java
trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentPanel.java
trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentPresenter.java
trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentView.java
trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewer.java
trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerPanel.java
trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerPresenter.java
trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerView.java
trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContext.java
trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContextPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractExtendedAction.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionCollection.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/InputMap.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractActionExtensiblePresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractComposedGuiItem.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuGui.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractSeparatorDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ActionExtensibleView.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/BaseAction.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/BasicGuiBindings.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ButtonBinding.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ButtonDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescCollection.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiBinding.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiBindingAdapter.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/IsActionExtensible.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuBinding.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuCheckItemDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemBinding.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemGui.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuRadioItemDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuSeparatorBinding.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonBinding.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonDescriptor.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java
trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ToolbarSeparatorBinding.java
trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java
trunk/src/main/java/org/ourproject/kune/platf/client/shortcuts/GlobalShortcutRegister.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTELinkPopup.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditor.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/MediaUtils.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoDownloadManager.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoUploadManager.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManager.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManager.java
trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManagerAbstract.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/WikiClientTool.java
trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java
trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContent.java
trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPanel.java
trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPresenter.java
trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentView.java
trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewer.java
trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPanel.java
trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPresenter.java
trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerView.java
trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContext.java
trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContextPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
trunk/src/main/java/org/ourproject/kune/workspace/client/ActionsModule.java
trunk/src/main/java/org/ourproject/kune/workspace/client/RegistryModule.java
trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.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/ContentEditorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertMediaLocalPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeader.java
trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/maxmin/MaxMinWorkspacePresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/hello/HelloWorldModule.java
trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/SiteOptionsI18nTranslatorAction.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearchPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcherPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManagerImpl.java
trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelectorPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/upload/AbstractUploader.java
trunk/src/main/webapp/WEB-INF/publicspace/public/templates/basic/basic.css
trunk/src/main/webapp/WEB-INF/publicspace/public/templates/basic/docs.liquid.html
trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java
trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolActionTest.java
trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolComparatorTest.java
Log:
SN Refactorization
Modified: trunk/script/css-update.sh
===================================================================
--- trunk/script/css-update.sh 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/script/css-update.sh 2011-02-10 03:07:28 UTC (rev 1243)
@@ -15,3 +15,5 @@
cp src/main/java/cc/kune/common/public/kune-common.css target/kune-0.0.7/ws/
cp src/main/java/cc/kune/core/public/ws.css target/kune-0.0.7/ws/
cp src/main/java/cc/kune/core/public/ws.html target/kune-0.0.7/ws/
+cp src/main/webapp/templates/basic/basic.css target/kune-0.0.7/templates/basic/basic.css
+cp src/main/webapp/templates/basic/docs.liquid.html target/kune-0.0.7/templates/basic/
Modified: trunk/src/main/java/cc/kune/Kune.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-02-10 03:07:28 UTC (rev 1243)
@@ -25,9 +25,9 @@
<set-property name="gwt.logging.systemHandler" value="ENABLED" />
<set-property name="gwt.logging.simpleRemoteHandler"
value="DISABLED" />
- <!-- Uncomment if you are enabling server side deobfuscation of StackTraces
- <set-property name="compiler.emulatedStack" value="true" /> <set-configuration-property
- name="compiler.emulatedStack.recordLineNumbers" value="true" /> <set-configuration-property
+ <!-- Uncomment if you are enabling server side deobfuscation of StackTraces
+ <set-property name="compiler.emulatedStack" value="true" /> <set-configuration-property
+ name="compiler.emulatedStack.recordLineNumbers" value="true" /> <set-configuration-property
name="compiler.emulatedStack.recordFileNames" value="true" /> -->
<!-- NOTE: this only compiles for chromium/safari ============= -->
<!--http://code.google.com/p/google-web-toolkit/issues/detail?id=42 -->
@@ -40,9 +40,10 @@
<set-configuration-property name="gin.ginjector"
value="cc.kune.client.KuneGinjector" />
<!-- Debugging =============================================== -->
- <!-- for add ensureDebugIds (debugId in UIBinder), remove/comment in production
+ <!-- for add ensureDebugIds (debugId in UIBinder), remove/comment in production
see UIObject.ensureDebugId()) -->
<inherits name="com.google.gwt.user.Debug" />
<!-- Entrypoint =============================================== -->
<entry-point class="cc.kune.client.KuneEntryPoint" />
+ <!-- <entry-point class="cc.kune.common.client.SampleEntryPoint" /> -->
</module>
Modified: trunk/src/main/java/cc/kune/chat/client/ChatClient.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClient.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClient.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -25,9 +25,11 @@
void addNewBuddie(String shortName);
+ void chat(String shortName);
+
void chat(XmppURI jid);
- boolean isBuddie(String localUserName);
+ boolean isBuddie(String shortName);
boolean isBuddie(XmppURI jid);
Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -189,10 +189,15 @@
@Override
public void addNewBuddie(final String shortName) {
- roster.requestAddItem(XmppURI.jid(shortName + "@" + chatOptions.domain), shortName, "");
+ roster.requestAddItem(uriFrom(shortName), shortName, "");
}
@Override
+ public void chat(final String shortName) {
+ chat(uriFrom(shortName));
+ }
+
+ @Override
public void chat(final XmppURI jid) {
chatManager.open(jid);
}
@@ -290,8 +295,8 @@
}
@Override
- public boolean isBuddie(final String localUserName) {
- return isBuddie(XmppURI.jid(localUserName + "@" + chatOptions.domain));
+ public boolean isBuddie(final String shortName) {
+ return isBuddie(uriFrom(shortName));
}
@Override
@@ -375,4 +380,8 @@
private void toggleShowDialog() {
showDialog(popup == null ? true : !popup.isShowing());
}
+
+ private XmppURI uriFrom(final String shortName) {
+ return XmppURI.jid(shortName + "@" + chatOptions.domain);
+ }
}
Modified: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -64,18 +64,19 @@
public void onModuleLoadCont() {
DelayedBindRegistry.bind(ginjector);
AsyncCallbackSimple.init(ginjector.getErrorHandler());
- NotifyUser.init(ginjector.getEventBus());
+ ginjector.getEventLogger();
+ NotifyUser.init(ginjector.getEventBus(), ginjector.getI18n());
ginjector.getCorePresenter().get().forceReveal();
ginjector.getStateManager();
ginjector.getSiteTokenListeners();
- ginjector.getEventLogger();
- ginjector.getI18n();
ginjector.getGxtGuiProvider();
ginjector.getUserNotifierPresenter();
ginjector.getGlobalShortcutRegister();
ginjector.getSpinerPresenter();
+ ginjector.getGroupMembersPresenter();
ginjector.getSiteLogoPresenter();
ginjector.getSpacesTabPresenter();
ginjector.getChatClient();
+ ginjector.getCoreParts();
}
}
Modified: trunk/src/main/java/cc/kune/client/KuneGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -26,17 +26,20 @@
import cc.kune.common.client.actions.ui.bind.GuiProvider;
import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
import cc.kune.core.client.CoreGinModule;
+import cc.kune.core.client.CoreParts;
import cc.kune.core.client.auth.RegisterPresenter;
import cc.kune.core.client.auth.SignInPresenter;
import cc.kune.core.client.cookies.CookiesManager;
import cc.kune.core.client.errors.ErrorHandler;
import cc.kune.core.client.groups.newgroup.NewGroupPresenter;
import cc.kune.core.client.logs.EventBusWithLogging;
+import cc.kune.core.client.notify.confirm.UserConfirmPresenter;
import cc.kune.core.client.notify.msgs.UserNotifierPresenter;
import cc.kune.core.client.notify.spiner.SpinerPresenter;
import cc.kune.core.client.sitebar.SitebarActionsPresenter;
import cc.kune.core.client.sitebar.logo.SiteLogoPresenter;
import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter;
+import cc.kune.core.client.sn.GroupMembersPresenter;
import cc.kune.core.client.state.SiteTokenListeners;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.client.ws.CorePresenter;
@@ -63,6 +66,8 @@
AsyncProvider<CookiesManager> getCookiesManager();
+ CoreParts getCoreParts();
+
Provider<CorePresenter> getCorePresenter();
ErrorHandler getErrorHandler();
@@ -73,6 +78,8 @@
GlobalShortcutRegister getGlobalShortcutRegister();
+ AsyncProvider<GroupMembersPresenter> getGroupMembersPresenter();
+
GuiProvider getGuiProvider();
GwtGuiProvider getGwtGuiProvider();
@@ -103,5 +110,7 @@
StateManager getStateManager();
+ AsyncProvider<UserConfirmPresenter> getUserConfirmPresenter();
+
AsyncProvider<UserNotifierPresenter> getUserNotifierPresenter();
}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/common/client/SampleEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/SampleEntryPoint.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/SampleEntryPoint.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -38,10 +38,14 @@
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
import cc.kune.common.client.notify.SimpleUserMessage;
import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.common.client.ui.BasicThumb;
import cc.kune.common.client.ui.IconLabel;
+import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
@@ -139,6 +143,21 @@
panel.add(view);
panel.add(simpleIconLabel);
+ final BasicThumb thumb = new BasicThumb("http://www.truth-out.org/sites/all/themes/truth/images/logo.gif", 60,
+ "fooo", 5, false, new ClickHandler() {
+
+ @Override
+ public void onClick(final ClickEvent event) {
+ userMsg.show("Testing");
+ }
+ });
+ thumb.setTooltip("kkkkkkK");
+ thumb.setOnOverLabel(true);
+ final LayoutContainer layout = new LayoutContainer();
+ // final QuickTip quickTip = new QuickTip(layout);
+ // quickTip.setInterceptTitles(true);
+ layout.add(thumb);
+ RootPanel.get().add(layout);
RootPanel.get().add(view);
}
}
Added: trunk/src/main/java/cc/kune/common/client/actions/ActionCollection.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ActionCollection.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/actions/ActionCollection.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,9 @@
+package cc.kune.common.client.actions;
+
+import java.util.ArrayList;
+
+public class ActionCollection extends ArrayList<AbstractAction> {
+
+ private static final long serialVersionUID = -3308296009308246636L;
+
+}
Property changes on: trunk/src/main/java/cc/kune/common/client/actions/ActionCollection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -24,8 +24,8 @@
import cc.kune.common.client.actions.KeyStroke;
import cc.kune.common.client.actions.ui.AbstractChildGuiItem;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.ui.IconLabel;
import com.google.gwt.event.dom.client.ClickEvent;
@@ -56,7 +56,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
iconLabel = new IconLabel("");
if (enableTongle) {
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -24,7 +24,7 @@
import cc.kune.common.client.actions.ui.AbstractChildGuiItem;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
import cc.kune.common.client.actions.ui.descrip.Position;
@@ -45,7 +45,7 @@
public AbstractGwtMenuGui() {
}
- public AbstractGwtMenuGui(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGwtMenuGui(final GuiActionDescrip descriptor) {
super(descriptor);
}
@@ -72,7 +72,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.create(descriptor);
menu = new MenuBar(true);
menu.setAnimationEnabled(true);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -27,7 +27,7 @@
import cc.kune.common.client.actions.PropertyChangeListener;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.MenuCheckItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuRadioItemDescriptor;
@@ -64,7 +64,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
iconLabel = new IconLabel("");
iconLabel.addTextStyleName("oc-ico-pad");
@@ -102,7 +102,7 @@
if (menu == null) {
throw new UIException("To add a menu item you need to add the menu before. Item: " + descriptor);
}
- if (position == AbstractGuiActionDescrip.NO_POSITION) {
+ if (position == GuiActionDescrip.NO_POSITION) {
menu.add(item);
} else {
menu.insert(position, item);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -25,7 +25,7 @@
import cc.kune.common.client.actions.KeyStroke;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.IconLabelDescriptor;
import cc.kune.common.client.ui.IconLabel;
@@ -49,7 +49,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
iconLabel = new IconLabel("");
descriptor.putValue(ParentWidget.PARENT_UI, this);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
import cc.kune.common.client.ui.IconLabel;
@@ -44,7 +44,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
descriptor.putValue(ParentWidget.PARENT_UI, this);
// Standalone menus are menus without and associated button in a toolbar
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuSeparatorGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuSeparatorGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuSeparatorGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,13 +21,13 @@
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.errors.UIException;
public class GwtMenuSeparatorGui extends AbstractGuiItem {
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
final AbstractGwtMenuGui menu = ((AbstractGwtMenuGui) descriptor.getParent().getValue(ParentWidget.PARENT_UI));
if (menu == null) {
throw new UIException("To add a menu separator you need to add the menu before. Item: " + descriptor);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -22,6 +22,7 @@
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.ui.IconLabel;
import com.google.gwt.user.client.ui.MenuItem;
@@ -39,7 +40,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
item = new MenuItem("", menu);
iconLabel = new IconLabel("");
@@ -47,7 +48,7 @@
configureItemFromProperties();
final AbstractGwtMenuGui parentMenu = ((AbstractGwtMenuGui) descriptor.getParent().getValue(PARENT_UI));
final int position = descriptor.getPosition();
- if (position == AbstractGuiActionDescrip.NO_POSITION) {
+ if (position == GuiActionDescrip.NO_POSITION) {
parentMenu.add(item);
} else {
parentMenu.insert(position, item);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -22,6 +22,7 @@
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import com.google.gwt.user.client.ui.UIObject;
@@ -55,7 +56,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
toolbar = new GwtComplexToolbar();
initWidget(toolbar);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarSeparatorGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarSeparatorGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtToolbarSeparatorGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
import cc.kune.common.client.errors.UIException;
@@ -29,7 +29,7 @@
public class GwtToolbarSeparatorGui extends AbstractGuiItem {
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
final GwtToolbarGui toolbar = ((GwtToolbarGui) descriptor.getParent().getValue(ParentWidget.PARENT_UI));
if (toolbar == null) {
throw new UIException("To add a toolbar separator you need to add the toolbar before. Item: " + descriptor);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -25,8 +25,8 @@
import cc.kune.common.client.actions.ui.AbstractChildGuiItem;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.PushButtonDescriptor;
import com.extjs.gxt.ui.client.Style.ButtonScale;
@@ -54,7 +54,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
descriptor.putValue(ParentWidget.PARENT_UI, this);
if (descriptor instanceof PushButtonDescriptor) {
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -24,7 +24,7 @@
import cc.kune.common.client.actions.ui.AbstractChildGuiItem;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
import cc.kune.common.client.actions.ui.descrip.Position;
@@ -41,7 +41,7 @@
public AbstractGxtMenuGui() {
}
- public AbstractGxtMenuGui(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGxtMenuGui(final GuiActionDescrip descriptor) {
super(descriptor);
}
@@ -69,7 +69,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
super.create(descriptor);
menu = new Menu();
@@ -85,8 +85,7 @@
@Override
public void propertyChange(final PropertyChangeEvent event) {
if (event.getPropertyName().equals(MenuDescriptor.MENU_SHOW)) {
- final String id = (String) descriptor.getValue(MenuDescriptor.MENU_SHOW_NEAR_TO);
- show(id);
+ show(descriptor.getValue(MenuDescriptor.MENU_SHOW_NEAR_TO));
}
}
});
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuItemGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuItemGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -27,7 +27,7 @@
import cc.kune.common.client.actions.PropertyChangeListener;
import cc.kune.common.client.actions.ui.AbstractChildGuiItem;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.MenuCheckItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuRadioItemDescriptor;
@@ -65,7 +65,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
if (descriptor instanceof MenuRadioItemDescriptor) {
final CheckMenuItem checkItem = createCheckItem((MenuItemDescriptor) descriptor);
@@ -89,9 +89,18 @@
public void componentSelected(final MenuEvent ce) {
final AbstractAction action = descriptor.getAction();
if (action != null) {
- action.actionPerformed(new ActionEvent(item, Event.getCurrentEvent()));
+
+ action.actionPerformed(new ActionEvent(getItemObjectOfAction(descriptor), Event.getCurrentEvent()));
}
}
+
+ private Object getItemObjectOfAction(final GuiActionDescrip descriptor) {
+ // If the action is associated with a item (like a Group, a
+ // group shortname, a username, etc) we pass this item to
+ // the action, if not we only pass the menuitem
+ return descriptor.hasItem() ? descriptor.getItem()
+ : descriptor.isChild() ? descriptor.getParent().getItem() : item;
+ }
});
child = item;
super.create(descriptor);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -23,7 +23,7 @@
import cc.kune.common.client.actions.PropertyChangeListener;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
import com.extjs.gxt.ui.client.event.ButtonEvent;
@@ -71,7 +71,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
descriptor.putValue(ParentWidget.PARENT_UI, this);
// Standalone menus are menus without and associated button in a
@@ -143,4 +143,9 @@
button.setVisible(visible);
}
}
+
+ @Override
+ public boolean shouldBeAdded() {
+ return notStandAlone;
+ }
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuSeparatorGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuSeparatorGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuSeparatorGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -22,7 +22,7 @@
import cc.kune.common.client.actions.ui.AbstractChildGuiItem;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import com.google.gwt.user.client.ui.UIObject;
@@ -33,7 +33,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.create(descriptor);
final GxtMenuGui menu = (GxtMenuGui) parent;
menu.addSeparator();
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtPushButtonGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtPushButtonGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtPushButtonGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -22,7 +22,7 @@
import cc.kune.common.client.actions.PropertyChangeEvent;
import cc.kune.common.client.actions.PropertyChangeListener;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.PushButtonDescriptor;
public class GxtPushButtonGui extends GxtButtonGui {
@@ -32,7 +32,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
final AbstractGuiItem item = super.create(descriptor);
final PushButtonDescriptor btn = (PushButtonDescriptor) descriptor;
setPressed(btn.isPushed());
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtSubMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtSubMenuGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtSubMenuGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import com.extjs.gxt.ui.client.widget.menu.MenuItem;
@@ -33,19 +33,19 @@
super();
}
- public GxtSubMenuGui(final AbstractGuiActionDescrip descriptor) {
+ public GxtSubMenuGui(final GuiActionDescrip descriptor) {
super(descriptor);
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.create(descriptor);
item = new MenuItem();
item.setSubMenu(menu);
final AbstractGxtMenuGui parentMenu = ((AbstractGxtMenuGui) descriptor.getParent().getValue(
ParentWidget.PARENT_UI));
final int position = descriptor.getPosition();
- if (position == AbstractGuiActionDescrip.NO_POSITION) {
+ if (position == GuiActionDescrip.NO_POSITION) {
parentMenu.add(item);
} else {
parentMenu.insert(position, item);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import com.extjs.gxt.ui.client.widget.Component;
import com.extjs.gxt.ui.client.widget.toolbar.ToolBar;
@@ -35,7 +35,7 @@
super();
}
- public GxtToolbarGui(final AbstractGuiActionDescrip descriptor) {
+ public GxtToolbarGui(final GuiActionDescrip descriptor) {
super(descriptor);
}
@@ -63,7 +63,7 @@
// }
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
toolbar = new ToolBar();
initWidget(toolbar);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
import cc.kune.common.client.actions.ui.AbstractChildGuiItem;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
@@ -32,7 +32,7 @@
public class GxtToolbarSeparatorGui extends AbstractChildGuiItem {
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
final GxtToolbarGui toolbar = (GxtToolbarGui) parent;
final Type type = ((ToolbarSeparatorDescriptor) descriptor).getSeparatorType();
switch (type) {
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractActionExtensiblePresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractActionExtensiblePresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractActionExtensiblePresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,23 +19,23 @@
*/
package cc.kune.common.client.actions.ui;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
public abstract class AbstractActionExtensiblePresenter implements IsActionExtensible {
@Override
- public abstract void addAction(final AbstractGuiActionDescrip descriptor);
+ public abstract void addAction(final GuiActionDescrip descriptor);
public void addActionCollection(final GuiActionDescCollection descriptors) {
- for (final AbstractGuiActionDescrip descriptor : descriptors) {
+ for (final GuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
@Override
- public void addActions(final AbstractGuiActionDescrip... descriptors) {
- for (final AbstractGuiActionDescrip descriptor : descriptors) {
+ public void addActions(final GuiActionDescrip... descriptors) {
+ for (final GuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractChildGuiItem.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractChildGuiItem.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractChildGuiItem.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,7 +19,7 @@
*/
package cc.kune.common.client.actions.ui;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.errors.UIException;
import com.google.gwt.user.client.ui.UIObject;
@@ -33,7 +33,7 @@
super();
}
- public AbstractChildGuiItem(final AbstractGuiActionDescrip descriptor) {
+ public AbstractChildGuiItem(final GuiActionDescrip descriptor) {
super(descriptor);
}
@@ -45,7 +45,7 @@
}
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
final int position = descriptor.getPosition();
if (descriptor.isChild()) {
// A menu item is a child, a toolbar separator, also. A button can
@@ -57,7 +57,7 @@
if (child != null) {
// Sometimes (menu/toolbar separators), there is no Widget to
// add/insert
- if (position == AbstractGuiActionDescrip.NO_POSITION) {
+ if (position == GuiActionDescrip.NO_POSITION) {
parent.add(child);
} else {
parent.insert(position, child);
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractComposedGuiItem.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractComposedGuiItem.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractComposedGuiItem.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -23,8 +23,8 @@
import cc.kune.common.client.actions.ui.bind.GuiBinding;
import cc.kune.common.client.actions.ui.bind.GuiProvider;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.errors.UIException;
import com.google.gwt.user.client.ui.Composite;
@@ -38,41 +38,47 @@
this.bindings = bindings;
}
- public void add(final AbstractGuiActionDescrip... descriptors) {
- for (final AbstractGuiActionDescrip descriptor : descriptors) {
+ public void add(final GuiActionDescCollection descriptors) {
+ for (final GuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
+ public void add(final GuiActionDescrip... descriptors) {
+ for (final GuiActionDescrip descriptor : descriptors) {
+ addAction(descriptor);
+ }
+ }
+
@Override
- public void addAction(final AbstractGuiActionDescrip descriptor) {
+ public void addAction(final GuiActionDescrip descriptor) {
getGuiItems().add(descriptor);
beforeAddWidget(descriptor);
}
@Override
- public void addActions(AbstractGuiActionDescrip... descriptors) {
- for (final AbstractGuiActionDescrip descriptor : descriptors) {
+ public void addActions(final GuiActionDescCollection descriptors) {
+ for (final GuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
@Override
- public void addActions(final GuiActionDescCollection descriptors) {
- for (final AbstractGuiActionDescrip descriptor : descriptors) {
+ public void addActions(final GuiActionDescrip... descriptors) {
+ for (final GuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
- public void addActions(final List<AbstractGuiActionDescrip> descriptors) {
- for (final AbstractGuiActionDescrip descriptor : descriptors) {
+ public void addActions(final List<GuiActionDescrip> descriptors) {
+ for (final GuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
protected abstract void addWidget(AbstractGuiItem item);
- protected void beforeAddWidget(final AbstractGuiActionDescrip descrip) {
+ protected void beforeAddWidget(final GuiActionDescrip descrip) {
if (descrip.mustBeAdded()) {
final GuiBinding binding = bindings.get(descrip.getType());
if (binding == null) {
@@ -82,7 +88,7 @@
final AbstractGuiItem item = binding.create(descrip);
// Log.debug("Adding: " + descrip);
if (binding.shouldBeAdded()) {
- if (descrip.getPosition() == AbstractGuiActionDescrip.NO_POSITION) {
+ if (descrip.getPosition() == GuiActionDescrip.NO_POSITION) {
addWidget(item);
} else {
insertWidget(item, descrip.getPosition());
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -24,7 +24,7 @@
import cc.kune.common.client.actions.PropertyChangeEvent;
import cc.kune.common.client.actions.PropertyChangeListener;
import cc.kune.common.client.actions.ui.bind.GuiBinding;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.errors.NotImplementedException;
import cc.kune.common.client.utils.TextUtils;
import cc.kune.core.client.resources.icons.IconConstants;
@@ -34,13 +34,13 @@
public abstract class AbstractGuiItem extends Composite implements GuiBinding {
- protected AbstractGuiActionDescrip descriptor;
+ protected GuiActionDescrip descriptor;
public AbstractGuiItem() {
super();
}
- public AbstractGuiItem(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem(final GuiActionDescrip descriptor) {
super();
this.descriptor = descriptor;
}
@@ -74,12 +74,12 @@
setToolTipText((String) (descriptor.getValue(Action.SHORT_DESCRIPTION)));
setIcon(descriptor.getValue(Action.SMALL_ICON));
setEnabled((Boolean) descriptor.getValue(AbstractAction.ENABLED));
- setVisible((Boolean) descriptor.getValue(AbstractGuiActionDescrip.VISIBLE));
- setStyles((String) descriptor.getValue(AbstractGuiActionDescrip.STYLES));
+ setVisible((Boolean) descriptor.getValue(GuiActionDescrip.VISIBLE));
+ setStyles((String) descriptor.getValue(GuiActionDescrip.STYLES));
}
@Override
- public abstract AbstractGuiItem create(final AbstractGuiActionDescrip descriptor);
+ public abstract AbstractGuiItem create(final GuiActionDescrip descriptor);
private PropertyChangeListener createActionPropertyChangeListener() {
return new PropertyChangeListener() {
@@ -94,9 +94,9 @@
setIcon(newValue);
} else if (event.getPropertyName().equals(Action.SHORT_DESCRIPTION)) {
setToolTipText((String) newValue);
- } else if (event.getPropertyName().equals(AbstractGuiActionDescrip.VISIBLE)) {
+ } else if (event.getPropertyName().equals(GuiActionDescrip.VISIBLE)) {
setVisible((Boolean) newValue);
- } else if (event.getPropertyName().equals(AbstractGuiActionDescrip.STYLES)) {
+ } else if (event.getPropertyName().equals(GuiActionDescrip.STYLES)) {
setStyles((String) newValue);
}
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/ActionExtensibleView.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/ActionExtensibleView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/ActionExtensibleView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,12 +19,12 @@
*/
package cc.kune.common.client.actions.ui;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import com.google.gwt.user.client.ui.IsWidget;
public interface ActionExtensibleView extends IsWidget {
- void addAction(AbstractGuiActionDescrip descriptor);
+ void addAction(GuiActionDescrip descriptor);
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/ActionSimplePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/ActionSimplePanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/ActionSimplePanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -40,6 +40,10 @@
bar.add(item);
}
+ public void clear() {
+ bar.clear();
+ }
+
@Override
protected void insertWidget(final AbstractGuiItem item, final int position) {
final int count = bar.getWidgetCount();
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/IsActionExtensible.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/IsActionExtensible.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/IsActionExtensible.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,8 +19,8 @@
*/
package cc.kune.common.client.actions.ui;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
public interface IsActionExtensible {
@@ -30,22 +30,22 @@
* @param action
* the action
*/
- void addAction(AbstractGuiActionDescrip action);
+ void addAction(GuiActionDescrip action);
/**
* Adds some action descriptions
*
- * @param action
- * the action
+ * @param actions
+ * the actions
*/
- void addActions(AbstractGuiActionDescrip... actions);
+ void addActions(GuiActionDescCollection actions);
/**
* Adds some action descriptions
*
- * @param actions
- * the actions
+ * @param action
+ * the action
*/
- void addActions(GuiActionDescCollection actions);
+ void addActions(GuiActionDescrip... actions);
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/bind/AbstractGuiBinding.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/bind/AbstractGuiBinding.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/bind/AbstractGuiBinding.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,12 +20,17 @@
package cc.kune.common.client.actions.ui.bind;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
public abstract class AbstractGuiBinding implements GuiBinding {
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) { // NOPMD by vjrj on 18/01/11 0:47
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) { // NOPMD
+ // by
+ // vjrj
+ // on
+ // 18/01/11
+ // 0:47
return null;
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiBinding.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiBinding.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiBinding.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,11 +20,11 @@
package cc.kune.common.client.actions.ui.bind;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
public interface GuiBinding {
- AbstractGuiItem create(AbstractGuiActionDescrip descriptor);
+ AbstractGuiItem create(GuiActionDescrip descriptor);
boolean shouldBeAdded();
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiChildBinding.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiChildBinding.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/bind/GuiChildBinding.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
import cc.kune.common.client.actions.ui.AbstractGuiItem;
import cc.kune.common.client.actions.ui.ParentWidget;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
import cc.kune.common.client.errors.UIException;
import com.google.gwt.user.client.ui.UIObject;
@@ -32,7 +32,7 @@
protected ParentWidget parent;
@Override
- public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
final int position = descriptor.getPosition();
if (descriptor.isChild()) {
// A menu item is a child, a toolbar separator, also. A button can
@@ -44,7 +44,7 @@
if (child != null) {
// Sometimes (menu/toolbar separators), there is no Widget to
// add/insert
- if (position == AbstractGuiActionDescrip.NO_POSITION) {
+ if (position == GuiActionDescrip.NO_POSITION) {
parent.add(child);
} else {
parent.insert(position, child);
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -27,16 +27,8 @@
/**
* The Class AbstractUIActionDescriptor.
*/
-public abstract class AbstractGuiActionDescrip extends ChangeableObject {
+public abstract class AbstractGuiActionDescrip extends ChangeableObject implements GuiActionDescrip {
- protected static final AbstractGuiActionDescrip NO_PARENT = new NoParentGuiActionDescriptor();
- public static final int NO_POSITION = -1;
- /**
- * Coma separated, styles of the Gui item
- */
- public static final String STYLES = "stylesprop";
- public static final String VISIBLE = "visibleprop";
-
/** The action. */
private final AbstractAction action;
@@ -48,7 +40,7 @@
/** The item location. */
private String location;
- protected AbstractGuiActionDescrip parent = NO_PARENT;
+ protected GuiActionDescrip parent = NO_PARENT;
/** The position where the item will be inserted. */
private int position;
@@ -66,33 +58,44 @@
parent = NO_PARENT;
}
+ @Override
public void fire(final ActionEvent event) {
action.actionPerformed(event);
}
+ @Override
public AbstractAction getAction() {
return action;
}
+ @Override
public GuiAddCondition getAddCondition() {
return addCondition;
}
+ @Override
public String getId() {
return id;
}
+ @Override
+ public Object getItem() {
+ return getValue(ITEM);
+ }
+
/**
* Gets the location, a string used to group actions with locations (top
* bar, bottom bar, user bar...).
*
* @return the location
*/
+ @Override
public String getLocation() {
return location;
}
- public AbstractGuiActionDescrip getParent() {
+ @Override
+ public GuiActionDescrip getParent() {
return parent;
}
@@ -101,10 +104,12 @@
*
* @return the position
*/
+ @Override
public int getPosition() {
return position;
}
+ @Override
public abstract Class<?> getType();
@Override
@@ -120,38 +125,55 @@
}
}
+ @Override
+ public boolean hasItem() {
+ return getValue(ITEM) != null;
+ }
+
+ @Override
public boolean isChild() {
return !parent.equals(NO_PARENT);
}
+ @Override
public boolean isEnabled() {
return (Boolean) getValue(Action.ENABLED);
}
+ @Override
public boolean isVisible() {
return (Boolean) getValue(VISIBLE);
}
+ @Override
public boolean mustBeAdded() {
boolean result = false;
if (addCondition != null) {
- result = addCondition.mustBeAdded();
+ result = addCondition.mustBeAdded(this);
}
return result;
}
+ @Override
public void setAddCondition(final GuiAddCondition addCondition) {
this.addCondition = addCondition;
}
+ @Override
public void setEnabled(final boolean enabled) {
super.putValue(Action.ENABLED, enabled);
}
+ @Override
public void setId(final String id) {
this.id = id;
}
+ @Override
+ public void setItem(final Object object) {
+ putValue(ITEM, object);
+ }
+
/**
* If we have several toolbars, we can group with the "location" string key
* actions that must be in the same location (ex: top bar, bottom bar, and
@@ -160,11 +182,13 @@
* @param location
* the new location
*/
+ @Override
public void setLocation(final String location) {
this.location = location;
}
- public void setParent(final AbstractGuiActionDescrip parent) {
+ @Override
+ public void setParent(final GuiActionDescrip parent) {
this.parent = parent;
}
@@ -175,14 +199,17 @@
* @param position
* the new position
*/
+ @Override
public void setPosition(final int position) {
this.position = position;
}
+ @Override
public void setStyles(final String styles) {
putValue(STYLES, styles);
}
+ @Override
public void setVisible(final boolean visible) {
putValue(VISIBLE, visible);
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescCollection.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescCollection.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescCollection.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,14 +21,13 @@
import java.util.ArrayList;
-
// @PMD:REVIEWED:AtLeastOneConstructor: by vjrj on 26/05/09 12:31
-public class GuiActionDescCollection extends ArrayList<AbstractGuiActionDescrip> {
+public class GuiActionDescCollection extends ArrayList<GuiActionDescrip> {
private static final long serialVersionUID = 6759723760404227737L;
- public void add(final AbstractGuiActionDescrip... descriptors) {
- for (AbstractGuiActionDescrip descriptor : descriptors) {
+ public void add(final GuiActionDescrip... descriptors) {
+ for (final GuiActionDescrip descriptor : descriptors) {
super.add(descriptor);
}
}
Added: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescProviderCollection.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescProviderCollection.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescProviderCollection.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,37 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.common.client.actions.ui.descrip;
+
+import java.util.ArrayList;
+
+import com.google.inject.Provider;
+
+ at Deprecated
+public class GuiActionDescProviderCollection extends ArrayList<Provider<GuiActionDescrip>> {
+
+ private static final long serialVersionUID = -7933642706229301169L;
+
+ public void add(final Provider<GuiActionDescrip>... descriptors) {
+ for (final Provider<GuiActionDescrip> descriptor : descriptors) {
+ super.add(descriptor);
+ }
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescProviderCollection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,85 @@
+package cc.kune.common.client.actions.ui.descrip;
+
+import cc.kune.common.client.actions.AbstractAction;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.PropertyChangeListener;
+
+public interface GuiActionDescrip {
+
+ /**
+ * {@link #ITEM} is used to associate a {@link #AbstractGuiActionDescrip}
+ * with an object like groups, group names, users, and so on, and used to
+ * execute actions with this item as parameter
+ */
+ public static final String ITEM = "item";
+
+ public static final AbstractGuiActionDescrip NO_PARENT = new NoParentGuiActionDescriptor();
+
+ public static final int NO_POSITION = -1;
+
+ /**
+ * Coma separated, styles of the Gui item
+ */
+ public static final String STYLES = "stylesprop";
+
+ public static final String VISIBLE = "visibleprop";
+
+ void addPropertyChangeListener(final PropertyChangeListener listener);
+
+ void fire(final ActionEvent event);
+
+ AbstractAction getAction();
+
+ GuiAddCondition getAddCondition();
+
+ String getId();
+
+ Object getItem();
+
+ Object[] getKeys();
+
+ String getLocation();
+
+ GuiActionDescrip getParent();
+
+ int getPosition();
+
+ PropertyChangeListener[] getPropertyChangeListeners();
+
+ Class<?> getType();
+
+ Object getValue(final String key);
+
+ boolean hasItem();
+
+ boolean isChild();
+
+ boolean isEnabled();
+
+ boolean isVisible();
+
+ boolean mustBeAdded();
+
+ public void putValue(final String key, final Object value);
+
+ void removePropertyChangeListener(final PropertyChangeListener listener);
+
+ void setAddCondition(final GuiAddCondition addCondition);
+
+ void setEnabled(final boolean enabled);
+
+ void setId(final String id);
+
+ void setItem(final Object object);
+
+ void setLocation(final String location);
+
+ void setParent(final GuiActionDescrip parent);
+
+ void setPosition(final int position);
+
+ void setStyles(final String styles);
+
+ void setVisible(final boolean visible);
+
+}
Property changes on: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiAddCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiAddCondition.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiAddCondition.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,8 +19,9 @@
*/
package cc.kune.common.client.actions.ui.descrip;
+
public interface GuiAddCondition {
- boolean mustBeAdded();
+ boolean mustBeAdded(GuiActionDescrip descript);
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiAddConditionAdapter.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiAddConditionAdapter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiAddConditionAdapter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,8 @@
public class GuiAddConditionAdapter implements GuiAddCondition {
- public boolean mustBeAdded() {
+ @Override
+ public boolean mustBeAdded(final GuiActionDescrip descrip) {
return true;
}
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuDescriptor.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -43,7 +43,7 @@
this(NO_PARENT, action);
}
- public MenuDescriptor(final AbstractGuiActionDescrip parent, final AbstractAction action) {
+ public MenuDescriptor(final GuiActionDescrip parent, final AbstractAction action) {
super(action);
setParent(parent);
putValue(MENU_HIDE, false);
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuItemDescriptor.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuItemDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuItemDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,13 +20,13 @@
package cc.kune.common.client.actions.ui.descrip;
import cc.kune.common.client.actions.AbstractAction;
-import cc.kune.common.client.errors.UIException;
+import cc.kune.core.client.logs.Log;
public class MenuItemDescriptor extends AbstractGuiActionDescrip {
public MenuItemDescriptor(final AbstractAction action) {
super(action);
- throw new UIException("You must define a menu item with its parent menu");
+ Log.debug("You must define a menu item with its parent menu");
}
public MenuItemDescriptor(final MenuDescriptor parent, final AbstractAction action) {
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/SubMenuDescriptor.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/SubMenuDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/SubMenuDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -34,7 +34,7 @@
this(NO_PARENT, action);
}
- public SubMenuDescriptor(final AbstractGuiActionDescrip parent, final AbstractAction action) {
+ public SubMenuDescriptor(final GuiActionDescrip parent, final AbstractAction action) {
super(action);
setParent(parent);
putValue(MENU_HIDE, false);
Deleted: trunk/src/main/java/cc/kune/common/client/noti/AlertEvent.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/noti/AlertEvent.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/noti/AlertEvent.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,137 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.common.client.noti;
-
-import com.google.gwt.event.shared.EventHandler;
-import com.google.gwt.event.shared.GwtEvent;
-import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.event.shared.HasHandlers;
-
-public class AlertEvent extends GwtEvent<AlertEvent.AlertHandler> {
-
- public interface HasAlertHandlers extends HasHandlers {
- HandlerRegistration addAlertHandler(AlertHandler handler);
- }
-
- public interface AlertHandler extends EventHandler {
- public void onAlert(AlertEvent event);
- }
-
- private static final Type<AlertHandler> TYPE = new Type<AlertHandler>();
-
- public static void fire(HasHandlers source, java.lang.String title, java.lang.String message, cc.kune.common.client.utils.SimpleCallback onOk) {
- source.fireEvent(new AlertEvent(title, message, onOk));
- }
-
- public static void fire(HasHandlers source, java.lang.String message) {
- source.fireEvent(new AlertEvent(message));
- }
-
- public static Type<AlertHandler> getType() {
- return TYPE;
- }
-
- java.lang.String title;
- java.lang.String message;
- cc.kune.common.client.utils.SimpleCallback onOk;
-
- public AlertEvent(java.lang.String title, java.lang.String message, cc.kune.common.client.utils.SimpleCallback onOk) {
- this.title = title;
- this.message = message;
- this.onOk = onOk;
- }
-
- public AlertEvent(java.lang.String message) {
- this.message = message;
- }
-
- protected AlertEvent() {
- // Possibly for serialization.
- }
-
- @Override
- public Type<AlertHandler> getAssociatedType() {
- return TYPE;
- }
-
- public java.lang.String getTitle() {
- return title;
- }
-
- public java.lang.String getMessage() {
- return message;
- }
-
- public cc.kune.common.client.utils.SimpleCallback getOnOk() {
- return onOk;
- }
-
- @Override
- protected void dispatch(AlertHandler handler) {
- handler.onAlert(this);
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- AlertEvent other = (AlertEvent) obj;
- if (title == null) {
- if (other.title != null)
- return false;
- } else if (!title.equals(other.title))
- return false;
- if (message == null) {
- if (other.message != null)
- return false;
- } else if (!message.equals(other.message))
- return false;
- if (onOk == null) {
- if (other.onOk != null)
- return false;
- } else if (!onOk.equals(other.onOk))
- return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- int hashCode = 23;
- hashCode = (hashCode * 37) + (title == null ? 1 : title.hashCode());
- hashCode = (hashCode * 37) + (message == null ? 1 : message.hashCode());
- hashCode = (hashCode * 37) + (onOk == null ? 1 : onOk.hashCode());
- return hashCode;
- }
-
- @Override
- public String toString() {
- return "AlertEvent["
- + title
- + ","
- + message
- + ","
- + onOk
- + "]";
- }
-}
Modified: trunk/src/main/java/cc/kune/common/client/noti/ConfirmAskEvent.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/noti/ConfirmAskEvent.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/noti/ConfirmAskEvent.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -24,184 +24,191 @@
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
-public class ConfirmAskEvent extends GwtEvent<ConfirmAskEvent.ConfirmAskHandler> {
+public class ConfirmAskEvent extends GwtEvent<ConfirmAskEvent.ConfirmAskHandler> {
- public interface HasConfirmAskHandlers extends HasHandlers {
- HandlerRegistration addConfirmAskHandler(ConfirmAskHandler handler);
- }
+ public interface ConfirmAskHandler extends EventHandler {
+ public void onConfirmAsk(ConfirmAskEvent event);
+ }
- public interface ConfirmAskHandler extends EventHandler {
- public void onConfirmAsk(ConfirmAskEvent event);
- }
+ public interface HasConfirmAskHandlers extends HasHandlers {
+ HandlerRegistration addConfirmAskHandler(ConfirmAskHandler handler);
+ }
- private static final Type<ConfirmAskHandler> TYPE = new Type<ConfirmAskHandler>();
+ private static final Type<ConfirmAskHandler> TYPE = new Type<ConfirmAskHandler>();
- public static void fire(HasHandlers source, java.lang.String title, java.lang.String message, java.lang.String acceptBtnMsg, java.lang.String cancelBtnMsg, java.lang.String acceptBtnTooltip, java.lang.String cancelBtnTooltip, cc.kune.common.client.utils.SimpleCallback onAccept, cc.kune.common.client.utils.SimpleCallback onCancel) {
- source.fireEvent(new ConfirmAskEvent(title, message, acceptBtnMsg, cancelBtnMsg, acceptBtnTooltip, cancelBtnTooltip, onAccept, onCancel));
- }
+ public static void fire(final HasHandlers source, final java.lang.String message) {
+ source.fireEvent(new ConfirmAskEvent(message));
+ }
- public static void fire(HasHandlers source, java.lang.String message) {
- source.fireEvent(new ConfirmAskEvent(message));
- }
+ public static void fire(final HasHandlers source, final java.lang.String title, final java.lang.String message,
+ final java.lang.String acceptBtnMsg, final java.lang.String cancelBtnMsg,
+ final java.lang.String acceptBtnTooltip, final java.lang.String cancelBtnTooltip,
+ final cc.kune.common.client.utils.SimpleCallback callback) {
+ source.fireEvent(new ConfirmAskEvent(title, message, acceptBtnMsg, cancelBtnMsg, acceptBtnTooltip,
+ cancelBtnTooltip, callback));
+ }
- public static Type<ConfirmAskHandler> getType() {
- return TYPE;
- }
+ public static Type<ConfirmAskHandler> getType() {
+ return TYPE;
+ }
- java.lang.String title;
- java.lang.String message;
- java.lang.String acceptBtnMsg;
- java.lang.String cancelBtnMsg;
- java.lang.String acceptBtnTooltip;
- java.lang.String cancelBtnTooltip;
- cc.kune.common.client.utils.SimpleCallback onAccept;
- cc.kune.common.client.utils.SimpleCallback onCancel;
+ java.lang.String acceptBtnMsg;
+ java.lang.String acceptBtnTooltip;
+ cc.kune.common.client.utils.SimpleCallback callback;
+ java.lang.String cancelBtnMsg;
+ java.lang.String cancelBtnTooltip;
+ java.lang.String message;
+ java.lang.String title;
- public ConfirmAskEvent(java.lang.String title, java.lang.String message, java.lang.String acceptBtnMsg, java.lang.String cancelBtnMsg, java.lang.String acceptBtnTooltip, java.lang.String cancelBtnTooltip, cc.kune.common.client.utils.SimpleCallback onAccept, cc.kune.common.client.utils.SimpleCallback onCancel) {
- this.title = title;
- this.message = message;
- this.acceptBtnMsg = acceptBtnMsg;
- this.cancelBtnMsg = cancelBtnMsg;
- this.acceptBtnTooltip = acceptBtnTooltip;
- this.cancelBtnTooltip = cancelBtnTooltip;
- this.onAccept = onAccept;
- this.onCancel = onCancel;
- }
+ protected ConfirmAskEvent() {
+ // Possibly for serialization.
+ }
- public ConfirmAskEvent(java.lang.String message) {
- this.message = message;
- }
+ public ConfirmAskEvent(final java.lang.String message) {
+ this.message = message;
+ }
- protected ConfirmAskEvent() {
- // Possibly for serialization.
- }
+ public ConfirmAskEvent(final java.lang.String title, final java.lang.String message,
+ final java.lang.String acceptBtnMsg, final java.lang.String cancelBtnMsg,
+ final cc.kune.common.client.utils.SimpleCallback callback) {
+ this.title = title;
+ this.message = message;
+ this.acceptBtnMsg = acceptBtnMsg;
+ this.cancelBtnMsg = cancelBtnMsg;
+ this.callback = callback;
+ }
- @Override
- public Type<ConfirmAskHandler> getAssociatedType() {
- return TYPE;
- }
+ public ConfirmAskEvent(final java.lang.String title, final java.lang.String message,
+ final java.lang.String acceptBtnMsg, final java.lang.String cancelBtnMsg,
+ final java.lang.String acceptBtnTooltip, final java.lang.String cancelBtnTooltip,
+ final cc.kune.common.client.utils.SimpleCallback callback) {
+ this.title = title;
+ this.message = message;
+ this.acceptBtnMsg = acceptBtnMsg;
+ this.cancelBtnMsg = cancelBtnMsg;
+ this.acceptBtnTooltip = acceptBtnTooltip;
+ this.cancelBtnTooltip = cancelBtnTooltip;
+ this.callback = callback;
+ }
- public java.lang.String getTitle() {
- return title;
- }
+ @Override
+ protected void dispatch(final ConfirmAskHandler handler) {
+ handler.onConfirmAsk(this);
+ }
- public java.lang.String getMessage() {
- return message;
- }
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final ConfirmAskEvent other = (ConfirmAskEvent) obj;
+ if (title == null) {
+ if (other.title != null) {
+ return false;
+ }
+ } else if (!title.equals(other.title)) {
+ return false;
+ }
+ if (message == null) {
+ if (other.message != null) {
+ return false;
+ }
+ } else if (!message.equals(other.message)) {
+ return false;
+ }
+ if (acceptBtnMsg == null) {
+ if (other.acceptBtnMsg != null) {
+ return false;
+ }
+ } else if (!acceptBtnMsg.equals(other.acceptBtnMsg)) {
+ return false;
+ }
+ if (cancelBtnMsg == null) {
+ if (other.cancelBtnMsg != null) {
+ return false;
+ }
+ } else if (!cancelBtnMsg.equals(other.cancelBtnMsg)) {
+ return false;
+ }
+ if (acceptBtnTooltip == null) {
+ if (other.acceptBtnTooltip != null) {
+ return false;
+ }
+ } else if (!acceptBtnTooltip.equals(other.acceptBtnTooltip)) {
+ return false;
+ }
+ if (cancelBtnTooltip == null) {
+ if (other.cancelBtnTooltip != null) {
+ return false;
+ }
+ } else if (!cancelBtnTooltip.equals(other.cancelBtnTooltip)) {
+ return false;
+ }
+ if (callback == null) {
+ if (other.callback != null) {
+ return false;
+ }
+ } else if (!callback.equals(other.callback)) {
+ return false;
+ }
+ return true;
+ }
- public java.lang.String getAcceptBtnMsg() {
- return acceptBtnMsg;
- }
+ public java.lang.String getAcceptBtnMsg() {
+ return acceptBtnMsg;
+ }
- public java.lang.String getCancelBtnMsg() {
- return cancelBtnMsg;
- }
+ public java.lang.String getAcceptBtnTooltip() {
+ return acceptBtnTooltip;
+ }
- public java.lang.String getAcceptBtnTooltip() {
- return acceptBtnTooltip;
- }
+ @Override
+ public Type<ConfirmAskHandler> getAssociatedType() {
+ return TYPE;
+ }
- public java.lang.String getCancelBtnTooltip() {
- return cancelBtnTooltip;
- }
+ public cc.kune.common.client.utils.SimpleCallback getCallback() {
+ return callback;
+ }
- public cc.kune.common.client.utils.SimpleCallback getOnAccept() {
- return onAccept;
- }
+ public java.lang.String getCancelBtnMsg() {
+ return cancelBtnMsg;
+ }
- public cc.kune.common.client.utils.SimpleCallback getOnCancel() {
- return onCancel;
- }
+ public java.lang.String getCancelBtnTooltip() {
+ return cancelBtnTooltip;
+ }
- @Override
- protected void dispatch(ConfirmAskHandler handler) {
- handler.onConfirmAsk(this);
- }
+ public java.lang.String getMessage() {
+ return message;
+ }
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- ConfirmAskEvent other = (ConfirmAskEvent) obj;
- if (title == null) {
- if (other.title != null)
- return false;
- } else if (!title.equals(other.title))
- return false;
- if (message == null) {
- if (other.message != null)
- return false;
- } else if (!message.equals(other.message))
- return false;
- if (acceptBtnMsg == null) {
- if (other.acceptBtnMsg != null)
- return false;
- } else if (!acceptBtnMsg.equals(other.acceptBtnMsg))
- return false;
- if (cancelBtnMsg == null) {
- if (other.cancelBtnMsg != null)
- return false;
- } else if (!cancelBtnMsg.equals(other.cancelBtnMsg))
- return false;
- if (acceptBtnTooltip == null) {
- if (other.acceptBtnTooltip != null)
- return false;
- } else if (!acceptBtnTooltip.equals(other.acceptBtnTooltip))
- return false;
- if (cancelBtnTooltip == null) {
- if (other.cancelBtnTooltip != null)
- return false;
- } else if (!cancelBtnTooltip.equals(other.cancelBtnTooltip))
- return false;
- if (onAccept == null) {
- if (other.onAccept != null)
- return false;
- } else if (!onAccept.equals(other.onAccept))
- return false;
- if (onCancel == null) {
- if (other.onCancel != null)
- return false;
- } else if (!onCancel.equals(other.onCancel))
- return false;
- return true;
- }
+ public java.lang.String getTitle() {
+ return title;
+ }
- @Override
- public int hashCode() {
- int hashCode = 23;
- hashCode = (hashCode * 37) + (title == null ? 1 : title.hashCode());
- hashCode = (hashCode * 37) + (message == null ? 1 : message.hashCode());
- hashCode = (hashCode * 37) + (acceptBtnMsg == null ? 1 : acceptBtnMsg.hashCode());
- hashCode = (hashCode * 37) + (cancelBtnMsg == null ? 1 : cancelBtnMsg.hashCode());
- hashCode = (hashCode * 37) + (acceptBtnTooltip == null ? 1 : acceptBtnTooltip.hashCode());
- hashCode = (hashCode * 37) + (cancelBtnTooltip == null ? 1 : cancelBtnTooltip.hashCode());
- hashCode = (hashCode * 37) + (onAccept == null ? 1 : onAccept.hashCode());
- hashCode = (hashCode * 37) + (onCancel == null ? 1 : onCancel.hashCode());
- return hashCode;
- }
+ @Override
+ public int hashCode() {
+ int hashCode = 23;
+ hashCode = (hashCode * 37) + (title == null ? 1 : title.hashCode());
+ hashCode = (hashCode * 37) + (message == null ? 1 : message.hashCode());
+ hashCode = (hashCode * 37) + (acceptBtnMsg == null ? 1 : acceptBtnMsg.hashCode());
+ hashCode = (hashCode * 37) + (cancelBtnMsg == null ? 1 : cancelBtnMsg.hashCode());
+ hashCode = (hashCode * 37) + (acceptBtnTooltip == null ? 1 : acceptBtnTooltip.hashCode());
+ hashCode = (hashCode * 37) + (cancelBtnTooltip == null ? 1 : cancelBtnTooltip.hashCode());
+ hashCode = (hashCode * 37) + (callback == null ? 1 : callback.hashCode());
+ return hashCode;
+ }
- @Override
- public String toString() {
- return "ConfirmAskEvent["
- + title
- + ","
- + message
- + ","
- + acceptBtnMsg
- + ","
- + cancelBtnMsg
- + ","
- + acceptBtnTooltip
- + ","
- + cancelBtnTooltip
- + ","
- + onAccept
- + ","
- + onCancel
- + "]";
- }
+ @Override
+ public String toString() {
+ return "ConfirmAskEvent[" + title + "," + message + "," + acceptBtnMsg + "," + cancelBtnMsg + ","
+ + acceptBtnTooltip + "," + cancelBtnTooltip + "," + callback + "]";
+ }
}
Modified: trunk/src/main/java/cc/kune/common/client/noti/NotifyUser.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/noti/NotifyUser.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/common/client/noti/NotifyUser.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -23,13 +23,19 @@
import cc.kune.core.client.notify.msgs.UserNotifyEvent;
import cc.kune.core.client.notify.spiner.ProgressHideEvent;
import cc.kune.core.client.notify.spiner.ProgressShowEvent;
+import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.gwt.event.shared.EventBus;
public class NotifyUser {
private static EventBus eventBus;
+ private static I18nTranslationService i18n;
private static SimpleCallback onOk;
+ public static void askConfirmation(final String tittle, final String message, final SimpleCallback callback) {
+ eventBus.fireEvent(new ConfirmAskEvent(tittle, message, i18n.t("Yes"), i18n.t("No"), callback));
+ }
+
public static void error(final String message) {
eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.error, message));
}
@@ -60,8 +66,9 @@
eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.info, message));
}
- public static void init(final EventBus eventBus) {
+ public static void init(final EventBus eventBus, final I18nTranslationService i18n) {
NotifyUser.eventBus = eventBus;
+ NotifyUser.i18n = i18n;
onOk = new SimpleCallback() {
@Override
@@ -78,11 +85,11 @@
}
public static void showAlertMessage(final String title, final String message) {
- eventBus.fireEvent(new AlertEvent(title, message, onOk));
+ showAlertMessage(title, message, onOk);
}
public static void showAlertMessage(final String title, final String message, final SimpleCallback callback) {
- eventBus.fireEvent(new AlertEvent(title, message, callback));
+ eventBus.fireEvent(new ConfirmAskEvent(title, message, i18n.t("Ok"), i18n.t("Close"), callback));
}
public static void showProgress(final String text) {
Copied: trunk/src/main/java/cc/kune/common/client/ui/BasicThumb.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/platf/client/ui/BasicThumb.java)
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/BasicThumb.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/ui/BasicThumb.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,138 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.common.client.ui;
+
+import cc.kune.common.client.utils.TextUtils;
+
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.MouseOutEvent;
+import com.google.gwt.event.dom.client.MouseOutHandler;
+import com.google.gwt.event.dom.client.MouseOverEvent;
+import com.google.gwt.event.dom.client.MouseOverHandler;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.VerticalPanel;
+
+/**
+ * BasicThumb.java
+ */
+public class BasicThumb extends Composite {
+ private static final int NOSIZE = -1;
+ private final Image image;
+ private final Label label;
+ private boolean onOverLabel;
+
+ public BasicThumb(final String imageUrl, final int imgSize, final String text, final int textMaxLenght,
+ final boolean crop) {
+ this(imageUrl, imgSize, text, textMaxLenght, crop, null);
+ }
+
+ public BasicThumb(final String imageUrl, final int imgSize, final String text, final int textMaxLenght,
+ final boolean crop, final ClickHandler clickHandler) {
+ super();
+ onOverLabel = false;
+ final VerticalPanel vpanel = new VerticalPanel();
+ if (imgSize == NOSIZE) {
+ image = new Image(imageUrl);
+ } else {
+ if (crop) {
+ image = new Image(imageUrl, 0, 0, imgSize, imgSize);
+ } else {
+ image = new Image(imageUrl);
+ image.setPixelSize(imgSize, imgSize);
+ }
+ }
+ final String title = textMaxLenght == NOSIZE ? text : TextUtils.ellipsis(text, textMaxLenght);
+ label = new Label(title);
+ vpanel.add(image);
+ vpanel.add(label);
+ vpanel.addStyleName("k-basic-thumb");
+ vpanel.addStyleName("kune-Margin-Small-trbl");
+ vpanel.addStyleName("kune-pointer");
+ vpanel.addStyleName("kune-floatleft");
+ vpanel.setCellHorizontalAlignment(label, VerticalPanel.ALIGN_CENTER);
+ if (clickHandler instanceof ClickHandler) {
+ addClickHandlerImpl(clickHandler);
+ }
+ image.addMouseOverHandler(new MouseOverHandler() {
+
+ @Override
+ public void onMouseOver(final MouseOverEvent event) {
+ if (onOverLabel) {
+ label.setVisible(true);
+ }
+ }
+ });
+ image.addMouseOutHandler(new MouseOutHandler() {
+
+ @Override
+ public void onMouseOut(final MouseOutEvent event) {
+ if (onOverLabel) {
+ label.setVisible(false);
+ }
+ }
+ });
+ initWidget(vpanel);
+ }
+
+ public BasicThumb(final String imageUrl, final String thumText, final ClickHandler clickHandler) {
+ this(imageUrl, NOSIZE, thumText, NOSIZE, false, clickHandler);
+ }
+
+ public BasicThumb(final String imageUrl, final String text, final int textMaxLenght, final ClickHandler clickHandler) {
+ this(imageUrl, NOSIZE, text, textMaxLenght, false, clickHandler);
+ }
+
+ public void addClickHandler(final ClickHandler clickHandler) {
+ addClickHandlerImpl(clickHandler);
+ }
+
+ private void addClickHandlerImpl(final ClickHandler clickHandler) {
+ label.addClickHandler(clickHandler);
+ image.addClickHandler(clickHandler);
+ }
+
+ public void setOnOverLabel(final boolean onOverLabel) {
+ this.onOverLabel = onOverLabel;
+ label.setVisible(!onOverLabel);
+ }
+
+ public void setText(final String text) {
+ label.setText(text);
+ }
+
+ public void setThumbUrl(final String url) {
+ image.setUrl(url);
+ }
+
+ public void setTooltip(final String tip) {
+ // DOM.setElementAttribute(thumbImg.getElement(), "qtip", tip);
+ image.setTitle(tip);
+ label.setTitle(tip);
+ // KuneUiUtils.setQuickTip(thumbImg, tip);
+ // KuneUiUtils.setQuickTip(thumbLabel, tip);
+ }
+
+ public void setTooltip(final String tipTitle, final String tip) {
+ image.setTitle(tip);
+ label.setTitle(tip);
+ }
+}
Added: trunk/src/main/java/cc/kune/common/client/utils/OnAcceptCallback.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/utils/OnAcceptCallback.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/utils/OnAcceptCallback.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,12 @@
+package cc.kune.common.client.utils;
+
+import com.google.gwt.core.client.GWT;
+
+public abstract class OnAcceptCallback implements SimpleCallback {
+
+ @Override
+ public void onCancel() {
+ // Do nothing
+ GWT.log("On cancel callback");
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/common/client/utils/OnAcceptCallback.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -49,6 +49,8 @@
import cc.kune.core.client.init.AppStarterDefault;
import cc.kune.core.client.init.PrefetchUtilities;
import cc.kune.core.client.logs.EventBusWithLogging;
+import cc.kune.core.client.notify.confirm.UserConfirmPanel;
+import cc.kune.core.client.notify.confirm.UserConfirmPresenter;
import cc.kune.core.client.notify.msgs.UserNotifierPresenter;
import cc.kune.core.client.notify.msgs.UserNotifierPresenter.UserNotifierProxy;
import cc.kune.core.client.notify.msgs.UserNotifierViewImpl;
@@ -64,6 +66,8 @@
import cc.kune.core.client.sitebar.logo.SiteLogoViewImpl;
import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter;
import cc.kune.core.client.sitebar.spaces.SpaceSelectorViewImpl;
+import cc.kune.core.client.sn.GroupMembersPanel;
+import cc.kune.core.client.sn.GroupMembersPresenter;
import cc.kune.core.client.state.ContentProvider;
import cc.kune.core.client.state.ContentProviderDefault;
import cc.kune.core.client.state.HistoryWrapper;
@@ -122,6 +126,8 @@
SitebarActionsViewImpl.class, SitebarActionsPresenter.SitebarActionsProxy.class);
bindPresenter(NewGroupPresenter.class, NewGroupView.class, NewGroupPanel.class,
NewGroupPresenter.NewGroupProxy.class);
+ bindPresenter(GroupMembersPresenter.class, GroupMembersPresenter.GroupMembersView.class,
+ GroupMembersPanel.class, GroupMembersPresenter.GroupMembersProxy.class);
bind(UserPassAutocompleteManager.class).to(UserPassAutocompleteManagerImpl.class).in(Singleton.class);
bindPresenter(SignInPresenter.class, SignInView.class, SignInPanel.class, SignInPresenter.SignInProxy.class);
@@ -133,6 +139,9 @@
bind(UserMessagesPresenter.class).in(Singleton.class);
bind(UserMessagesPanel.class).in(Singleton.class);
+ bindPresenter(UserConfirmPresenter.class, UserConfirmPresenter.UserConfirmView.class, UserConfirmPanel.class,
+ UserConfirmPresenter.UserConfirmProxy.class);
+
// bind(MessagePanelView.class).to(MessagePanel.class);
// UI
@@ -160,5 +169,6 @@
bind(SitebarSignOutLink.class).in(Singleton.class);
bind(BeforeSignOut.class).in(Singleton.class);
bind(SiteTokenListeners.class).asEagerSingleton();
+ bind(CoreParts.class).asEagerSingleton();
}
}
Added: trunk/src/main/java/cc/kune/core/client/CoreParts.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreParts.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/CoreParts.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,23 @@
+package cc.kune.core.client;
+
+import cc.kune.core.client.init.AppStartEvent;
+import cc.kune.core.client.init.AppStartEvent.AppStartHandler;
+import cc.kune.core.client.sn.GroupMembersPresenter;
+import cc.kune.core.client.state.Session;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class CoreParts {
+
+ @Inject
+ public CoreParts(final Session session, final Provider<GroupMembersPresenter> grouMembersPresenter) {
+ session.onInitDataReceived(new AppStartHandler() {
+ @Override
+ public void onAppStart(final AppStartEvent event) {
+ grouMembersPresenter.get();
+ ;
+ }
+ });
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/CoreParts.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -99,7 +99,7 @@
}
public void show() {
- dialog.show();
+ dialog.showCentered();
}
public void unMask() {
Modified: trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,8 +20,8 @@
package cc.kune.core.client.errors;
import cc.kune.common.client.noti.NotifyLevel;
+import cc.kune.common.client.noti.NotifyUser;
import cc.kune.core.client.logs.Log;
-import cc.kune.core.client.notify.alerts.AlertEvent;
import cc.kune.core.client.notify.msgs.UserNotifyEvent;
import cc.kune.core.client.notify.spiner.ProgressHideEvent;
import cc.kune.core.client.state.Session;
@@ -109,8 +109,8 @@
goHome();
} else if (caught instanceof LastAdminInGroupException) {
logException(caught);
- eventBus.fireEvent(new AlertEvent(i18n.t("Warning"), i18n.t("Sorry, you are the last admin of this group."
- + " Look for someone to substitute you appropriately as admin before leaving this group.")));
+ NotifyUser.showAlertMessage(i18n.t("Warning"), i18n.t("Sorry, you are the last admin of this group."
+ + " Look for someone to substitute you appropriately as admin before leaving this group."));
} else if (caught instanceof AlreadyGroupMemberException) {
logException(caught);
eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.error, i18n.t("This group is already a group member")));
Modified: trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -286,7 +286,7 @@
@Override
public void show() {
- dialog.show();
+ dialog.showCentered();
}
@Override
Modified: trunk/src/main/java/cc/kune/core/client/i18n/I18nReadyEvent.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/I18nReadyEvent.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/i18n/I18nReadyEvent.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -23,63 +23,59 @@
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
-import com.gwtplatform.mvp.client.HasEventBus;
-public class I18nReadyEvent extends GwtEvent<I18nReadyEvent.I18nReadyHandler> {
+public class I18nReadyEvent extends GwtEvent<I18nReadyEvent.I18nReadyHandler> {
- public interface HasI18nReadyHandlers extends HasHandlers {
- HandlerRegistration addI18nReadyHandler(I18nReadyHandler handler);
- }
+ public interface HasI18nReadyHandlers extends HasHandlers {
+ HandlerRegistration addI18nReadyHandler(I18nReadyHandler handler);
+ }
- public interface I18nReadyHandler extends EventHandler {
- public void onI18nReady(I18nReadyEvent event);
- }
+ public interface I18nReadyHandler extends EventHandler {
+ public void onI18nReady(I18nReadyEvent event);
+ }
- private static final Type<I18nReadyHandler> TYPE = new Type<I18nReadyHandler>();
+ private static final Type<I18nReadyHandler> TYPE = new Type<I18nReadyHandler>();
- public static void fire(HasEventBus source) {
- source.fireEvent(new I18nReadyEvent());
- }
+ public static void fire(final HasHandlers source) {
+ source.fireEvent(new I18nReadyEvent());
+ }
- public static Type<I18nReadyHandler> getType() {
- return TYPE;
- }
+ public static Type<I18nReadyHandler> getType() {
+ return TYPE;
+ }
+ public I18nReadyEvent() {
+ }
- public I18nReadyEvent() {
- }
+ @Override
+ protected void dispatch(final I18nReadyHandler handler) {
+ handler.onI18nReady(this);
+ }
- @Override
- public Type<I18nReadyHandler> getAssociatedType() {
- return TYPE;
- }
+ @Override
+ public boolean equals(final Object other) {
+ if (other != null && other.getClass().equals(this.getClass())) {
+ final I18nReadyEvent o = (I18nReadyEvent) other;
+ return true;
+ }
+ return false;
+ }
- @Override
- protected void dispatch(I18nReadyHandler handler) {
- handler.onI18nReady(this);
- }
+ @Override
+ public Type<I18nReadyHandler> getAssociatedType() {
+ return TYPE;
+ }
- @Override
- public boolean equals(Object other) {
- if (other != null && other.getClass().equals(this.getClass())) {
- I18nReadyEvent o = (I18nReadyEvent) other;
- return true
- ;
+ @Override
+ public int hashCode() {
+ int hashCode = 23;
+ hashCode = (hashCode * 37) + getClass().hashCode();
+ return hashCode;
}
- return false;
- }
- @Override
- public int hashCode() {
- int hashCode = 23;
- hashCode = (hashCode * 37) + getClass().hashCode();
- return hashCode;
- }
+ @Override
+ public String toString() {
+ return "I18nReadyEvent[" + "]";
+ }
- @Override
- public String toString() {
- return "I18nReadyEvent["
- + "]";
- }
-
}
Copied: trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPanel.java (from rev 1239, trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmViewImpl2.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,93 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.client.notify.confirm;
+
+import cc.kune.common.client.noti.ConfirmAskEvent;
+import cc.kune.core.client.notify.confirm.UserConfirmPresenter.UserConfirmView;
+import cc.kune.core.client.ui.dialogs.BasicTopDialog;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.shared.HandlerRegistration;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.ViewImpl;
+
+public class UserConfirmPanel extends ViewImpl implements UserConfirmView {
+ private static final String CANCEL_ID = "k-conf-dial";
+ private static final String DIALOG_ID = "k-conf-dial-nok";
+ private static final String OK_ID = "k-conf-dial-ok";
+ private HandlerRegistration acceptHandler;
+ private final Label askLabel;
+ private HandlerRegistration cancelHandler;
+ private final BasicTopDialog dialog;
+
+ @Inject
+ public UserConfirmPanel(final I18nTranslationService i18n) {
+ dialog = new BasicTopDialog(DIALOG_ID, "", false, true, false, 100, 100, "", "", OK_ID, "", CANCEL_ID, 1);
+ askLabel = new Label();
+ askLabel.addStyleName("k-userconfirm-label");
+ dialog.getInnerPanel().add(askLabel);
+ }
+
+ @Override
+ public Widget asWidget() {
+ return null;
+ }
+
+ @Override
+ public void confirmAsk(final ConfirmAskEvent ask) {
+ dialog.getFirstBtnText().setText(ask.getAcceptBtnMsg());
+ dialog.getSecondBtnText().setText(ask.getCancelBtnMsg());
+ dialog.setFirstBtnTitle(ask.getAcceptBtnTooltip());
+ dialog.setSecondBtnTitle(ask.getCancelBtnTooltip());
+ dialog.getTitleText().setText(ask.getTitle());
+ askLabel.setText(ask.getMessage());
+ dialog.showCentered();
+ resetHandlers();
+ acceptHandler = dialog.getFirstBtn().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ ask.getCallback().onSuccess();
+ dialog.hide();
+ }
+ });
+ cancelHandler = dialog.getSecondBtn().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ ask.getCallback().onCancel();
+ dialog.hide();
+ }
+ });
+ dialog.showCentered();
+ }
+
+ private void resetHandlers() {
+ if (acceptHandler != null) {
+ acceptHandler.removeHandler();
+ }
+ if (cancelHandler != null) {
+ cancelHandler.removeHandler();
+ }
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -47,7 +47,7 @@
}
@ProxyEvent
- public void onConfirmAsk(ConfirmAskEvent event) {
+ public void onConfirmAsk(final ConfirmAskEvent event) {
getView().confirmAsk(event);
}
Deleted: trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmViewImpl2.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmViewImpl2.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmViewImpl2.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,45 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.core.client.notify.confirm;
-
-import cc.kune.common.client.noti.ConfirmAskEvent;
-import cc.kune.core.client.notify.confirm.UserConfirmPresenter.UserConfirmView;
-
-import com.google.gwt.user.client.ui.Widget;
-import com.google.inject.Inject;
-import com.gwtplatform.mvp.client.ViewImpl;
-
-public class UserConfirmViewImpl2 extends ViewImpl implements UserConfirmView {
- @Inject
- public UserConfirmViewImpl2() {
- }
-
- @Override
- public Widget asWidget() {
- return null;
- }
-
- @Override
- public void confirmAsk(final ConfirmAskEvent ask) {
- // TODO Auto-generated method stub
-
- }
-
-}
Modified: trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -355,6 +355,9 @@
@Source("loading-spiner.gif")
ImageResource loadingSpiner();
+ @Source("new-chat.gif")
+ ImageResource newChat();
+
@Source("nobody.png")
ImageResource nobody();
Added: trunk/src/main/java/cc/kune/core/client/resources/new-chat.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/new-chat.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: trunk/src/main/java/cc/kune/core/client/services/FileConstants.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileConstants.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/services/FileConstants.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/services/FileConstants.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,39 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.core.client.services;
+
+public final class FileConstants {
+
+ public final static String HASH = "hash";
+ public final static String TOKEN = "token";
+ public final static String DOWNLOAD = "download";
+ public final static String IMGSIZE = "imgsize";
+ public final static String FILENAME = "filename";
+ public final static String TYPE_ID = "typeid";
+ public final static String USER_LOGO_FIELD = "k-ulogov-ff";
+ public final static String GROUP_LOGO_FIELD = "k-glogov-ff";
+ public final static int LOGO_DEF_HEIGHT = 60;
+ public final static int LOGO_DEF_WIDTH = 468;
+ public final static int LOGO_MIN_HEIGHT = 28;
+ public final static int LOGO_MIN_WIDTH = 468;
+
+ private FileConstants() {
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/services/FileConstants.java
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: trunk/src/main/java/cc/kune/core/client/services/FileDownloadUtils.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileDownloadUtils.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/services/FileDownloadUtils.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/services/FileDownloadUtils.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,93 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.core.client.services;
+
+import cc.kune.common.client.utils.Url;
+import cc.kune.common.client.utils.UrlParam;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.domain.utils.StateToken;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.inject.Inject;
+
+public class FileDownloadUtils {
+
+ private static final String DOWNLOADSERVLET = "servlets/FileDownloadManager";
+ private static final String LOGODOWNLOADSERVLET = "servlets/EntityLogoDownloadManager";
+
+ private final ImageUtils imageUtils;
+ private final Session session;
+
+ @Inject
+ public FileDownloadUtils(final Session session, final ImageUtils imageUtils) {
+ this.session = session;
+ this.imageUtils = imageUtils;
+ }
+
+ private String calculateUrl(final StateToken token, final boolean download, final boolean useHash) {
+ final Url url = new Url(GWT.getModuleBaseURL() + DOWNLOADSERVLET, new UrlParam(FileConstants.TOKEN,
+ token.toString()));
+ if (download) {
+ url.add(new UrlParam(FileConstants.DOWNLOAD, download));
+ }
+ if (useHash) {
+ final String hash = session.getUserHash();
+ if (hash != null) {
+ url.add(new UrlParam(FileConstants.HASH, hash));
+ }
+ }
+ return url.toString();
+ }
+
+ public void downloadFile(final StateToken token) {
+ final String url = calculateUrl(token, true, true);
+ DOM.setElementAttribute(RootPanel.get("__download").getElement(), "src", url);
+ }
+
+ public String getImageResizedUrl(final StateToken token, final ImageSize imageSize) {
+ return calculateUrl(token, false, true) + "&" + new UrlParam(FileConstants.IMGSIZE, imageSize.toString());
+ }
+
+ public String getImageUrl(final StateToken token) {
+ return calculateUrl(token, false, true);
+ }
+
+ public String getLogoAvatarHtml(final StateToken groupToken, final boolean groupHasLogo, final boolean isPersonal,
+ final int size, final int hvspace) {
+ if (groupHasLogo) {
+ return "<img hspace='" + hvspace + "' vspace='" + hvspace + "' align='left' style='width: " + size
+ + "px; height: " + size + "px;' src='" + getLogoImageUrl(groupToken) + "'>";
+ } else {
+ return isPersonal ? imageUtils.getImageHtml(ImageDescriptor.personDef)
+ : imageUtils.getImageHtml(ImageDescriptor.groupDefIcon);
+ }
+ }
+
+ public String getLogoImageUrl(final StateToken token) {
+ return new Url(GWT.getModuleBaseURL() + LOGODOWNLOADSERVLET,
+ new UrlParam(FileConstants.TOKEN, token.toString())).toString();
+ }
+
+ public String getUrl(final StateToken token) {
+ return calculateUrl(token, false, false);
+ }
+}
Copied: trunk/src/main/java/cc/kune/core/client/services/ImageDescriptor.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/platf/client/services/ImageDescriptor.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/services/ImageDescriptor.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/services/ImageDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,24 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.core.client.services;
+
+public enum ImageDescriptor {
+ accept, add, addGreen, alert, anybody, arrowDownBlack, arrowDownGreen, arrowDownWhite, arrowLeftGreen, arrowRightBlack, arrowRightGreen, arrowRightWhite, arrowUpGreen, bulletAdd, bulletBlack, bulletBlue, bulletDelete, bulletGreen, bulletPink, bulletPurple, bulletRed, bulletStar, bulletToggleMinus, bulletTogglePlus, bulletYellow, button15cblue, button15cdark, button15clight, button15cxlight, button15lblue, button15ldark, button15llight, button15lxlight, button15rblue, button15rdark, button15rlight, button15rxlight, button17cblue, button17cdark, button17clight, button17cxlight, button17lblue, button17ldark, button17llight, button17lxlight, button17rblue, button17rdark, button17rlight, button17rxlight, button20cblue, button20cdark, button20clight, button20cxlight, button20lblue, button20ldark, button20llight, button20lxlight, button20rblue, button20rdark, button20rlight, button20rxlight, buttonArrowDown, buttonHelpBlue, buttonHelpDark, buttonHelpLight, buttonSitebarArrowDown, by80x15, bync80x15, byncnd80x15, byncsa80x15, bynd80x15, bysa80x15, cancel, clear, copyleft, cross, crossDark, del, emblemImportant, emblemSystem, error, everybody, fullscreen, gnuFdl, groupDefIcon, groupHome, important, info, infoLight, kuneClose, kuneExternalWindow, kuneHelpTranslationIcon, kuneIcon16, kuneLogo16px, kunePreferences, kuneSearchIco, kuneSearchIcoPush, language, nobody, noCopyleft, nt, opentriangle, personDef, remove, rssIcon, searchIco, spinKuneThundGreen, splitterVertBar, star10, star20, star30, star40, star50, star60, star70, star80, star90, starGrey, starSmallYellow, starVsmallYellow, starYellow, step1, step2, step3, step4, step5, themeChoose, triangle
+}
Copied: trunk/src/main/java/cc/kune/core/client/services/ImageSize.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/ImageSize.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/services/ImageSize.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/services/ImageSize.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,24 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.core.client.services;
+
+public enum ImageSize {
+ sized, thumb, ico
+}
\ No newline at end of file
Copied: trunk/src/main/java/cc/kune/core/client/services/ImageUtils.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/platf/client/services/ImageUtils.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/services/ImageUtils.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/services/ImageUtils.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,431 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.core.client.services;
+
+import cc.kune.core.client.resources.CoreResources;
+
+import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.inject.Inject;
+
+public class ImageUtils {
+
+ private final CoreResources img;
+
+ @Inject
+ public ImageUtils(final CoreResources img) {
+ this.img = img;
+ }
+
+ public ImageResource getImage(final ImageDescriptor imageDescriptor) {
+ switch (imageDescriptor) {
+ case accept: {
+ return img.accept();
+ }
+ case add: {
+ return img.add();
+ }
+ case addGreen: {
+ return img.addGreen();
+ }
+ case alert: {
+ return img.alert();
+ }
+ case anybody: {
+ return img.anybody();
+ }
+ case arrowDownBlack: {
+ return img.arrowDownBlack();
+ }
+ case arrowDownGreen: {
+ return img.arrowDownGreen();
+ }
+ case arrowDownWhite: {
+ return img.arrowDownWhite();
+ }
+ case arrowLeftGreen: {
+ return img.arrowLeftGreen();
+ }
+ case arrowRightBlack: {
+ return img.arrowRightBlack();
+ }
+ case arrowRightGreen: {
+ return img.arrowRightGreen();
+ }
+ case arrowRightWhite: {
+ return img.arrowRightWhite();
+ }
+ case arrowUpGreen: {
+ return img.arrowUpGreen();
+ }
+ case bulletAdd: {
+ return img.bulletAdd();
+ }
+ case bulletBlack: {
+ return img.bulletBlack();
+ }
+ case bulletBlue: {
+ return img.bulletBlue();
+ }
+ case bulletDelete: {
+ return img.bulletDelete();
+ }
+ case bulletGreen: {
+ return img.bulletGreen();
+ }
+ case bulletPink: {
+ return img.bulletPink();
+ }
+ case bulletPurple: {
+ return img.bulletPurple();
+ }
+ case bulletRed: {
+ return img.bulletRed();
+ }
+ case bulletStar: {
+ return img.bulletStar();
+ }
+ case bulletToggleMinus: {
+ return img.bulletToggleMinus();
+ }
+ case bulletTogglePlus: {
+ return img.bulletTogglePlus();
+ }
+ case bulletYellow: {
+ return img.bulletYellow();
+ }
+ case button15cblue: {
+ return img.button15cblue();
+ }
+ case button15cdark: {
+ return img.button15cdark();
+ }
+ case button15clight: {
+ return img.button15clight();
+ }
+ case button15cxlight: {
+ return img.button15cxlight();
+ }
+ case button15lblue: {
+ return img.button15lblue();
+ }
+ case button15ldark: {
+ return img.button15ldark();
+ }
+ case button15llight: {
+ return img.button15llight();
+ }
+ case button15lxlight: {
+ return img.button15lxlight();
+ }
+ case button15rblue: {
+ return img.button15rblue();
+ }
+ case button15rdark: {
+ return img.button15rdark();
+ }
+ case button15rlight: {
+ return img.button15rlight();
+ }
+ case button15rxlight: {
+ return img.button15rxlight();
+ }
+ case button17cblue: {
+ return img.button17cblue();
+ }
+ case button17cdark: {
+ return img.button17cdark();
+ }
+ case button17clight: {
+ return img.button17clight();
+ }
+ case button17cxlight: {
+ return img.button17cxlight();
+ }
+ case button17lblue: {
+ return img.button17lblue();
+ }
+ case button17ldark: {
+ return img.button17ldark();
+ }
+ case button17llight: {
+ return img.button17llight();
+ }
+ case button17lxlight: {
+ return img.button17lxlight();
+ }
+ case button17rblue: {
+ return img.button17rblue();
+ }
+ case button17rdark: {
+ return img.button17rdark();
+ }
+ case button17rlight: {
+ return img.button17rlight();
+ }
+ case button17rxlight: {
+ return img.button17rxlight();
+ }
+ case button20cblue: {
+ return img.button20cblue();
+ }
+ case button20cdark: {
+ return img.button20cdark();
+ }
+ case button20clight: {
+ return img.button20clight();
+ }
+ case button20cxlight: {
+ return img.button20cxlight();
+ }
+ case button20lblue: {
+ return img.button20lblue();
+ }
+ case button20ldark: {
+ return img.button20ldark();
+ }
+ case button20llight: {
+ return img.button20llight();
+ }
+ case button20lxlight: {
+ return img.button20lxlight();
+ }
+ case button20rblue: {
+ return img.button20rblue();
+ }
+ case button20rdark: {
+ return img.button20rdark();
+ }
+ case button20rlight: {
+ return img.button20rlight();
+ }
+ case button20rxlight: {
+ return img.button20rxlight();
+ }
+ case buttonArrowDown: {
+ return img.buttonArrowDown();
+ }
+ case buttonHelpBlue: {
+ return img.buttonHelpBlue();
+ }
+ case buttonHelpDark: {
+ return img.buttonHelpDark();
+ }
+ case buttonHelpLight: {
+ return img.buttonHelpLight();
+ }
+ case buttonSitebarArrowDown: {
+ return img.buttonSitebarArrowDown();
+ }
+ case by80x15: {
+ return img.by80x15();
+ }
+ case bync80x15: {
+ return img.bync80x15();
+ }
+ case byncnd80x15: {
+ return img.byncnd80x15();
+ }
+ case byncsa80x15: {
+ return img.byncsa80x15();
+ }
+ case bynd80x15: {
+ return img.bynd80x15();
+ }
+ case bysa80x15: {
+ return img.bysa80x15();
+ }
+ case cancel: {
+ return img.cancel();
+ }
+ case clear: {
+ return img.clear();
+ }
+ case copyleft: {
+ return img.copyleft();
+ }
+ case cross: {
+ return img.cross();
+ }
+ case crossDark: {
+ return img.crossDark();
+ }
+ case del: {
+ return img.del();
+ }
+ case emblemImportant: {
+ return img.emblemImportant();
+ }
+ case emblemSystem: {
+ return img.emblemSystem();
+ }
+ case error: {
+ return img.error();
+ }
+ case everybody: {
+ return img.everybody();
+ }
+ case fullscreen: {
+ return img.fullscreen();
+ }
+ case gnuFdl: {
+ return img.gnuFdl();
+ }
+ case groupDefIcon: {
+ return img.groupDefIcon();
+ }
+ case groupHome: {
+ return img.groupHome();
+ }
+ case important: {
+ return img.important();
+ }
+ case info: {
+ return img.info();
+ }
+ case infoLight: {
+ return img.infoLight();
+ }
+ case kuneClose: {
+ return img.kuneClose();
+ }
+ case kuneExternalWindow: {
+ return img.kuneExternalWindow();
+ }
+ case kuneHelpTranslationIcon: {
+ return img.kuneHelpTranslationIcon();
+ }
+ case kuneIcon16: {
+ return img.kuneIcon16();
+ }
+ case kuneLogo16px: {
+ return img.kuneLogo16px();
+ }
+ case kunePreferences: {
+ return img.kunePreferences();
+ }
+ case kuneSearchIco: {
+ return img.kuneSearchIco();
+ }
+ case kuneSearchIcoPush: {
+ return img.kuneSearchIcoPush();
+ }
+ case language: {
+ return img.language();
+ }
+ case nobody: {
+ return img.nobody();
+ }
+ case noCopyleft: {
+ return img.noCopyleft();
+ }
+ case nt: {
+ return img.nt();
+ }
+ case opentriangle: {
+ return img.opentriangle();
+ }
+ case personDef: {
+ return img.personDef();
+ }
+ case remove: {
+ return img.remove();
+ }
+ case rssIcon: {
+ return img.rssIcon();
+ }
+ case searchIco: {
+ return img.searchIco();
+ }
+ case spinKuneThundGreen: {
+ return img.spinKuneThundGreen();
+ }
+ case splitterVertBar: {
+ return img.splitterVertBar();
+ }
+ case star10: {
+ return img.star10();
+ }
+ case star20: {
+ return img.star20();
+ }
+ case star30: {
+ return img.star30();
+ }
+ case star40: {
+ return img.star40();
+ }
+ case star50: {
+ return img.star50();
+ }
+ case star60: {
+ return img.star60();
+ }
+ case star70: {
+ return img.star70();
+ }
+ case star80: {
+ return img.star80();
+ }
+ case star90: {
+ return img.star90();
+ }
+ case starGrey: {
+ return img.starGrey();
+ }
+ case starSmallYellow: {
+ return img.starSmallYellow();
+ }
+ case starVsmallYellow: {
+ return img.starVsmallYellow();
+ }
+ case starYellow: {
+ return img.starYellow();
+ }
+ case step1: {
+ return img.step1();
+ }
+ case step2: {
+ return img.step2();
+ }
+ case step3: {
+ return img.step3();
+ }
+ case step4: {
+ return img.step4();
+ }
+ case step5: {
+ return img.step5();
+ }
+ case themeChoose: {
+ return img.themeChoose();
+ }
+ case triangle: {
+ return img.triangle();
+ }
+ default:
+ return null;
+ }
+ }
+
+ public String getImageHtml(final ImageDescriptor imageDescriptor) {
+ return AbstractImagePrototype.create(getImage(imageDescriptor)).getHTML();
+ }
+}
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -27,8 +27,6 @@
import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuSeparatorDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarDescriptor;
-import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor;
-import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
import cc.kune.common.client.ui.KuneWindowUtils;
import cc.kune.core.client.init.AppStartEvent;
import cc.kune.core.client.notify.msgs.UserNotifyEvent;
@@ -118,8 +116,10 @@
action.putValue(Action.NAME, "Test");
final MenuItemDescriptor testMenuItem = new MenuItemDescriptor(OPTIONS_MENU, action);
OPTIONS_MENU.setStyles("k-no-backimage, k-btn-sitebar");
- final ToolbarSeparatorDescriptor separator = new ToolbarSeparatorDescriptor(Type.separator, RIGHT_TOOLBAR);
- final ToolbarSeparatorDescriptor separator2 = new ToolbarSeparatorDescriptor(Type.separator, RIGHT_TOOLBAR);
+ // final ToolbarSeparatorDescriptor separator = new
+ // ToolbarSeparatorDescriptor(Type.separator, RIGHT_TOOLBAR);
+ // final ToolbarSeparatorDescriptor separator2 = new
+ // ToolbarSeparatorDescriptor(Type.separator, RIGHT_TOOLBAR);
final MenuSeparatorDescriptor menuSeparator = new MenuSeparatorDescriptor(OPTIONS_MENU);
final AbstractExtendedAction bugsAction = new AbstractExtendedAction() {
Added: trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,172 @@
+package cc.kune.core.client.sn;
+
+import cc.kune.common.client.actions.ui.ActionFlowPanel;
+import cc.kune.common.client.actions.ui.ActionSimplePanel;
+import cc.kune.common.client.actions.ui.IsActionExtensible;
+import cc.kune.common.client.actions.ui.bind.GuiProvider;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
+import cc.kune.common.client.ui.BasicThumb;
+import cc.kune.core.client.sn.GroupMembersPresenter.GroupMembersView;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.WsArmor;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.DeckPanel;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.ViewImpl;
+
+public class GroupMembersPanel extends ViewImpl implements GroupMembersView {
+
+ interface GroupMembersPanelUiBinder extends UiBinder<Widget, GroupMembersPanel> {
+ }
+
+ private static GroupMembersPanelUiBinder uiBinder = GWT.create(GroupMembersPanelUiBinder.class);
+ private final ActionSimplePanel actions;
+ @UiField
+ FlowPanel adminsFlow;
+ @UiField
+ Label adminsLabel;
+ ActionFlowPanel bottomActionsToolbar;
+ @UiField
+ FlowPanel bottomPanel;
+ @UiField
+ FlowPanel collabsFlow;
+ @UiField
+ Label collabsLabel;
+ @UiField
+ ScrollPanel collabsScroll;
+ @UiField
+ DeckPanel deck;
+ @UiField
+ FlowPanel mainPanel;
+ @UiField
+ Label mainTitle;
+ @UiField
+ FlowPanel membersFlow;
+ @UiField
+ Label noMembersVisible;
+ @UiField
+ Label orphanProject;
+ @UiField
+ FlowPanel pendingsFlow;
+ @UiField
+ Label pendingsLabel;
+ @UiField
+ ScrollPanel pendingsScroll;
+ private final Widget widget;
+
+ @Inject
+ public GroupMembersPanel(final I18nTranslationService i18n, final GuiProvider guiProvider, final WsArmor armor) {
+ widget = uiBinder.createAndBindUi(this);
+ mainTitle.setText(i18n.t("Group members"));
+ mainTitle.setTitle(i18n.t("People and groups collaborating in this group"));
+ adminsLabel.setText(i18n.t("Admins"));
+ adminsLabel.setTitle(i18n.t("People that can admin this group"));
+ collabsLabel.setText(i18n.t("Collaborators"));
+ collabsLabel.setTitle(i18n.t("Other people that collaborate with this group"));
+ pendingsLabel.setText(i18n.t("Pending"));
+ pendingsLabel.setTitle(i18n.t("People pending to be accepted in this group by the admins"));
+ orphanProject.setText(i18n.t("This is an orphaned project, if you are interested please request to join to work on it"));
+ noMembersVisible.setText(i18n.t("The members of this group are not public"));
+ bottomActionsToolbar = new ActionFlowPanel(guiProvider);
+ actions = new ActionSimplePanel(guiProvider);
+ bottomPanel.add(bottomActionsToolbar);
+ armor.getEntityToolsNorth().add(widget);
+ deck.showWidget(2);
+ }
+
+ @Override
+ public void addAdmin(final GroupDTO group, final String avatarUrl, final String tooltip, final String tooltipTitle,
+ final GuiActionDescCollection menu) {
+ final BasicThumb thumb = createThumb(group, avatarUrl, tooltip, tooltipTitle, menu);
+ adminsFlow.add(thumb);
+ }
+
+ @Override
+ public void addCollab(final GroupDTO group, final String avatarUrl, final String tooltip,
+ final String tooltipTitle, final GuiActionDescCollection menu) {
+ final BasicThumb thumb = createThumb(group, avatarUrl, tooltip, tooltipTitle, menu);
+ collabsFlow.add(thumb);
+ }
+
+ @Override
+ public void addPending(final GroupDTO group, final String avatarUrl, final String tooltip,
+ final String tooltipTitle, final GuiActionDescCollection menu) {
+ final BasicThumb thumb = createThumb(group, avatarUrl, tooltip, tooltipTitle, menu);
+ pendingsFlow.add(thumb);
+ }
+
+ @Override
+ public Widget asWidget() {
+ return widget;
+ }
+
+ @Override
+ public void clear() {
+ pendingsFlow.clear();
+ adminsFlow.clear();
+ collabsFlow.clear();
+ actions.clear();
+ }
+
+ private BasicThumb createThumb(final GroupDTO group, final String avatarUrl, final String tooltip,
+ final String tooltipTitle, final GuiActionDescCollection menuitems) {
+ final BasicThumb thumb = new BasicThumb(avatarUrl, AVATARSIZE, group.getShortName(), AVATARLABELMAXSIZE, false);
+ final MenuDescriptor menu = new MenuDescriptor();
+ menu.setStandalone(true);
+ for (final GuiActionDescrip item : menuitems) {
+ item.setParent(menu);
+ }
+ final ClickHandler clickHand = new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ GWT.log("Show event");
+ menu.show(thumb);
+ }
+ };
+ thumb.addClickHandler(clickHand);
+ actions.add(menu);
+ actions.add(menuitems);
+
+ thumb.setTooltip(tooltipTitle, tooltip);
+ thumb.setOnOverLabel(true);
+ return thumb;
+ }
+
+ @Override
+ public IsActionExtensible getBottomToolbar() {
+ return bottomActionsToolbar;
+ }
+
+ @Override
+ public void setVisible(final boolean visible) {
+ deck.setVisible(visible);
+ }
+
+ @Override
+ public void showMemberNotPublic() {
+ deck.showWidget(0);
+ }
+
+ @Override
+ public void showMembers() {
+ deck.showWidget(2);
+ }
+
+ @Override
+ public void showOrphan() {
+ deck.showWidget(1);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPanel.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPanel.ui.xml (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPanel.ui.xml 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,66 @@
+<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
+<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+ xmlns:g="urn:import:com.google.gwt.user.client.ui">
+ <ui:style>
+ .important {
+ font-weight: bold;
+ }
+ </ui:style>
+
+ <g:FlowPanel width="100%" ui:field="mainPanel"
+ addStyleNames="k-sn-mainpanel">
+ <g:Label ui:field="mainTitle" addStyleNames="k-sn-maintitle" />
+ <g:DeckPanel ui:field="deck" addStyleNames="k-sn-deck">
+ <g:Label ui:field="noMembersVisible" addStyleNames="k-sn-novisible-label" />
+ <g:Label ui:field="orphanProject" addStyleNames="k-sn-orphan-label" />
+ <g:FlowPanel width="100%" height="100px" ui:field="membersFlow">
+
+ <g:DockLayoutPanel unit="EM" width="100%"
+ addStyleNames="k-sn-adminspanel" height="100px">
+ <g:north size="2.0">
+ <g:Label text="Admins" ui:field="adminsLabel"
+ addStyleNames="k-sn-adminslabel" />
+ </g:north>
+ <g:center>
+ <g:ScrollPanel width="100%" addStyleNames="k-sn-adminsscroll">
+ <g:FlowPanel width="100%" height="100%"
+ ui:field="adminsFlow" />
+ </g:ScrollPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+
+ <g:DockLayoutPanel unit="EM" width="100%"
+ addStyleNames="k-sn-collabspanel" height="100px">
+ <g:north size="2.0">
+ <g:Label text="Collabs" ui:field="collabsLabel"
+ addStyleNames="k-sn-collabslabel" />
+ </g:north>
+ <g:center>
+ <g:ScrollPanel ui:field="collabsScroll" width="100%"
+ addStyleNames="k-sn-collabsscroll">
+ <g:FlowPanel width="100%" height="100%"
+ ui:field="collabsFlow" />
+ </g:ScrollPanel>
+ </g:center>
+
+ </g:DockLayoutPanel>
+
+ <g:DockLayoutPanel unit="EM" width="100%"
+ addStyleNames="k-sn-pendingspanel" height="100px">
+ <g:north size="2.0">
+ <g:Label text="Pendings" ui:field="pendingsLabel"
+ addStyleNames="k-sn-pendingslabel" />
+ </g:north>
+ <g:center>
+ <g:ScrollPanel ui:field="pendingsScroll"
+ addStyleNames="k-sn-pendingsscroll" width="100%">
+ <g:FlowPanel width="100%" height="100%"
+ ui:field="pendingsFlow" />
+ </g:ScrollPanel>
+ </g:center>
+ </g:DockLayoutPanel>
+ </g:FlowPanel>
+ </g:DeckPanel>
+ <g:FlowPanel ui:field="bottomPanel" />
+ </g:FlowPanel>
+</ui:UiBinder>
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPanel.ui.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPresenter.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,188 @@
+package cc.kune.core.client.sn;
+
+import java.util.List;
+
+import cc.kune.common.client.actions.ui.IsActionExtensible;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.core.client.init.AppStartEvent;
+import cc.kune.core.client.init.AppStartEvent.AppStartHandler;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.sn.actions.registry.AbstractSocialNetworActionsRegistry;
+import cc.kune.core.client.sn.actions.registry.SNAdminsMenuItemsRegistry;
+import cc.kune.core.client.sn.actions.registry.SNCollabsMenuItemsRegistry;
+import cc.kune.core.client.sn.actions.registry.SNPendingsMenuItemsRegistry;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.SocialNetworkChangedEvent;
+import cc.kune.core.client.state.StateChangedEvent;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.domain.utils.AccessRights;
+import cc.kune.core.shared.dto.AccessListsDTO;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.SocialNetworkDTO;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.gwtplatform.mvp.client.Presenter;
+import com.gwtplatform.mvp.client.View;
+import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
+import com.gwtplatform.mvp.client.proxy.Proxy;
+import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;
+
+public class GroupMembersPresenter extends
+ Presenter<GroupMembersPresenter.GroupMembersView, GroupMembersPresenter.GroupMembersProxy> {
+
+ @ProxyCodeSplit
+ public interface GroupMembersProxy extends Proxy<GroupMembersPresenter> {
+ }
+
+ public interface GroupMembersView extends View {
+ int AVATARLABELMAXSIZE = 15;
+ int AVATARSIZE = 32;
+ String NOAVATAR = "";
+
+ void addAdmin(GroupDTO group, String avatarUrl, String tooltip, String tooltipTitle,
+ GuiActionDescCollection menu);
+
+ void addCollab(GroupDTO group, String avatarUrl, String tooltip, String tooltipTitle,
+ GuiActionDescCollection menu);
+
+ void addPending(GroupDTO group, String avatarUrl, String tooltip, String tooltipTitle,
+ GuiActionDescCollection menu);
+
+ void clear();
+
+ IsActionExtensible getBottomToolbar();
+
+ void setVisible(boolean b);
+
+ void showMemberNotPublic();
+
+ void showMembers();
+
+ void showOrphan();
+ }
+
+ private final SNAdminsMenuItemsRegistry adminsMenuItemsRegistry;
+ private final SNCollabsMenuItemsRegistry collabsMenuItemsRegistry;
+
+ private final Provider<FileDownloadUtils> downloadProvider;
+ private final SNPendingsMenuItemsRegistry pendingsMenuItemsRegistry;
+ private final Session session;
+
+ @Inject
+ public GroupMembersPresenter(final EventBus eventBus, final GroupMembersView view, final GroupMembersProxy proxy,
+ final StateManager stateManager, final Session session, final Provider<FileDownloadUtils> downloadProvider,
+ final SNAdminsMenuItemsRegistry adminsMenuItemsRegistry,
+ final SNCollabsMenuItemsRegistry collabsMenuItemsRegistry,
+ final SNPendingsMenuItemsRegistry pendingsMenuItemsRegistry) {
+ super(eventBus, view, proxy);
+ this.session = session;
+ this.downloadProvider = downloadProvider;
+ this.adminsMenuItemsRegistry = adminsMenuItemsRegistry;
+ this.collabsMenuItemsRegistry = collabsMenuItemsRegistry;
+ this.pendingsMenuItemsRegistry = pendingsMenuItemsRegistry;
+ stateManager.onStateChanged(new StateChangedEvent.StateChangedHandler() {
+ @Override
+ public void onStateChanged(final StateChangedEvent event) {
+ GroupMembersPresenter.this.onStateChanged(event.getState());
+ }
+ });
+ stateManager.onSocialNetworkChanged(new SocialNetworkChangedEvent.SocialNetworkChangedHandler() {
+
+ @Override
+ public void onSocialNetworkChanged(final SocialNetworkChangedEvent event) {
+ GroupMembersPresenter.this.onStateChanged(event.getState());
+ }
+ });
+ session.onInitDataReceived(new AppStartHandler() {
+ @Override
+ public void onAppStart(final AppStartEvent event) {
+ // FIXME
+ }
+ });
+ createActions();
+ }
+
+ private void createActions() {
+ // TODO
+ }
+
+ private GuiActionDescCollection createMenuItems(final GroupDTO group,
+ final AbstractSocialNetworActionsRegistry registry) {
+ final GuiActionDescCollection items = new GuiActionDescCollection();
+ for (final Provider<MenuItemDescriptor> provider : registry) {
+ final MenuItemDescriptor menuItem = provider.get();
+ menuItem.setItem(group);
+ items.add(menuItem);
+ }
+ return items;
+ }
+
+ private String getAvatar(final GroupDTO admin) {
+ return admin.hasLogo() ? downloadProvider.get().getLogoImageUrl(admin.getStateToken()) : "images/unknown.jpg";
+ }
+
+ private void onStateChanged(final StateAbstractDTO state) {
+ if (state.getGroup().isPersonal()) {
+ getView().setVisible(false);
+ } else {
+ if (state.getSocialNetworkData().isMembersVisible()) {
+ setGroupMembers(state.getGroupMembers(), state.getGroupRights());
+ } else {
+ getView().clear();
+ getView().showMemberNotPublic();
+ getView().setVisible(true);
+ }
+ }
+ }
+
+ @Override
+ protected void revealInParent() {
+ RevealRootContentEvent.fire(this, this);
+ }
+
+ private void setGroupMembers(final SocialNetworkDTO socialNetwork, final AccessRights rights) {
+ final AccessListsDTO accessLists = socialNetwork.getAccessLists();
+
+ final List<GroupDTO> adminsList = accessLists.getAdmins().getList();
+ final List<GroupDTO> collabList = accessLists.getEditors().getList();
+ final List<GroupDTO> pendingCollabsList = socialNetwork.getPendingCollaborators().getList();
+
+ final int numAdmins = adminsList.size();
+ final int numCollabs = collabList.size();
+ final int numPendings = pendingCollabsList.size();
+
+ if ((numAdmins + numCollabs + numPendings) == 0) {
+ getView().showOrphan();
+ } else {
+ final boolean userIsAdmin = rights.isAdministrable();
+ final boolean userCanView = rights.isVisible();
+
+ if (userCanView) {
+ for (final GroupDTO admin : adminsList) {
+ final String avatar = getAvatar(admin);
+ getView().addAdmin(admin, avatar, admin.getLongName(), "",
+ createMenuItems(admin, adminsMenuItemsRegistry));
+
+ }
+ for (final GroupDTO collab : collabList) {
+ final String avatar = getAvatar(collab);
+ getView().addCollab(collab, avatar, collab.getLongName(), "",
+ createMenuItems(collab, collabsMenuItemsRegistry));
+ }
+ if (userIsAdmin) {
+ for (final GroupDTO pendingCollab : pendingCollabsList) {
+ final String avatar = getAvatar(pendingCollab);
+ getView().addCollab(pendingCollab, avatar, pendingCollab.getLongName(), "",
+ createMenuItems(pendingCollab, pendingsMenuItemsRegistry));
+ }
+ }
+ getView().showMembers();
+ }
+ }
+ getView().setVisible(true);
+ }
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPresenter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/AcceptJoinGroupAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/AcceptJoinGroupAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/AcceptJoinGroupAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,60 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class AcceptJoinGroupAction extends AbstractExtendedAction {
+ public class AcceptJoinGroupMenuItem extends MenuItemDescriptor {
+
+ @Inject
+ public AcceptJoinGroupMenuItem(final AcceptJoinGroupAction action) {
+ super(action);
+ }
+ }
+ private final I18nTranslationService i18n;
+ private final Session session;
+ private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+
+ private final StateManager stateManager;
+
+ @Inject
+ public AcceptJoinGroupAction(final StateManager stateManager, final Session session,
+ final I18nTranslationService i18n, final CoreResources res,
+ final Provider<SocialNetworkServiceAsync> snServiceProvider) {
+ this.stateManager = stateManager;
+ this.session = session;
+ this.i18n = i18n;
+ this.snServiceProvider = snServiceProvider;
+ putValue(NAME, i18n.t("Accept this member"));
+ putValue(Action.SMALL_ICON, res.accept());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().acceptJoinGroup(session.getUserHash(), session.getCurrentState().getStateToken(),
+ ((GroupDTO) event.getSource()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member accepted"));
+ stateManager.setSocialNetwork(result);
+ }
+ });
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/AcceptJoinGroupAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToAdminAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToAdminAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToAdminAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,59 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class ChangeToAdminAction extends AbstractExtendedAction {
+ public class ChangeToAdminMenuItem extends MenuItemDescriptor {
+ @Inject
+ public ChangeToAdminMenuItem(final ChangeToAdminAction action) {
+ super(action);
+ }
+ }
+ private final I18nTranslationService i18n;
+ private final Session session;
+ private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+
+ private final StateManager stateManager;
+
+ @Inject
+ public ChangeToAdminAction(final StateManager stateManager, final Session session,
+ final I18nTranslationService i18n, final CoreResources res,
+ final Provider<SocialNetworkServiceAsync> snServiceProvider) {
+ this.stateManager = stateManager;
+ this.session = session;
+ this.i18n = i18n;
+ this.snServiceProvider = snServiceProvider;
+ putValue(NAME, i18n.t("Change to admin"));
+ putValue(Action.SMALL_ICON, res.arrowUpGreen());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().setCollabAsAdmin(session.getUserHash(), session.getCurrentState().getStateToken(),
+ ((GroupDTO) event.getSource()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member type changed"));
+ stateManager.setSocialNetwork(result);
+ }
+ });
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToAdminAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToCollabAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToCollabAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToCollabAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,58 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class ChangeToCollabAction extends AbstractExtendedAction {
+ public class ChangeToCollabMenuItem extends MenuItemDescriptor {
+ @Inject
+ public ChangeToCollabMenuItem(final ChangeToCollabAction action) {
+ super(action);
+ }
+ }
+ private final I18nTranslationService i18n;
+ private final Session session;
+ private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+ private final StateManager stateManager;
+
+ @Inject
+ public ChangeToCollabAction(final StateManager stateManager, final Session session,
+ final I18nTranslationService i18n, final CoreResources res,
+ final Provider<SocialNetworkServiceAsync> snServiceProvider) {
+ this.stateManager = stateManager;
+ this.session = session;
+ this.i18n = i18n;
+ this.snServiceProvider = snServiceProvider;
+ putValue(NAME, i18n.t("Change to collaborator"));
+ putValue(Action.SMALL_ICON, res.arrowDownGreen());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().setAdminAsCollab(session.getUserHash(), session.getCurrentState().getStateToken(),
+ ((GroupDTO) event.getSource()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member type changed"));
+ stateManager.setSocialNetwork(result);
+ }
+ });
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToCollabAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/DenyJoinGroupAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/DenyJoinGroupAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/DenyJoinGroupAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,59 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class DenyJoinGroupAction extends AbstractExtendedAction {
+ public class DenyJoinGroupMenuItem extends MenuItemDescriptor {
+ @Inject
+ public DenyJoinGroupMenuItem(final DenyJoinGroupAction action) {
+ super(action);
+ }
+ }
+ private final I18nTranslationService i18n;
+ private final Session session;
+ private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+
+ private final StateManager stateManager;
+
+ @Inject
+ public DenyJoinGroupAction(final StateManager stateManager, final Session session,
+ final I18nTranslationService i18n, final CoreResources res,
+ final Provider<SocialNetworkServiceAsync> snServiceProvider) {
+ this.stateManager = stateManager;
+ this.session = session;
+ this.i18n = i18n;
+ this.snServiceProvider = snServiceProvider;
+ putValue(NAME, i18n.t("Reject as member"));
+ putValue(Action.SMALL_ICON, res.cancel());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().denyJoinGroup(session.getUserHash(), session.getCurrentState().getStateToken(),
+ ((GroupDTO) event.getSource()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member rejected"));
+ stateManager.setSocialNetwork(result);
+ }
+ });
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/DenyJoinGroupAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/GotoGroupAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/GotoGroupAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/GotoGroupAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,36 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class GotoGroupAction extends AbstractExtendedAction {
+ public class GotoGroupMenuItem extends MenuItemDescriptor {
+ @Inject
+ public GotoGroupMenuItem(final GotoGroupAction action) {
+ super(action);
+ }
+ }
+
+ private final StateManager stateManager;
+
+ @Inject
+ public GotoGroupAction(final StateManager stateManager, final I18nTranslationService i18n, final CoreResources res) {
+ this.stateManager = stateManager;
+ putValue(NAME, i18n.t("Visit this group homepage"));
+ putValue(Action.SMALL_ICON, res.groupHome());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ stateManager.gotoToken(((GroupDTO) event.getSource()).getStateToken());
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/GotoGroupAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/GotoMemberAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/GotoMemberAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/GotoMemberAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,35 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class GotoMemberAction extends AbstractExtendedAction {
+ public class GotoMemberMenuItem extends MenuItemDescriptor {
+ @Inject
+ public GotoMemberMenuItem(final GotoMemberAction action) {
+ super(action);
+ }
+ }
+ private final StateManager stateManager;
+
+ @Inject
+ public GotoMemberAction(final StateManager stateManager, final I18nTranslationService i18n, final CoreResources res) {
+ this.stateManager = stateManager;
+ putValue(NAME, i18n.t("Visit this member homepage"));
+ putValue(Action.SMALL_ICON, res.groupHome());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ stateManager.gotoToken(((GroupDTO) event.getSource()).getStateToken());
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/GotoMemberAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/RemoveMemberAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/RemoveMemberAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/RemoveMemberAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,58 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class RemoveMemberAction extends AbstractExtendedAction {
+ public class RemoveMemberMenuItem extends MenuItemDescriptor {
+ @Inject
+ public RemoveMemberMenuItem(final RemoveMemberAction action) {
+ super(action);
+ }
+ }
+ private final I18nTranslationService i18n;
+ private final Session session;
+ private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+ private final StateManager stateManager;
+
+ @Inject
+ public RemoveMemberAction(final StateManager stateManager, final Session session,
+ final I18nTranslationService i18n, final CoreResources res,
+ final Provider<SocialNetworkServiceAsync> snServiceProvider) {
+ this.stateManager = stateManager;
+ this.session = session;
+ this.i18n = i18n;
+ this.snServiceProvider = snServiceProvider;
+ putValue(NAME, i18n.t("Remove this member"));
+ putValue(Action.SMALL_ICON, res.del());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().deleteMember(session.getUserHash(), session.getCurrentState().getStateToken(),
+ ((GroupDTO) event.getSource()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member removed"));
+ stateManager.reload();
+ }
+ });
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/RemoveMemberAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithUserAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithUserAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithUserAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,47 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.chat.client.ChatClient;
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class StartChatWithUserAction extends AbstractExtendedAction {
+ public class StartChatWithUserMenuItem extends MenuItemDescriptor {
+ @Inject
+ public StartChatWithUserMenuItem(final StartChatWithUserAction action) {
+ super(action);
+ }
+ }
+ private final Provider<ChatClient> chatClient;
+
+ private final I18nTranslationService i18n;
+
+ @Inject
+ public StartChatWithUserAction(final I18nTranslationService i18n, final CoreResources res,
+ final Provider<ChatClient> chatClient) {
+ this.i18n = i18n;
+ this.chatClient = chatClient;
+ putValue(NAME, i18n.t("Start a chat with this member"));
+ putValue(Action.SMALL_ICON, res.newChat());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ chatClient.get().show();
+ if (chatClient.get().isLoggedIn()) {
+ chatClient.get().chat(XmppURI.jid(((GroupDTO) event.getSource()).getShortName()));
+ } else {
+ NotifyUser.important(i18n.t("To start a chat you need to be 'online'"));
+ }
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithUserAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/UnJoinGroupAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/UnJoinGroupAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/UnJoinGroupAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,60 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class UnJoinGroupAction extends AbstractExtendedAction {
+ public class UnJoinGroupMenuItem extends MenuItemDescriptor {
+ @Inject
+ public UnJoinGroupMenuItem(final UnJoinGroupAction action) {
+ super(action);
+ }
+ }
+ private final I18nTranslationService i18n;
+ private final Session session;
+ private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+ private final StateManager stateManager;
+
+ @Inject
+ public UnJoinGroupAction(final StateManager stateManager, final Session session, final I18nTranslationService i18n,
+ final CoreResources res, final Provider<SocialNetworkServiceAsync> snServiceProvider) {
+ this.stateManager = stateManager;
+ this.session = session;
+ this.i18n = i18n;
+ this.snServiceProvider = snServiceProvider;
+ putValue(NAME, i18n.t("Do not participate anymore in this group"));
+ putValue(Action.SMALL_ICON, res.del());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().unJoinGroup(session.getUserHash(), ((GroupDTO) event.getSource()).getStateToken(),
+ new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Removed as member"));
+ stateManager.reload();
+ // in the future with user info:
+ // services.stateManager.reloadSocialNetwork((SocialNetworkResultDTO)
+ // result);
+ }
+ });
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/UnJoinGroupAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/AdministrableGroupWhenLoggedCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/AdministrableGroupWhenLoggedCondition.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/AdministrableGroupWhenLoggedCondition.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,25 @@
+package cc.kune.core.client.sn.actions.conditions;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiAddCondition;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.dto.GroupDTO;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class AdministrableGroupWhenLoggedCondition implements GuiAddCondition {
+
+ private final Session session;
+
+ @Inject
+ public AdministrableGroupWhenLoggedCondition(final Session session) {
+ this.session = session;
+ }
+
+ @Override
+ public boolean mustBeAdded(final GuiActionDescrip descr) {
+ return (!((GroupDTO) descr.getItem()).isPersonal() && session.isLogged() && session.getContentState().getGroupRights().isAdministrable());
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/AdministrableGroupWhenLoggedCondition.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/AdministrablePersonWhenLoggedCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/AdministrablePersonWhenLoggedCondition.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/AdministrablePersonWhenLoggedCondition.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,25 @@
+package cc.kune.core.client.sn.actions.conditions;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiAddCondition;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.dto.GroupDTO;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class AdministrablePersonWhenLoggedCondition implements GuiAddCondition {
+
+ private final Session session;
+
+ @Inject
+ public AdministrablePersonWhenLoggedCondition(final Session session) {
+ this.session = session;
+ }
+
+ @Override
+ public boolean mustBeAdded(final GuiActionDescrip descr) {
+ return (((GroupDTO) descr.getItem()).isPersonal() && session.isLogged() && session.getContentState().getGroupRights().isAdministrable());
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/AdministrablePersonWhenLoggedCondition.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/GroupWhenLoggedCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/GroupWhenLoggedCondition.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/GroupWhenLoggedCondition.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,25 @@
+package cc.kune.core.client.sn.actions.conditions;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiAddCondition;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.dto.GroupDTO;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class GroupWhenLoggedCondition implements GuiAddCondition {
+
+ private final Session session;
+
+ @Inject
+ public GroupWhenLoggedCondition(final Session session) {
+ this.session = session;
+ }
+
+ @Override
+ public boolean mustBeAdded(final GuiActionDescrip descr) {
+ return (!((GroupDTO) descr.getItem()).isPersonal() && session.isLogged());
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/GroupWhenLoggedCondition.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsAdministrableCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsAdministrableCondition.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsAdministrableCondition.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,24 @@
+package cc.kune.core.client.sn.actions.conditions;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiAddCondition;
+import cc.kune.core.client.state.Session;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class IsAdministrableCondition implements GuiAddCondition {
+
+ private final Session session;
+
+ @Inject
+ public IsAdministrableCondition(final Session session) {
+ this.session = session;
+ }
+
+ @Override
+ public boolean mustBeAdded(final GuiActionDescrip descr) {
+ return (session.getContentState().getGroupRights().isAdministrable());
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsAdministrableCondition.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsGroupCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsGroupCondition.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsGroupCondition.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,21 @@
+package cc.kune.core.client.sn.actions.conditions;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiAddCondition;
+import cc.kune.core.shared.dto.GroupDTO;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class IsGroupCondition implements GuiAddCondition {
+
+ @Inject
+ public IsGroupCondition() {
+ }
+
+ @Override
+ public boolean mustBeAdded(final GuiActionDescrip descr) {
+ return (!((GroupDTO) descr.getItem()).isPersonal());
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsGroupCondition.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsPersonCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsPersonCondition.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsPersonCondition.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,21 @@
+package cc.kune.core.client.sn.actions.conditions;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiAddCondition;
+import cc.kune.core.shared.dto.GroupDTO;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class IsPersonCondition implements GuiAddCondition {
+
+ @Inject
+ public IsPersonCondition() {
+ }
+
+ @Override
+ public boolean mustBeAdded(final GuiActionDescrip descr) {
+ return (((GroupDTO) descr.getItem()).isPersonal());
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsPersonCondition.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/PersonWhenLoggedCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/PersonWhenLoggedCondition.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/PersonWhenLoggedCondition.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,25 @@
+package cc.kune.core.client.sn.actions.conditions;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.GuiAddCondition;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.shared.dto.GroupDTO;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class PersonWhenLoggedCondition implements GuiAddCondition {
+
+ private final Session session;
+
+ @Inject
+ public PersonWhenLoggedCondition(final Session session) {
+ this.session = session;
+ }
+
+ @Override
+ public boolean mustBeAdded(final GuiActionDescrip descr) {
+ return (((GroupDTO) descr.getItem()).isPersonal() && session.isLogged());
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/PersonWhenLoggedCondition.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/AbstractSocialNetworActionsRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/registry/AbstractSocialNetworActionsRegistry.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/registry/AbstractSocialNetworActionsRegistry.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,10 @@
+package cc.kune.core.client.sn.actions.registry;
+
+import java.util.ArrayList;
+
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+
+import com.google.inject.Provider;
+
+public abstract class AbstractSocialNetworActionsRegistry extends ArrayList<Provider<MenuItemDescriptor>> { // NOPMD by vjrj on 10/02/11 3:19
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/AbstractSocialNetworActionsRegistry.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNAdminsMenuItemsRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNAdminsMenuItemsRegistry.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNAdminsMenuItemsRegistry.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,71 @@
+package cc.kune.core.client.sn.actions.registry;
+
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.core.client.sn.actions.AcceptJoinGroupAction;
+import cc.kune.core.client.sn.actions.ChangeToAdminAction;
+import cc.kune.core.client.sn.actions.ChangeToCollabAction;
+import cc.kune.core.client.sn.actions.DenyJoinGroupAction;
+import cc.kune.core.client.sn.actions.GotoGroupAction;
+import cc.kune.core.client.sn.actions.GotoMemberAction;
+import cc.kune.core.client.sn.actions.RemoveMemberAction;
+import cc.kune.core.client.sn.actions.StartChatWithUserAction;
+import cc.kune.core.client.sn.actions.conditions.IsAdministrableCondition;
+import cc.kune.core.client.sn.actions.conditions.IsGroupCondition;
+import cc.kune.core.client.sn.actions.conditions.IsPersonCondition;
+import cc.kune.core.client.state.Session;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class SNAdminsMenuItemsRegistry extends AbstractSocialNetworActionsRegistry {
+
+ @Inject
+ public SNAdminsMenuItemsRegistry(final Session session, final IsAdministrableCondition isAdministrableCondition,
+ final IsPersonCondition isPersonCondition, final IsGroupCondition isGroupCondition,
+ final ChangeToCollabAction changeToCollabAction, final ChangeToAdminAction changeToAdminAction,
+ final RemoveMemberAction removeMemberAction, final AcceptJoinGroupAction acceptJoinGroupAction,
+ final DenyJoinGroupAction denyJoinGroupAction, final StartChatWithUserAction startChatWithUserAction,
+ final GotoGroupAction gotoGroupAction, final GotoMemberAction gotoMemberAction) {
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(changeToCollabAction);
+ item.setAddCondition(isAdministrableCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(removeMemberAction);
+ item.setAddCondition(isAdministrableCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(gotoMemberAction);
+ item.setAddCondition(isPersonCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(gotoGroupAction);
+ item.setAddCondition(isGroupCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(startChatWithUserAction);
+ item.setAddCondition(isPersonCondition);
+ return item;
+ }
+ });
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNAdminsMenuItemsRegistry.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNCollabsMenuItemsRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNCollabsMenuItemsRegistry.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNCollabsMenuItemsRegistry.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,71 @@
+package cc.kune.core.client.sn.actions.registry;
+
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.core.client.sn.actions.AcceptJoinGroupAction;
+import cc.kune.core.client.sn.actions.ChangeToAdminAction;
+import cc.kune.core.client.sn.actions.ChangeToCollabAction;
+import cc.kune.core.client.sn.actions.DenyJoinGroupAction;
+import cc.kune.core.client.sn.actions.GotoGroupAction;
+import cc.kune.core.client.sn.actions.GotoMemberAction;
+import cc.kune.core.client.sn.actions.RemoveMemberAction;
+import cc.kune.core.client.sn.actions.StartChatWithUserAction;
+import cc.kune.core.client.sn.actions.conditions.IsAdministrableCondition;
+import cc.kune.core.client.sn.actions.conditions.IsGroupCondition;
+import cc.kune.core.client.sn.actions.conditions.IsPersonCondition;
+import cc.kune.core.client.state.Session;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class SNCollabsMenuItemsRegistry extends AbstractSocialNetworActionsRegistry {
+
+ @Inject
+ public SNCollabsMenuItemsRegistry(final Session session, final IsAdministrableCondition isAdministrableCondition,
+ final IsPersonCondition isPersonCondition, final IsGroupCondition isGroupCondition,
+ final ChangeToCollabAction changeToCollabAction, final ChangeToAdminAction changeToAdminAction,
+ final RemoveMemberAction removeMemberAction, final AcceptJoinGroupAction acceptJoinGroupAction,
+ final DenyJoinGroupAction denyJoinGroupAction, final StartChatWithUserAction startChatWithUserAction,
+ final GotoGroupAction gotoGroupAction, final GotoMemberAction gotoMemberAction) {
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(changeToAdminAction);
+ item.setAddCondition(isAdministrableCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(removeMemberAction);
+ item.setAddCondition(isAdministrableCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(gotoMemberAction);
+ item.setAddCondition(isPersonCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(gotoGroupAction);
+ item.setAddCondition(isGroupCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(startChatWithUserAction);
+ item.setAddCondition(isPersonCondition);
+ return item;
+ }
+ });
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNCollabsMenuItemsRegistry.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNPendingsMenuItemsRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNPendingsMenuItemsRegistry.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNPendingsMenuItemsRegistry.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,71 @@
+package cc.kune.core.client.sn.actions.registry;
+
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.core.client.sn.actions.AcceptJoinGroupAction;
+import cc.kune.core.client.sn.actions.ChangeToAdminAction;
+import cc.kune.core.client.sn.actions.ChangeToCollabAction;
+import cc.kune.core.client.sn.actions.DenyJoinGroupAction;
+import cc.kune.core.client.sn.actions.GotoGroupAction;
+import cc.kune.core.client.sn.actions.GotoMemberAction;
+import cc.kune.core.client.sn.actions.RemoveMemberAction;
+import cc.kune.core.client.sn.actions.StartChatWithUserAction;
+import cc.kune.core.client.sn.actions.conditions.IsAdministrableCondition;
+import cc.kune.core.client.sn.actions.conditions.IsGroupCondition;
+import cc.kune.core.client.sn.actions.conditions.IsPersonCondition;
+import cc.kune.core.client.state.Session;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class SNPendingsMenuItemsRegistry extends AbstractSocialNetworActionsRegistry {
+
+ @Inject
+ public SNPendingsMenuItemsRegistry(final Session session, final IsAdministrableCondition isAdministrableCondition,
+ final IsPersonCondition isPersonCondition, final IsGroupCondition isGroupCondition,
+ final ChangeToCollabAction changeToCollabAction, final ChangeToAdminAction changeToAdminAction,
+ final RemoveMemberAction removeMemberAction, final AcceptJoinGroupAction acceptJoinGroupAction,
+ final DenyJoinGroupAction denyJoinGroupAction, final StartChatWithUserAction startChatWithUserAction,
+ final GotoGroupAction gotoGroupAction, final GotoMemberAction gotoMemberAction) {
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(acceptJoinGroupAction);
+ item.setAddCondition(isAdministrableCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(denyJoinGroupAction);
+ item.setAddCondition(isAdministrableCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(gotoMemberAction);
+ item.setAddCondition(isPersonCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(gotoGroupAction);
+ item.setAddCondition(isGroupCondition);
+ return item;
+ }
+ });
+ add(new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(startChatWithUserAction);
+ item.setAddCondition(isPersonCondition);
+ return item;
+ }
+ });
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNPendingsMenuItemsRegistry.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/core/client/state/ContentProvider.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/ContentProvider.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/state/ContentProvider.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/cc/kune/core/client/state/ContentProviderDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/ContentProviderDefault.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/state/ContentProviderDefault.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/cc/kune/core/client/state/HistoryWrapper.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/HistoryWrapper.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/state/HistoryWrapper.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/cc/kune/core/client/state/HistoryWrapperDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/HistoryWrapperDefault.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/state/HistoryWrapperDefault.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/cc/kune/core/client/state/Session.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/Session.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/state/Session.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,7 @@
/*
*
* This file is part of kune.
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -41,6 +41,7 @@
import java.util.Collection;
import java.util.List;
+import cc.kune.core.client.init.AppStartEvent;
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.I18nCountryDTO;
@@ -135,15 +136,21 @@
boolean isNotLogged();
+ void onInitDataReceived(AppStartEvent.AppStartHandler handler);
+
@Deprecated
void onInitDataReceived(Listener<InitDataDTO> listener);
@Deprecated
void onUserSignIn(Listener<UserInfoDTO> listener);
+ void onUserSignIn(UserSignInEvent.UserSignInHandler handler);
+
@Deprecated
void onUserSignOut(Listener0 listener);
+ void onUserSignOut(UserSignOutEvent.UserSignOutHandler handler);
+
void setCurrentLanguage(final I18nLanguageDTO currentLanguage);
void setCurrentState(final StateAbstractDTO currentState);
Modified: trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -24,9 +24,13 @@
import cc.kune.common.client.errors.NotImplementedException;
import cc.kune.core.client.cookies.CookiesManager;
+import cc.kune.core.client.init.AppStartEvent;
+import cc.kune.core.client.init.AppStartEvent.AppStartHandler;
import cc.kune.core.client.logs.Log;
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.client.rpcservices.UserServiceAsync;
+import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
+import cc.kune.core.client.state.UserSignOutEvent.UserSignOutHandler;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.I18nCountryDTO;
import cc.kune.core.shared.dto.I18nLanguageDTO;
@@ -288,6 +292,11 @@
}
@Override
+ public void onInitDataReceived(final AppStartHandler handler) {
+ eventBus.addHandler(AppStartEvent.getType(), handler);
+ }
+
+ @Override
public void onInitDataReceived(final Listener<InitDataDTO> listener) {
throw new NotImplementedException();
}
@@ -298,11 +307,21 @@
}
@Override
+ public void onUserSignIn(final UserSignInHandler handler) {
+ eventBus.addHandler(UserSignInEvent.getType(), handler);
+ }
+
+ @Override
public void onUserSignOut(final Listener0 listener) {
throw new NotImplementedException();
}
@Override
+ public void onUserSignOut(final UserSignOutHandler handler) {
+ eventBus.addHandler(UserSignOutEvent.getType(), handler);
+ }
+
+ @Override
public void setCurrentLanguage(final I18nLanguageDTO currentLanguage) {
this.currentLanguage = currentLanguage;
}
Modified: trunk/src/main/java/cc/kune/core/client/state/StateManager.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManager.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManager.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -37,18 +37,26 @@
void gotoToken(String newToken);
+ void onGroupChanged(GroupChangedEvent.GroupChangedHandler handler);
+
@Deprecated
void onGroupChanged(Listener2<String, String> listener);
@Deprecated
void onSocialNetworkChanged(Listener<StateAbstractDTO> listener);
+ void onSocialNetworkChanged(SocialNetworkChangedEvent.SocialNetworkChangedHandler handler);
+
@Deprecated
void onStateChanged(Listener<StateAbstractDTO> listener);
+ void onStateChanged(StateChangedEvent.StateChangedHandler handler);
+
@Deprecated
void onToolChanged(Listener2<String, String> listener);
+ void onToolChanged(ToolChangedEvent.ToolChangedHandler handler);
+
void reload();
void removeBeforeStateChangeListener(BeforeActionListener listener);
Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,7 +1,7 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -28,6 +28,10 @@
import cc.kune.core.client.logs.Log;
import cc.kune.core.client.notify.spiner.ProgressHideEvent;
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.state.GroupChangedEvent.GroupChangedHandler;
+import cc.kune.core.client.state.SocialNetworkChangedEvent.SocialNetworkChangedHandler;
+import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler;
+import cc.kune.core.client.state.ToolChangedEvent.ToolChangedHandler;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.SocialNetworkDataDTO;
import cc.kune.core.shared.dto.StateAbstractDTO;
@@ -126,6 +130,11 @@
}
@Override
+ public void onGroupChanged(final GroupChangedHandler handler) {
+ eventBus.addHandler(GroupChangedEvent.getType(), handler);
+ }
+
+ @Override
public void onGroupChanged(final Listener2<String, String> listener) {
throw new NotImplementedException();
}
@@ -168,16 +177,31 @@
}
@Override
+ public void onSocialNetworkChanged(final SocialNetworkChangedHandler handler) {
+ eventBus.addHandler(SocialNetworkChangedEvent.getType(), handler);
+ }
+
+ @Override
public void onStateChanged(final Listener<StateAbstractDTO> listener) {
throw new NotImplementedException();
}
@Override
+ public void onStateChanged(final StateChangedHandler handler) {
+ eventBus.addHandler(StateChangedEvent.getType(), handler);
+ }
+
+ @Override
public void onToolChanged(final Listener2<String, String> listener) {
throw new NotImplementedException();
}
@Override
+ public void onToolChanged(final ToolChangedHandler handler) {
+ eventBus.addHandler(ToolChangedEvent.getType(), handler);
+ }
+
+ @Override
public void onValueChange(final ValueChangeEvent<String> event) {
onHistoryChanged(event.getValue());
}
@@ -241,6 +265,5 @@
eventBus.fireEvent(new ProgressHideEvent());
checkGroupAndToolChange(newState);
previousToken = newState.getStateToken();
-
}
}
Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -113,6 +113,11 @@
}
@Override
+ public void setFirstBtnTitle(final String title) {
+ firstBtn.setTitle(title);
+ }
+
+ @Override
public void setFirstBtnVisible(final boolean visible) {
firstBtn.setVisible(visible);
}
@@ -126,6 +131,11 @@
}
@Override
+ public void setSecondBtnTitle(final String title) {
+ secondBtn.setTitle(title);
+ }
+
+ @Override
public void setSecondBtnVisible(final boolean visible) {
secondBtn.setVisible(visible);
}
Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialogView.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialogView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialogView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -40,8 +40,12 @@
HasDirectionalText getTitleText();
+ void setFirstBtnTitle(String title);
+
void setFirstBtnVisible(boolean visible);
+ void setSecondBtnTitle(String title);
+
void setSecondBtnVisible(boolean visible);
}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -24,6 +24,7 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.logical.shared.HasCloseHandlers;
import com.google.gwt.user.client.ui.PopupPanel;
+import com.google.gwt.user.client.ui.UIObject;
public class BasicTopDialog extends BasicDialog {
@@ -58,7 +59,11 @@
}
- public void show() {
+ public void showCentered() {
popup.showCentered();
}
+
+ public void showRelativeTo(final UIObject object) {
+ popup.showRelativeTo(object);
+ }
}
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,57 +1,57 @@
@CHARSET "UTF-8";
body {
- background-color: white;
- color: black;
- font-family: 'Ubuntu', Arial;
- font-size: small;
- margin: 5px;
- overflow: hidden;
+ background-color: white;
+ color: black;
+ font-family: 'Ubuntu', Arial;
+ font-size: small;
+ margin: 5px;
+ overflow: hidden;
}
* {
- font-family: 'Ubuntu', Arial;
+ font-family: 'Ubuntu', Arial;
}
body.fontface {
- font: 'Ubuntu', Arial;
+ font: 'Ubuntu', Arial;
}
a {
- color: darkblue;
+ color: darkblue;
}
a:visited {
- color: darkblue;
+ color: darkblue;
}
.gwt-DialogBox {
- border: 2px solid #AAAAAA;
- background-color: white;
+ border: 2px solid #AAAAAA;
+ background-color: white;
}
.gwt-DialogBox .Caption {
- background-image: url(gray_gradient.gif);
- background-repeat: repeat-x;
- padding: 4px;
- padding-bottom: 8px;
- font-weight: bold;
- cursor: default;
+ background-image: url(gray_gradient.gif);
+ background-repeat: repeat-x;
+ padding: 4px;
+ padding-bottom: 8px;
+ font-weight: bold;
+ cursor: default;
}
.gwt-MenuBar {
- background-color: #C3D9FF;
- cursor: default;
+ background-color: #C3D9FF;
+ cursor: default;
}
.gwt-MenuItem {
- font-size: 80%;
- margin: 1px;
- cursor: default;
+ font-size: 80%;
+ margin: 1px;
+ cursor: default;
}
.gwt-MenuItem-selected {
- background-color: #E8EEF7;
+ background-color: #E8EEF7;
}
.gwt-Tree {
@@ -59,26 +59,26 @@
}
.gwt-Tree .gwt-TreeItem {
- font-size: 80%;
- cursor: default;
+ font-size: 80%;
+ cursor: default;
}
.gwt-Tree .gwt-TreeItem-selected {
- background-color: #C3D9FF;
+ background-color: #C3D9FF;
}
.gwt-StackPanel {
- background-color: white;
- border: 1px solid #AAAAAA;
- width: 15em;
+ background-color: white;
+ border: 1px solid #AAAAAA;
+ width: 15em;
}
.gwt-StackPanel .gwt-StackPanelItem {
- background-image: url(blue_gradient.gif);
- background-repeat: repeat-x;
- background-color: #EEEEEE;
- cursor: pointer;
- cursor: hand;
+ background-image: url(blue_gradient.gif);
+ background-repeat: repeat-x;
+ background-color: #EEEEEE;
+ cursor: pointer;
+ cursor: hand;
}
.gwt-StackPanel .gwt-StackPanelItem-selected {
@@ -90,236 +90,236 @@
}
.gwt-TabPanelBottom {
- border-left: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- border-bottom: 1px solid #87b3ff;
+ border-left: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ border-bottom: 1px solid #87b3ff;
}
.gwt-TabBar {
- font-size: smaller;
+ font-size: smaller;
}
.gwt-TabBar .gwt-TabBarFirst {
- height: 100%;
- border-bottom: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- padding-left: 3px;
+ height: 100%;
+ border-bottom: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ padding-left: 3px;
}
.gwt-TabBar .gwt-TabBarRest {
- border-bottom: 1px solid #87b3ff;
- padding-right: 3px;
+ border-bottom: 1px solid #87b3ff;
+ padding-right: 3px;
}
.gwt-TabBar .gwt-TabBarItem {
- border-top: 1px solid #87b3ff;
- border-bottom: 1px solid #87b3ff;
- padding: 2px;
- cursor: hand;
- white-space: nowrap;
- border-right: 1px solid #87b3ff;
+ border-top: 1px solid #87b3ff;
+ border-bottom: 1px solid #87b3ff;
+ padding: 2px;
+ cursor: hand;
+ white-space: nowrap;
+ border-right: 1px solid #87b3ff;
}
.gwt-TabBar .gwt-TabBarItem-selected {
- font-weight: bold;
- background-color: #e8eef7;
- border-top: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- border-bottom: 1px solid #e8eef7;
- padding: 2px;
- cursor: default;
- white-space: nowrap;
+ font-weight: bold;
+ background-color: #e8eef7;
+ border-top: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ border-bottom: 1px solid #e8eef7;
+ padding: 2px;
+ cursor: default;
+ white-space: nowrap;
}
.gwt-PushButton-up {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
}
.gwt-PushButton-up-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
}
.gwt-PushButton-down {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
}
.gwt-PushButton-down-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
}
.gwt-ToggleButton-up {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
}
.gwt-ToggleButton-up-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
}
.gwt-ToggleButton-down {
- background-color: #C3D9FF;
- padding: 2px;
- background-color: #E8F1FF;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
}
.gwt-ToggleButton-down-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- background-color: #E8F1FF;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
}
.gwt-RichTextArea {
- border: 1px solid black;
- background-color: white;
+ border: 1px solid black;
+ background-color: white;
}
.gwt-RichTextToolbar {
- background-color: #C3D9FF;
- padding: 2px;
+ background-color: #C3D9FF;
+ padding: 2px;
}
.gwt-RichTextToolbar .gwt-PushButton-up {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
}
.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
}
.gwt-RichTextToolbar .gwt-PushButton-down {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
}
.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
}
.gwt-RichTextToolbar .gwt-ToggleButton-up {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
}
.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
}
.gwt-RichTextToolbar .gwt-ToggleButton-down {
- margin-right: 2px;
- background-color: #E8F1FF;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
}
.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
- margin-right: 2px;
- background-color: #E8F1FF;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
}
.gwt-HorizontalSplitPanel {
- border: 8px solid #C3D9FF;
+ border: 8px solid #C3D9FF;
}
.gwt-HorizontalSplitPanel .splitter {
- background-color: #C3D9FF;
- cursor: move;
+ background-color: #C3D9FF;
+ cursor: move;
}
.gwt-HorizontalSplitPanel .left {
- background-color: #E8EEF7;
+ background-color: #E8EEF7;
}
.gwt-VerticalSplitPanel {
- border: 8px solid #C3D9FF;
+ border: 8px solid #C3D9FF;
}
.gwt-VerticalSplitPanel .splitter {
- background-color: #C3D9FF;
- height: 8px;
- cursor: move;
+ background-color: #C3D9FF;
+ height: 8px;
+ cursor: move;
}
.gwt-SuggestBoxPopup {
- border: 2px solid #C3D9FF;
+ border: 2px solid #C3D9FF;
}
.gwt-SuggestBoxPopup .item {
- padding: 2px;
+ padding: 2px;
}
.gwt-SuggestBoxPopup .item-selected {
- background-color: #C3D9FF;
- padding: 2px;
+ background-color: #C3D9FF;
+ padding: 2px;
}
.gwt-DisclosurePanel {
- border: 2px solid #C3D9FF;
+ border: 2px solid #C3D9FF;
}
.gwt-DisclosurePanel .header {
- background-color: #e8eef7;
- cursor: hand;
+ background-color: #e8eef7;
+ cursor: hand;
}
.gwt-SplitLayoutPanel {
@@ -327,62 +327,62 @@
}
.gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-HDragger {
- background-color: white;
- background: none;
- cursor: col-resize;
+ background-color: white;
+ background: none;
+ cursor: col-resize;
}
.gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-VDragger {
- background-color: white;
- background: none;
- cursor: row-resize;
+ background-color: white;
+ background: none;
+ cursor: row-resize;
}
.kLoadingPanel {
- background-color: #FF9999;
- -webkit-border-bottom-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- border-bottom-right-radius: 4px;
- padding: 0 1px 0 3px;
- border-collapse: separate;
- border-spacing: 2px;
+ background-color: #FF9999;
+ -webkit-border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ border-bottom-right-radius: 4px;
+ padding: 0 1px 0 3px;
+ border-collapse: separate;
+ border-spacing: 2px;
}
.kLoadingLabel {
- font-size: 14px;
- color: white;
- font-weight: bold;
- padding: 0 5px 0 5px;
+ font-size: 14px;
+ color: white;
+ font-weight: bold;
+ padding: 0 5px 0 5px;
}
.k-space-sel {
- margin-right: 10px;
- background-color: #F2F2F2;
+ margin-right: 10px;
+ background-color: #F2F2F2;
}
.k-space-sel-btn {
- padding: 0 1px 0 1px;
- margin: 0 0 -2px;
+ padding: 0 1px 0 1px;
+ margin: 0 0 -2px;
}
.k-sitebar-logo {
- margin-top: 2px;
+ margin-top: 2px;
}
.x-btn button {
- font: 18px/27px 'Ubuntu', arial;
+ font: 18px/27px 'Ubuntu', arial;
}
.k-btn-sitebar,.k-btn-sitebar button {
- font: 13px 'Ubuntu', arial;
- color: #B3B3B3;
- cursor: pointer;
- text-decoration: underline;
- white-space: nowrap;
+ font: 13px 'Ubuntu', arial;
+ color: #B3B3B3;
+ cursor: pointer;
+ text-decoration: underline;
+ white-space: nowrap;
}
.k-btn-sitebar button {
- margin-top: -5px;
+ margin-top: -5px;
}
.k-sitebar { /* margin-top: -30px; */
@@ -390,247 +390,247 @@
}
.k-link {
- text-decoration: underline;
- color: green;
- cursor: pointer;
+ text-decoration: underline;
+ color: green;
+ cursor: pointer;
}
/* Margins */
.kune-Margin-40-trbl {
- margin: 40px;
+ margin: 40px;
}
.kune-Margin-40-lr {
- margin-left: 40px;
- margin-right: 40px;
+ margin-left: 40px;
+ margin-right: 40px;
}
.kune-Margin-40-tl {
- margin-top: 40px;
- margin-left: 40px;
+ margin-top: 40px;
+ margin-left: 40px;
}
.kune-Margin-40-tb {
- margin-top: 40px;
- margin-bottom: 40px;
+ margin-top: 40px;
+ margin-bottom: 40px;
}
.kune-Margin-40-t {
- margin-top: 40px;
+ margin-top: 40px;
}
.kune-Margin-40-r {
- margin-right: 40px;
+ margin-right: 40px;
}
.kune-Margin-40-l {
- margin-left: 40px;
+ margin-left: 40px;
}
.kune-Margin-20-trbl {
- margin: 20px;
+ margin: 20px;
}
.kune-Margin-20-lr {
- margin-left: 20px;
- margin-right: 20px;
+ margin-left: 20px;
+ margin-right: 20px;
}
.kune-Margin-20-tl {
- margin-top: 20px;
- margin-left: 20px;
+ margin-top: 20px;
+ margin-left: 20px;
}
.kune-Margin-20-tb {
- margin-top: 20px;
- margin-bottom: 20px;
+ margin-top: 20px;
+ margin-bottom: 20px;
}
.kune-Margin-20-t {
- margin-top: 20px;
+ margin-top: 20px;
}
.kune-Margin-20-r {
- margin-right: 20px;
+ margin-right: 20px;
}
.kune-Margin-20-l {
- margin-left: 20px;
+ margin-left: 20px;
}
.kune-Margin-Large-trbl {
- margin: 10px;
+ margin: 10px;
}
.kune-Margin-Large-lr {
- margin-left: 10px;
- margin-right: 10px;
+ margin-left: 10px;
+ margin-right: 10px;
}
.kune-Margin-Large-tl {
- margin-top: 10px;
- margin-left: 10px;
+ margin-top: 10px;
+ margin-left: 10px;
}
.kune-Margin-Large-tb {
- margin-top: 10px;
- margin-bottom: 10px;
+ margin-top: 10px;
+ margin-bottom: 10px;
}
.kune-Margin-Large-t {
- margin-top: 10px;
+ margin-top: 10px;
}
.kune-Margin-Large-r {
- margin-right: 10px;
+ margin-right: 10px;
}
.kune-Margin-Large-l {
- margin-left: 10px;
+ margin-left: 10px;
}
.kune-Margin-7-trbl {
- margin: 7px;
+ margin: 7px;
}
.kune-Margin-7-lr {
- margin-left: 7px;
- margin-right: 7px;
+ margin-left: 7px;
+ margin-right: 7px;
}
.kune-Margin-7-tl {
- margin-top: 7px;
- margin-left: 7px;
+ margin-top: 7px;
+ margin-left: 7px;
}
.kune-Margin-7-tb {
- margin-top: 7px;
- margin-bottom: 7px;
+ margin-top: 7px;
+ margin-bottom: 7px;
}
.kune-Margin-7-t {
- margin-top: 7px;
+ margin-top: 7px;
}
.kune-Margin-7-r {
- margin-right: 7px;
+ margin-right: 7px;
}
.kune-Margin-7-b {
- margin-bottom: 7px;
+ margin-bottom: 7px;
}
.kune-Margin-7-l {
- margin-left: 7px;
+ margin-left: 7px;
}
.kune-Margin-Medium-trbl {
- margin: 5px;
+ margin: 5px;
}
.kune-Margin-Medium-lr {
- margin-left: 5px;
- margin-right: 5px;
+ margin-left: 5px;
+ margin-right: 5px;
}
.kune-Margin-Medium-tl {
- margin-top: 5px;
- margin-left: 5px;
+ margin-top: 5px;
+ margin-left: 5px;
}
.kune-Margin-Medium-tb {
- margin-top: 5px;
- margin-bottom: 5px;
+ margin-top: 5px;
+ margin-bottom: 5px;
}
.kune-Margin-Medium-t {
- margin-top: 5px;
+ margin-top: 5px;
}
.kune-Margin-Medium-r {
- margin-right: 5px;
+ margin-right: 5px;
}
.kune-Margin-Medium-b {
- margin-bottom: 5px;
+ margin-bottom: 5px;
}
.kune-Margin-Medium-l {
- margin-left: 5px;
+ margin-left: 5px;
}
.kune-Margin-Small-trbl {
- margin: 3px;
+ margin: 3px;
}
.kune-Margin-Small-lr {
- margin-left: 3px;
- margin-right: 3px;
+ margin-left: 3px;
+ margin-right: 3px;
}
.kune-Margin-Small-tl {
- margin-top: 3px;
- margin-left: 3px;
+ margin-top: 3px;
+ margin-left: 3px;
}
.kune-Margin-Small-tb {
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-top: 3px;
+ margin-bottom: 3px;
}
.kune-Margin-Small-t {
- margin-top: 3px;
+ margin-top: 3px;
}
.kune-Margin-Small-l {
- margin-left: 3px;
+ margin-left: 3px;
}
.kune-Margin-Small-r {
- margin-right: 3px;
+ margin-right: 3px;
}
.kune-Margin-Small-b {
- margin-bottom: 3px;
+ margin-bottom: 3px;
}
.kune-Margin-Mini-trbl {
- margin: 1px;
+ margin: 1px;
}
.kune-Margin-Mini-lr {
- margin-left: 1px;
- margin-right: 1px;
+ margin-left: 1px;
+ margin-right: 1px;
}
.kune-Margin-Mini-tl {
- margin-top: 1px;
- margin-left: 1px;
+ margin-top: 1px;
+ margin-left: 1px;
}
.kune-Margin-Mini-tb {
- margin-top: 1px;
- margin-bottom: 1px;
+ margin-top: 1px;
+ margin-bottom: 1px;
}
.kune-Margin-Mini-t {
- margin-top: 1px;
+ margin-top: 1px;
}
.kune-Margin-Mini-r {
- margin-right: 1px;
+ margin-right: 1px;
}
.kune-Margin-Mini-b {
- margin-bottom: 1px;
+ margin-bottom: 1px;
}
.kune-Margin-Mini-l {
- margin-left: 1px;
+ margin-left: 1px;
}
.k-publicspace-msg {
- background-color: #E0E0E0;
+ background-color: #E0E0E0;
}
.k-publicspace-mask { /* background-color: #fff !important;
@@ -642,100 +642,192 @@
}
.k-publicspace-panel {
- margin: 5px;
- display: table-row;
+ margin: 5px;
+ display: table-row;
}
.k-publicspace-icon {
- margin: 3px 3px 3px 0;
- float: left;
+ margin: 3px 3px 3px 0;
+ float: left;
}
.k-publicspace-title {
- font-weight: bold;
- display: block;
- margin-bottom: 5px;
- font-size: 16px;
- display: table-caption;
+ font-weight: bold;
+ display: block;
+ margin-bottom: 5px;
+ font-size: 16px;
+ display: table-caption;
}
.k-publicspace-description {
- font-size: 14px;
- display: table-cell;
+ font-size: 14px;
+ display: table-cell;
}
.k-publicspace-actions {
- display: inline;
+ display: inline;
}
.k-message-panel {
- margin: 5px;
- display: table-row;
+ margin: 5px;
+ display: table-row;
}
.k-message-icon {
- margin: 3px 3px 3px 0;
- float: left;
+ margin: 3px 3px 3px 0;
+ float: left;
}
.k-message-title {
- font-weight: bold;
- display: block;
- margin-bottom: 5px;
- font-size: 16px;
- display: table-caption;
+ font-weight: bold;
+ display: block;
+ margin-bottom: 5px;
+ font-size: 16px;
+ display: table-caption;
}
.k-message-description {
- font-size: 14px;
- display: table-cell;
+ font-size: 14px;
+ display: table-cell;
}
.k-error-tb {
- background: #FFB380 none repeat scroll 0% 50%;
- /* color: #250; */
- padding: 10px;
+ background: #FFB380 none repeat scroll 0% 50%;
+ /* color: #250; */
+ padding: 10px;
}
.k-error-tb img {
- margin: 0 10px;
- float: left;
+ margin: 0 10px;
+ float: left;
}
.k-error-tb div {
- font-size: 14px;
- display: table-cell;
+ font-size: 14px;
+ display: table-cell;
}
.k-mask {
- background-color: #F2F2F2 !important;
- /* kfilter: alpha(opacity = 78) !important; */
- -moz-opacity: 0.78 !important;
- -khtml-opacity: 0.78 !important;
- opacity: 0.78 !important;
+ background-color: #F2F2F2 !important;
+ /* kfilter: alpha(opacity = 78) !important; */
+ -moz-opacity: 0.78 !important;
+ -khtml-opacity: 0.78 !important;
+ opacity: 0.78 !important;
}
.x-form-item-label {
- font-size: 14px;
- font-weight: bold;
- color: brown;
+ font-size: 14px;
+ font-weight: bold;
+ color: brown;
}
.x-form-text {
- font-size: 14px;
+ font-size: 14px;
}
.x-fieldset-header-text,.x-form-group-label,.x-form-cb-label {
- font-size: 14px;
- font-family: 'Ubuntu', Arial;
+ font-size: 14px;
+ font-family: 'Ubuntu', Arial;
}
.k-form-intro {
- font-size: 14px;
- margin-bottom: 10px;
+ font-size: 14px;
+ margin-bottom: 10px;
}
.k-form-fieldset {
- font-size: 16px;
- margin-left: 105px;
+ font-size: 16px;
+ margin-left: 105px;
+}
+
+.k-basic-thumb {
+ background-color: #F2F2F2;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+}
+
+.k-basic-thumb img {
+ margin: 2px 2px 0px 2px;
+}
+
+.k-basic-thumb div {
+ margin: -3px 0px 0px 0px;
+ font-weight: normal;
+ font-size: 12px;
+}
+
+.k-sn-mainpanel {
+ font-size: 16px;
+ font-weight: bold;
+}
+
+.k-sn-maintitle {
+ margin: 5px;
+}
+
+.k-sn-maintitle {
+ color: #a05a2c;
+ font-size: 20px;
+}
+
+.k-sn-adminslabel,.k-sn-collabslabel,.k-sn-pendingslabel {
+ color: #FFF;
+ text-transform: lowercase;
+ padding-left: 10px;
+}
+
+.k-sn-adminslabel {
+
+}
+
+.k-sn-collabslabel {
+
+}
+
+.k-sn-pendingslabel {
+
+}
+
+.k-sn-adminspanel {
+ background-color: #a05a2c;
+}
+
+.k-sn-collabspanel {
+
+}
+
+.k-sn-pendingspanel {
+
+}
+
+.k-sn-adminsscroll,.k-sn-collabsscroll,.k-sn-pendingsscroll {
+ padding-left: 10px;
+}
+
+.k-sn-adminsscroll {
+
+}
+
+.k-sn-collabsscroll {
+
+}
+
+.k-sn-pendingsscroll {
+ margin: 5px;
+}
+
+.k-userconfirm-label {
+ width: 300px;
+ margin: 10px;
+}
+
+.k-sn-deck {
+ padding: 5px;
+}
+
+.k-sn-novisible-label,.k-sn-orphan-label {
+ color: #FFF;
+ font-size: 16px;
+ font-weight: bold;
}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css 2011-02-10 03:07:28 UTC (rev 1243)
@@ -2,170 +2,170 @@
@external .*;
.floatLeft {
- float: left;
+ float: left;
}
.mainPanel {
- border-top: 2px solid white;
- border-bottom: 7px solid white;
- border-right: 7px solid white;
- border-left: 7px solid white;
+ border-top: 2px solid white;
+ border-bottom: 7px solid white;
+ border-right: 7px solid white;
+ border-left: 7px solid white;
}
.floatRight {
- float: right;
+ float: right;
}
.siteBar {
- overflow: hidden;
+ overflow: hidden;
}
.entityHeader {
- -webkit-border-top-left-radius: 10px;
- -moz-border-radius-topleft: 10px;
- border-top-left-radius: 10px;
- background-color: #f4e3d7;
- overflow: hidden;
+ -webkit-border-top-left-radius: 10px;
+ -moz-border-radius-topleft: 10px;
+ border-top-left-radius: 10px;
+ background-color: #f4e3d7;
+ overflow: hidden;
}
.entityFooter {
- -webkit-border-bottom-left-radius: 10px;
- -moz-border-radius-bottomleft: 10px;
- border-top-bottom-radius: 10px;
- background-color: #f7ebe3;
- padding: 7px 10px 0px 17px;
- overflow: hidden;
+ -webkit-border-bottom-left-radius: 10px;
+ -moz-border-radius-bottomleft: 10px;
+ border-top-bottom-radius: 10px;
+ background-color: #f7ebe3;
+ padding: 7px 10px 0px 17px;
+ overflow: hidden;
}
.entityFooter span {
- color: #784421;
- font-size: 16px;
- font-weight: bold;
+ color: #784421;
+ font-size: 16px;
+ font-weight: bold;
}
.entityHeader span {
- font-size: 56px;
- margin-left: 15px;
- color: #550000;
- font-weight: bold;
- font: 'UbuntuBold', Arial;
+ font-size: 56px;
+ margin-left: 15px;
+ color: #550000;
+ font-weight: bold;
+ font: 'UbuntuBold', Arial;
}
.docHeader {
- background-color: #c87137;
- overflow: hidden;
+ background-color: #c87137;
+ overflow: hidden;
}
.docHeaderArrow {
- position: relative;
- z-index: 10;
- top: -25px;
- left: 10px;
+ position: relative;
+ z-index: 10;
+ top: -25px;
+ left: 10px;
}
.docHeader span {
- color: #FFF;
- font-size: 28px;
- font-weight: bold;
- margin-left: 15px;
- font: 'UbuntuBold', Arial;
+ color: #FFF;
+ font-size: 28px;
+ font-weight: bold;
+ margin-left: 15px;
+ font: 'UbuntuBold', Arial;
}
.docSubheader {
- background-color: #f7ebe3;
- padding: 15px 0 0 15px;
- overflow: hidden;
+ background-color: #f7ebe3;
+ padding: 15px 0 0 15px;
+ overflow: hidden;
}
.docSubheaderLeft {
- position: relative;
- top: 0;
- left: -30px;
+ position: relative;
+ top: 0;
+ left: -30px;
}
.docSubheader span {
- color: #784421;
- font-size: 20px;
- font-weight: bold;
+ color: #784421;
+ font-size: 20px;
+ font-weight: bold;
}
.docEditorMargin {
- background-color: #f7ebe3;
+ background-color: #f7ebe3;
}
.docEditor {
- background-color: #FFF;
- border-left: 1px solid #959595;
- border-right: 1px solid #959595;
- border-top: 1px solid #959595;
- -webkit-border-top-left-radius: 7px;
- -moz-border-radius-topleft: 7px;
- border-top-left-radius: 7px;
- -webkit-border-top-right-radius: 7px;
- -moz-border-radius-topright: 7px;
- border-top-right-radius: 7px;
- padding: 5px;
+ background-color: #FFF;
+ border-left: 1px solid #959595;
+ border-right: 1px solid #959595;
+ border-top: 1px solid #959595;
+ -webkit-border-top-left-radius: 7px;
+ -moz-border-radius-topleft: 7px;
+ border-top-left-radius: 7px;
+ -webkit-border-top-right-radius: 7px;
+ -moz-border-radius-topright: 7px;
+ border-top-right-radius: 7px;
+ padding: 5px;
}
.docFooter {
- border-left: 1px solid #959595;
- border-right: 1px solid #959595;
- border-bottom: 1px solid #959595;
- background-color: #e3dbdb;
- -webkit-border-bottom-left-radius: 7px;
- -moz-border-radius-bottomleft: 7px;
- border-bottom-left-radius: 7px;
- -webkit-border-bottom-right-radius: 7px;
- -moz-border-radius-bottomright: 7px;
- border-bottom-right-radius: 7px;
- padding: 7px 7px 0 7px;
- overflow: hidden;
+ border-left: 1px solid #959595;
+ border-right: 1px solid #959595;
+ border-bottom: 1px solid #959595;
+ background-color: #e3dbdb;
+ -webkit-border-bottom-left-radius: 7px;
+ -moz-border-radius-bottomleft: 7px;
+ border-bottom-left-radius: 7px;
+ -webkit-border-bottom-right-radius: 7px;
+ -moz-border-radius-bottomright: 7px;
+ border-bottom-right-radius: 7px;
+ padding: 7px 7px 0 7px;
+ overflow: hidden;
}
.docFooter span {
- color: #784421;
- font-size: 16px;
- font-weight: bold;
+ color: #784421;
+ font-size: 16px;
+ font-weight: bold;
}
.entityTools {
- -webkit-border-top-right-radius: 10px;
- -moz-border-radius-topright: 10px;
- border-top-right-radius: 10px;
- -webkit-border-bottom-right-radius: 10px;
- -moz-border-radius-bottomright: 10px;
- border-bottom-right-radius: 10px;
- background-color: #DEAA87;
+ -webkit-border-top-right-radius: 10px;
+ -moz-border-radius-topright: 10px;
+ border-top-right-radius: 10px;
+ -webkit-border-bottom-right-radius: 10px;
+ -moz-border-radius-bottomright: 10px;
+ border-bottom-right-radius: 10px;
+ background-color: #DEAA87;
}
.entityToolsNorth {
- margin: 10px;
+ /* margin: 10px; */
}
.entityToolsNorth span {
- color: #a05a2c;
- font-size: 20px;
- font-weight: bold;
+ color: #a05a2c;
+ font-size: 20px;
+ font-weight: bold;
}
.entityToolsCenter {
- margin: 10px;
+ margin: 10px;
}
.entityToolsCenter span {
- color: #FFF;
- font-size: 22px;
- font-weight: bold;
+ color: #FFF;
+ font-size: 22px;
+ font-weight: bold;
}
.entityToolsSouth {
- border-top: 2px solid #FFF;
- padding: 10px;
+ border-top: 2px solid #FFF;
+ padding: 10px;
}
.entityToolsSouth span {
- color: #a05a2c;
- font-size: 20px;
- font-weight: bold;
+ color: #a05a2c;
+ font-size: 20px;
+ font-weight: bold;
}
Added: trunk/src/main/java/cc/kune/gspace/public/kune-gspace.css
===================================================================
--- trunk/src/main/java/cc/kune/gspace/public/kune-gspace.css (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/public/kune-gspace.css 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1 @@
+/* TODO: extract wsArmor.css here */
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/gspace/public/kune-gspace.css
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,694 +1,694 @@
.k-site-traybar {
- background: transparent none repeat scroll 0% 50%;
+ background: transparent none repeat scroll 0% 50%;
}
.k-blank-toolbar {
- background: #FFF none repeat scroll 0% 50%;
+ background: #FFF none repeat scroll 0% 50%;
}
.k-sitebar .kune-IconHyperlink {
- white-space: nowrap;
+ white-space: nowrap;
}
.k-sitebar .kune-IconHyperlink a:link {
- cursor: pointer;
- text-decoration: underline;
- color: #B3B3B3;
+ cursor: pointer;
+ text-decoration: underline;
+ color: #B3B3B3;
}
.k-sitebar .kune-IconHyperlink a:hover {
- text-decoration: underline;
+ text-decoration: underline;
}
.k-sitebar .kune-IconHyperlink a:visited {
- color: #B3B3B3;
+ color: #B3B3B3;
}
.k-sitebar-labellink {
- white-space: nowrap;
- color: #B3B3B3;
- cursor: pointer;
- text-decoration: underline;
+ white-space: nowrap;
+ color: #B3B3B3;
+ cursor: pointer;
+ text-decoration: underline;
}
.k-sitebar {
- margin-right: 10px;
- height: 16px;
+ margin-right: 10px;
+ height: 16px;
}
.k-sitebar .gwt-TextBox {
- border: 1px solid #E4A374;
- margin: 0 15px 0 3px;
- padding-left: 1px;
- color: #B3B3B3;
- background: transparent;
+ border: 1px solid #E4A374;
+ margin: 0 15px 0 3px;
+ padding-left: 1px;
+ color: #B3B3B3;
+ background: transparent;
}
.k-sitebar .gwt-Hyperlink a {
- white-space: nowrap;
- color: #B3B3B3;
- text-decoration: underline;
- cursor: pointer;
+ white-space: nowrap;
+ color: #B3B3B3;
+ text-decoration: underline;
+ cursor: pointer;
}
.k-sitebar .gwt-PushButton {
- cursor: pointer;
+ cursor: pointer;
}
.k-sitebar-LabelLink {
- white-space: nowrap;
- color: #B3B3B3;
- cursor: pointer;
- text-decoration: underline;
+ white-space: nowrap;
+ color: #B3B3B3;
+ cursor: pointer;
+ text-decoration: underline;
}
.k-entity-summary {
- border-left-color: transparent;
- border-left-width: 5px;
- border-bottom-color: transparent;
- border-bottom-width: 5px;
+ border-left-color: transparent;
+ border-left-width: 5px;
+ border-bottom-color: transparent;
+ border-bottom-width: 5px;
}
.k-entitytextlogo-border {
- border: 2px solid #F2F2F2;
+ border: 2px solid #F2F2F2;
}
.k-entitytextlogo-no-border {
- border: none;
+ border: none;
}
.k-entitytextlogo {
- height: 60px;
- margin: 0 0 4px 0;
- overflow: hidden;
- width: 468px;
+ height: 60px;
+ margin: 0 0 4px 0;
+ overflow: hidden;
+ width: 468px;
}
.k-entitytextlogo table {
- vertical-align: middle;
+ vertical-align: middle;
}
.k-elogo-l-l {
- font-size: 272%;
+ font-size: 272%;
}
.k-elogo-l-m {
- font-size: 167%;
+ font-size: 167%;
}
.k-elogo-l-s {
- font-size: 108%;
+ font-size: 108%;
}
.k-entitytextlogo .gwt-Label {
- font-weight: 700;
- margin: 5px;
- height: 27px;
+ font-weight: 700;
+ margin: 5px;
+ height: 27px;
}
.k-entitytextlogo-default .gwt-Label {
- color: #69312F;
+ color: #69312F;
}
.k-entitytextlogo-green .gwt-Label {
- color: #250;
+ color: #250;
}
.k-entitytextlogo-blue .gwt-Label {
- color: #000080;
+ color: #000080;
}
.k-entitytextlogo-grey .gwt-Label {
- color: #1A1A1A;
+ color: #1A1A1A;
}
.k-entitytextlogo-purple .gwt-Label {
- color: #440055;
+ color: #440055;
}
.k-entitytextlogo-red .gwt-Label {
- color: #800000;
+ color: #800000;
}
.k-elogo-plink {
- color: #CCC;
- font-size: 85%;
- margin: 5px;
- text-decoration: underline;
- white-space: nowrap;
- background-color: #FFF;
+ color: #CCC;
+ font-size: 85%;
+ margin: 5px;
+ text-decoration: underline;
+ white-space: nowrap;
+ background-color: #FFF;
}
.k-elogop-expand {
- background-color: transparent;
+ background-color: transparent;
}
.k-entity-default .x-layout-split,.k-entity-default .x-layout-collapsed
- {
- background: #DD8A3D none repeat scroll 0% 50%;
+ {
+ background: #DD8A3D none repeat scroll 0% 50%;
}
.k-entity-green .x-layout-split,.k-entity-green .x-layout-collapsed {
- background: #5FD35F none repeat scroll 0% 50%;
+ background: #5FD35F none repeat scroll 0% 50%;
}
.k-entity-blue .x-layout-split,.k-entity-blue .x-layout-collapsed {
- background: #0066FF none repeat scroll 0% 50%;
+ background: #0066FF none repeat scroll 0% 50%;
}
.k-entity-grey .x-layout-split,.k-entity-grey .x-layout-collapsed {
- background: #4D4D4D none repeat scroll 0% 50%;
+ background: #4D4D4D none repeat scroll 0% 50%;
}
.k-entity-purple .x-layout-split,.k-entity-purple .x-layout-collapsed {
- background: #660080 none repeat scroll 0% 50%;
+ background: #660080 none repeat scroll 0% 50%;
}
.k-entity-red .x-layout-split,.k-entity-red .x-layout-collapsed {
- background: #D40000 none repeat scroll 0% 50%;
+ background: #D40000 none repeat scroll 0% 50%;
}
.k-entityworkspace .x-layout-split,.k-entityworkspace .x-layout-collapsed
- {
- background: transparent none repeat scroll 0% 50%;
+ {
+ background: transparent none repeat scroll 0% 50%;
}
.k-entityworkspace-default .x-layout-split,.k-entityworkspace-default .x-layout-collapsed
- {
- background: #DEAA87 none repeat scroll 0% 50%;
+ {
+ background: #DEAA87 none repeat scroll 0% 50%;
}
.k-entityworkspace-green .x-layout-split,.k-entityworkspace-green .x-layout-collapsed
- {
- background: #DCE8AB none repeat scroll 0% 50%;
+ {
+ background: #DCE8AB none repeat scroll 0% 50%;
}
.k-entityworkspace-blue .x-layout-split,.k-entityworkspace-blue .x-layout-collapsed
- {
- background: #D5D5FF none repeat scroll 0% 50%;
+ {
+ background: #D5D5FF none repeat scroll 0% 50%;
}
.k-entityworkspace-grey .x-layout-split,.k-entityworkspace-grey .x-layout-collapsed
- {
- background: #999999 none repeat scroll 0% 50%;
+ {
+ background: #999999 none repeat scroll 0% 50%;
}
.k-entityworkspace-purple .x-layout-split,.k-entityworkspace-purple .x-layout-collapsed
- {
- background: #A793AC none repeat scroll 0% 50%;
+ {
+ background: #A793AC none repeat scroll 0% 50%;
}
.k-entityworkspace-red .x-layout-split,.k-entityworkspace-red .x-layout-collapsed
- {
- background: #FF5555 none repeat scroll 0% 50%;
+ {
+ background: #FF5555 none repeat scroll 0% 50%;
}
.k-entity-title {
- border-left-style: solid;
- border-left-width: 5px;
+ border-left-style: solid;
+ border-left-width: 5px;
}
.k-entity-title div {
- line-height: 22px;
- white-space: nowrap;
+ line-height: 22px;
+ white-space: nowrap;
}
.k-entity-subtitle {
-
+
}
.k-entity-subtitle div {
- line-height: 22px;
- white-space: nowrap;
+ line-height: 22px;
+ white-space: nowrap;
}
.k-entity-title-rd-default {
- background: #DD8A3D;
+ background: #DD8A3D;
}
.k-entity-title-rd-green {
- background: #5FD35F;
+ background: #5FD35F;
}
.k-entity-title-rd-blue {
- background: #0066FF;
+ background: #0066FF;
}
.k-entity-title-rd-grey {
- background: #4D4D4D;
+ background: #4D4D4D;
}
.k-entity-title-rd-purple {
- background: #660080;
+ background: #660080;
}
.k-entity-title-rd-red {
- background: #D40000;
+ background: #D40000;
}
.k-entity-title-default {
- background: #F1BB59 none repeat scroll 0% 50%;
- border-left-color: #DD8A3D;
+ background: #F1BB59 none repeat scroll 0% 50%;
+ border-left-color: #DD8A3D;
}
.k-entity-title-green {
- background: #AFA none repeat scroll 0% 50%;
- border-left-color: #5FD35F;
+ background: #AFA none repeat scroll 0% 50%;
+ border-left-color: #5FD35F;
}
.k-entity-title-blue {
- background: #AFDDE9 none repeat scroll 0% 50%;
- border-left-color: #0066FF;
+ background: #AFDDE9 none repeat scroll 0% 50%;
+ border-left-color: #0066FF;
}
.k-entity-title-grey {
- background: #CCCCCC none repeat scroll 0% 50%;
- border-left-color: #4D4D4D;
+ background: #CCCCCC none repeat scroll 0% 50%;
+ border-left-color: #4D4D4D;
}
.k-entity-title-purple {
- background: #DDAFE9 none repeat scroll 0% 50%;
- border-left-color: #660080;
+ background: #DDAFE9 none repeat scroll 0% 50%;
+ border-left-color: #660080;
}
.k-entity-title-red {
- background: #FF8080 none repeat scroll 0% 50%;
- border-left-color: #D40000;
+ background: #FF8080 none repeat scroll 0% 50%;
+ border-left-color: #D40000;
}
.k-entity-title-default div {
- color: #69312F;
+ color: #69312F;
}
.k-entity-title-green div {
- color: #250;
+ color: #250;
}
.k-entity-title-blue div {
- color: #000080;
+ color: #000080;
}
.k-entity-title-grey div {
- color: #1A1A1A;
+ color: #1A1A1A;
}
.k-entity-title-purple div {
- color: #440055;
+ color: #440055;
}
.k-entity-title-red div {
- color: #800000;
+ color: #800000;
}
.k-entity-subtitle-default {
- background: #DD8A3D none repeat scroll 0% 50%;
+ background: #DD8A3D none repeat scroll 0% 50%;
}
.k-entity-subtitle-green {
- background: #5FD35F none repeat scroll 0% 50%;
+ background: #5FD35F none repeat scroll 0% 50%;
}
.k-entity-subtitle-blue {
- background: #0066FF none repeat scroll 0% 50%;
+ background: #0066FF none repeat scroll 0% 50%;
}
.k-entity-subtitle-grey {
- background: #4D4D4D none repeat scroll 0% 50%;
+ background: #4D4D4D none repeat scroll 0% 50%;
}
.k-entity-subtitle-purple {
- background: #660080 none repeat scroll 0% 50%;
+ background: #660080 none repeat scroll 0% 50%;
}
.k-entity-subtitle-red {
- background: #D40000 none repeat scroll 0% 50%;
+ background: #D40000 none repeat scroll 0% 50%;
}
.k-entity-subtitle-default div {
- color: #FFF;
+ color: #FFF;
}
.k-entity-subtitle-green div {
- color: #FFF;
+ color: #FFF;
}
.k-entity-subtitle-blue div {
- color: #FFF;
+ color: #FFF;
}
.k-entity-subtitle-grey div {
- color: #FFF;
+ color: #FFF;
}
.k-entity-subtitle-purple div {
- color: #FFF;
+ color: #FFF;
}
.k-entity-subtitle-red div {
- color: #FFF;
+ color: #FFF;
}
.k-entity-bottom-rd-default,.k-entity-bottom-default,.k-toolselectoritem-sel-default
- {
- background: #DD8A3D;
+ {
+ background: #DD8A3D;
}
.k-entity-bottom-rd-green,.k-entity-bottom-green,.k-toolselectoritem-sel-green
- {
- background: #5FD35F;
+ {
+ background: #5FD35F;
}
.k-entity-bottom-rd-blue,.k-entity-bottom-blue,.k-toolselectoritem-sel-blue
- {
- background: #0066FF;
+ {
+ background: #0066FF;
}
.k-entity-bottom-rd-grey,.k-entity-bottom-grey,.k-toolselectoritem-sel-grey
- {
- background: #4D4D4D;
+ {
+ background: #4D4D4D;
}
.k-entity-bottom-rd-purple,.k-entity-bottom-purple,.k-toolselectoritem-sel-purple
- {
- background: #660080;
+ {
+ background: #660080;
}
.k-entity-bottom-rd-red,.k-entity-bottom-red,.k-toolselectoritem-sel-red
- {
- background: #D40000;
+ {
+ background: #D40000;
}
.k-entity-context-default div,.k-entity-context-default .x-tree .x-panel-body
- {
- background: #FFD09D none repeat scroll 0% 50%;
+ {
+ background: #FFD09D none repeat scroll 0% 50%;
}
.k-entity-context-green div,.k-entity-context-green .x-tree .x-panel-body
- {
- background: #CFA none repeat scroll 0% 50%;
+ {
+ background: #CFA none repeat scroll 0% 50%;
}
.k-entity-context-blue div,.k-entity-context-blue .x-tree .x-panel-body
- {
- background: #AACCFF none repeat scroll 0% 50%;
+ {
+ background: #AACCFF none repeat scroll 0% 50%;
}
.k-entity-context-grey div,.k-entity-context-grey .x-tree .x-panel-body
- {
- background: #B3B3B3 none repeat scroll 0% 50%;
+ {
+ background: #B3B3B3 none repeat scroll 0% 50%;
}
.k-entity-context-purple div,.k-entity-context-purple .x-tree .x-panel-body
- {
- background: #DDAFE9 none repeat scroll 0% 50%;
+ {
+ background: #DDAFE9 none repeat scroll 0% 50%;
}
.k-entity-context-red div,.k-entity-context-red .x-tree .x-panel-body {
- background: #FFAAAA none repeat scroll 0% 50%;
+ background: #FFAAAA none repeat scroll 0% 50%;
}
.k-entity-context-purple .x-tree .x-panel-body {
- background: #DDAFE9 none repeat scroll 0% 50%;
+ background: #DDAFE9 none repeat scroll 0% 50%;
}
.k-entity-content {
- background: #FFF;
+ background: #FFF;
}
.k-entity-bottom div { /* line-height: 24px; */
- color: #FFF;
+ color: #FFF;
}
.k-toolbar-top-line {
- border-top-color: rgb(208, 208, 208);
- border-top-style: solid;
- border-top-width: 1px;
+ border-top-color: rgb(208, 208, 208);
+ border-top-style: solid;
+ border-top-width: 1px;
}
.k-toolbar-bottom-line {
- border-bottom-color: rgb(208, 208, 208);
- border-bottom-style: solid;
- border-bottom-width: 1px;
+ border-bottom-color: rgb(208, 208, 208);
+ border-bottom-style: solid;
+ border-bottom-width: 1px;
}
.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label
- {
- white-space: nowrap;
- font: normal 100% arial, sans;
- line-height: 19px;
+ {
+ white-space: nowrap;
+ font: normal 100% arial, sans;
+ line-height: 19px;
}
.k-toolbar-sep {
- padding-top: 4px;
- padding-left: 5px;
+ padding-top: 4px;
+ padding-left: 5px;
}
/* Custom gwt-ext styles */
.ytb-sep {
- background-image:
- url(../js/ext/resources/images/default/grid/grid-split.gif);
- background-position: center;
- background-repeat: no-repeat;
- display: block;
- font-size: 1px;
- height: 16px;
- width: 4px;
- overflow: hidden;
- cursor: default;
- margin: 0 2px 0;
- border: 0;
+ background-image:
+ url(../js/ext/resources/images/default/grid/grid-split.gif);
+ background-position: center;
+ background-repeat: no-repeat;
+ display: block;
+ font-size: 1px;
+ height: 16px;
+ width: 4px;
+ overflow: hidden;
+ cursor: default;
+ margin: 0 2px 0;
+ border: 0;
}
.ytb-spacer {
- width: 2px;
+ width: 2px;
}
.x-grid-group-hd {
- border-bottom: 2px solid grey;
- cursor: pointer;
- padding-top: 3px;
+ border-bottom: 2px solid grey;
+ cursor: pointer;
+ padding-top: 3px;
}
/* Drop down */
.k-dropdownouter {
- background-color: grey;
+ background-color: grey;
}
.k-dropdownouter-members {
-
+
}
.k-dropdownouter-members-default {
- background-color: #DF5244;
+ background-color: #DF5244;
}
.k-dropdownouter-members-green {
- background-color: #008000;
+ background-color: #008000;
}
.k-dropdownouter-members-blue {
- background-color: #5500D4;
+ background-color: #5500D4;
}
.k-dropdownouter-members-grey {
- background-color: #4D4D4D;
+ background-color: #4D4D4D;
}
.k-dropdownouter-members-purple {
- background-color: #672178;
+ background-color: #672178;
}
.k-dropdownouter-members-red {
- background-color: #A02C2C;
+ background-color: #A02C2C;
}
.k-dropdownouter-part {
-
+
}
.k-dropdownouter-part-default {
- background-color: #CA5842;
+ background-color: #CA5842;
}
.k-dropdownouter-part-green {
- background-color: #00AA00;
+ background-color: #00AA00;
}
.k-dropdownouter-part-blue {
- background-color: #6600FF;
+ background-color: #6600FF;
}
.k-dropdownouter-part-grey {
- background-color: #666666;
+ background-color: #666666;
}
.k-dropdownouter-part-purple {
- background-color: #892CA0;
+ background-color: #892CA0;
}
.k-dropdownouter-part-red {
- background-color: #C83737;
+ background-color: #C83737;
}
.k-dropdownouter-tags {
-
+
}
.k-dropdownouter-tags-default {
- background-color: #87501E;
+ background-color: #87501E;
}
.k-dropdownouter-tags-green {
- background-color: #00D400;
+ background-color: #00D400;
}
.k-dropdownouter-tags-blue {
- background-color: #9955FF;
+ background-color: #9955FF;
}
.k-dropdownouter-tags-grey {
- background-color: #808080;
+ background-color: #808080;
}
.k-dropdownouter-tags-purple {
- background-color: #AB37C8;
+ background-color: #AB37C8;
}
.k-dropdownouter-tags-red {
- background-color: #D35F5F;
+ background-color: #D35F5F;
}
.k-dropdownouter-summary {
-
+
}
.k-dropdownouter-summary-default {
- background-color: #9F734B;
+ background-color: #9F734B;
}
.k-dropdownouter-summary-green {
- background-color: #4CE14C;
+ background-color: #4CE14C;
}
.k-dropdownouter-summary-blue {
- background-color: #69A5FF;
+ background-color: #69A5FF;
}
.k-dropdownouter-summary-grey {
- background-color: #A6A6A6;
+ background-color: #A6A6A6;
}
.k-dropdownouter-summary-purple {
- background-color: #C473D8;
+ background-color: #C473D8;
}
.k-dropdownouter-summary-red {
- background-color: #E08F8F;
+ background-color: #E08F8F;
}
.k-dropdowninner {
- margin: 0 3px 1px 3px;
- background: green;
- background-color: #FFF;
- /* padding: 3px; */
+ margin: 0 3px 1px 3px;
+ background: green;
+ background-color: #FFF;
+ /* padding: 3px; */
}
.k-dropdownlabel {
- color: #FFF;
- cursor: pointer;
+ color: #FFF;
+ cursor: pointer;
}
.k-dropdownlabel .gwt-Label {
- margin: 0 5px 0 0;
- width: 100%;
+ margin: 0 5px 0 0;
+ width: 100%;
}
.k-dropdownlabel img {
- margin: 0 3px 0 1px;
+ margin: 0 3px 0 1px;
}
/* WsTheme */
.k-wstheme-icon-default {
- background: #FF8C00;
+ background: #FF8C00;
}
.k-wstheme-icon-green {
- background: green;
+ background: green;
}
.k-wstheme-icon-blue {
- background: blue;
+ background: blue;
}
.k-wstheme-icon-grey {
- background: grey;
+ background: grey;
}
.k-wstheme-icon-purple {
- background: purple;
+ background: purple;
}
.k-wstheme-icon-red {
- background: red;
+ background: red;
}
/* Tool selector items */
.k-toolselectoritem {
- width: auto;
- margin-bottom: 5px;
- cursor: pointer;
+ width: auto;
+ margin-bottom: 5px;
+ cursor: pointer;
}
.k-toolselectoritem-sel {
-
+
}
.k-toolselectoritem-notsel-default {
- background: #FFE9A5;
+ background: #FFE9A5;
}
.k-toolselectoritem-notsel-green {
- background: #D6F4D6;
+ background: #D6F4D6;
}
.k-toolselectoritem-notsel-blue {
- background: #D7D7F4;
+ background: #D7D7F4;
}
.k-toolselectoritem-notsel-grey {
- background: #E6E6E6;
+ background: #E6E6E6;
}
.k-toolselectoritem-notsel-purple {
- background: #EED7F4;
+ background: #EED7F4;
}
.k-toolselectoritem-notsel-red {
- background: #FFD5D5;
+ background: #FFD5D5;
}
.k-toolselectoritem-sel a {
- color: #FFF;
- padding: 0 9px;
- text-decoration: none;
+ color: #FFF;
+ padding: 0 9px;
+ text-decoration: none;
}
.k-toolselectoritem-sel a:hover {
- text-decoration: none;
+ text-decoration: none;
}
.k-toolselectoritem-notsel {
-
+
}
.k-toolselectoritem-notsel a {
- color: #0000FF;
- padding: 0 9px;
- text-decoration: none;
+ color: #0000FF;
+ padding: 0 9px;
+ text-decoration: none;
}
.k-toolselectoritem-notsel a:hover {
- text-decoration: underline;
+ text-decoration: underline;
}
/* others */ /*
@@ -699,231 +699,231 @@
}
*/
.x-tree-node .k-ctn-status-normal a span {
-
+
}
.x-tree-node .k-ctn-status-deleted a span {
- text-decoration: line-through;
- color: gray;
+ text-decoration: line-through;
+ color: gray;
}
.x-tree-node .k-ctn-status-rejected a span {
- text-decoration: line-through;
- /* color: #FF6633; */
- color: #FF3300;
+ text-decoration: line-through;
+ /* color: #FF6633; */
+ color: #FF3300;
}
.x-tree-node .k-ctn-status-editing a span {
- font-style: italic;
- color: gray;
+ font-style: italic;
+ color: gray;
}
.x-tree-node .k-ctn-status-submitted a span {
- color: green;
+ color: green;
}
.k-info-links {
- text-decoration: underline;
- color: gray;
- cursor: pointer;
+ text-decoration: underline;
+ color: gray;
+ cursor: pointer;
}
.x-tool-kmenu {
- background-position: 0 -75px;
+ background-position: 0 -75px;
}
.x-tool-kmenu-over {
- background-position: -15px -75px;
+ background-position: -15px -75px;
}
.k-border-openbox {
- border-bottom: 1px #D0D0D0 solid;
- border-right: 1px #D0D0D0 solid;
- border-left: 1px #D0D0D0 solid;
+ border-bottom: 1px #D0D0D0 solid;
+ border-right: 1px #D0D0D0 solid;
+ border-left: 1px #D0D0D0 solid;
}
/* SiteToastMessages */
.k-stm-info-icon {
- background-image: url(img/info.gif) !important;
+ background-image: url(img/info.gif) !important;
}
.k-stm-imp-icon {
- background-image: url(img/alert.gif) !important;
+ background-image: url(img/alert.gif) !important;
}
.k-stm-verimp-icon {
- background-image: url(img/important.gif) !important;
+ background-image: url(img/important.gif) !important;
}
.k-stm-error-icon {
- background-image: url(img/error.gif) !important;
+ background-image: url(img/error.gif) !important;
}
.k-infod-head {
- font-size: 108%;
- margin-bottom: 10px;
+ font-size: 108%;
+ margin-bottom: 10px;
}
.gwt-DisclosurePanel {
-
+
}
.gwt-DisclosurePanel-open {
-
+
}
.gwt-DisclosurePanel-closed {
-
+
}
.gwt-DisclosurePanel .header,.gwt-DisclosurePanel .header a,.gwt-DisclosurePanel .header td
- {
- text-decoration: none; /* Remove underline from header */
- color: black;
- cursor: pointer;
- cursor: hand;
+ {
+ text-decoration: none; /* Remove underline from header */
+ color: black;
+ cursor: pointer;
+ cursor: hand;
}
.gwt-DisclosurePanel .content {
- border-left: 3px solid #e8eef7;
- padding: 4px 0px 4px 8px;
- margin-left: 6px;
+ border-left: 3px solid #e8eef7;
+ padding: 4px 0px 4px 8px;
+ margin-left: 6px;
}
.k-basic-thumb {
- background: #FAFAFA none repeat scroll 0% 50%;
- border: 1px solid #EBEBEB;
- padding: 3px;
- margin: 3px;
+ background: #FAFAFA none repeat scroll 0% 50%;
+ border: 1px solid #EBEBEB;
+ padding: 3px;
+ margin: 3px;
}
.k-basic-thumb td {
- padding: 2px 3px 2px 3px;
- border: none;
+ padding: 2px 3px 2px 3px;
+ border: none;
}
.k-text-gray {
- color: gray;
+ color: gray;
}
.k-elp-limg {
- margin-top: 4px;
- margin-left: 5px;
- cursor: pointer;
- overflow: hidden;
+ margin-top: 4px;
+ margin-left: 5px;
+ cursor: pointer;
+ overflow: hidden;
}
.k-tsp-tag {
- float: left;
- padding: 3px;
- cursor: pointer;
- color: #0000FF;
+ float: left;
+ padding: 3px;
+ cursor: pointer;
+ color: #0000FF;
}
.k-tsp-cloud {
- line-height: 1.5em;
- text-align: center;
+ line-height: 1.5em;
+ text-align: center;
}
.k-link-icon {
- background-image: url(img/link.gif) !important;
+ background-image: url(img/link.gif) !important;
}
.k-options-icon {
- background-image: url(img/emblem-system.gif) !important;
+ background-image: url(img/emblem-system.gif) !important;
}
.k-copyleft-icon {
- background-image: url(img/copyleft.png) !important;
+ background-image: url(img/copyleft.png) !important;
}
.k-picture-icon {
- background-image: url(img/picture.png) !important;
+ background-image: url(img/picture.png) !important;
}
.k-film-icon {
- background-image: url(img/film.png) !important;
+ background-image: url(img/film.png) !important;
}
.k-specialchars-icon {
- background-image: url(img/specialchars.png) !important;
+ background-image: url(img/specialchars.png) !important;
}
.k-info-icon {
- background-image: url(img/info.gif) !important;
+ background-image: url(img/info.gif) !important;
}
.k-newgroup-icon {
- background-image: url(img/kune-icon16.png) !important;
+ background-image: url(img/kune-icon16.png) !important;
}
.k-colors-icon {
- background-image: url(img/colors.gif) !important;
+ background-image: url(img/colors.gif) !important;
}
.x-toolbar-body table { /* width: 100%; */
-
+
}
.k-preview-msg {
- background: #FFCCAA;
+ background: #FFCCAA;
}
.k-preview-msg-lab {
- background: #FFCCAA;
- padding: 0 5px;
+ background: #FFCCAA;
+ padding: 0 5px;
}
.k-eil-edit {
- border: thin solid black;
+ border: thin solid black;
}
/* duplicated in rte.css */
.k-rte-comment {
- border: 1px dashed #C0C0C0;
- line-height: 1.4;
- padding: 1px;
- background-color: #D7FFD7;
+ border: 1px dashed #C0C0C0;
+ line-height: 1.4;
+ padding: 1px;
+ background-color: #D7FFD7;
}
.k-specialchar-grid {
- border: 1px solid #ACA899;
+ border: 1px solid #ACA899;
}
.k-specialchar-grid table {
-
+
}
.k-specialchar-grid div {
- line-height: 22px;
+ line-height: 22px;
}
.k-specialchar-grid td {
- padding: 1px;
+ padding: 1px;
}
.k-specialchar-pb {
- border: 1px solid #EBE8D7;
- cursor: pointer;
- font-size: 108% !important;
- text-align: center;
- vertical-align: middle;
- width: 18px;
- height: 18px;
+ border: 1px solid #EBE8D7;
+ cursor: pointer;
+ font-size: 108% !important;
+ text-align: center;
+ vertical-align: middle;
+ width: 18px;
+ height: 18px;
}
.k-specialchar-pb-up {
-
+
}
.k-specialchar-big {
- padding: 3px;
- line-height: 22px;
- font-size: 197% !important;
+ padding: 3px;
+ line-height: 22px;
+ font-size: 197% !important;
}
.k-specialchar-adv-label {
- margin-left: -10px;
+ margin-left: -10px;
}
.k-specialchar-popup
@@ -1019,79 +1019,79 @@
;
}
.k-specialchar-pb-down {
- color: #161616;
+ color: #161616;
}
.k-specialchar-pb-up-hovering {
- border: thin solid #ACA899;
+ border: thin solid #ACA899;
}
.k-specialchar-pb-down-hovering {
- color: #161616;
+ color: #161616;
}
.k-preview-panel {
- border: dashed 1px gray;
- padding: 5px;
+ border: dashed 1px gray;
+ padding: 5px;
}
.k-rte-changelink {
- white-space: nowrap;
- color: navy;
- cursor: pointer;
- text-decoration: underline;
- margin: 5px;
+ white-space: nowrap;
+ color: navy;
+ cursor: pointer;
+ text-decoration: underline;
+ margin: 5px;
}
.k-rte-changelink-popup {
- border: 1px solid #C0C0C0;
- z-index: 9999 !important;
- background-color: #ECECEC;
+ border: 1px solid #C0C0C0;
+ z-index: 9999 !important;
+ background-color: #ECECEC;
}
.e-ui-room {
- height: 27px;
- line-height: 22px;
+ height: 27px;
+ line-height: 22px;
}
.e-ui-room input {
- font-size: 100%;
- margin-left: 0px;
- margin-top: 0px;
+ font-size: 100%;
+ margin-left: 0px;
+ margin-top: 0px;
}
.k-def-popup {
- z-index: 9999 !important;
- background-color: #FFF;
- border: 1px solid gray;
+ z-index: 9999 !important;
+ background-color: #FFF;
+ border: 1px solid gray;
}
#k-mshortcut {
- position: absolute;
- right: 10px;
+ position: absolute;
+ right: 10px;
}
#k-mshortcut-hidden {
- visibility: hidden;
+ visibility: hidden;
}
#k-mshortcut a {
- text-decoration: none;
- color: black;
+ text-decoration: none;
+ color: black;
}
.k-plain-iframe iframe {
- border: 1px solid gray;
+ border: 1px solid gray;
}
.k-transp .x-panel-body {
- background: transparent;
+ background: transparent;
}
.k-transp {
- background: transparent;
+ background: transparent;
}
.k-blank {
- background: #FFF;
+ background: #FFF;
}
\ No newline at end of file
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -25,7 +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.ui.download.FileDownloadUtils;
import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
@@ -42,6 +41,7 @@
import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -32,7 +32,6 @@
import org.ourproject.kune.platf.client.app.ToolGroup;
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
@@ -53,6 +52,7 @@
import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.i18n.I18nTranslationService;
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientTool.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogsMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogsMessages.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogsMessages.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContent.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContent.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContent.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -21,11 +21,11 @@
import org.ourproject.kune.blogs.client.BlogClientTool;
import org.ourproject.kune.platf.client.actions.ActionRegistry;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.utils.StateToken;
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogFolderContentView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewer.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewer.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -20,13 +20,13 @@
package org.ourproject.kune.blogs.client.cnt;
import org.ourproject.kune.blogs.client.BlogClientTool;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
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 cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.dto.StateContentDTO;
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/cnt/BlogViewerView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/ctx/BlogContext.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/ctx/BlogContext.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/ctx/BlogContext.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/ctx/BlogContextPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/ctx/BlogContextPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/ctx/BlogContextPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoom.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoom.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoom.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -21,13 +21,13 @@
import org.ourproject.kune.chat.client.ChatClientTool;
import org.ourproject.kune.platf.client.actions.ActionRegistry;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter;
import cc.kune.common.client.utils.TextUtils;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.utils.StateToken;
Modified: trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/chat/client/cnt/ChatRoomView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -25,7 +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.ui.download.FileDownloadUtils;
import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
@@ -42,6 +41,7 @@
import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
Modified: trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -32,7 +32,6 @@
import org.ourproject.kune.platf.client.app.ToolGroup;
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
@@ -53,6 +52,7 @@
import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.i18n.I18nTranslationService;
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocFolderContentPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,11 +21,11 @@
import org.ourproject.kune.docs.client.DocumentClientTool;
import org.ourproject.kune.platf.client.actions.ActionRegistry;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.utils.StateToken;
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/docs/client/cnt/DocumentViewerPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,13 +20,13 @@
package org.ourproject.kune.docs.client.cnt;
import org.ourproject.kune.docs.client.DocumentClientTool;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
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 cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.dto.StateContentDTO;
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -24,7 +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.ui.download.FileDownloadUtils;
import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
@@ -41,6 +40,7 @@
import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -32,7 +32,6 @@
import org.ourproject.kune.platf.client.app.ToolGroup;
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
@@ -53,6 +52,7 @@
import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.i18n.I18nTranslationService;
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientTool.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryMessages.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryMessages.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContent.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContent.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContent.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -19,10 +19,10 @@
*/
package org.ourproject.kune.gallery.client.cnt;
-import org.ourproject.kune.platf.client.ui.BasicThumb;
import org.ourproject.kune.workspace.client.cnt.FoldableContentPanel;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import cc.kune.common.client.ui.BasicThumb;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.utils.StateToken;
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -21,12 +21,12 @@
import org.ourproject.kune.gallery.client.GalleryClientTool;
import org.ourproject.kune.platf.client.actions.ActionRegistry;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
-import org.ourproject.kune.platf.client.ui.download.ImageSize;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.services.ImageSize;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.utils.StateToken;
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryFolderContentView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewer.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewer.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -20,13 +20,13 @@
package org.ourproject.kune.gallery.client.cnt;
import org.ourproject.kune.gallery.client.GalleryClientTool;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
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 cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.dto.StateContentDTO;
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/cnt/GalleryViewerView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContext.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContext.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContext.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContextPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContextPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/ctx/GalleryContextPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractAction.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,165 +0,0 @@
-/* AbstractAction.java --
- Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
-
-This file is part of GNU Classpath.
-
-GNU Classpath is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Classpath 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
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Classpath; see the file COPYING. If not, write to the
-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301 USA.
-
-Linking this library statically or dynamically with other modules is
-making a combined work based on this library. Thus, the terms and
-conditions of the GNU General Public License cover the whole
-combination.
-
-As a special exception, the copyright holders of this library give you
-permission to link this library with independent modules to produce an
-executable, regardless of the license terms of these independent
-modules, and to copy and distribute the resulting executable under
-terms of your choice, provided that you also meet, for each linked
-independent module, the terms and conditions of the license of that
-module. An independent module is a module which is not derived from
-or based on this library. If you modify this library, you may extend
-this exception to your version of the library, but you are not
-obligated to do so. If you do not wish to do so, delete this
-exception statement from your version. */
-
-package org.ourproject.kune.platf.client.actions;
-
-import java.util.HashMap;
-
-import com.google.gwt.resources.client.ImageResource;
-
-/**
- * A base class for implementing the {@link Action} interface.
- *
- * @author Andrew Selkirk
- * @author Adapted version for GWT (C) The kune development team
- */
-public abstract class AbstractAction extends ChangebleObject implements Action {
-
- /**
- * A flag that indicates whether or not the action is enabled.
- */
- protected boolean enabled = true;
-
- /**
- * Creates a new action with no properties set.
- */
- public AbstractAction() {
- // Nothing to do.
- }
-
- /**
- * Copy constructor used as a substitute of clone
- */
- @SuppressWarnings("unchecked")
- public AbstractAction(final AbstractAction action) {
- enabled = action.enabled;
- store = (HashMap<String, Object>) action.store.clone();
- }
-
- /**
- * Creates a new action with the specified name. The name is stored as a
- * property with the key {@link Action#NAME}, and no other properties are
- * initialised.
- *
- * @param name
- * the name (<code>null</code> permitted).
- */
- public AbstractAction(final String name) {
- // @PMD:REVIEWED:ConstructorCallsOverridableMethod: by vjrj on 21/05/09
- // 15:19
- putValue(NAME, name);
- }
-
- /**
- * Creates a new action with the specified name and icon. The name is stored
- * as a property with the key {@link Action#NAME}, the icon is stored as a
- * property with the key {@link Action#SMALL_ICON}, and no other properties
- * are initialised.
- *
- * @param name
- * the name (<code>null</code> permitted).
- * @param icon
- * the icon (<code>null</code> permitted).
- */
- public AbstractAction(final String name, final ImageResource icon) {
- // @PMD:REVIEWED:ConstructorCallsOverridableMethod: by vjrj on 21/05/09
- // 15:19
- putValue(NAME, name);
- // @PMD:REVIEWED:ConstructorCallsOverridableMethod: by vjrj on 21/05/09
- // 15:19
- putValue(SMALL_ICON, icon);
- }
-
- /**
- * Returns the flag that indicates whether or not the action is enabled.
- *
- * @return The flag.
- *
- * @see #setEnabled(boolean)
- */
- public boolean isEnabled() {
- return enabled;
- }
-
- @Override
- /**
- * Sets the value associated with the specified key and sends a
- * {@link java.beans.PropertyChangeEvent} to all registered listeners. The
- * standard keys are:
- * <ul>
- * <li>{@link #NAME}</li>
- * <li>{@link #SHORT_DESCRIPTION}</li>
- * <li>{@link #LONG_DESCRIPTION}</li>
- * <li>{@link #SMALL_ICON}</li>
- * <li>{@link #ACTION_COMMAND_KEY}</li>
- * <li>{@link #ACCELERATOR_KEY}</li>
- * <li>{@link #MNEMONIC_KEY}</li>
- * </ul>
- * Any existing value associated with the key will be overwritten.
- *
- * @param key
- * the key (not <code>null</code>).
- * @param value
- * the value (<code>null</code> permitted).
- */
- public void putValue(final String key, final Object value) {
- // TODO Auto-generated method stub
- super.putValue(key, value);
- }
-
- /**
- * Sets the flag that indicates whether or not the action is enabled and, if
- * the value of the flag changed from the previous setting, sends a
- * {@link java.beans.PropertyChangeEvent} to all registered listeners (using
- * the property name 'enabled').
- *
- * @param enabled
- * the new flag value.
- *
- * @see #isEnabled()
- */
- public void setEnabled(final boolean enabled) {
- if (enabled != this.enabled) {
- this.enabled = enabled;
- firePropertyChange(ENABLED, !this.enabled, this.enabled);
- }
- }
-
- public void setShortcut(final KeyStroke key) {
- putValue(Action.ACCELERATOR_KEY, key);
- }
-}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractExtendedAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractExtendedAction.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractExtendedAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
import com.google.gwt.resources.client.ImageResource;
-public abstract class AbstractExtendedAction extends AbstractAction {
+public abstract class AbstractExtendedAction extends OldAbstractAction {
public static final String NO_TEXT = null;
public static final ImageResource NO_ICON = null;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionCollection.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionCollection.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionCollection.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,6 +21,7 @@
import java.util.ArrayList;
+ at Deprecated
public class ActionCollection<T> extends ArrayList<ActionDescriptor<T>> {
private static final long serialVersionUID = -3308296009308246636L;
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ActionDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,9 +19,9 @@
\*/
package org.ourproject.kune.platf.client.actions;
-import org.ourproject.kune.platf.client.services.ImageDescriptor;
import org.ourproject.kune.platf.client.shortcuts.ShortcutDescriptor;
+import cc.kune.core.client.services.ImageDescriptor;
import cc.kune.core.shared.dto.AccessRolDTO;
import com.calclab.suco.client.events.Listener;
@@ -30,59 +30,60 @@
/**
* The Class ActionDescriptor.
*/
+ at Deprecated
public class ActionDescriptor<T> {
public static final int NO_POSITION = -1;
- /** The icon url. */
- private String iconUrl;
+ /** The access rol. */
+ private AccessRolDTO accessRol;
+ /** The must be added condition. */
+ private ActionAddCondition<T> addCondition;
+
+ /** The confirmation text. */
+ private String confirmationText;
+
+ /** The confirmation title. */
+ private String confirmationTitle;
+
+ /** The enable condition. */
+ private ActionEnableCondition<T> enableCondition;
+
/** The icon cls. */
private String iconCls;
/** The icon descriptor. */
private ImageDescriptor iconDescriptor;
- /** The text description. */
- private String textDescription;
+ /** The icon url. */
+ private String iconUrl;
- /** The tool tip. */
- private String toolTip;
+ /** The id. */
+ private String id;
+ /** The must be authenticated. */
+ private boolean mustBeAuthenticated;
+
/** The must be confirmed. */
private boolean mustBeConfirmed;
- /** The confirmation title. */
- private String confirmationTitle;
+ /** The on not confirmed. */
+ private Listener<T> onNotConfirmed;
- /** The confirmation text. */
- private String confirmationText;
-
/** The on perform call. */
private final Listener<T> onPerformCall;
- /** The on not confirmed. */
- private Listener<T> onNotConfirmed;
+ private int position = NO_POSITION;
- /** The must be authenticated. */
- private boolean mustBeAuthenticated;
+ private ShortcutDescriptor shortcut;
- /** The access rol. */
- private AccessRolDTO accessRol;
+ /** The text description. */
+ private String textDescription;
- /** The enable condition. */
- private ActionEnableCondition<T> enableCondition;
+ /** The tool tip. */
+ private String toolTip;
- /** The must be added condition. */
- private ActionAddCondition<T> addCondition;
-
- /** The id. */
- private String id;
-
- private ShortcutDescriptor shortcut;
-
- private int position = NO_POSITION;
-
public ActionDescriptor(final AccessRolDTO accessRolDTO, final Listener<T> onPerformCall) {
this.accessRol = accessRolDTO;
this.onPerformCall = onPerformCall;
@@ -124,6 +125,7 @@
public ActionDescriptor(final AccessRolDTO accessRolDTO, final Listener0 onPerformCall) {
this(accessRolDTO, new Listener<T>() {
+ @Override
public void onEvent(final T parameter) {
onPerformCall.onEvent();
}
@@ -221,6 +223,10 @@
return accessRol;
}
+ private ActionAddCondition<T> getAddCondition() {
+ return addCondition;
+ }
+
/**
* Gets the confirmation text.
*
@@ -239,6 +245,10 @@
return confirmationTitle;
}
+ private ActionEnableCondition<T> getEnableCondition() {
+ return enableCondition;
+ }
+
public String getIconCls() {
return iconCls;
}
@@ -270,6 +280,14 @@
return id;
}
+ private Listener<T> getOnNotConfirmed() {
+ return onNotConfirmed;
+ }
+
+ private Listener<T> getOnPerformCall() {
+ return onPerformCall;
+ }
+
/**
* Get the index position where this action will be inserted
*
@@ -296,6 +314,10 @@
return textDescription;
}
+ private String getTextDescription() {
+ return textDescription;
+ }
+
/**
* Gets the tool tip.
*
@@ -439,6 +461,10 @@
this.mustBeConfirmed = mustBeConfirmed;
}
+ private void setOnNotConfirmed(final Listener<T> onNotConfirmed) {
+ this.onNotConfirmed = onNotConfirmed;
+ }
+
/**
* Index position where this action will be inserted
*
@@ -472,28 +498,4 @@
this.toolTip = toolTip;
}
- private ActionAddCondition<T> getAddCondition() {
- return addCondition;
- }
-
- private ActionEnableCondition<T> getEnableCondition() {
- return enableCondition;
- }
-
- private Listener<T> getOnNotConfirmed() {
- return onNotConfirmed;
- }
-
- private Listener<T> getOnPerformCall() {
- return onPerformCall;
- }
-
- private String getTextDescription() {
- return textDescription;
- }
-
- private void setOnNotConfirmed(final Listener<T> onNotConfirmed) {
- this.onNotConfirmed = onNotConfirmed;
- }
-
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/InputMap.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/InputMap.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/InputMap.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -63,7 +63,7 @@
/**
* Storage for the KeyStroke --> Object mappings.
*/
- private Map<KeyStroke, AbstractAction> inputMap;
+ private Map<KeyStroke, OldAbstractAction> inputMap;
/**
* An optional parent map.
@@ -122,8 +122,8 @@
* @return The binding associated with the specified keystroke (or
* <code>null</code>).
*/
- public AbstractAction get(final KeyStroke keystroke) {
- AbstractAction result = null;
+ public OldAbstractAction get(final KeyStroke keystroke) {
+ OldAbstractAction result = null;
if (inputMap != null) {
result = inputMap.get(keystroke);
}
@@ -177,12 +177,12 @@
* @param actionMapKey
* the action (<code>null</code> permitted).
*/
- public void put(final KeyStroke keystroke, final AbstractAction actionMapKey) {
+ public void put(final KeyStroke keystroke, final OldAbstractAction actionMapKey) {
if (keystroke == null) {
return;
}
if (inputMap == null) {
- inputMap = new HashMap<KeyStroke, AbstractAction>();
+ inputMap = new HashMap<KeyStroke, OldAbstractAction>();
}
if (actionMapKey == null) {
inputMap.remove(keystroke);
Copied: trunk/src/main/java/org/ourproject/kune/platf/client/actions/OldAbstractAction.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/platf/client/actions/AbstractAction.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/OldAbstractAction.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/OldAbstractAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,168 @@
+/* AbstractAction.java --
+ Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+package org.ourproject.kune.platf.client.actions;
+
+import java.util.HashMap;
+
+import com.google.gwt.resources.client.ImageResource;
+
+/**
+ * A base class for implementing the {@link Action} interface.
+ *
+ * @author Andrew Selkirk
+ * @author Adapted version for GWT (C) The kune development team
+ */
+ at Deprecated
+public abstract class OldAbstractAction extends ChangebleObject implements Action {
+
+ /**
+ * A flag that indicates whether or not the action is enabled.
+ */
+ protected boolean enabled = true;
+
+ /**
+ * Creates a new action with no properties set.
+ */
+ public OldAbstractAction() {
+ // Nothing to do.
+ }
+
+ /**
+ * Copy constructor used as a substitute of clone
+ */
+ @SuppressWarnings("unchecked")
+ public OldAbstractAction(final OldAbstractAction action) {
+ enabled = action.enabled;
+ store = (HashMap<String, Object>) action.store.clone();
+ }
+
+ /**
+ * Creates a new action with the specified name. The name is stored as a
+ * property with the key {@link Action#NAME}, and no other properties are
+ * initialised.
+ *
+ * @param name
+ * the name (<code>null</code> permitted).
+ */
+ public OldAbstractAction(final String name) {
+ // @PMD:REVIEWED:ConstructorCallsOverridableMethod: by vjrj on 21/05/09
+ // 15:19
+ putValue(NAME, name);
+ }
+
+ /**
+ * Creates a new action with the specified name and icon. The name is stored
+ * as a property with the key {@link Action#NAME}, the icon is stored as a
+ * property with the key {@link Action#SMALL_ICON}, and no other properties
+ * are initialised.
+ *
+ * @param name
+ * the name (<code>null</code> permitted).
+ * @param icon
+ * the icon (<code>null</code> permitted).
+ */
+ public OldAbstractAction(final String name, final ImageResource icon) {
+ // @PMD:REVIEWED:ConstructorCallsOverridableMethod: by vjrj on 21/05/09
+ // 15:19
+ putValue(NAME, name);
+ // @PMD:REVIEWED:ConstructorCallsOverridableMethod: by vjrj on 21/05/09
+ // 15:19
+ putValue(SMALL_ICON, icon);
+ }
+
+ /**
+ * Returns the flag that indicates whether or not the action is enabled.
+ *
+ * @return The flag.
+ *
+ * @see #setEnabled(boolean)
+ */
+ @Override
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ @Override
+ /**
+ * Sets the value associated with the specified key and sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners. The
+ * standard keys are:
+ * <ul>
+ * <li>{@link #NAME}</li>
+ * <li>{@link #SHORT_DESCRIPTION}</li>
+ * <li>{@link #LONG_DESCRIPTION}</li>
+ * <li>{@link #SMALL_ICON}</li>
+ * <li>{@link #ACTION_COMMAND_KEY}</li>
+ * <li>{@link #ACCELERATOR_KEY}</li>
+ * <li>{@link #MNEMONIC_KEY}</li>
+ * </ul>
+ * Any existing value associated with the key will be overwritten.
+ *
+ * @param key
+ * the key (not <code>null</code>).
+ * @param value
+ * the value (<code>null</code> permitted).
+ */
+ public void putValue(final String key, final Object value) {
+ // TODO Auto-generated method stub
+ super.putValue(key, value);
+ }
+
+ /**
+ * Sets the flag that indicates whether or not the action is enabled and, if
+ * the value of the flag changed from the previous setting, sends a
+ * {@link java.beans.PropertyChangeEvent} to all registered listeners (using
+ * the property name 'enabled').
+ *
+ * @param enabled
+ * the new flag value.
+ *
+ * @see #isEnabled()
+ */
+ @Override
+ public void setEnabled(final boolean enabled) {
+ if (enabled != this.enabled) {
+ this.enabled = enabled;
+ firePropertyChange(ENABLED, !this.enabled, this.enabled);
+ }
+ }
+
+ public void setShortcut(final KeyStroke key) {
+ putValue(Action.ACCELERATOR_KEY, key);
+ }
+}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractActionExtensiblePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractActionExtensiblePresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractActionExtensiblePresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,16 +21,16 @@
public abstract class AbstractActionExtensiblePresenter implements IsActionExtensible {
- public abstract void addAction(final GuiActionDescrip descriptor);
+ public abstract void addAction(final OldGuiActionDescrip descriptor);
public void addActionCollection(final GuiActionDescCollection descriptors) {
- for (final GuiActionDescrip descriptor : descriptors) {
+ for (final OldGuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
- public void addActions(final GuiActionDescrip... descriptors) {
- for (final GuiActionDescrip descriptor : descriptors) {
+ public void addActions(final OldGuiActionDescrip... descriptors) {
+ for (final OldGuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractComposedGuiItem.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractComposedGuiItem.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractComposedGuiItem.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -36,30 +36,30 @@
protected abstract void add(AbstractGuiItem item);
- public void add(final GuiActionDescrip... descriptors) {
- for (final GuiActionDescrip descriptor : descriptors) {
+ public void add(final OldGuiActionDescrip... descriptors) {
+ for (final OldGuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
- public void addAction(final GuiActionDescrip descriptor) {
+ public void addAction(final OldGuiActionDescrip descriptor) {
getGuiItems().add(descriptor);
beforeAddWidget(descriptor);
}
public void addAll(final GuiActionDescCollection descriptors) {
- for (final GuiActionDescrip descriptor : descriptors) {
+ for (final OldGuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
- public void addAll(final List<GuiActionDescrip> descriptors) {
- for (final GuiActionDescrip descriptor : descriptors) {
+ public void addAll(final List<OldGuiActionDescrip> descriptors) {
+ for (final OldGuiActionDescrip descriptor : descriptors) {
addAction(descriptor);
}
}
- protected void beforeAddWidget(final GuiActionDescrip descrip) {
+ protected void beforeAddWidget(final OldGuiActionDescrip descrip) {
if (descrip.mustBeAdded()) {
final GuiBinding binding = bindings.get(descrip.getType());
if (binding == null) {
@@ -67,7 +67,7 @@
} else {
final AbstractGuiItem item = binding.create(descrip);
if (binding.isAttachable()) {
- if (descrip.getPosition() == GuiActionDescrip.NO_POSITION) {
+ if (descrip.getPosition() == OldGuiActionDescrip.NO_POSITION) {
add(item);
} else {
insert(item, descrip.getPosition());
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractGuiItem.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,7 +20,7 @@
package org.ourproject.kune.platf.client.actions.ui;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.Action;
import org.ourproject.kune.platf.client.actions.PropertyChangeEvent;
import org.ourproject.kune.platf.client.actions.PropertyChangeListener;
@@ -32,9 +32,9 @@
public abstract class AbstractGuiItem extends Composite implements View {
- protected final GuiActionDescrip descriptor;
+ protected final OldGuiActionDescrip descriptor;
- public AbstractGuiItem(final GuiActionDescrip descriptor) {
+ public AbstractGuiItem(final OldGuiActionDescrip descriptor) {
super();
this.descriptor = descriptor;
}
@@ -46,7 +46,7 @@
configure();
}
- public AbstractAction getAction() {
+ public OldAbstractAction getAction() {
return descriptor.getAction();
}
@@ -70,9 +70,9 @@
private void configureProperties() {
setText((String) (descriptor.getValue(Action.NAME)));
setIcon(descriptor.getValue(Action.SMALL_ICON));
- setEnabled((Boolean) descriptor.getValue(AbstractAction.ENABLED));
+ setEnabled((Boolean) descriptor.getValue(OldAbstractAction.ENABLED));
setToolTipText((String) (descriptor.getValue(Action.SHORT_DESCRIPTION)));
- setVisible((Boolean) descriptor.getValue(GuiActionDescrip.VISIBLE));
+ setVisible((Boolean) descriptor.getValue(OldGuiActionDescrip.VISIBLE));
}
private PropertyChangeListener createActionPropertyChangeListener() {
@@ -87,7 +87,7 @@
setIcon(newValue);
} else if (event.getPropertyName().equals(Action.SHORT_DESCRIPTION)) {
setToolTipText((String) newValue);
- } else if (event.getPropertyName().equals(GuiActionDescrip.VISIBLE)) {
+ } else if (event.getPropertyName().equals(OldGuiActionDescrip.VISIBLE)) {
setVisible((Boolean) newValue);
}
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -29,7 +29,7 @@
protected final Menu menu;
- public AbstractMenuGui(final GuiActionDescrip descriptor) {
+ public AbstractMenuGui(final OldGuiActionDescrip descriptor) {
super(descriptor);
menu = new Menu();
menu.setShadow(true);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractMenuItemGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.platf.client.actions.ui;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.Action;
import org.ourproject.kune.platf.client.actions.ActionEvent;
import org.ourproject.kune.platf.client.actions.KeyStroke;
@@ -39,7 +39,7 @@
private Item item;
- public AbstractMenuItemGui(final MenuItemDescriptor descriptor) {
+ public AbstractMenuItemGui(final OldMenuItemDescriptor descriptor) {
super(descriptor);
if (descriptor instanceof MenuRadioItemDescriptor) {
final CheckItem checkItem = createCheckItem(descriptor);
@@ -61,7 +61,7 @@
final BaseItemListenerAdapter clickListener = new BaseItemListenerAdapter() {
@Override
public void onClick(final BaseItem item, final EventObject event) {
- final AbstractAction action = getAction();
+ final OldAbstractAction action = getAction();
if (action != null) {
action.actionPerformed(new ActionEvent(item, event.getBrowserEvent()));
}
@@ -119,7 +119,7 @@
}
}
- private void confCheckListener(final MenuItemDescriptor descriptor, final CheckItem checkItem) {
+ private void confCheckListener(final OldMenuItemDescriptor descriptor, final CheckItem checkItem) {
descriptor.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(final PropertyChangeEvent event) {
if (event.getPropertyName().equals(MenuCheckItemDescriptor.CHECKED)) {
@@ -129,7 +129,7 @@
});
}
- private CheckItem createCheckItem(final MenuItemDescriptor descriptor) {
+ private CheckItem createCheckItem(final OldMenuItemDescriptor descriptor) {
final CheckItem checkItem = new CheckItem();
checkItem.setChecked(((MenuCheckItemDescriptor) descriptor).isChecked());
return checkItem;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractSeparatorDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractSeparatorDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/AbstractSeparatorDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,13 +19,13 @@
*/
package org.ourproject.kune.platf.client.actions.ui;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.ActionEvent;
-public abstract class AbstractSeparatorDescriptor extends GuiActionDescrip {
+public abstract class AbstractSeparatorDescriptor extends OldGuiActionDescrip {
public AbstractSeparatorDescriptor() {
- super(new AbstractAction() {
+ super(new OldAbstractAction() {
public void actionPerformed(final ActionEvent event) {
// No action
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ActionExtensibleView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ActionExtensibleView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ActionExtensibleView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -23,6 +23,6 @@
public interface ActionExtensibleView extends View {
- void addAction(GuiActionDescrip descriptor);
+ void addAction(OldGuiActionDescrip descriptor);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/BaseAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/BaseAction.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/BaseAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,13 +19,13 @@
*/
package org.ourproject.kune.platf.client.actions.ui;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.Action;
import org.ourproject.kune.platf.client.actions.ActionEvent;
import com.google.gwt.resources.client.ImageResource;
-public class BaseAction extends AbstractAction {
+public class BaseAction extends OldAbstractAction {
public BaseAction(final String text, final String tooltip) {
super();
super.putValue(Action.NAME, text);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/BasicGuiBindings.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/BasicGuiBindings.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/BasicGuiBindings.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -26,7 +26,7 @@
bindings.register(MenuDescriptor.class, new MenuBinding());
bindings.register(MenuRadioItemDescriptor.class, menuItemBinding);
bindings.register(MenuCheckItemDescriptor.class, menuItemBinding);
- bindings.register(MenuItemDescriptor.class, menuItemBinding);
+ bindings.register(OldMenuItemDescriptor.class, menuItemBinding);
bindings.register(MenuSeparatorDescriptor.class, new MenuSeparatorBinding());
bindings.register(PushButtonDescriptor.class, new PushButtonBinding());
bindings.register(ButtonDescriptor.class, new ButtonBinding());
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ButtonBinding.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ButtonBinding.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ButtonBinding.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -22,7 +22,7 @@
public class ButtonBinding extends GuiBindingAdapter {
@Override
- public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final OldGuiActionDescrip descriptor) {
return new ButtonGui((ButtonDescriptor) descriptor);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ButtonDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ButtonDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ButtonDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,11 +19,11 @@
*/
package org.ourproject.kune.platf.client.actions.ui;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
-public class ButtonDescriptor extends GuiActionDescrip {
+public class ButtonDescriptor extends OldGuiActionDescrip {
- public ButtonDescriptor(final AbstractAction action) {
+ public ButtonDescriptor(final OldAbstractAction action) {
super(action);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescCollection.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescCollection.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescCollection.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -22,12 +22,12 @@
import java.util.ArrayList;
// @PMD:REVIEWED:AtLeastOneConstructor: by vjrj on 26/05/09 12:31
-public class GuiActionDescCollection extends ArrayList<GuiActionDescrip> {
+public class GuiActionDescCollection extends ArrayList<OldGuiActionDescrip> {
private static final long serialVersionUID = 6759723760404227737L;
- public void add(final GuiActionDescrip... descriptors) {
- for (GuiActionDescrip descriptor : descriptors) {
+ public void add(final OldGuiActionDescrip... descriptors) {
+ for (OldGuiActionDescrip descriptor : descriptors) {
super.add(descriptor);
}
}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescrip.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescrip.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescrip.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,186 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.actions.ui;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
-import org.ourproject.kune.platf.client.actions.Action;
-import org.ourproject.kune.platf.client.actions.ActionEvent;
-import org.ourproject.kune.platf.client.actions.ChangebleObject;
-
-/**
- * The Class AbstractUIActionDescriptor.
- */
-public abstract class GuiActionDescrip extends ChangebleObject {
-
- public static final String VISIBLE = "visibleprop";
-
- protected static final int NO_POSITION = -1;
- protected static final View NO_VIEW = null;
- protected static final GuiActionDescrip NO_PARENT = null;
-
- private GuiAddCondition addCondition = new GuiAddConditionAdapter();
-
- protected GuiActionDescrip parent;
-
- /** The action. */
- private final AbstractAction action;
-
- /** The position where the item will be inserted. */
- private int position;
-
- /** The item location. */
- private String location;
-
- /** The item DOM id. */
- private String id;
-
- /**
- * Instantiates a new abstract ui action descriptor. This is used for
- * describe UI button, menus, menu items and so on
- *
- * @param action
- * the action
- */
- public GuiActionDescrip(final AbstractAction action) {
- this.action = action;
- position = NO_POSITION;
- parent = NO_PARENT;
- }
-
- public void fire(final ActionEvent event) {
- action.actionPerformed(event);
- }
-
- public AbstractAction getAction() {
- return action;
- }
-
- public GuiAddCondition getAddCondition() {
- return addCondition;
- }
-
- public String getId() {
- return id;
- }
-
- /**
- * Gets the location, a string used to group actions with locations (top
- * bar, bottom bar, user bar...).
- *
- * @return the location
- */
- public String getLocation() {
- return location;
- }
-
- public GuiActionDescrip getParent() {
- return parent;
- }
-
- /**
- * Gets the position.
- *
- * @return the position
- */
- public int getPosition() {
- return position;
- }
-
- public abstract Class<?> getType();
-
- @Override
- /**
- * We try to get the gui property (for instance the name) and if it's empty we try to get the same property in actions. This permit to have several gui items with the same action but different gui properties (like text descriptions) if necessary.
- */
- public Object getValue(final String key) {
- final Object guiValue = super.getValue(key);
- if (guiValue == null) {
- return action.getValue(key);
- } else {
- return guiValue;
- }
- }
-
- public boolean isChild() {
- // @PMD:REVIEWED:CompareObjectsWithEquals: by vjrj on 26/05/09 20:57
- return parent != NO_PARENT;
- }
-
- public boolean mustBeAdded() {
- boolean result = false;
- if (addCondition != null) {
- result = addCondition.mustBeAdded();
- }
- return result;
- }
-
- public void setAddCondition(final GuiAddCondition addCondition) {
- this.addCondition = addCondition;
- }
-
- public void setEnabled(final boolean enabled) {
- action.setEnabled(enabled);
- }
-
- public void setId(final String id) {
- this.id = id;
- }
-
- /**
- * If we have several toolbars, we can group with the "location" string key
- * actions that must be in the same location (ex: top bar, bottom bar, and
- * so on).
- *
- * @param location
- * the new location
- */
- public void setLocation(final String location) {
- this.location = location;
- }
-
- public void setParent(final GuiActionDescrip parent) {
- this.parent = parent;
- }
-
- /**
- * Sets the position (where the UI element will be positioned, for instance
- * in a toolbar or in a menu).
- *
- * @param position
- * the new position
- */
- public void setPosition(final int position) {
- this.position = position;
- }
-
- public void setVisible(final boolean visible) {
- action.putValue(VISIBLE, visible);
- }
-
- @Override
- public String toString() {
- final String name = (String) getValue(Action.NAME);
- final String tooltip = (String) getValue(Action.SHORT_DESCRIPTION);
- return "[GuiActionDescrip: " + action.getClass() + (name == null ? "" : " " + name)
- + (tooltip == null ? "" : " " + tooltip) + "]";
- }
-
-}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiBinding.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiBinding.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiBinding.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
public interface GuiBinding {
- AbstractGuiItem create(GuiActionDescrip descriptor);
+ AbstractGuiItem create(OldGuiActionDescrip descriptor);
boolean isAttachable();
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiBindingAdapter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiBindingAdapter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiBindingAdapter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
public class GuiBindingAdapter implements GuiBinding {
- public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final OldGuiActionDescrip descriptor) {
return null;
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/IsActionExtensible.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/IsActionExtensible.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/IsActionExtensible.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -27,7 +27,7 @@
* @param action
* the action
*/
- void addAction(GuiActionDescrip action);
+ void addAction(OldGuiActionDescrip action);
/**
* Adds some action descriptions
@@ -43,6 +43,6 @@
* @param action
* the action
*/
- void addActions(GuiActionDescrip... actions);
+ void addActions(OldGuiActionDescrip... actions);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuBinding.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuBinding.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuBinding.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -28,13 +28,13 @@
private Boolean isSubmenu;
@Override
- public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final OldGuiActionDescrip descriptor) {
AbstractGuiItem item;
if (descriptor.isChild()) {
final SubMenuGui submenu = new SubMenuGui(descriptor);
final AbstractMenuGui parentMenu = ((AbstractMenuGui) descriptor.getParent().getValue(UI_MENU));
final int position = descriptor.getPosition();
- if (position == GuiActionDescrip.NO_POSITION) {
+ if (position == OldGuiActionDescrip.NO_POSITION) {
parentMenu.add(submenu.getMenuItem());
} else {
parentMenu.insert(position, submenu.getMenuItem());
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuCheckItemDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuCheckItemDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuCheckItemDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,15 +19,15 @@
*/
package org.ourproject.kune.platf.client.actions.ui;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
-public class MenuCheckItemDescriptor extends MenuItemDescriptor {
+public class MenuCheckItemDescriptor extends OldMenuItemDescriptor {
public static final String CHECKED = "checked";
private boolean checked = false;
- public MenuCheckItemDescriptor(final MenuDescriptor parent, final AbstractAction action) {
+ public MenuCheckItemDescriptor(final MenuDescriptor parent, final OldAbstractAction action) {
super(parent, action);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,12 +19,12 @@
*/
package org.ourproject.kune.platf.client.actions.ui;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.Action;
import com.google.gwt.resources.client.ImageResource;
-public class MenuDescriptor extends GuiActionDescrip {
+public class MenuDescriptor extends OldGuiActionDescrip {
public static final String MENU_HIDE = "hidemenu";
public static final String MENU_SHOW = "showmenu";
@@ -37,11 +37,11 @@
this(new BaseAction(null, null));
}
- public MenuDescriptor(final AbstractAction action) {
+ public MenuDescriptor(final OldAbstractAction action) {
this(NO_PARENT, action);
}
- public MenuDescriptor(final GuiActionDescrip parent, final AbstractAction action) {
+ public MenuDescriptor(final OldGuiActionDescrip parent, final OldAbstractAction action) {
super(action);
setParent(parent);
action.putValue(MENU_HIDE, false);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemBinding.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemBinding.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemBinding.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -27,15 +27,15 @@
public class MenuItemBinding extends GuiBindingAdapter {
@Override
- public AbstractGuiItem create(final GuiActionDescrip descriptor) {
- final MenuItemGui item = new MenuItemGui((MenuItemDescriptor) descriptor);
+ public AbstractGuiItem create(final OldGuiActionDescrip descriptor) {
+ final MenuItemGui item = new MenuItemGui((OldMenuItemDescriptor) descriptor);
final int position = descriptor.getPosition();
final Item menuItem = (Item) item.getWidget();
final AbstractMenuGui menu = ((AbstractMenuGui) descriptor.getParent().getValue(MenuBinding.UI_MENU));
if (menu == null) {
throw new UIException("To add a menu item you need to add the menu before. Item: " + descriptor);
}
- if (position == GuiActionDescrip.NO_POSITION) {
+ if (position == OldGuiActionDescrip.NO_POSITION) {
menu.add(menuItem);
} else {
menu.insert(position, menuItem);
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,39 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.actions.ui;
-
-import org.ourproject.kune.platf.client.actions.AbstractAction;
-
-public class MenuItemDescriptor extends GuiActionDescrip {
-
- public MenuItemDescriptor(final AbstractAction action) {
- super(action);
- }
-
- public MenuItemDescriptor(final MenuDescriptor parent, final AbstractAction action) {
- super(action);
- setParent(parent);
- }
-
- @Override
- public Class<?> getType() {
- return MenuItemDescriptor.class;
- }
-}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
public class MenuItemGui extends AbstractMenuItemGui {
- public MenuItemGui(final MenuItemDescriptor descriptor) {
+ public MenuItemGui(final OldMenuItemDescriptor descriptor) {
super(descriptor);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuRadioItemDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuRadioItemDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuRadioItemDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,13 +19,13 @@
*/
package org.ourproject.kune.platf.client.actions.ui;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
public class MenuRadioItemDescriptor extends MenuCheckItemDescriptor {
private final String group;
- public MenuRadioItemDescriptor(final MenuDescriptor parent, final AbstractAction action, final String group) {
+ public MenuRadioItemDescriptor(final MenuDescriptor parent, final OldAbstractAction action, final String group) {
super(parent, action);
this.group = group;
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuSeparatorBinding.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuSeparatorBinding.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuSeparatorBinding.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -24,7 +24,7 @@
public class MenuSeparatorBinding extends GuiBindingAdapter {
@Override
- public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final OldGuiActionDescrip descriptor) {
final AbstractMenuGui menu = ((AbstractMenuGui) descriptor.getParent().getValue(MenuBinding.UI_MENU));
if (menu == null) {
throw new UIException("To add a menu separator you need to add the menu before. Item: " + descriptor);
Copied: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/OldGuiActionDescrip.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/GuiActionDescrip.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/OldGuiActionDescrip.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/OldGuiActionDescrip.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,186 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.platf.client.actions.ui;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
+import org.ourproject.kune.platf.client.actions.Action;
+import org.ourproject.kune.platf.client.actions.ActionEvent;
+import org.ourproject.kune.platf.client.actions.ChangebleObject;
+
+/**
+ * The Class AbstractUIActionDescriptor.
+ */
+public abstract class OldGuiActionDescrip extends ChangebleObject {
+
+ public static final String VISIBLE = "visibleprop";
+
+ protected static final int NO_POSITION = -1;
+ protected static final View NO_VIEW = null;
+ protected static final OldGuiActionDescrip NO_PARENT = null;
+
+ private GuiAddCondition addCondition = new GuiAddConditionAdapter();
+
+ protected OldGuiActionDescrip parent;
+
+ /** The action. */
+ private final OldAbstractAction action;
+
+ /** The position where the item will be inserted. */
+ private int position;
+
+ /** The item location. */
+ private String location;
+
+ /** The item DOM id. */
+ private String id;
+
+ /**
+ * Instantiates a new abstract ui action descriptor. This is used for
+ * describe UI button, menus, menu items and so on
+ *
+ * @param action
+ * the action
+ */
+ public OldGuiActionDescrip(final OldAbstractAction action) {
+ this.action = action;
+ position = NO_POSITION;
+ parent = NO_PARENT;
+ }
+
+ public void fire(final ActionEvent event) {
+ action.actionPerformed(event);
+ }
+
+ public OldAbstractAction getAction() {
+ return action;
+ }
+
+ public GuiAddCondition getAddCondition() {
+ return addCondition;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Gets the location, a string used to group actions with locations (top
+ * bar, bottom bar, user bar...).
+ *
+ * @return the location
+ */
+ public String getLocation() {
+ return location;
+ }
+
+ public OldGuiActionDescrip getParent() {
+ return parent;
+ }
+
+ /**
+ * Gets the position.
+ *
+ * @return the position
+ */
+ public int getPosition() {
+ return position;
+ }
+
+ public abstract Class<?> getType();
+
+ @Override
+ /**
+ * We try to get the gui property (for instance the name) and if it's empty we try to get the same property in actions. This permit to have several gui items with the same action but different gui properties (like text descriptions) if necessary.
+ */
+ public Object getValue(final String key) {
+ final Object guiValue = super.getValue(key);
+ if (guiValue == null) {
+ return action.getValue(key);
+ } else {
+ return guiValue;
+ }
+ }
+
+ public boolean isChild() {
+ // @PMD:REVIEWED:CompareObjectsWithEquals: by vjrj on 26/05/09 20:57
+ return parent != NO_PARENT;
+ }
+
+ public boolean mustBeAdded() {
+ boolean result = false;
+ if (addCondition != null) {
+ result = addCondition.mustBeAdded();
+ }
+ return result;
+ }
+
+ public void setAddCondition(final GuiAddCondition addCondition) {
+ this.addCondition = addCondition;
+ }
+
+ public void setEnabled(final boolean enabled) {
+ action.setEnabled(enabled);
+ }
+
+ public void setId(final String id) {
+ this.id = id;
+ }
+
+ /**
+ * If we have several toolbars, we can group with the "location" string key
+ * actions that must be in the same location (ex: top bar, bottom bar, and
+ * so on).
+ *
+ * @param location
+ * the new location
+ */
+ public void setLocation(final String location) {
+ this.location = location;
+ }
+
+ public void setParent(final OldGuiActionDescrip parent) {
+ this.parent = parent;
+ }
+
+ /**
+ * Sets the position (where the UI element will be positioned, for instance
+ * in a toolbar or in a menu).
+ *
+ * @param position
+ * the new position
+ */
+ public void setPosition(final int position) {
+ this.position = position;
+ }
+
+ public void setVisible(final boolean visible) {
+ action.putValue(VISIBLE, visible);
+ }
+
+ @Override
+ public String toString() {
+ final String name = (String) getValue(Action.NAME);
+ final String tooltip = (String) getValue(Action.SHORT_DESCRIPTION);
+ return "[GuiActionDescrip: " + action.getClass() + (name == null ? "" : " " + name)
+ + (tooltip == null ? "" : " " + tooltip) + "]";
+ }
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/OldMenuItemDescriptor.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/MenuItemDescriptor.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/OldMenuItemDescriptor.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/OldMenuItemDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,39 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.platf.client.actions.ui;
+
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
+
+public class OldMenuItemDescriptor extends OldGuiActionDescrip {
+
+ public OldMenuItemDescriptor(final OldAbstractAction action) {
+ super(action);
+ }
+
+ public OldMenuItemDescriptor(final MenuDescriptor parent, final OldAbstractAction action) {
+ super(action);
+ setParent(parent);
+ }
+
+ @Override
+ public Class<?> getType() {
+ return OldMenuItemDescriptor.class;
+ }
+}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonBinding.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonBinding.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonBinding.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -22,7 +22,7 @@
public class PushButtonBinding extends GuiBindingAdapter {
@Override
- public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final OldGuiActionDescrip descriptor) {
return new PushButtonGui((PushButtonDescriptor) descriptor);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/PushButtonDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.platf.client.actions.ui;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
public class PushButtonDescriptor extends ButtonDescriptor {
@@ -27,7 +27,7 @@
protected boolean pushed = false;
- public PushButtonDescriptor(final AbstractAction action) {
+ public PushButtonDescriptor(final OldAbstractAction action) {
super(action);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/SubMenuGui.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -25,7 +25,7 @@
private final MenuItem item;
- public SubMenuGui(final GuiActionDescrip descriptor) {
+ public SubMenuGui(final OldGuiActionDescrip descriptor) {
super(descriptor);
item = new MenuItem();
item.setMenu(menu);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ToolbarSeparatorBinding.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ToolbarSeparatorBinding.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/actions/ui/ToolbarSeparatorBinding.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,7 +21,7 @@
public class ToolbarSeparatorBinding extends GuiBindingAdapter {
@Override
- public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+ public AbstractGuiItem create(final OldGuiActionDescrip descriptor) {
final ToolbarSeparatorDescriptor sepDescrip = (ToolbarSeparatorDescriptor) descriptor;
final ComplexToolbar toolbar = (ComplexToolbar) sepDescrip.getToolbar();
switch (sepDescrip.getSeparatorType()) {
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/services/ImageDescriptor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/ImageDescriptor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/ImageDescriptor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,24 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.platf.client.services;
-
-public enum ImageDescriptor {
- accept, add, addGreen, alert, anybody, arrowDownBlack, arrowDownGreen, arrowDownWhite, arrowLeftGreen, arrowRightBlack, arrowRightGreen, arrowRightWhite, arrowUpGreen, bulletAdd, bulletBlack, bulletBlue, bulletDelete, bulletGreen, bulletPink, bulletPurple, bulletRed, bulletStar, bulletToggleMinus, bulletTogglePlus, bulletYellow, button15cblue, button15cdark, button15clight, button15cxlight, button15lblue, button15ldark, button15llight, button15lxlight, button15rblue, button15rdark, button15rlight, button15rxlight, button17cblue, button17cdark, button17clight, button17cxlight, button17lblue, button17ldark, button17llight, button17lxlight, button17rblue, button17rdark, button17rlight, button17rxlight, button20cblue, button20cdark, button20clight, button20cxlight, button20lblue, button20ldark, button20llight, button20lxlight, button20rblue, button20rdark, button20rlight, button20rxlight, buttonArrowDown, buttonHelpBlue, buttonHelpDark, buttonHelpLight, buttonSitebarArrowDown, by80x15, bync80x15, byncnd80x15, byncsa80x15, bynd80x15, bysa80x15, cancel, clear, copyleft, cross, crossDark, del, emblemImportant, emblemSystem, error, everybody, fullscreen, gnuFdl, groupDefIcon, groupHome, important, info, infoLight, kuneClose, kuneExternalWindow, kuneHelpTranslationIcon, kuneIcon16, kuneLogo16px, kunePreferences, kuneSearchIco, kuneSearchIcoPush, language, nobody, noCopyleft, nt, opentriangle, personDef, remove, rssIcon, searchIco, spinKuneThundGreen, splitterVertBar, star10, star20, star30, star40, star50, star60, star70, star80, star90, starGrey, starSmallYellow, starVsmallYellow, starYellow, step1, step2, step3, step4, step5, themeChoose, triangle
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/services/ImageUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/ImageUtils.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/ImageUtils.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,426 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.platf.client.services;
-
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-
-public class ImageUtils {
-
- private final Images img;
-
- public ImageUtils(Images img) {
- this.img = img;
- }
-
- public AbstractImagePrototype getImage(final ImageDescriptor imageDescriptor) {
- switch (imageDescriptor) {
- case accept: {
- return img.accept();
- }
- case add: {
- return img.add();
- }
- case addGreen: {
- return img.addGreen();
- }
- case alert: {
- return img.alert();
- }
- case anybody: {
- return img.anybody();
- }
- case arrowDownBlack: {
- return img.arrowDownBlack();
- }
- case arrowDownGreen: {
- return img.arrowDownGreen();
- }
- case arrowDownWhite: {
- return img.arrowDownWhite();
- }
- case arrowLeftGreen: {
- return img.arrowLeftGreen();
- }
- case arrowRightBlack: {
- return img.arrowRightBlack();
- }
- case arrowRightGreen: {
- return img.arrowRightGreen();
- }
- case arrowRightWhite: {
- return img.arrowRightWhite();
- }
- case arrowUpGreen: {
- return img.arrowUpGreen();
- }
- case bulletAdd: {
- return img.bulletAdd();
- }
- case bulletBlack: {
- return img.bulletBlack();
- }
- case bulletBlue: {
- return img.bulletBlue();
- }
- case bulletDelete: {
- return img.bulletDelete();
- }
- case bulletGreen: {
- return img.bulletGreen();
- }
- case bulletPink: {
- return img.bulletPink();
- }
- case bulletPurple: {
- return img.bulletPurple();
- }
- case bulletRed: {
- return img.bulletRed();
- }
- case bulletStar: {
- return img.bulletStar();
- }
- case bulletToggleMinus: {
- return img.bulletToggleMinus();
- }
- case bulletTogglePlus: {
- return img.bulletTogglePlus();
- }
- case bulletYellow: {
- return img.bulletYellow();
- }
- case button15cblue: {
- return img.button15cblue();
- }
- case button15cdark: {
- return img.button15cdark();
- }
- case button15clight: {
- return img.button15clight();
- }
- case button15cxlight: {
- return img.button15cxlight();
- }
- case button15lblue: {
- return img.button15lblue();
- }
- case button15ldark: {
- return img.button15ldark();
- }
- case button15llight: {
- return img.button15llight();
- }
- case button15lxlight: {
- return img.button15lxlight();
- }
- case button15rblue: {
- return img.button15rblue();
- }
- case button15rdark: {
- return img.button15rdark();
- }
- case button15rlight: {
- return img.button15rlight();
- }
- case button15rxlight: {
- return img.button15rxlight();
- }
- case button17cblue: {
- return img.button17cblue();
- }
- case button17cdark: {
- return img.button17cdark();
- }
- case button17clight: {
- return img.button17clight();
- }
- case button17cxlight: {
- return img.button17cxlight();
- }
- case button17lblue: {
- return img.button17lblue();
- }
- case button17ldark: {
- return img.button17ldark();
- }
- case button17llight: {
- return img.button17llight();
- }
- case button17lxlight: {
- return img.button17lxlight();
- }
- case button17rblue: {
- return img.button17rblue();
- }
- case button17rdark: {
- return img.button17rdark();
- }
- case button17rlight: {
- return img.button17rlight();
- }
- case button17rxlight: {
- return img.button17rxlight();
- }
- case button20cblue: {
- return img.button20cblue();
- }
- case button20cdark: {
- return img.button20cdark();
- }
- case button20clight: {
- return img.button20clight();
- }
- case button20cxlight: {
- return img.button20cxlight();
- }
- case button20lblue: {
- return img.button20lblue();
- }
- case button20ldark: {
- return img.button20ldark();
- }
- case button20llight: {
- return img.button20llight();
- }
- case button20lxlight: {
- return img.button20lxlight();
- }
- case button20rblue: {
- return img.button20rblue();
- }
- case button20rdark: {
- return img.button20rdark();
- }
- case button20rlight: {
- return img.button20rlight();
- }
- case button20rxlight: {
- return img.button20rxlight();
- }
- case buttonArrowDown: {
- return img.buttonArrowDown();
- }
- case buttonHelpBlue: {
- return img.buttonHelpBlue();
- }
- case buttonHelpDark: {
- return img.buttonHelpDark();
- }
- case buttonHelpLight: {
- return img.buttonHelpLight();
- }
- case buttonSitebarArrowDown: {
- return img.buttonSitebarArrowDown();
- }
- case by80x15: {
- return img.by80x15();
- }
- case bync80x15: {
- return img.bync80x15();
- }
- case byncnd80x15: {
- return img.byncnd80x15();
- }
- case byncsa80x15: {
- return img.byncsa80x15();
- }
- case bynd80x15: {
- return img.bynd80x15();
- }
- case bysa80x15: {
- return img.bysa80x15();
- }
- case cancel: {
- return img.cancel();
- }
- case clear: {
- return img.clear();
- }
- case copyleft: {
- return img.copyleft();
- }
- case cross: {
- return img.cross();
- }
- case crossDark: {
- return img.crossDark();
- }
- case del: {
- return img.del();
- }
- case emblemImportant: {
- return img.emblemImportant();
- }
- case emblemSystem: {
- return img.emblemSystem();
- }
- case error: {
- return img.error();
- }
- case everybody: {
- return img.everybody();
- }
- case fullscreen: {
- return img.fullscreen();
- }
- case gnuFdl: {
- return img.gnuFdl();
- }
- case groupDefIcon: {
- return img.groupDefIcon();
- }
- case groupHome: {
- return img.groupHome();
- }
- case important: {
- return img.important();
- }
- case info: {
- return img.info();
- }
- case infoLight: {
- return img.infoLight();
- }
- case kuneClose: {
- return img.kuneClose();
- }
- case kuneExternalWindow: {
- return img.kuneExternalWindow();
- }
- case kuneHelpTranslationIcon: {
- return img.kuneHelpTranslationIcon();
- }
- case kuneIcon16: {
- return img.kuneIcon16();
- }
- case kuneLogo16px: {
- return img.kuneLogo16px();
- }
- case kunePreferences: {
- return img.kunePreferences();
- }
- case kuneSearchIco: {
- return img.kuneSearchIco();
- }
- case kuneSearchIcoPush: {
- return img.kuneSearchIcoPush();
- }
- case language: {
- return img.language();
- }
- case nobody: {
- return img.nobody();
- }
- case noCopyleft: {
- return img.noCopyleft();
- }
- case nt: {
- return img.nt();
- }
- case opentriangle: {
- return img.opentriangle();
- }
- case personDef: {
- return img.personDef();
- }
- case remove: {
- return img.remove();
- }
- case rssIcon: {
- return img.rssIcon();
- }
- case searchIco: {
- return img.searchIco();
- }
- case spinKuneThundGreen: {
- return img.spinKuneThundGreen();
- }
- case splitterVertBar: {
- return img.splitterVertBar();
- }
- case star10: {
- return img.star10();
- }
- case star20: {
- return img.star20();
- }
- case star30: {
- return img.star30();
- }
- case star40: {
- return img.star40();
- }
- case star50: {
- return img.star50();
- }
- case star60: {
- return img.star60();
- }
- case star70: {
- return img.star70();
- }
- case star80: {
- return img.star80();
- }
- case star90: {
- return img.star90();
- }
- case starGrey: {
- return img.starGrey();
- }
- case starSmallYellow: {
- return img.starSmallYellow();
- }
- case starVsmallYellow: {
- return img.starVsmallYellow();
- }
- case starYellow: {
- return img.starYellow();
- }
- case step1: {
- return img.step1();
- }
- case step2: {
- return img.step2();
- }
- case step3: {
- return img.step3();
- }
- case step4: {
- return img.step4();
- }
- case step5: {
- return img.step5();
- }
- case themeChoose: {
- return img.themeChoose();
- }
- case triangle: {
- return img.triangle();
- }
- default:
- return null;
- }
- }
-
- public String getImageHtml(final ImageDescriptor imageDescriptor) {
- return getImage(imageDescriptor).getHTML();
- }
-}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -26,7 +26,6 @@
import org.ourproject.kune.platf.client.i18n.Resources;
import org.ourproject.kune.platf.client.shortcuts.GlobalShortcutRegister;
import org.ourproject.kune.platf.client.ui.QuickTipsHelper;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalette;
import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalettePanel;
@@ -100,6 +99,8 @@
import cc.kune.core.client.errors.ErrorHandler;
import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.services.ImageUtils;
import cc.kune.core.client.state.AccessRightsClientManager;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
@@ -161,19 +162,19 @@
return null; // new ErrorHandler(i(Session.class), i18n, p(StateManager.class));
}
});
+//
+// register(Singleton.class, new Factory<Images>(Images.class) {
+// @Override
+// public Images create() {
+// return Images.App.getInstance();
+// }
+// }, new Factory<ImageUtils>(ImageUtils.class) {
+// @Override
+// public ImageUtils create() {
+// return new ImageUtils(i(Images.class));
+// }
+// });
- register(Singleton.class, new Factory<Images>(Images.class) {
- @Override
- public Images create() {
- return Images.App.getInstance();
- }
- }, new Factory<ImageUtils>(ImageUtils.class) {
- @Override
- public ImageUtils create() {
- return new ImageUtils(i(Images.class));
- }
- });
-
//AsyncCallbackSimple.init(i(ErrorHandler.class));
// register(Singleton.class, new Factory<AppStarter>(AppStarter.class) {
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/shortcuts/GlobalShortcutRegister.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/shortcuts/GlobalShortcutRegister.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/shortcuts/GlobalShortcutRegister.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.platf.client.shortcuts;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.ActionEvent;
import org.ourproject.kune.platf.client.actions.ChangebleObject;
import org.ourproject.kune.platf.client.actions.InputMap;
@@ -45,7 +45,7 @@
if (nativeEventPrev.getTypeInt() == Event.ONKEYDOWN) {
final NativeEvent nativeEvent = nativeEventPrev.getNativeEvent();
final Event event = Event.as(nativeEvent);
- final AbstractAction action = get(Shortcut.getShortcut(event.getCtrlKey(), event.getAltKey(),
+ final OldAbstractAction action = get(Shortcut.getShortcut(event.getCtrlKey(), event.getAltKey(),
event.getShiftKey(), event.getShiftKey(), (char) event.getKeyCode()));
if (action != null) {
Log.debug("Not propagating event");
@@ -69,7 +69,7 @@
}
@Override
- public void put(final KeyStroke keystroke, final AbstractAction action) {
+ public void put(final KeyStroke keystroke, final OldAbstractAction action) {
final ChangebleObject previous = super.get(keystroke);
if (previous != null) {
Log.warn("Shortcut already registed by: " + previous + "(overriding)");
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/BasicThumb.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/BasicThumb.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/BasicThumb.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,89 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.ui;
-
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.gwtext.client.util.Format;
-
-// http://en.wikipedia.org/wiki/Thumbnail
-
-public class BasicThumb extends Composite {
- private static final int NOSIZE = -1;
- private final Image thumbImg;
- private final Label thumbLabel;
-
- public BasicThumb(final String imageUrl, final int imgSize, final String text, final int textMaxLenght,
- final boolean crop, final ClickHandler clickHandler) {
- super();
- final VerticalPanel vpanel = new VerticalPanel();
- if (imgSize == NOSIZE) {
- thumbImg = new Image(imageUrl);
- } else {
- if (crop) {
- thumbImg = new Image(imageUrl, 0, 0, imgSize, imgSize);
- } else {
- thumbImg = new Image(imageUrl);
- thumbImg.setPixelSize(imgSize, imgSize);
- }
- }
- final String title = textMaxLenght == NOSIZE ? text : Format.ellipsis(text, textMaxLenght);
- thumbLabel = new Label(title);
- vpanel.add(thumbImg);
- vpanel.add(thumbLabel);
- vpanel.addStyleName("k-basic-thumb");
- vpanel.addStyleName("kune-Margin-Small-trbl");
- vpanel.addStyleName("kune-pointer");
- vpanel.addStyleName("kune-floatleft");
- thumbLabel.addClickHandler(clickHandler);
- vpanel.setCellHorizontalAlignment(thumbLabel, VerticalPanel.ALIGN_CENTER);
- thumbImg.addClickHandler(clickHandler);
- initWidget(vpanel);
- }
-
- public BasicThumb(final String imageUrl, final String thumText, final ClickHandler clickHandler) {
- this(imageUrl, NOSIZE, thumText, NOSIZE, false, clickHandler);
- }
-
- public BasicThumb(final String imageUrl, final String text, final int textMaxLenght, final ClickHandler clickHandler) {
- this(imageUrl, NOSIZE, text, textMaxLenght, false, clickHandler);
- }
-
- public void setText(final String text) {
- thumbLabel.setText(text);
- }
-
- public void setThumbUrl(final String url) {
- thumbImg.setUrl(url);
- }
-
- public void setTooltip(final String tip) {
- KuneUiUtils.setQuickTip(thumbImg, tip);
- KuneUiUtils.setQuickTip(thumbLabel, tip);
- }
-
- public void setTooltip(final String tipTitle, final String tip) {
- KuneUiUtils.setQuickTip(thumbImg, tip, tipTitle);
- KuneUiUtils.setQuickTip(thumbLabel, tip, tipTitle);
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileConstants.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileConstants.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileConstants.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,39 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.platf.client.ui.download;
-
-public final class FileConstants {
-
- public final static String HASH = "hash";
- public final static String TOKEN = "token";
- public final static String DOWNLOAD = "download";
- public final static String IMGSIZE = "imgsize";
- public final static String FILENAME = "filename";
- public final static String TYPE_ID = "typeid";
- public final static String USER_LOGO_FIELD = "k-ulogov-ff";
- public final static String GROUP_LOGO_FIELD = "k-glogov-ff";
- public final static int LOGO_DEF_HEIGHT = 60;
- public final static int LOGO_DEF_WIDTH = 468;
- public final static int LOGO_MIN_HEIGHT = 28;
- public final static int LOGO_MIN_WIDTH = 468;
-
- private FileConstants() {
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileDownloadUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileDownloadUtils.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/FileDownloadUtils.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,94 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.platf.client.ui.download;
-
-import org.ourproject.kune.platf.client.services.ImageDescriptor;
-import org.ourproject.kune.platf.client.services.ImageUtils;
-
-import cc.kune.common.client.utils.Url;
-import cc.kune.common.client.utils.UrlParam;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.shared.domain.utils.StateToken;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.ui.RootPanel;
-
-public class FileDownloadUtils {
-
- private static final String DOWNLOADSERVLET = "servlets/FileDownloadManager";
- private static final String LOGODOWNLOADSERVLET = "servlets/EntityLogoDownloadManager";
-
- private final Session session;
- private final ImageUtils imageUtils;
-
- public FileDownloadUtils(final Session session, final ImageUtils imageUtils) {
- this.session = session;
- this.imageUtils = imageUtils;
- }
-
- public void downloadFile(final StateToken token) {
- final String url = calculateUrl(token, true, true);
- DOM.setElementAttribute(RootPanel.get("__download").getElement(), "src", url);
- }
-
- public String getImageResizedUrl(final StateToken token, final ImageSize imageSize) {
- return calculateUrl(token, false, true) + "&" + new UrlParam(FileConstants.IMGSIZE, imageSize.toString());
- }
-
- public String getImageUrl(final StateToken token) {
- return calculateUrl(token, false, true);
- }
-
- public String getLogoAvatarHtml(final StateToken groupToken, final boolean groupHasLogo, final boolean isPersonal,
- final int size, final int hvspace) {
- if (groupHasLogo) {
- return "<img hspace='" + hvspace + "' vspace='" + hvspace + "' align='left' style='width: " + size
- + "px; height: " + size + "px;' src='" + getLogoImageUrl(groupToken) + "'>";
- } else {
- return isPersonal ? imageUtils.getImageHtml(ImageDescriptor.personDef)
- : imageUtils.getImageHtml(ImageDescriptor.groupDefIcon);
- }
- }
-
- public String getLogoImageUrl(final StateToken token) {
- return new Url(GWT.getModuleBaseURL() + LOGODOWNLOADSERVLET,
- new UrlParam(FileConstants.TOKEN, token.toString())).toString();
- }
-
- public String getUrl(final StateToken token) {
- return calculateUrl(token, false, false);
- }
-
- private String calculateUrl(final StateToken token, final boolean download, final boolean useHash) {
- final Url url = new Url(GWT.getModuleBaseURL() + DOWNLOADSERVLET, new UrlParam(FileConstants.TOKEN,
- token.toString()));
- if (download) {
- url.add(new UrlParam(FileConstants.DOWNLOAD, download));
- }
- if (useHash) {
- final String hash = session.getUserHash();
- if (hash != null) {
- url.add(new UrlParam(FileConstants.HASH, hash));
- }
- }
- return url.toString();
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/ImageSize.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/ImageSize.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/download/ImageSize.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,24 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.platf.client.ui.download;
-
-public enum ImageSize {
- sized, thumb, ico
-}
\ No newline at end of file
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTELinkPopup.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTELinkPopup.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTELinkPopup.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -22,7 +22,7 @@
import org.ourproject.kune.platf.client.actions.Action;
import org.ourproject.kune.platf.client.actions.ActionEvent;
import org.ourproject.kune.platf.client.actions.ActionItem;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
import org.ourproject.kune.platf.client.services.Images;
import org.ourproject.kune.platf.client.ui.KuneUiUtils;
import org.ourproject.kune.platf.client.ui.dialogs.AbstractPopupPanel;
@@ -53,7 +53,7 @@
hpanel.add(close);
}
- public void add(final GuiActionDescrip item) {
+ public void add(final OldGuiActionDescrip item) {
final Label actionLabel = new Label();
actionLabel.setText((String) item.getValue(Action.NAME));
actionLabel.addStyleName("k-rte-changelink");
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditor.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditor.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditor.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,9 +20,9 @@
package org.ourproject.kune.platf.client.ui.rte.basic;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.KeyStroke;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
import org.ourproject.kune.platf.client.actions.ui.GuiAddCondition;
import org.ourproject.kune.platf.client.actions.ui.IsActionExtensible;
import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
@@ -36,19 +36,19 @@
public interface RTEditor extends IsActionExtensible {
/**
- * The TOPBAR location used in {@link GuiActionDescrip#setLocation(String)}
+ * The TOPBAR location used in {@link OldGuiActionDescrip#setLocation(String)}
* for put the actions in the correct position
*/
String TOPBAR = "rte-topbar";
/**
- * The SNDBAR location used in {@link GuiActionDescrip#setLocation(String)}
+ * The SNDBAR location used in {@link OldGuiActionDescrip#setLocation(String)}
* for put the actions in the correct position
*/
String SNDBAR = "rte-sndbar";
/**
- * The LINKCTX location used in {@link GuiActionDescrip#setLocation(String)}
+ * The LINKCTX location used in {@link OldGuiActionDescrip#setLocation(String)}
* for put the actions in the links context menu
*/
String LINKCTX = "rte-linkctx";
@@ -168,7 +168,7 @@
* @param action
* the action
*/
- void setActionShortcut(KeyStroke key, AbstractAction action);
+ void setActionShortcut(KeyStroke key, OldAbstractAction action);
/**
* Sets some action shortcut, some principal, other similar (used when some
@@ -181,7 +181,7 @@
* @param actions
* the actions
*/
- void setActionShortcut(KeyStroke key, AbstractAction mainAction, AbstractAction... actions);
+ void setActionShortcut(KeyStroke key, OldAbstractAction mainAction, OldAbstractAction... actions);
/**
* Sets that editor must be extended type (if browser permit it).
@@ -216,7 +216,7 @@
* @param descripts
* the descripts
*/
- void setLocation(String location, GuiActionDescrip... descripts);
+ void setLocation(String location, OldGuiActionDescrip... descripts);
/**
* Sets the text of the editor.
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -23,12 +23,12 @@
import org.cobogw.gwt.user.client.CSS;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.ActionEvent;
import org.ourproject.kune.platf.client.actions.InputMap;
import org.ourproject.kune.platf.client.actions.KeyStroke;
import org.ourproject.kune.platf.client.actions.ui.ComplexToolbar;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
import org.ourproject.kune.platf.client.actions.ui.GuiBindingsRegister;
import org.ourproject.kune.platf.client.shortcuts.GlobalShortcutRegister;
import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
@@ -90,7 +90,7 @@
setHeight("100%");
}
- public void addAction(final GuiActionDescrip item) {
+ public void addAction(final OldGuiActionDescrip item) {
final String location = item.getLocation();
if (location == null) {
throw new UIException("Unknown location in action item: " + item);
@@ -315,8 +315,8 @@
break;
case Event.ONKEYPRESS:
final KeyStroke keystroke = KeyStroke.getKeyStrokeForEvent(event);
- final AbstractAction rtaActionItem = inputMap.get(keystroke);
- final AbstractAction actionItem = rtaActionItem == null ? globalShortcutReg.get(keystroke) : rtaActionItem;
+ final OldAbstractAction rtaActionItem = inputMap.get(keystroke);
+ final OldAbstractAction actionItem = rtaActionItem == null ? globalShortcutReg.get(keystroke) : rtaActionItem;
if (actionItem == null) {
super.onBrowserEvent(event);
updateStatus();
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/basic/RTEditorPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -28,7 +28,7 @@
import java.util.Map;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
import org.ourproject.kune.platf.client.actions.ActionEvent;
import org.ourproject.kune.platf.client.actions.InputMap;
@@ -37,11 +37,11 @@
import org.ourproject.kune.platf.client.actions.ui.AbstractActionExtensiblePresenter;
import org.ourproject.kune.platf.client.actions.ui.ButtonDescriptor;
import org.ourproject.kune.platf.client.actions.ui.GuiActionDescCollection;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
import org.ourproject.kune.platf.client.actions.ui.GuiAddCondition;
import org.ourproject.kune.platf.client.actions.ui.MenuCheckItemDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuRadioItemDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuSeparatorDescriptor;
import org.ourproject.kune.platf.client.actions.ui.PushButtonDescriptor;
@@ -786,7 +786,7 @@
}
@Override
- public void addAction(final GuiActionDescrip descriptor) {
+ public void addAction(final OldGuiActionDescrip descriptor) {
actions.add(descriptor);
checkForMenus(descriptor);
}
@@ -810,12 +810,12 @@
}
private void attachActions() {
- for (final GuiActionDescrip descriptor : actions) {
+ for (final OldGuiActionDescrip descriptor : actions) {
view.addAction(descriptor);
}
}
- private void checkForMenus(final GuiActionDescrip descriptor) {
+ private void checkForMenus(final OldGuiActionDescrip descriptor) {
if (descriptor instanceof MenuDescriptor) {
menus.add((MenuDescriptor) descriptor);
}
@@ -833,7 +833,7 @@
final SelectAllAction selectAllAction = new SelectAllAction(i18n.t("Select all"),
AbstractExtendedAction.NO_TEXT, imgResources.selectall());
- final MenuItemDescriptor select = new MenuItemDescriptor(editMenu, selectAllAction);
+ final OldMenuItemDescriptor select = new OldMenuItemDescriptor(editMenu, selectAllAction);
setActionShortcut(Shortcut.getShortcut(true, Character.valueOf('A')), selectAllAction);
final BoldAction boldAction = new BoldAction(NO_TEXT, i18n.t("Bold"), imgResources.bold());
@@ -851,12 +851,12 @@
final SubscriptAction subscriptAction = new SubscriptAction(i18n.t("Subscript"), NO_TEXT,
imgResources.subscript());
- final MenuItemDescriptor subscript = new MenuItemDescriptor(formatMenu, subscriptAction);
+ final OldMenuItemDescriptor subscript = new OldMenuItemDescriptor(formatMenu, subscriptAction);
setActionShortcut(Shortcut.getShortcut(true, Character.valueOf(',')), subscriptAction);
final SuperscriptAction superscriptAction = new SuperscriptAction(i18n.t("Superscript"), NO_TEXT,
imgResources.superscript());
- final MenuItemDescriptor superscript = new MenuItemDescriptor(formatMenu, superscriptAction);
+ final OldMenuItemDescriptor superscript = new OldMenuItemDescriptor(formatMenu, superscriptAction);
setActionShortcut(Shortcut.getShortcut(true, Character.valueOf('.')), superscriptAction);
final JustifyLeftAction jfyLeftAction = new JustifyLeftAction(NO_TEXT, i18n.t("Left Justify"),
@@ -876,49 +876,49 @@
final UndoAction undoAction = new UndoAction(i18n.t("Undo"), NO_TEXT, imgResources.undo());
final UndoAction undoActionBtn = new UndoAction(NO_TEXT, i18n.t("Undo"), imgResources.undo());
- final MenuItemDescriptor undo = new MenuItemDescriptor(editMenu, undoAction);
+ final OldMenuItemDescriptor undo = new OldMenuItemDescriptor(editMenu, undoAction);
final ButtonDescriptor undoBtn = new ButtonDescriptor(undoActionBtn);
undoBtn.setPosition(0);
setActionShortcut(Shortcut.getShortcut(true, Character.valueOf('Z')), undoAction);
final RedoAction redoAction = new RedoAction(i18n.t("Redo"), NO_TEXT, imgResources.redo());
final RedoAction redoActionBtn = new RedoAction(NO_TEXT, i18n.t("Redo"), imgResources.redo());
- final MenuItemDescriptor redo = new MenuItemDescriptor(editMenu, redoAction);
+ final OldMenuItemDescriptor redo = new OldMenuItemDescriptor(editMenu, redoAction);
final ButtonDescriptor redoBtn = new ButtonDescriptor(redoActionBtn);
redoBtn.setPosition(1);
setActionShortcut(Shortcut.getShortcut(true, Character.valueOf('Y')), redoAction);
final CopyAction copyAction = new CopyAction(i18n.t("Copy"), NO_TEXT, imgResources.copy());
- final MenuItemDescriptor copy = new MenuItemDescriptor(editMenu, copyAction);
+ final OldMenuItemDescriptor copy = new OldMenuItemDescriptor(editMenu, copyAction);
setActionShortcut(Shortcut.getShortcut(true, Character.valueOf('C')), copyAction);
final CutAction cutAction = new CutAction(i18n.t("Cut"), NO_TEXT, imgResources.cut());
- final MenuItemDescriptor cut = new MenuItemDescriptor(editMenu, cutAction);
+ final OldMenuItemDescriptor cut = new OldMenuItemDescriptor(editMenu, cutAction);
setActionShortcut(Shortcut.getShortcut(true, Character.valueOf('X')), cutAction);
final PasteAction pasteAction = new PasteAction(i18n.t("Paste"), NO_TEXT, imgResources.paste());
- final MenuItemDescriptor paste = new MenuItemDescriptor(editMenu, pasteAction);
+ final OldMenuItemDescriptor paste = new OldMenuItemDescriptor(editMenu, pasteAction);
setActionShortcut(Shortcut.getShortcut(true, Character.valueOf('V')), pasteAction);
final EditHtmlAction editHtmlAction = new EditHtmlAction(i18n.t("Edit HTML"), NO_TEXT, imgResources.edithtml());
- final MenuItemDescriptor editHtml = new MenuItemDescriptor(editMenu, editHtmlAction);
+ final OldMenuItemDescriptor editHtml = new OldMenuItemDescriptor(editMenu, editHtmlAction);
editHtml.setAddCondition(extendedAddCond);
final CommentAction commentAction = new CommentAction(i18n.t("Comment"), NO_TEXT, NO_ICON);
- final MenuItemDescriptor comment = new MenuItemDescriptor(insertMenu, commentAction);
+ final OldMenuItemDescriptor comment = new OldMenuItemDescriptor(insertMenu, commentAction);
comment.setAddCondition(extendedAddCond);
setActionShortcut(Shortcut.getShortcut(true, Character.valueOf('M')), commentAction);
final HrAction hlineAction = new HrAction(i18n.t("Horizontal line"), NO_TEXT, imgResources.hfixedline());
final HrAction hlineBtnAction = new HrAction(NO_TEXT, i18n.t("Horizontal line"), imgResources.hfixedline());
- final MenuItemDescriptor hline = new MenuItemDescriptor(insertMenu, hlineAction);
+ final OldMenuItemDescriptor hline = new OldMenuItemDescriptor(insertMenu, hlineAction);
final ButtonDescriptor hlineBtn = new ButtonDescriptor(hlineBtnAction);
hline.setAddCondition(extendedAddCond);
hlineBtn.setAddCondition(extendedAddCond);
setActionShortcut(Shortcut.getShortcut(true, true, Character.valueOf(' ')), hlineAction);
final BlockquoteAction blockquoteAction = new BlockquoteAction(i18n.t("Block Quotation"), NO_TEXT, NO_ICON);
- final MenuItemDescriptor blockquote = new MenuItemDescriptor(formatMenu, blockquoteAction);
+ final OldMenuItemDescriptor blockquote = new OldMenuItemDescriptor(formatMenu, blockquoteAction);
blockquote.setAddCondition(extendedAddCond);
final StrikethroughAction strikeAction = new StrikethroughAction(NO_TEXT, i18n.t("Strikethrough"),
@@ -948,14 +948,14 @@
final ImgAction imgAction = new ImgAction(i18n.t("Image..."), NO_TEXT, imgResources.images());
final ImgAction imgBtnAction = new ImgAction(NO_TEXT, i18n.t("Insert Image"), imgResources.images());
- final MenuItemDescriptor img = new MenuItemDescriptor(insertMenu, imgAction);
+ final OldMenuItemDescriptor img = new OldMenuItemDescriptor(insertMenu, imgAction);
final ButtonDescriptor imgBtn = new ButtonDescriptor(imgBtnAction);
img.setAddCondition(extendedAddCond);
imgBtn.setAddCondition(extendedAddCond);
final InsertMediaAction insertMediaAction = new InsertMediaAction(i18n.t("Audio/Video..."), NO_TEXT,
imgResources.film());
- final MenuItemDescriptor insertMedia = new MenuItemDescriptor(insertMenu, insertMediaAction);
+ final OldMenuItemDescriptor insertMedia = new OldMenuItemDescriptor(insertMenu, insertMediaAction);
insertMedia.setAddCondition(extendedAddCond);
final CreateOrEditLinkAction editLinkAction = new CreateOrEditLinkAction(i18n.t("Link..."), NO_TEXT,
@@ -964,8 +964,8 @@
i18n.t("Create or Edit Link"), imgResources.link());
final CreateOrEditLinkAction editLinkCtxAction = new CreateOrEditLinkAction(i18n.t("Change"), NO_TEXT,
imgResources.link());
- final MenuItemDescriptor editLink = new MenuItemDescriptor(insertMenu, editLinkAction);
- final MenuItemDescriptor editLinkCtx = new MenuItemDescriptor(linkCtxMenu, editLinkCtxAction);
+ final OldMenuItemDescriptor editLink = new OldMenuItemDescriptor(insertMenu, editLinkAction);
+ final OldMenuItemDescriptor editLinkCtx = new OldMenuItemDescriptor(linkCtxMenu, editLinkCtxAction);
final ButtonDescriptor editLinkBtn = new ButtonDescriptor(editLinkBtnAction);
editLink.setAddCondition(extendedAddCond);
editLinkBtn.setAddCondition(extendedAddCond);
@@ -977,7 +977,7 @@
imgResources.linkbreak());
final RemoveLinkAction delLinkCtxAction = new RemoveLinkAction(i18n.t("Remove"), NO_TEXT,
imgResources.linkbreak());
- final MenuItemDescriptor removeLinkCtx = new MenuItemDescriptor(linkCtxMenu, delLinkCtxAction);
+ final OldMenuItemDescriptor removeLinkCtx = new OldMenuItemDescriptor(linkCtxMenu, delLinkCtxAction);
final ButtonDescriptor removeLinkBtn = new ButtonDescriptor(delLinkBtnAction);
removeLinkBtn.setAddCondition(extendedAddCond);
removeLinkCtx.setAddCondition(extendedAddCond);
@@ -987,7 +987,7 @@
imgResources.removeFormat());
final RemoveFormatAction remFormatBtnAc = new RemoveFormatAction(NO_TEXT, i18n.t("Clear Formatting..."),
imgResources.removeFormat());
- final MenuItemDescriptor removeFormat = new MenuItemDescriptor(formatMenu, remFormatAction);
+ final OldMenuItemDescriptor removeFormat = new OldMenuItemDescriptor(formatMenu, remFormatAction);
final ButtonDescriptor removeFormatBtn = new ButtonDescriptor(remFormatBtnAc);
removeFormat.setAddCondition(extendedAddCond);
removeFormatBtn.setAddCondition(extendedAddCond);
@@ -995,14 +995,14 @@
final InsertSpecialCharAction insCharAction = new InsertSpecialCharAction(i18n.t("Special characters..."),
NO_TEXT, imgResources.specialchars());
- final MenuItemDescriptor insertSpecialChar = new MenuItemDescriptor(insertMenu, insCharAction);
+ final OldMenuItemDescriptor insertSpecialChar = new OldMenuItemDescriptor(insertMenu, insCharAction);
insertSpecialChar.setAddCondition(extendedAddCond);
final InsertTableAction insTableAction = new InsertTableAction(i18n.t("Table..."), NO_TEXT,
imgResources.inserttable());
final InsertTableAction insTableBtnAction = new InsertTableAction(NO_TEXT, i18n.t("Insert Table"),
imgResources.inserttable());
- final MenuItemDescriptor insertTable = new MenuItemDescriptor(insertMenu, insTableAction);
+ final OldMenuItemDescriptor insertTable = new OldMenuItemDescriptor(insertMenu, insTableAction);
final ButtonDescriptor insertTableBtn = new ButtonDescriptor(insTableBtnAction);
insertTable.setAddCondition(extendedAddCond);
insertTableBtn.setAddCondition(extendedAddCond);
@@ -1019,7 +1019,7 @@
final DevInfoAction devInfoAction = new DevInfoAction(i18n.t("Developers info"), NO_TEXT,
imgResources.specialchars());
- final MenuItemDescriptor devInfo = new MenuItemDescriptor(formatMenu, devInfoAction);
+ final OldMenuItemDescriptor devInfo = new OldMenuItemDescriptor(formatMenu, devInfoAction);
devInfo.setAddCondition(extendedAddCond);
setActionShortcut(Shortcut.getShortcut(false, true, false, false, Character.valueOf('I')), devInfoAction);
@@ -1033,15 +1033,15 @@
fontColor, backgroundColor, fontSizeMenu, fontMenu, editLinkCtx, removeLinkCtx);
// actions.add(devInfo);
- setLocation(TOPBAR, new GuiActionDescrip[] { fileMenu, editMenu, insertMenu, formatMenu, editMenuSep,
+ setLocation(TOPBAR, new OldGuiActionDescrip[] { fileMenu, editMenu, insertMenu, formatMenu, editMenuSep,
subscript, superscript, undo, redo, editMenuSep, copy, cut, paste, editMenuSep, select, editMenuSep,
editHtml, comment, hline, blockquote, img, insertTable, insertMedia, editLink, removeFormat,
formatMenuSep, insertMenuSep, insertSpecialChar, insertTable, devInfo });
- setLocation(SNDBAR, new GuiActionDescrip[] { undoBtn, redoBtn, sndbarSep, sndbarSepExt, bold, italic,
+ setLocation(SNDBAR, new OldGuiActionDescrip[] { undoBtn, redoBtn, sndbarSep, sndbarSepExt, bold, italic,
underline, strikethrough, justifyLeft, justifyCentre, justifyRight, undoBtn, redoBtn, hlineBtn,
decreaseIndent, increaseIndent, olist, ulist, hlineBtn, imgBtn, editLinkBtn, removeLinkBtn,
removeFormatBtn, insertTableBtn, fontColor, backgroundColor, fontMenu, fontSizeMenu });
- setLocation(LINKCTX, new GuiActionDescrip[] { removeLinkCtx, editLinkCtx });
+ setLocation(LINKCTX, new OldGuiActionDescrip[] { removeLinkCtx, editLinkCtx });
for (final String fontName : FONT_NAMES) {
createFontAction(fontMenu, fontName);
@@ -1203,15 +1203,15 @@
}
@Override
- public void setActionShortcut(final KeyStroke key, final AbstractAction action) {
+ public void setActionShortcut(final KeyStroke key, final OldAbstractAction action) {
inputMap.put(key, action);
action.setShortcut(key);
}
@Override
- public void setActionShortcut(final KeyStroke key, final AbstractAction mainAction, final AbstractAction... actions) {
+ public void setActionShortcut(final KeyStroke key, final OldAbstractAction mainAction, final OldAbstractAction... actions) {
setActionShortcut(key, mainAction);
- for (final AbstractAction action : actions) {
+ for (final OldAbstractAction action : actions) {
action.setShortcut(key);
}
}
@@ -1233,8 +1233,8 @@
}
@Override
- public void setLocation(final String location, final GuiActionDescrip... descripts) {
- for (final GuiActionDescrip descript : descripts) {
+ public void setLocation(final String location, final OldGuiActionDescrip... descripts) {
+ for (final OldGuiActionDescrip descript : descripts) {
descript.setLocation(location);
}
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/MediaUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/MediaUtils.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/abstractmedia/MediaUtils.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,9 +19,9 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertimg.ContentPosition;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.shared.domain.utils.StateToken;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -27,7 +27,7 @@
import org.ourproject.kune.platf.client.actions.KeyStroke;
import org.ourproject.kune.platf.client.actions.ui.ButtonDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuCheckItemDescriptor;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
import org.ourproject.kune.platf.client.shortcuts.Keyboard;
import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalette;
import org.ourproject.kune.platf.client.ui.rte.basic.RTEditor;
@@ -192,7 +192,7 @@
saveBtn.setLocation(RTEditor.SNDBAR);
saveMenuAction = new SaveAction(i18n.t("Save"),NO_TEXT, imgResources.save());
- final MenuItemDescriptor saveMenu = new MenuItemDescriptor(super.getFileMenu(), saveMenuAction);
+ final OldMenuItemDescriptor saveMenu = new OldMenuItemDescriptor(super.getFileMenu(), saveMenuAction);
saveMenu.setPosition(0);
saveMenu.setLocation(RTEditor.TOPBAR);
@@ -207,11 +207,11 @@
autoSaveItem.setLocation(RTEditor.TOPBAR);
final CloseAction closeAction = new CloseAction(i18n.t("Close"), NO_TEXT, NO_ICON);
- final MenuItemDescriptor closeItem = new MenuItemDescriptor(super.getFileMenu(), closeAction);
+ final OldMenuItemDescriptor closeItem = new OldMenuItemDescriptor(super.getFileMenu(), closeAction);
closeItem.setLocation(RTEditor.TOPBAR);
final SaveCloseAction saveCloseAction = new SaveCloseAction(i18n.t("Save & Close"), NO_TEXT, NO_ICON);
- final MenuItemDescriptor saveClose = new MenuItemDescriptor(super.getFileMenu(), saveCloseAction);
+ final OldMenuItemDescriptor saveClose = new OldMenuItemDescriptor(super.getFileMenu(), saveCloseAction);
final ButtonDescriptor saveCloseBtn = new ButtonDescriptor(saveCloseAction);
saveClose.setLocation(RTEditor.TOPBAR);
saveCloseBtn.setLocation(RTEditor.TOPBAR);
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/init/DatabaseInitializer.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -83,34 +83,29 @@
groupManager.reIndex();
final Content defaultContent = siteGroup.getDefaultContent();
- contentManager.save(
- user,
- defaultContent,
- "<img src=\"http://kune.ourproject.org/IMG/cache-200x37/siteon0-200x37.png\" "
- + "align=\"right\">This a initial demo of "
- + "<a href=\"http://kune.ourproject.org\">kune</a>."
- + "<br><div style=\"text-align: right;\"><br></div>"
- + "Kune is currently under initial development.<br>"
- + "<br>To test it, <a href=\"#signin\">sign in registering an user</a>, "
- + "but take into account that:<br><ul><li>kune is not optimized yet, "
- + "then the initial load and other operations maybe are slow.</li>"
- + "<li>Don\'t use passwords that you are using in other sites "
- + "(kune isn\'t secure yet storing passwords).</li>"
- + "<li>The site is divided in two main areas: the public "
- + "space and the workspace:</li><ul>"
- + "<li>The workspace is the most important part of kune, "
- + "because is where users collaborate and communicates which each others. "
- + "This part is the most dynamic and we are using modern "
- + "(and sometimes experimental) web technologies to improve the end user "
- + "experience. I heavily under development.<br></li>"
- + "<li>The public space is currently lest developed. "
- + "Our main goal is to offer customs and configurable styles "
- + "for groups/users contents.</li></ul></ul><font size=\"4\"><br>"
- + "We need your feedback<br><br></font>Please help us to improve this software "
- + "reporting <a href=\"http://ourproject.org/tracker/?atid=139&group_id=407&func=browse\">bugs and/or "
- + "suggestions</a>. Also you <a href=\"#translate\">help us to translate it</a> "
- + "into other languages.<br><br>Thank you,<br>"
- + "<br>--<br><span style=\"font-style: italic;\">" + "The kune development team</span><br><br>");
+ contentManager.save(user, defaultContent, "<img src=\"http://kune.ourproject.org/kimages/logo-header.png\" "
+ + "align=\"right\">This a initial demo of " + "<a href=\"http://kune.ourproject.org\">kune</a>."
+ + "<br><div style=\"text-align: right;\"><br></div>"
+ + "Kune is currently under initial development.<br>"
+ + "<br>To test it, <a href=\"#signin\">sign in registering an user</a>, "
+ + "but take into account that:<br><ul><li>kune is not optimized yet, "
+ + "then the initial load and other operations maybe are slow.</li>"
+ + "<li>Don\'t use passwords that you are using in other sites "
+ + "(kune isn\'t secure yet storing passwords).</li>"
+ + "<li>The site is divided in two main areas: the public " + "space and the workspace:</li><ul>"
+ + "<li>The workspace is the most important part of kune, "
+ + "because is where users collaborate and communicates which each others. "
+ + "This part is the most dynamic and we are using modern "
+ + "(and sometimes experimental) web technologies to improve the end user "
+ + "experience. I heavily under development.<br></li>"
+ + "<li>The public space is currently lest developed. "
+ + "Our main goal is to offer customs and configurable styles "
+ + "for groups/users contents.</li></ul></ul><font size=\"4\"><br>"
+ + "We need your feedback<br><br></font>Please help us to improve this software "
+ + "reporting <a href=\"http://kune.ourproject.org/issues/\">bugs and/or "
+ + "suggestions</a>. Also you <a href=\"#translate\">help us to translate it</a> "
+ + "into other languages.<br><br>Thank you,<br>" + "<br>--<br><span style=\"font-style: italic;\">"
+ + "The kune development team</span><br><br>");
contentManager.renameContent(user, defaultContent.getId(), "Welcome to kune demo");
contentManager.setStatus(defaultContent.getId(), ContentStatus.publishedOnline);
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoDownloadManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoDownloadManager.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoDownloadManager.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -27,9 +27,9 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.ourproject.kune.platf.client.ui.download.FileConstants;
import org.ourproject.kune.platf.server.manager.GroupManager;
+import cc.kune.core.client.services.FileConstants;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.domain.Group;
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoUploadManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoUploadManager.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/EntityLogoUploadManager.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -29,12 +29,12 @@
import magick.MagickException;
import org.apache.commons.fileupload.FileItem;
-import org.ourproject.kune.platf.client.ui.download.FileConstants;
import org.ourproject.kune.platf.server.auth.ActionLevel;
import org.ourproject.kune.platf.server.auth.Authenticated;
import org.ourproject.kune.platf.server.auth.Authorizated;
import org.ourproject.kune.platf.server.manager.GroupManager;
+import cc.kune.core.client.services.FileConstants;
import cc.kune.core.shared.domain.AccessRol;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.i18n.I18nTranslationService;
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManager.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManager.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -31,8 +31,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.platf.client.ui.download.FileConstants;
-import org.ourproject.kune.platf.client.ui.download.ImageSize;
import org.ourproject.kune.platf.server.auth.ActionLevel;
import org.ourproject.kune.platf.server.auth.Authenticated;
import org.ourproject.kune.platf.server.auth.Authorizated;
@@ -41,6 +39,8 @@
import org.ourproject.kune.platf.server.properties.KuneProperties;
import cc.kune.core.client.errors.ContentNotFoundException;
+import cc.kune.core.client.services.FileConstants;
+import cc.kune.core.client.services.ImageSize;
import cc.kune.core.shared.domain.AccessRol;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.domain.BasicMimeType;
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManager.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManager.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -26,7 +26,6 @@
import net.sf.json.JSONObject;
import org.apache.commons.fileupload.FileItem;
-import org.ourproject.kune.platf.client.ui.download.ImageSize;
import org.ourproject.kune.platf.server.UserSession;
import org.ourproject.kune.platf.server.access.AccessService;
import org.ourproject.kune.platf.server.auth.ActionLevel;
@@ -38,6 +37,7 @@
import org.ourproject.kune.platf.server.properties.KuneProperties;
import org.ourproject.kune.platf.server.utils.StringW;
+import cc.kune.core.client.services.ImageSize;
import cc.kune.core.shared.domain.AccessRol;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.i18n.I18nTranslationService;
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManagerAbstract.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManagerAbstract.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/file/FileUploadManagerAbstract.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -37,9 +37,9 @@
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.ourproject.kune.platf.client.ui.download.FileConstants;
import org.ourproject.kune.platf.server.properties.KuneProperties;
+import cc.kune.core.client.services.FileConstants;
import cc.kune.core.shared.domain.utils.StateToken;
import com.google.inject.Inject;
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -24,7 +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.ui.download.FileDownloadUtils;
import org.ourproject.kune.wiki.client.cnt.WikiViewer;
import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
@@ -42,6 +41,7 @@
import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -22,7 +22,6 @@
import org.ourproject.kune.platf.client.app.ToolGroup;
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.wiki.client.cnt.WikiFolderContent;
import org.ourproject.kune.wiki.client.cnt.WikiFolderContentPanel;
@@ -53,6 +52,7 @@
import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.i18n.I18nTranslationService;
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientTool.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiMessages.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContent.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContent.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContent.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -20,12 +20,12 @@
package org.ourproject.kune.wiki.client.cnt;
import org.ourproject.kune.platf.client.actions.ActionRegistry;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.wiki.client.WikiClientTool;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.utils.StateToken;
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiFolderContentView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewer.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewer.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewer.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
@@ -19,7 +19,6 @@
*/
package org.ourproject.kune.wiki.client.cnt;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.wiki.client.WikiClientTool;
import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
@@ -27,6 +26,7 @@
import org.ourproject.kune.workspace.client.cnt.FoldableContentPresenter;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.dto.StateContentDTO;
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/cnt/WikiViewerView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContext.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContext.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContext.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContextPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContextPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/ctx/WikiContextPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
* This file is part of kune.
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -31,7 +31,6 @@
import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
import org.ourproject.kune.platf.client.actions.RadioMustBeChecked;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
import org.ourproject.kune.workspace.client.cnt.FoldableContent;
@@ -51,6 +50,7 @@
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.ContentStatus;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ActionsModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ActionsModule.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ActionsModule.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,38 +20,32 @@
package org.ourproject.kune.workspace.client;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.workspace.client.socialnet.ParticipateAction;
-import org.ourproject.kune.workspace.client.socialnet.UnjoinAction;
-import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
-import cc.kune.core.client.state.AccessRightsClientManager;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.ioc.decorator.NoDecoration;
-import com.calclab.suco.client.ioc.module.Factory;
-
public class ActionsModule extends AbstractExtendedModule {
@Override
protected void onInstall() {
- register(NoDecoration.class, new Factory<ParticipateAction>(ParticipateAction.class) {
- @Override
- public ParticipateAction create() {
- return new ParticipateAction(i(Session.class), p(SocialNetworkServiceAsync.class),
- i(StateManager.class), i(AccessRightsClientManager.class), i(I18nTranslationService.class),
- i(IconResources.class));
- }
- });
+ // register(NoDecoration.class, new
+ // Factory<ParticipateAction>(ParticipateAction.class) {
+ // @Override
+ // public ParticipateAction create() {
+ // return new ParticipateAction(i(Session.class),
+ // p(SocialNetworkServiceAsync.class),
+ // i(StateManager.class), i(AccessRightsClientManager.class),
+ // i(I18nTranslationService.class),
+ // i(IconResources.class));
+ // }
+ // });
+ //
+ // register(NoDecoration.class, new
+ // Factory<UnjoinAction>(UnjoinAction.class) {
+ // @Override
+ // public UnjoinAction create() {
+ // return new UnjoinAction(i(Session.class),
+ // p(SocialNetworkServiceAsync.class), i(StateManager.class),
+ // i(AccessRightsClientManager.class), i(I18nTranslationService.class),
+ // i(IconResources.class));
+ // }
+ // });
- register(NoDecoration.class, new Factory<UnjoinAction>(UnjoinAction.class) {
- @Override
- public UnjoinAction create() {
- return new UnjoinAction(i(Session.class), p(SocialNetworkServiceAsync.class), i(StateManager.class),
- i(AccessRightsClientManager.class), i(I18nTranslationService.class), i(IconResources.class));
- }
- });
-
}
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/RegistryModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/RegistryModule.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/RegistryModule.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -40,8 +40,8 @@
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 org.ourproject.kune.workspace.client.oldsn.GroupActionRegistry;
+import org.ourproject.kune.workspace.client.oldsn.UserActionRegistry;
import com.calclab.suco.client.ioc.decorator.Singleton;
import com.calclab.suco.client.ioc.module.Factory;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -31,10 +31,8 @@
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.registry.RenamableRegistry;
import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.platf.client.services.ImageUtils;
import org.ourproject.kune.platf.client.services.Images;
import org.ourproject.kune.platf.client.shortcuts.GlobalShortcutRegister;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalette;
import org.ourproject.kune.platf.client.ui.rte.edithtml.EditHtmlDialog;
@@ -105,6 +103,13 @@
import org.ourproject.kune.workspace.client.nohomepage.NoHomePage;
import org.ourproject.kune.workspace.client.nohomepage.NoHomePagePanel;
import org.ourproject.kune.workspace.client.nohomepage.NoHomePagePresenter;
+import org.ourproject.kune.workspace.client.oldsn.other.AddAsBuddieHeaderButton;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionBuddiesSummaryToolbar;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionBuddiesSummaryToolbarPresenter;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionGroupSummaryToolbar;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionGroupSummaryToolbarPresenter;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionParticipationSummaryToolbarPresenter;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionParticipationToolbar;
import org.ourproject.kune.workspace.client.options.GroupOptions;
import org.ourproject.kune.workspace.client.options.GroupOptionsPanel;
import org.ourproject.kune.workspace.client.options.GroupOptionsPresenter;
@@ -177,26 +182,6 @@
import org.ourproject.kune.workspace.client.sitebar.siteusermenu.SiteUserOptionsPresenter;
import org.ourproject.kune.workspace.client.skel.ActionCntCtxToolbarPanel;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-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;
-import org.ourproject.kune.workspace.client.socialnet.GroupMembersSummaryView;
-import org.ourproject.kune.workspace.client.socialnet.ParticipationSummary;
-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.AddAsBuddieHeaderButton;
-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;
@@ -236,7 +221,7 @@
import cc.kune.core.client.rpcservices.SocialNetworkService;
import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
import cc.kune.core.client.rpcservices.UserServiceAsync;
-import cc.kune.core.client.state.AccessRightsClientManager;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.HistoryTokenCallback;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.SiteCommonTokens;
@@ -536,22 +521,28 @@
}
});
- register(ApplicationComponentGroup.class, new Factory<GroupMembersSummary>(GroupMembersSummary.class) {
- @Override
- public GroupMembersSummary create() {
- final GroupMembersSummaryPresenter presenter = new GroupMembersSummaryPresenter(
- i(I18nUITranslationService.class), i(StateManager.class), i(ImageUtils.class),
- i(Session.class), p(SocialNetworkServiceAsync.class), p(GroupServiceAsync.class),
- p(GroupLiveSearcher.class), p(ChatEngine.class), i(GroupActionRegistry.class),
- i(ActionGroupSummaryToolbar.class), p(FileDownloadUtils.class),
- i(AccessRightsClientManager.class), i(IconResources.class));
- final GroupMembersSummaryView view = new GroupMembersSummaryPanel(presenter,
- i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
- ActionGroupSummaryToolbar.class).getView());
- presenter.init(view);
- return presenter;
- }
- });
+ // register(ApplicationComponentGroup.class, new
+ // Factory<GroupMembersSummary>(GroupMembersSummary.class) {
+ // @Override
+ // public GroupMembersSummary create() {
+ // final GroupMembersSummaryPresenter presenter = new
+ // GroupMembersSummaryPresenter(
+ // i(I18nUITranslationService.class), i(StateManager.class),
+ // i(ImageUtils.class),
+ // i(Session.class), p(SocialNetworkServiceAsync.class),
+ // p(GroupServiceAsync.class),
+ // p(GroupLiveSearcher.class), p(ChatEngine.class),
+ // i(GroupActionRegistry.class),
+ // i(ActionGroupSummaryToolbar.class), p(FileDownloadUtils.class),
+ // i(AccessRightsClientManager.class), i(IconResources.class));
+ // final GroupMembersSummaryView view = new
+ // GroupMembersSummaryPanel(presenter,
+ // i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
+ // ActionGroupSummaryToolbar.class).getView());
+ // presenter.init(view);
+ // return presenter;
+ // }
+ // });
register(ApplicationComponentGroup.class, new Factory<AddAsBuddieHeaderButton>(AddAsBuddieHeaderButton.class) {
@Override
@@ -561,37 +552,49 @@
}
});
- register(ApplicationComponentGroup.class, new Factory<BuddiesSummary>(BuddiesSummary.class) {
- @Override
- public BuddiesSummary create() {
- final BuddiesSummaryPresenter presenter = new BuddiesSummaryPresenter(i(StateManager.class),
- i(Session.class), p(UserServiceAsync.class), i(UserActionRegistry.class),
- i(I18nTranslationService.class), p(ChatEngine.class), i(ActionBuddiesSummaryToolbar.class),
- p(FileDownloadUtils.class), i(ImageUtils.class), p(SocialNetworkServiceAsync.class),
- i(GroupActionRegistry.class), i(AccessRightsClientManager.class), i(IconResources.class));
- final BuddiesSummaryPanel panel = new BuddiesSummaryPanel(presenter, i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class), i(ActionManager.class),
- i(ActionBuddiesSummaryToolbar.class).getView());
- presenter.init(panel);
- return presenter;
- }
- });
+ // register(ApplicationComponentGroup.class, new
+ // Factory<BuddiesSummary>(BuddiesSummary.class) {
+ // @Override
+ // public BuddiesSummary create() {
+ // final BuddiesSummaryPresenter presenter = new
+ // BuddiesSummaryPresenter(i(StateManager.class),
+ // i(Session.class), p(UserServiceAsync.class),
+ // i(UserActionRegistry.class),
+ // i(I18nTranslationService.class), p(ChatEngine.class),
+ // i(ActionBuddiesSummaryToolbar.class),
+ // p(FileDownloadUtils.class), i(ImageUtils.class),
+ // p(SocialNetworkServiceAsync.class),
+ // i(GroupActionRegistry.class), i(AccessRightsClientManager.class),
+ // i(IconResources.class));
+ // final BuddiesSummaryPanel panel = new BuddiesSummaryPanel(presenter,
+ // i(WorkspaceSkeleton.class),
+ // i(I18nTranslationService.class), i(ActionManager.class),
+ // i(ActionBuddiesSummaryToolbar.class).getView());
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
- register(ApplicationComponentGroup.class, new Factory<ParticipationSummary>(ParticipationSummary.class) {
- @Override
- public ParticipationSummary create() {
- final ParticipationSummaryPresenter presenter = new ParticipationSummaryPresenter(
- i(I18nUITranslationService.class), i(StateManager.class), i(ImageUtils.class),
- i(Session.class), p(SocialNetworkServiceAsync.class), i(GroupActionRegistry.class),
- i(ActionParticipationToolbar.class), p(FileDownloadUtils.class),
- i(AccessRightsClientManager.class), i(IconResources.class));
- final ParticipationSummaryView view = new ParticipationSummaryPanel(presenter,
- i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
- ActionParticipationToolbar.class).getView());
- presenter.init(view);
- return presenter;
- }
- });
+ // register(ApplicationComponentGroup.class, new
+ // Factory<ParticipationSummary>(ParticipationSummary.class) {
+ // @Override
+ // public ParticipationSummary create() {
+ // final ParticipationSummaryPresenter presenter = new
+ // ParticipationSummaryPresenter(
+ // i(I18nUITranslationService.class), i(StateManager.class),
+ // i(ImageUtils.class),
+ // i(Session.class), p(SocialNetworkServiceAsync.class),
+ // i(GroupActionRegistry.class),
+ // i(ActionParticipationToolbar.class), p(FileDownloadUtils.class),
+ // i(AccessRightsClientManager.class), i(IconResources.class));
+ // final ParticipationSummaryView view = new
+ // ParticipationSummaryPanel(presenter,
+ // i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
+ // ActionParticipationToolbar.class).getView());
+ // presenter.init(view);
+ // return presenter;
+ // }
+ // });
register(ApplicationComponentGroup.class, new Factory<TagsSummary>(TagsSummary.class) {
@Override
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cnt/FoldableContentPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,11 +21,11 @@
import org.ourproject.kune.platf.client.actions.ActionItemCollection;
import org.ourproject.kune.platf.client.actions.ActionRegistry;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
-import org.ourproject.kune.platf.client.ui.download.ImageSize;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.services.ImageSize;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.utils.AccessRights;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/ctxnav/ContextNavigatorPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -28,14 +28,14 @@
import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
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.AbstractFoldableContentActions;
import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry;
import org.ourproject.kune.workspace.client.cxt.ActionContextBottomToolbar;
import org.ourproject.kune.workspace.client.title.RenameAction;
import org.ourproject.kune.workspace.client.upload.FileUploader;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.services.ImageSize;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.ContentStatus;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditorPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/ContentEditorPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -27,7 +27,7 @@
import org.ourproject.kune.platf.client.actions.ActionEvent;
import org.ourproject.kune.platf.client.actions.KeyStroke;
import org.ourproject.kune.platf.client.actions.ui.ComplexToolbar;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
import org.ourproject.kune.platf.client.shortcuts.Keyboard;
import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalette;
import org.ourproject.kune.platf.client.ui.rte.basic.RTEditor;
@@ -152,7 +152,7 @@
private void addContentActions() {
final RenameAction renameAction = new RenameAction(i18n.t("Rename"), NO_TEXT, NO_ICON);
- final MenuItemDescriptor renameItem = new MenuItemDescriptor(super.getFileMenu(), renameAction);
+ final OldMenuItemDescriptor renameItem = new OldMenuItemDescriptor(super.getFileMenu(), renameAction);
renameItem.setLocation(RTEditor.TOPBAR);
final KeyStroke key = KeyStroke.getKeyStroke(Keyboard.KEY_F2, 0);
renameAction.putValue(Action.ACCELERATOR_KEY, key);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,10 +20,10 @@
package org.ourproject.kune.workspace.client.editor.insertlocalimg;
import org.ourproject.kune.platf.client.services.SearcherConstants;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertimg.abstractimg.InsertImageAbstractPanel;
import org.ourproject.kune.workspace.client.search.AbstractLiveSearcherField;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.BasicMimeTypeDTO;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,11 +20,11 @@
package org.ourproject.kune.workspace.client.editor.insertlocallink;
import org.ourproject.kune.platf.client.services.SearcherConstants;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertlink.abstractlink.InsertLinkAbstractPanel;
import org.ourproject.kune.workspace.client.search.AbstractLiveSearcherField;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.LinkDTO;
import cc.kune.core.shared.dto.StateTokenUtils;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertMediaLocalPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertMediaLocalPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertMediaLocalPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,10 +20,10 @@
package org.ourproject.kune.workspace.client.editor.insertlocalmedia;
import org.ourproject.kune.platf.client.services.SearcherConstants;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.InsertMediaAbstractPanel;
import org.ourproject.kune.workspace.client.search.AbstractLiveSearcherField;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.BasicMimeTypeDTO;
import cc.kune.core.shared.dto.LinkDTO;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeader.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeader.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeader.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,11 +20,11 @@
package org.ourproject.kune.workspace.client.entityheader;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
public interface EntityHeader {
- void addAction(GuiActionDescrip descriptor);
+ void addAction(OldGuiActionDescrip descriptor);
void addWidget(View widget);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -23,14 +23,14 @@
import org.ourproject.kune.platf.client.View;
import org.ourproject.kune.platf.client.actions.ui.ComplexToolbar;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
import org.ourproject.kune.platf.client.actions.ui.GuiBindingsRegister;
import org.ourproject.kune.platf.client.services.Images;
-import org.ourproject.kune.platf.client.ui.download.FileConstants;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsTheme;
+import cc.kune.core.client.services.FileConstants;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.GroupDTO;
@@ -66,7 +66,7 @@
wskel.addToEntityMainHeader(this);
}
- public void addAction(final GuiActionDescrip descriptor) {
+ public void addAction(final OldGuiActionDescrip descriptor) {
toolbar.add(descriptor);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,7 +20,7 @@
package org.ourproject.kune.workspace.client.entityheader;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
import org.ourproject.kune.workspace.client.themes.WsTheme;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
@@ -52,7 +52,7 @@
});
}
- public void addAction(final GuiActionDescrip descriptor) {
+ public void addAction(final OldGuiActionDescrip descriptor) {
view.addAction(descriptor);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,7 +20,7 @@
package org.ourproject.kune.workspace.client.entityheader;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
import org.ourproject.kune.workspace.client.themes.WsTheme;
import cc.kune.core.shared.domain.utils.StateToken;
@@ -28,7 +28,7 @@
public interface EntityHeaderView {
- void addAction(GuiActionDescrip descriptor);
+ void addAction(OldGuiActionDescrip descriptor);
void addWidget(View view);
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/maxmin/MaxMinWorkspacePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/maxmin/MaxMinWorkspacePresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/maxmin/MaxMinWorkspacePresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -25,7 +25,7 @@
import org.ourproject.kune.platf.client.actions.ActionEvent;
import org.ourproject.kune.platf.client.actions.KeyStroke;
import org.ourproject.kune.platf.client.actions.Shortcut;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
import org.ourproject.kune.platf.client.shortcuts.GlobalShortcutRegister;
import org.ourproject.kune.workspace.client.sitebar.siteoptions.SiteOptions;
@@ -70,9 +70,9 @@
private final GlobalShortcutRegister shortcutReg;
- private MenuItemDescriptor maximizeButton;
+ private OldMenuItemDescriptor maximizeButton;
- private MenuItemDescriptor minimizeButton;
+ private OldMenuItemDescriptor minimizeButton;
private final SiteOptions siteOptions;
public MaxMinWorkspacePresenter(final GlobalShortcutRegister shortcutReg, final IconResources images,
@@ -107,13 +107,13 @@
final MaximizeAction maximizeAction = new MaximizeAction(i18n.t("Maximize the workspace"), images.maximize());
maximizeAction.setShortcut(shortcut);
- maximizeButton = new MenuItemDescriptor(maximizeAction);
+ maximizeButton = new OldMenuItemDescriptor(maximizeAction);
maximizeButton.setPosition(0);
maximizeButton.setId(MAX_ICON);
final MinimizeAction minimizeAction = new MinimizeAction(i18n.t("Minimize the workspace"), images.minimize());
minimizeAction.setShortcut(shortcut);
- minimizeButton = new MenuItemDescriptor(minimizeAction);
+ minimizeButton = new OldMenuItemDescriptor(minimizeAction);
minimizeButton.setPosition(1);
minimizeButton.setVisible(false);
minimizeButton.setId(MIN_ICON);
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 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/hello/HelloWorldModule.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,14 +20,14 @@
package org.ourproject.kune.workspace.client.hello;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
import org.ourproject.kune.platf.client.actions.Action;
import org.ourproject.kune.platf.client.actions.ActionEvent;
import org.ourproject.kune.platf.client.actions.Shortcut;
import org.ourproject.kune.platf.client.actions.ui.MenuCheckItemDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuRadioItemDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuSeparatorDescriptor;
import org.ourproject.kune.platf.client.actions.ui.PushButtonDescriptor;
@@ -121,15 +121,15 @@
// recommended the use in real code
final MenuDescriptor menu = new MenuDescriptor(i18n.t("HelloWorldMenu"), "File menu tooltip");
- final MenuItemDescriptor menuitem = new MenuItemDescriptor(menu, action);
- final MenuItemDescriptor menuitem2 = new MenuItemDescriptor(menu, action);
+ final OldMenuItemDescriptor menuitem = new OldMenuItemDescriptor(menu, action);
+ final OldMenuItemDescriptor menuitem2 = new OldMenuItemDescriptor(menu, action);
// A submenu
final MenuDescriptor submenu = new MenuDescriptor("Options", "Submenu tooltip");
submenu.setParent(menu);
// A menu check item
- final MenuItemDescriptor menuitem3 = new MenuItemDescriptor(submenu, action);
+ final OldMenuItemDescriptor menuitem3 = new OldMenuItemDescriptor(submenu, action);
final MenuCheckItemDescriptor menuitem4 = new MenuCheckItemDescriptor(submenu, action);
menuitem4.setChecked(true);
@@ -206,7 +206,7 @@
void showMessage();
}
- static class HelloWorldAction extends AbstractAction {
+ static class HelloWorldAction extends OldAbstractAction {
public HelloWorldAction(final IconResources img) {
super();
super.putValue(Action.NAME, "helloworld");
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/SiteOptionsI18nTranslatorAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/SiteOptionsI18nTranslatorAction.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/SiteOptionsI18nTranslatorAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,10 +19,10 @@
*/
package org.ourproject.kune.workspace.client.i18n;
-import org.ourproject.kune.platf.client.actions.AbstractAction;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
import org.ourproject.kune.platf.client.actions.Action;
import org.ourproject.kune.platf.client.actions.ActionEvent;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
import org.ourproject.kune.workspace.client.sitebar.siteoptions.SiteOptions;
import cc.kune.core.client.resources.icons.IconResources;
@@ -30,7 +30,7 @@
import com.calclab.suco.client.ioc.Provider;
-public class SiteOptionsI18nTranslatorAction extends AbstractAction {
+public class SiteOptionsI18nTranslatorAction extends OldAbstractAction {
private final Provider<I18nTranslator> translator;
public SiteOptionsI18nTranslatorAction(final SiteOptions siteOptions, final I18nTranslationService i18n,
@@ -39,7 +39,7 @@
this.translator = translator;
putValue(Action.NAME, i18n.t("Help with the translation"));
putValue(Action.SMALL_ICON, img.language());
- final MenuItemDescriptor item = new MenuItemDescriptor(this);
+ final OldMenuItemDescriptor item = new OldMenuItemDescriptor(this);
item.setPosition(1);
siteOptions.addAction(item);
}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummary.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummary.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummary.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummary.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,24 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.oldsn;
+
+
+public interface BuddiesSummary {
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryPanel.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryPanel.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,133 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.oldsn;
+
+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.MenuItemsContainer;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
+import org.ourproject.kune.workspace.client.skel.SummaryPanel;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+
+import cc.kune.common.client.ui.BasicThumb;
+import cc.kune.core.client.resources.CoreMessages;
+import cc.kune.core.shared.dto.UserSimpleDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.events.Listener;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.gwtext.client.widgets.menu.Menu;
+
+public class BuddiesSummaryPanel extends SummaryPanel implements BuddiesSummaryView {
+
+ private final MenuItemsContainer<UserSimpleDTO> menuItemsContainer;
+ private final FlowPanel flowPanel;
+ private final Label otherBuddiesLabel;
+ private final I18nTranslationService i18n;
+ private final ActionManager actionManager;
+ private final AbstractToolbar toolbar;
+ private final Label noBuddiesPublic;
+
+ public BuddiesSummaryPanel(final BuddiesSummaryPresenter presenter, final WorkspaceSkeleton ws,
+ final I18nTranslationService i18n, final ActionManager actionManager,
+ final ActionToolbarView<UserSimpleDTO> actionToolbarView) {
+ super(i18n.t("Buddies"), i18n.t("This user buddies"), ws);
+ this.actionManager = actionManager;
+ menuItemsContainer = new MenuItemsContainer<UserSimpleDTO>();
+ this.i18n = i18n;
+ final VerticalPanel vp = new VerticalPanel();
+ flowPanel = new FlowPanel();
+ otherBuddiesLabel = new Label();
+ otherBuddiesLabel.addStyleName("kune-Margin-Small-trbl");
+ vp.add(flowPanel);
+ vp.add(otherBuddiesLabel);
+ toolbar = ((ActionToolbarPanel<UserSimpleDTO>) actionToolbarView).getToolbar();
+ toolbar.setBlankStyle();
+ vp.add((Widget) toolbar);
+ super.add(vp);
+ addInSummary();
+ noBuddiesPublic = new Label(i18n.t(CoreMessages.BUDDIES_NOT_PUBLIC));
+ noBuddiesPublic.addStyleName("kune-Margin-7-trbl");
+ noBuddiesPublic.addStyleName("k-text-gray");
+ }
+
+ public void addBuddie(final UserSimpleDTO user, final ActionItemCollection<UserSimpleDTO> actionCollection,
+ final String avatarUrl, final String tooltipTitle, final String tooltip) {
+ final ClickHandler listener = new ClickHandler() {
+ public void onClick(final ClickEvent event) {
+ final Element sender = event.getRelativeElement();
+ final Menu menu = menuItemsContainer.get(user.getShortName());
+ if (menu.getItems().length > 0) {
+ menu.showAt(sender.getAbsoluteLeft(), sender.getAbsoluteTop() + 5);
+ }
+ }
+ };
+ menuItemsContainer.createItemMenu(user.getShortName(), actionCollection,
+ new Listener<ActionItem<UserSimpleDTO>>() {
+ public void onEvent(final ActionItem<UserSimpleDTO> actionItem) {
+ doAction(actionItem);
+ }
+ });
+
+ final BasicThumb thumb = new BasicThumb(avatarUrl.equals(NOAVATAR) ? "images/persons/person2-32.png"
+ : avatarUrl, AVATARSIZE, user.getShortName(), AVATARLABELMAXSIZE, false, listener);
+ thumb.setTooltip(tooltipTitle, tooltip);
+ flowPanel.add(thumb);
+ }
+
+ @Override
+ public void clear() {
+ flowPanel.clear();
+ clearOtherUsers();
+ menuItemsContainer.clear();
+ toolbar.removeAll();
+ super.doLayoutIfNeeded();
+ }
+
+ public void clearOtherUsers() {
+ otherBuddiesLabel.setText("");
+ }
+
+ public void setNoBuddies() {
+ otherBuddiesLabel.setText(i18n.t("This user has no buddies"));
+ }
+
+ public void setOtherUsers(final String text) {
+ otherBuddiesLabel.setText(text);
+ }
+
+ public void showBuddiesNotVisible() {
+ flowPanel.add(noBuddiesPublic);
+ super.doLayoutIfNeeded();
+ }
+
+ private void doAction(final ActionItem<UserSimpleDTO> actionItem) {
+ actionManager.doAction(actionItem);
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryPresenter.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryPresenter.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,241 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.oldsn;
+
+import java.util.List;
+
+import org.ourproject.kune.chat.client.ChatEngine;
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.actions.ActionEnableCondition;
+import org.ourproject.kune.platf.client.actions.ActionMenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
+import org.ourproject.kune.platf.client.actions.RadioMustBeChecked;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionBuddiesSummaryToolbar;
+
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.rpcservices.UserServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.services.ImageUtils;
+import cc.kune.core.client.state.AccessRightsClientManager;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.domain.UserBuddiesVisibility;
+import cc.kune.core.shared.domain.utils.AccessRights;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.core.shared.dto.UserBuddiesDataDTO;
+import cc.kune.core.shared.dto.UserSimpleDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.events.Listener;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class BuddiesSummaryPresenter extends SocialNetworkPresenter implements BuddiesSummary {
+
+ public static final String BUDDIES_VISIBILITY_GROUP = "k-bsp-bud-visib";
+
+ private final UserActionRegistry actionRegistry;
+ private final Provider<ChatEngine> chatEngineProvider;
+ private final Provider<FileDownloadUtils> fileDownUtilsProvider;
+ private final I18nTranslationService i18n;
+ private final Session session;
+ private final StateManager stateManager;
+ private final ActionBuddiesSummaryToolbar toolbar;
+ private final Provider<UserServiceAsync> userServiceAsync;
+ private BuddiesSummaryView view;
+
+ @Inject
+ public BuddiesSummaryPresenter(final StateManager stateManager, final Session session,
+ final Provider<UserServiceAsync> userServiceAsync, final UserActionRegistry actionRegistry,
+ final I18nTranslationService i18n, final Provider<ChatEngine> chatEngineProvider,
+ final ActionBuddiesSummaryToolbar toolbar, final Provider<FileDownloadUtils> fileDownUtilsProvider,
+ final ImageUtils imageUtils, final Provider<SocialNetworkServiceAsync> snServiceAsync,
+ final GroupActionRegistry groupActionRegistry, final AccessRightsClientManager accessRightManager,
+ final IconResources img) {
+ super(i18n, stateManager, accessRightManager, session, snServiceAsync, groupActionRegistry,
+ fileDownUtilsProvider, img);
+ this.stateManager = stateManager;
+ this.session = session;
+ this.userServiceAsync = userServiceAsync;
+ this.actionRegistry = actionRegistry;
+ this.i18n = i18n;
+ this.chatEngineProvider = chatEngineProvider;
+ this.toolbar = toolbar;
+ this.fileDownUtilsProvider = fileDownUtilsProvider;
+ stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
+ @Override
+ public void onEvent(final StateAbstractDTO state) {
+ setState(state);
+ }
+ });
+ stateManager.onSocialNetworkChanged(new Listener<StateAbstractDTO>() {
+ @Override
+ public void onEvent(final StateAbstractDTO state) {
+ setState(state);
+ }
+ });
+ registerActions();
+ }
+
+ private void createAddNewBuddiesAction() {
+ final ActionToolbarMenuDescriptor<UserSimpleDTO> addNewBuddiesAction = new ActionToolbarMenuDescriptor<UserSimpleDTO>(
+ AccessRolDTO.Administrator, buddiesBottom, new Listener<UserSimpleDTO>() {
+ @Override
+ public void onEvent(final UserSimpleDTO parameter) {
+ NotifyUser.info("In development");
+ }
+ });
+ addNewBuddiesAction.setTextDescription(i18n.t("Add a new buddy"));
+ addNewBuddiesAction.setParentMenuTitle(i18n.t("Options"));
+ addNewBuddiesAction.setIconUrl("images/add-green.gif");
+ actionRegistry.addAction(addNewBuddiesAction);
+ }
+
+ private void createSetBuddiesVisibilityAction(final String textDescription, final UserBuddiesVisibility visibility) {
+ final ActionToolbarMenuRadioDescriptor<UserSimpleDTO> buddiesVisibilityAction = new ActionToolbarMenuRadioDescriptor<UserSimpleDTO>(
+ AccessRolDTO.Administrator, buddiesBottom, new Listener<UserSimpleDTO>() {
+ @Override
+ public void onEvent(final UserSimpleDTO parameter) {
+ userServiceAsync.get().setBuddiesVisibility(session.getUserHash(),
+ session.getCurrentState().getGroup().getStateToken(), visibility,
+ new AsyncCallbackSimple<Void>() {
+ @Override
+ public void onSuccess(final Void result) {
+ NotifyUser.info(i18n.t("Buddies visibility changed"));
+ }
+ });
+ }
+ }, BUDDIES_VISIBILITY_GROUP, new RadioMustBeChecked() {
+ @Override
+ public boolean mustBeChecked() {
+ final StateAbstractDTO currentState = session.getCurrentState();
+ if (currentState.getGroup().isPersonal()) {
+ final SocialNetworkDataDTO socialNetworkData = currentState.getSocialNetworkData();
+ return socialNetworkData.getUserBuddiesVisibility().equals(visibility);
+ }
+ return false;
+ }
+ });
+ buddiesVisibilityAction.setTextDescription(textDescription);
+ buddiesVisibilityAction.setParentMenuTitle(i18n.t("Options"));
+ buddiesVisibilityAction.setParentSubMenuTitle(i18n.t("Those who can view your buddies list"));
+ actionRegistry.addAction(buddiesVisibilityAction);
+ }
+
+ public View getView() {
+ return view;
+ }
+
+ public void init(final BuddiesSummaryView view) {
+ this.view = view;
+ }
+
+ private void registerActions() {
+ final ActionMenuItemDescriptor<UserSimpleDTO> addAsBuddie = new ActionMenuItemDescriptor<UserSimpleDTO>(
+ AccessRolDTO.Viewer, new Listener<UserSimpleDTO>() {
+ @Override
+ public void onEvent(final UserSimpleDTO user) {
+ chatEngineProvider.get().addNewBuddie(user.getShortName());
+ }
+ });
+ addAsBuddie.setMustBeAuthenticated(true);
+ addAsBuddie.setTextDescription(i18n.t("Add as a buddie"));
+ addAsBuddie.setIconUrl("images/add-green.png");
+ addAsBuddie.setEnableCondition(new ActionEnableCondition<UserSimpleDTO>() {
+ @Override
+ public boolean mustBeEnabled(final UserSimpleDTO user) {
+ return !chatEngineProvider.get().isBuddie(user.getShortName());
+ }
+ });
+ actionRegistry.addAction(addAsBuddie);
+
+ final ActionMenuItemDescriptor<UserSimpleDTO> go = new ActionMenuItemDescriptor<UserSimpleDTO>(
+ AccessRolDTO.Viewer, new Listener<UserSimpleDTO>() {
+ @Override
+ public void onEvent(final UserSimpleDTO user) {
+ stateManager.gotoToken(user.getShortName());
+ }
+ });
+ go.setMustBeAuthenticated(false);
+ go.setTextDescription(i18n.t("Visit this user's homepage"));
+ go.setIconUrl("images/group-home.gif");
+ actionRegistry.addAction(go);
+
+ createAddNewBuddiesAction();
+ createSetBuddiesVisibilityAction(i18n.t("anyone"), UserBuddiesVisibility.anyone);
+ createSetBuddiesVisibilityAction(i18n.t("only your buddies"), UserBuddiesVisibility.yourbuddies);
+ createSetBuddiesVisibilityAction(i18n.t("only you"), UserBuddiesVisibility.onlyyou);
+ }
+
+ protected void setState(final StateAbstractDTO state) {
+ if (state.getGroup().isPersonal()) {
+ view.clear();
+ final UserBuddiesDataDTO userBuddies = state.getUserBuddies();
+ if (state.getSocialNetworkData().isBuddiesVisible()) {
+ final List<UserSimpleDTO> buddies = userBuddies.getBuddies();
+ for (final UserSimpleDTO user : buddies) {
+ final String avatarUrl = user.hasLogo() ? fileDownUtilsProvider.get().getLogoImageUrl(
+ user.getStateToken()) : BuddiesSummaryView.NOAVATAR;
+ final String tooltip = super.createTooltipWithLogo(user.getShortName(), user.getStateToken(),
+ user.hasLogo(), true);
+ view.addBuddie(user, actionRegistry.getCurrentActions(user, session.isLogged(), new AccessRights(
+ true, true, true), false), avatarUrl, user.getName(), tooltip);
+ }
+ final boolean hasLocalBuddies = buddies.size() > 0;
+ final int numExtBuddies = userBuddies.getOtherExtBuddies();
+ if (numExtBuddies > 0) {
+ if (hasLocalBuddies) {
+ // i18n: plural
+ view.setOtherUsers(i18n.t(numExtBuddies == 1 ? "and [%d] external user"
+ : "and [%d] external users", numExtBuddies));
+ } else {
+ view.setOtherUsers(i18n.t(numExtBuddies == 1 ? "[%d] external user" : "[%d] external users",
+ numExtBuddies));
+ }
+ } else {
+ if (hasLocalBuddies) {
+ view.clearOtherUsers();
+ } else {
+ view.setNoBuddies();
+ }
+ }
+ toolbar.disableMenusAndClearButtons();
+ toolbar.addActions(
+ actionRegistry.getCurrentActions(session.getCurrentUser(), session.isLogged(),
+ state.getGroupRights(), true), ActionToolbar.IN_ANY);
+ toolbar.attach();
+ view.show();
+ } else {
+ view.showBuddiesNotVisible();
+ view.show();
+ }
+ } else {
+ view.hide();
+ }
+ }
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryView.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryView.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryView.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/BuddiesSummaryView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,49 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.actions.ActionItemCollection;
+
+import cc.kune.core.shared.dto.UserSimpleDTO;
+
+public interface BuddiesSummaryView extends View {
+
+ String NOAVATAR = "";
+ int AVATARSIZE = 32;
+ int AVATARLABELMAXSIZE = 15;
+
+ void addBuddie(UserSimpleDTO user, ActionItemCollection<UserSimpleDTO> actionCollection, String avatarUrl,
+ String tooltipTitle, String tooltip);
+
+ void clear();
+
+ void clearOtherUsers();
+
+ void hide();
+
+ void setNoBuddies();
+
+ void setOtherUsers(String text);
+
+ void show();
+
+ void showBuddiesNotVisible();
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupActionRegistry.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupActionRegistry.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupActionRegistry.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupActionRegistry.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,30 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.actions.ActionRegistry;
+
+import cc.kune.core.shared.domain.utils.StateToken;
+
+/**
+ * The Class GroupActionRegistry stores actions over groups (mainly used in SN)
+ */
+public class GroupActionRegistry extends ActionRegistry<StateToken> {
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummary.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummary.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummary.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummary.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.ui.MenuItem;
+
+import cc.kune.core.shared.dto.GroupDTO;
+
+public interface GroupMembersSummary {
+
+ void addGroupOperation(MenuItem<GroupDTO> operation, boolean mustBeLogged);
+
+ void addUserOperation(MenuItem<GroupDTO> operation, boolean mustBeLogged);
+
+ void removeGroupOperation(MenuItem<GroupDTO> operation, boolean mustBeLogged);
+
+ void removeUserOperation(MenuItem<GroupDTO> operation, boolean mustBeLogged);
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryPanel.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryPanel.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,139 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
+import org.ourproject.kune.platf.client.ui.gridmenu.GridDragConfiguration;
+import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
+import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel;
+import org.ourproject.kune.workspace.client.skel.SummaryPanel;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.resources.CoreMessages;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.GroupDTO;
+
+import com.calclab.suco.client.events.Listener;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.Widget;
+import com.gwtext.client.widgets.BoxComponent;
+import com.gwtext.client.widgets.MessageBox;
+import com.gwtext.client.widgets.event.ContainerListenerAdapter;
+
+public class GroupMembersSummaryPanel extends SummaryPanel implements GroupMembersSummaryView {
+ // private static final int MAX_HEIGHT = 110;
+ private final GridMenuPanel<GroupDTO> gridMenuPanel;
+ private final I18nUITranslationService i18n;
+ private final Label noMembersPublic;
+ private final GroupMembersSummaryPresenter presenter;
+ private final AbstractToolbar toolbar;
+
+ public GroupMembersSummaryPanel(final GroupMembersSummaryPresenter presenter, final I18nUITranslationService i18n,
+ final WorkspaceSkeleton ws, final ActionToolbarView<StateToken> actionToolbarView) {
+ super(i18n.t("Group members"), i18n.t("People and groups collaborating in this group"), ws);
+ this.presenter = presenter;
+ this.i18n = i18n;
+
+ final GridDragConfiguration dragConf = new GridDragConfiguration("kk",
+ i18n.t("Drop into the chat area to start a chat.") + "<br/>"
+ + i18n.t("Drop into a room to invite the user to join the chat room"));
+ gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This is an orphaned project, if you are interested "
+ + "please request to join to work on it"), dragConf, true, true, false, true, false);
+ final Listener<String> go = new Listener<String>() {
+ @Override
+ public void onEvent(final String groupShortName) {
+ presenter.onDoubleClick(groupShortName);
+ }
+ };
+ // gridMenuPanel.onClick(go);
+ gridMenuPanel.onDoubleClick(go);
+ gridMenuPanel.getBottomBar().setCls("k-blank-toolbar");
+ super.add(gridMenuPanel);
+
+ noMembersPublic = new Label(i18n.t(CoreMessages.MEMBERS_NOT_PUBLIC));
+ noMembersPublic.addStyleName("kune-Margin-7-trbl");
+ noMembersPublic.addStyleName("k-text-gray");
+ noMembersPublic.setVisible(false);
+ super.add(noMembersPublic);
+
+ toolbar = ((ActionToolbarPanel<StateToken>) actionToolbarView).getToolbar();
+ toolbar.setBlankStyle();
+ super.add((Widget) toolbar);
+ super.addInSummary();
+ ws.addListenerInEntitySummary(new ContainerListenerAdapter() {
+ @Override
+ public void onResize(final BoxComponent component, final int adjWidth, final int adjHeight,
+ final int rawWidth, final int rawHeight) {
+ gridMenuPanel.setWidth(adjWidth);
+ }
+ });
+ }
+
+ @Override
+ public void addItem(final GridItem<GroupDTO> gridItem) {
+ gridMenuPanel.setVisible(true);
+ gridMenuPanel.addItem(gridItem);
+ doLayoutIfNeeded();
+ }
+
+ @Override
+ public void clear() {
+ gridMenuPanel.removeAll();
+ toolbar.removeAll();
+ noMembersPublic.setVisible(false);
+ doLayoutIfNeeded();
+ }
+
+ @Override
+ public void confirmAddCollab(final String groupShortName, final String groupLongName) {
+ final String groupName = groupLongName + " (" + groupShortName + ")";
+ MessageBox.confirm(i18n.t("Confirm member joining"), i18n.t("Add [%s] as a member?", groupName),
+ new MessageBox.ConfirmCallback() {
+ @Override
+ public void execute(final String btnID) {
+ if (btnID.equals("yes")) {
+ Scheduler.get().scheduleDeferred(new ScheduledCommand() {
+ @Override
+ public void execute() {
+ presenter.addCollab(groupShortName);
+ }
+ });
+ }
+ }
+ });
+ }
+
+ @Override
+ public void setDraggable(final boolean draggable) {
+ // gridMenuPanel.setDraggable(draggable);
+ }
+
+ @Override
+ public void showMembersNotVisible() {
+ noMembersPublic.setVisible(true);
+ gridMenuPanel.setVisible(false);
+ doLayoutIfNeeded();
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryPresenter.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryPresenter.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,294 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.oldsn;
+
+import java.util.List;
+
+import org.ourproject.kune.chat.client.ChatEngine;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
+import org.ourproject.kune.platf.client.actions.RadioMustBeChecked;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
+import org.ourproject.kune.platf.client.ui.MenuItem;
+import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionGroupSummaryToolbar;
+import org.ourproject.kune.workspace.client.search.GroupLiveSearcher;
+
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.services.ImageDescriptor;
+import cc.kune.core.client.services.ImageUtils;
+import cc.kune.core.client.state.AccessRightsClientManager;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.domain.AdmissionType;
+import cc.kune.core.shared.domain.SocialNetworkVisibility;
+import cc.kune.core.shared.domain.utils.AccessRights;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.AccessListsDTO;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.InitDataDTO;
+import cc.kune.core.shared.dto.LinkDTO;
+import cc.kune.core.shared.dto.SocialNetworkDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+
+import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
+import com.calclab.suco.client.events.Listener;
+import com.google.inject.Provider;
+
+public class GroupMembersSummaryPresenter extends SocialNetworkPresenter implements GroupMembersSummary {
+
+ public static final String MEMBERS_VISIBILITY_GROUP = "k-gmsp-memb-visib";
+ public static final String NEW_MEMBERS_POLICY_GROUP = "k-gmsp-new-memb-pol";
+
+ private final GridGroup adminCategory;
+ private final GridGroup collabCategory;
+ private final GroupActionRegistry groupActionRegistry;
+ private final Provider<GroupServiceAsync> groupServiceProvider;
+ private final I18nUITranslationService i18n;
+ private final Provider<GroupLiveSearcher> liveSearcherProvider;
+ private final GridGroup pendigCategory;
+ private final Session session;
+ private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+ private final StateManager stateManager;
+ private GroupMembersSummaryView view;
+
+ public GroupMembersSummaryPresenter(final I18nUITranslationService i18n, final StateManager stateManager,
+ final ImageUtils imageUtils, final Session session,
+ final Provider<SocialNetworkServiceAsync> snServiceProvider,
+ final Provider<GroupServiceAsync> groupServiceProvider,
+ final Provider<GroupLiveSearcher> liveSearcherProvider, final Provider<ChatEngine> chatEngineProvider,
+ final GroupActionRegistry groupActionRegistry, final ActionGroupSummaryToolbar toolbar,
+ final Provider<FileDownloadUtils> downloadProvider, final AccessRightsClientManager accessRightsManager,
+ final IconResources img) {
+ super(i18n, stateManager, accessRightsManager, session, snServiceProvider, groupActionRegistry,
+ downloadProvider, img);
+ this.i18n = i18n;
+ this.stateManager = stateManager;
+ this.session = session;
+ this.snServiceProvider = snServiceProvider;
+ this.groupServiceProvider = groupServiceProvider;
+ this.liveSearcherProvider = liveSearcherProvider;
+ this.groupActionRegistry = groupActionRegistry;
+ final Listener<StateAbstractDTO> setStateListener = new Listener<StateAbstractDTO>() {
+ @Override
+ public void onEvent(final StateAbstractDTO state) {
+ setState(state);
+ toolbar.disableMenusAndClearButtons();
+ toolbar.addActions(groupActionRegistry.getCurrentActions(state.getGroup().getStateToken(),
+ session.isLogged(), state.getGroupRights(), true), ActionToolbar.IN_ANY);
+ toolbar.attach();
+ }
+ };
+ stateManager.onStateChanged(setStateListener);
+ stateManager.onSocialNetworkChanged(setStateListener);
+ session.onInitDataReceived(new Listener<InitDataDTO>() {
+ @Override
+ public void onEvent(final InitDataDTO initData) {
+ addUserOperation(new MenuItem<GroupDTO>("images/new-chat.gif", i18n.t("Start a chat with this member"),
+ new Listener<GroupDTO>() {
+ @Override
+ public void onEvent(final GroupDTO group) {
+ chatEngineProvider.get().show();
+ if (chatEngineProvider.get().isLoggedIn()) {
+ chatEngineProvider.get().chat(
+ XmppURI.jid(group.getShortName() + "@" + initData.getChatDomain()));
+ } else {
+ NotifyUser.important(i18n.t("To start a chat you need to be 'online'"));
+ }
+ }
+ }), true);
+ }
+ });
+ final String adminsTitle = i18n.t("Admins");
+ final String collabsTitle = i18n.t("Collaborators");
+ final String pendingTitle = i18n.t("Pending");
+ adminCategory = new GridGroup(adminsTitle, adminsTitle, i18n.t("People that can admin this group"), true);
+ collabCategory = new GridGroup(collabsTitle, collabsTitle,
+ i18n.t("Other people that collaborate with this group"), true);
+ pendigCategory = new GridGroup(pendingTitle, pendingTitle,
+ i18n.t("People pending to be accepted in this group by the admins"),
+ imageUtils.getImageHtml(ImageDescriptor.alert), true);
+ super.addGroupOperation(gotoGroupMenuItem, false);
+ super.addUserOperation(gotoMemberMenuItem, false);
+ createActions();
+ }
+
+ public void addCollab(final String groupShortName) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().addCollabMember(session.getUserHash(), session.getCurrentState().getStateToken(),
+ groupShortName, new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member added as collaborator"));
+ stateManager.setSocialNetwork(result);
+ }
+
+ });
+ }
+
+ private void createActions() {
+ final ActionToolbarMenuDescriptor<StateToken> addMember = new ActionToolbarMenuDescriptor<StateToken>(
+ AccessRolDTO.Administrator, membersBottom, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken parameter) {
+ liveSearcherProvider.get().onSelection(new Listener<LinkDTO>() {
+ @Override
+ public void onEvent(final LinkDTO link) {
+ view.confirmAddCollab(link.getShortName(), link.getLongName());
+ }
+ });
+ liveSearcherProvider.get().show();
+ }
+ });
+ addMember.setIconUrl("images/add-green.gif");
+ addMember.setTextDescription(i18n.t("Add member"));
+ addMember.setToolTip(i18n.t("Add an user or a group as member of this group"));
+ addMember.setParentMenuTitle(i18n.t("Options"));
+
+ groupActionRegistry.addAction(addMember);
+ // groupActionRegistry.addAction(unJoin);
+
+ // groupActionRegistry.addAction(participate);
+ createSetMembersVisibilityAction(i18n.t("anyone"), SocialNetworkVisibility.anyone);
+ createSetMembersVisibilityAction(i18n.t("only members"), SocialNetworkVisibility.onlymembers);
+ createSetMembersVisibilityAction(i18n.t("only admins"), SocialNetworkVisibility.onlyadmins);
+ createNewMembersPolicyAction(i18n.t("moderate request to join"), AdmissionType.Moderated);
+ createNewMembersPolicyAction(i18n.t("auto accept request to join"), AdmissionType.Open);
+ }
+
+ private void createNewMembersPolicyAction(final String textDescription, final AdmissionType admissionPolicy) {
+ final ActionToolbarMenuRadioDescriptor<StateToken> newMembersPolicy = new ActionToolbarMenuRadioDescriptor<StateToken>(
+ AccessRolDTO.Administrator, membersBottom, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken parameter) {
+ groupServiceProvider.get().setGroupNewMembersJoiningPolicy(session.getUserHash(),
+ session.getCurrentState().getGroup().getStateToken(), admissionPolicy,
+ new AsyncCallbackSimple<Void>() {
+ @Override
+ public void onSuccess(final Void result) {
+ NotifyUser.info(i18n.t("Members joining policy changed"));
+ }
+ });
+ }
+ }, NEW_MEMBERS_POLICY_GROUP, new RadioMustBeChecked() {
+ @Override
+ public boolean mustBeChecked() {
+ final StateAbstractDTO currentState = session.getCurrentState();
+ return currentState.getGroup().getAdmissionType().equals(admissionPolicy);
+ }
+ });
+ newMembersPolicy.setTextDescription(textDescription);
+ newMembersPolicy.setParentMenuTitle(i18n.t("Options"));
+ newMembersPolicy.setParentSubMenuTitle(i18n.t("New members policy"));
+ groupActionRegistry.addAction(newMembersPolicy);
+ }
+
+ private void createSetMembersVisibilityAction(final String textDescription, final SocialNetworkVisibility visibility) {
+ final ActionToolbarMenuRadioDescriptor<StateToken> showMembers = new ActionToolbarMenuRadioDescriptor<StateToken>(
+ AccessRolDTO.Administrator, membersBottom, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken parameter) {
+ groupServiceProvider.get().setSocialNetworkVisibility(session.getUserHash(),
+ session.getCurrentState().getGroup().getStateToken(), visibility,
+ new AsyncCallbackSimple<Void>() {
+ @Override
+ public void onSuccess(final Void result) {
+ NotifyUser.info(i18n.t("Members visibility changed"));
+ }
+ });
+ }
+ }, MEMBERS_VISIBILITY_GROUP, new RadioMustBeChecked() {
+ @Override
+ public boolean mustBeChecked() {
+ final StateAbstractDTO currentState = session.getCurrentState();
+ if (!currentState.getGroup().isPersonal()) {
+ final SocialNetworkDataDTO socialNetworkData = currentState.getSocialNetworkData();
+ return socialNetworkData.getSocialNetworkVisibility().equals(visibility);
+ }
+ return false;
+ }
+ });
+ showMembers.setTextDescription(textDescription);
+ showMembers.setParentMenuTitle(i18n.t("Options"));
+ showMembers.setParentSubMenuTitle(i18n.t("Those who can view this member list"));
+ groupActionRegistry.addAction(showMembers);
+ }
+
+ public void init(final GroupMembersSummaryView view) {
+ this.view = view;
+ }
+
+ @SuppressWarnings("unchecked")
+ private void setGroupMembers(final SocialNetworkDTO socialNetwork, final AccessRights rights) {
+ final AccessListsDTO accessLists = socialNetwork.getAccessLists();
+
+ final List<GroupDTO> adminsList = accessLists.getAdmins().getList();
+ final List<GroupDTO> collabList = accessLists.getEditors().getList();
+ final List<GroupDTO> pendingCollabsList = socialNetwork.getPendingCollaborators().getList();
+
+ // final int numAdmins = adminsList.size();
+
+ final boolean userIsAdmin = rights.isAdministrable();
+ final boolean userCanView = rights.isVisible();
+
+ view.clear();
+
+ view.setDraggable(session.isLogged());
+
+ if (userCanView) {
+ for (final GroupDTO admin : adminsList) {
+ view.addItem(createGridItem(adminCategory, admin, rights, changeToCollabMenuItem, removeMemberMenuItem));
+ }
+ for (final GroupDTO collab : collabList) {
+ view.addItem(createGridItem(collabCategory, collab, rights, changeToAdminMenuItem, removeMemberMenuItem));
+ }
+ if (userIsAdmin) {
+ for (final GroupDTO pendingCollab : pendingCollabsList) {
+ view.addItem(createGridItem(pendigCategory, pendingCollab, rights, acceptJoinGroupMenuItem,
+ denyJoinGroupMenuItem));
+ }
+ }
+ }
+ view.setVisible(true);
+ }
+
+ private void setState(final StateAbstractDTO state) {
+ if (state.getGroup().isPersonal()) {
+ view.setVisible(false);
+ } else {
+ if (state.getSocialNetworkData().isMembersVisible()) {
+ setGroupMembers(state.getGroupMembers(), state.getGroupRights());
+ } else {
+ view.clear();
+ view.showMembersNotVisible();
+ view.setVisible(true);
+ }
+ }
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryView.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryView.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/GroupMembersSummaryView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
+
+import cc.kune.core.shared.dto.GroupDTO;
+
+public interface GroupMembersSummaryView {
+
+ void addItem(GridItem<GroupDTO> gridItem);
+
+ void clear();
+
+ void confirmAddCollab(String groupShortName, String groupLongName);
+
+ void setDraggable(boolean draggable);
+
+ void setVisible(boolean visible);
+
+ void showMembersNotVisible();
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipateAction.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipateAction.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipateAction.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipateAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,75 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.actions.ActionEvent;
+
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.state.AccessRightsClientManager;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.SocialNetworkRequestResult;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Provider;
+
+public class ParticipateAction extends RolAction {
+ private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+
+ public ParticipateAction(final Session session, final Provider<SocialNetworkServiceAsync> snServiceProvider,
+ final StateManager stateManager, final AccessRightsClientManager rightsManager,
+ final I18nTranslationService i18n, final IconResources imgResources) {
+ super(session, stateManager, rightsManager, i18n, AccessRolDTO.Viewer, i18n.t("Participate"),
+ i18n.t("Request to participate in this group"), imgResources.addGreen());
+ this.snServiceProvider = snServiceProvider;
+ super.setVisible(false, true);
+ super.setMustBeAuthenticated(false);
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().requestJoinGroup(session.getUserHash(), session.getCurrentState().getStateToken(),
+ new AsyncCallbackSimple<SocialNetworkRequestResult>() {
+ @Override
+ public void onSuccess(final SocialNetworkRequestResult result) {
+ NotifyUser.hideProgress();
+ switch ((result)) {
+ case accepted:
+ NotifyUser.info(i18n.t("You are now member of this group"));
+ stateManager.reload();
+ break;
+ case denied:
+ NotifyUser.important(i18n.t("Sorry this is a closed group"));
+ break;
+ case moderated:
+ NotifyUser.info(i18n.t("Membership requested. Waiting for admins decision"));
+ break;
+ default:
+ NotifyUser.info(i18n.t("Programatic error in ParticipateAction"));
+ }
+ }
+ });
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummary.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummary.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummary.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummary.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,24 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn;
+
+public interface ParticipationSummary {
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryPanel.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryPanel.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,80 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
+import org.ourproject.kune.platf.client.ui.AbstractToolbar;
+import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
+import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel;
+import org.ourproject.kune.workspace.client.skel.SummaryPanel;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.events.Listener;
+import com.google.gwt.user.client.ui.Widget;
+import com.gwtext.client.widgets.BoxComponent;
+import com.gwtext.client.widgets.event.ContainerListenerAdapter;
+
+public class ParticipationSummaryPanel extends SummaryPanel implements ParticipationSummaryView {
+
+ private final GridMenuPanel<GroupDTO> gridMenuPanel;
+ private final AbstractToolbar toolbar;
+
+ public ParticipationSummaryPanel(final ParticipationSummaryPresenter presenter, final I18nTranslationService i18n,
+ final WorkspaceSkeleton ws, final ActionToolbarView<StateToken> actionToolbarView) {
+ super(i18n.t("Participates in"), i18n.t("Groups in which the user participates"), ws);
+ gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This user does not belong to any group"), false, false,
+ false, false, false);
+ final Listener<String> go = new Listener<String>() {
+ public void onEvent(final String groupShortName) {
+ presenter.onDoubleClick(groupShortName);
+ }
+ };
+ // gridMenuPanel.onClick(go);
+ gridMenuPanel.onDoubleClick(go);
+ super.add(gridMenuPanel);
+ toolbar = ((ActionToolbarPanel<StateToken>) actionToolbarView).getToolbar();
+ toolbar.setBlankStyle();
+ super.add((Widget) toolbar);
+ addInSummary();
+ ws.addListenerInEntitySummary(new ContainerListenerAdapter() {
+ @Override
+ public void onResize(final BoxComponent component, final int adjWidth, final int adjHeight,
+ final int rawWidth, final int rawHeight) {
+ gridMenuPanel.setWidth(adjWidth);
+ }
+ });
+ }
+
+ public void addItem(final GridItem<GroupDTO> gridItem) {
+ gridMenuPanel.addItem(gridItem);
+ }
+
+ @Override
+ public void clear() {
+ gridMenuPanel.removeAll();
+ toolbar.removeAll();
+ }
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryPresenter.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryPresenter.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,105 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn;
+
+import java.util.List;
+
+import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionParticipationToolbar;
+
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.services.ImageUtils;
+import cc.kune.core.client.state.AccessRightsClientManager;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.domain.utils.AccessRights;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.ParticipationDataDTO;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+
+import com.calclab.suco.client.events.Listener;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class ParticipationSummaryPresenter extends SocialNetworkPresenter implements ParticipationSummary {
+
+ private final GridGroup adminCategory;
+ private GridGroup collabCategory;
+ private final GridGroup collabOnlyCategory;
+ private ParticipationSummaryView view;
+
+ @Inject
+ public ParticipationSummaryPresenter(final I18nUITranslationService i18n, final StateManager stateManager,
+ final ImageUtils imageUtils, final Session session,
+ final Provider<SocialNetworkServiceAsync> snServiceProvider, final GroupActionRegistry groupActionRegistry,
+ final ActionParticipationToolbar actionParticipationToolbar,
+ final Provider<FileDownloadUtils> downloadProvider, final AccessRightsClientManager accessRightsManager,
+ final IconResources img) {
+ super(i18n, stateManager, accessRightsManager, session, snServiceProvider, groupActionRegistry,
+ downloadProvider, img);
+ adminCategory = new GridGroup("admin in:", " ", i18n.tWithNT("Administrate these groups",
+ "talking about a person"), false);
+ collabCategory = new GridGroup(i18n.t("and as collaborator in:"), " ", i18n.t("Collaborate in these groups"),
+ false);
+ collabOnlyCategory = new GridGroup(i18n.t("collaborator in:"), " ", i18n.t("Collaborate in these groups"),
+ false);
+ super.addGroupOperation(gotoGroupMenuItem, false);
+ final Listener<StateAbstractDTO> setStateListener = new Listener<StateAbstractDTO>() {
+ @Override
+ public void onEvent(final StateAbstractDTO state) {
+ setState(state);
+ }
+ };
+ stateManager.onStateChanged(setStateListener);
+ stateManager.onSocialNetworkChanged(setStateListener);
+ }
+
+ public void init(final ParticipationSummaryView view) {
+ this.view = view;
+ }
+
+ @SuppressWarnings("unchecked")
+ private void setState(final StateAbstractDTO state) {
+ final ParticipationDataDTO participation = state.getParticipation();
+ final AccessRights rights = state.getGroupRights();
+ view.clear();
+ final List<GroupDTO> groupsIsAdmin = participation.getGroupsIsAdmin();
+ final List<GroupDTO> groupsIsCollab = participation.getGroupsIsCollab();
+ final int numAdmins = groupsIsAdmin.size();
+ final int numCollaborators = groupsIsCollab.size();
+ if (numAdmins == 0) {
+ collabCategory = collabOnlyCategory;
+ }
+ for (final GroupDTO group : groupsIsAdmin) {
+ view.addItem(createGridItem(adminCategory, group, rights, unJoinMenuItem));
+ }
+ for (final GroupDTO group : groupsIsCollab) {
+ view.addItem(createGridItem(collabCategory, group, rights, unJoinMenuItem));
+ }
+ if (numAdmins > 0 || numCollaborators > 0) {
+ view.setVisible(true);
+ } else {
+ view.setVisible(false);
+ }
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryView.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryView.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/ParticipationSummaryView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,35 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
+
+import cc.kune.core.shared.dto.GroupDTO;
+
+public interface ParticipationSummaryView extends View {
+
+ void addItem(GridItem<GroupDTO> createGridItem);
+
+ void clear();
+
+ void setVisible(boolean b);
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/RolAction.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolAction.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/RolAction.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/RolAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,96 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
+
+import cc.kune.core.client.state.AccessRightsClientManager;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.domain.utils.AccessRights;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.events.Listener2;
+import com.google.gwt.resources.client.ImageResource;
+
+public abstract class RolAction extends AbstractExtendedAction {
+
+ public static UIStatus refreshStatus(final AccessRolDTO rolRequired, final boolean authNeed,
+ final boolean isLogged, final boolean visibleForMembers, final boolean visibleForNonMemb,
+ final AccessRights newRights) {
+ boolean newVisibility = false;
+ boolean newEnabled = false;
+ if (authNeed && !isLogged) {
+ newVisibility = newEnabled = false;
+ } else {
+ // Auth ok
+ newEnabled = RolComparator.isEnabled(rolRequired, newRights);
+ if (newEnabled) {
+ final boolean isMember = RolComparator.isMember(newRights);
+ newEnabled = newVisibility = isMember && visibleForMembers || !isMember && visibleForNonMemb;
+ } else {
+ newVisibility = false;
+ }
+ }
+ return new UIStatus(newVisibility, newEnabled);
+ }
+
+ protected final Session session;
+ protected final StateManager stateManager;
+ protected final I18nTranslationService i18n;
+ private boolean visibleForNonMemb;
+ private boolean visibleForMembers;
+ private boolean authNeed;
+
+ public RolAction(final Session session, final StateManager stateManager,
+ final AccessRightsClientManager rightsManager, final I18nTranslationService i18n,
+ final AccessRolDTO rolRequired, final String text, final String tooltip, final ImageResource icon) {
+ super(text, tooltip, icon);
+ this.session = session;
+ this.stateManager = stateManager;
+ this.i18n = i18n;
+ this.visibleForMembers = true;
+ this.visibleForNonMemb = true;
+ this.authNeed = false;
+ rightsManager.onRightsChanged(new Listener2<AccessRights, AccessRights>() {
+ public void onEvent(final AccessRights prevRights, final AccessRights newRights) {
+ setStatus(refreshStatus(rolRequired, authNeed, session.isLogged(), visibleForMembers,
+ visibleForNonMemb, newRights));
+ }
+
+ });
+ }
+
+ public void setMustBeAuthenticated(final boolean authNeed) {
+ this.authNeed = authNeed;
+ }
+
+ public void setVisible(final boolean forMembers, final boolean forNonMembers) {
+ this.visibleForMembers = forMembers;
+ this.visibleForNonMemb = forNonMembers;
+ }
+
+ private void setStatus(final UIStatus refreshStatus) {
+ setEnabled(refreshStatus.isEnabled());
+ putValue(OldGuiActionDescrip.VISIBLE, refreshStatus.isVisible());
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/RolComparator.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolComparator.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/RolComparator.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/RolComparator.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,45 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn;
+
+import cc.kune.core.shared.domain.utils.AccessRights;
+import cc.kune.core.shared.dto.AccessRolDTO;
+
+public final class RolComparator {
+
+ public static boolean isEnabled(final AccessRolDTO rolRequired, final AccessRights rights) {
+ switch (rolRequired) {
+ case Administrator:
+ return rights.isAdministrable();
+ case Editor:
+ return rights.isEditable();
+ case Viewer:
+ return rights.isVisible();
+ }
+ return false;
+ }
+
+ public static boolean isMember(final AccessRights newRights) {
+ return newRights.isAdministrable() || newRights.isEditable();
+ }
+
+ private RolComparator() {
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/SocialNetworkPresenter.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/SocialNetworkPresenter.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/SocialNetworkPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,329 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.oldsn;
+
+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.ui.ButtonDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
+import org.ourproject.kune.platf.client.ui.MenuItem;
+import org.ourproject.kune.platf.client.ui.MenuItemCollection;
+import org.ourproject.kune.platf.client.ui.gridmenu.CustomMenu;
+import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
+import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
+
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.services.FileConstants;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.AccessRightsClientManager;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.domain.utils.AccessRights;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.events.Listener;
+import com.google.inject.Provider;
+
+public class SocialNetworkPresenter {
+
+ private static final String MEMBERS_BOTTON = "members_bottom";
+
+ protected MenuItem<GroupDTO> acceptJoinGroupMenuItem;
+ protected final ActionToolbarPosition buddiesBottom = new ActionToolbarPosition("sn-bottomtoolbar");
+ protected MenuItem<GroupDTO> changeToAdminMenuItem;
+ protected MenuItem<GroupDTO> changeToCollabMenuItem;
+ protected MenuItem<GroupDTO> denyJoinGroupMenuItem;
+ private final Provider<FileDownloadUtils> downloadProvider;
+ protected MenuItem<GroupDTO> gotoGroupMenuItem;
+ protected MenuItem<GroupDTO> gotoMemberMenuItem;
+ private final I18nTranslationService i18n;
+ private final IconResources imgResources;
+ protected final ActionToolbarPosition membersBottom = new ActionToolbarPosition("sn-bottomtoolbar");
+ private MenuDescriptor menuOptions;
+ private final MenuItemCollection<GroupDTO> otherLoggedOperations;
+ private final MenuItemCollection<GroupDTO> otherLoggedOperationsUsers;
+ private final MenuItemCollection<GroupDTO> otherOperations;
+ private final MenuItemCollection<GroupDTO> otherOperationsUsers;
+ protected ActionToolbarButtonDescriptor<StateToken> participate;
+ protected MenuItem<GroupDTO> removeMemberMenuItem;
+ private final AccessRightsClientManager rightsManager;
+ private final Session session;
+ private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+ private final StateManager stateManager;
+ protected ActionToolbarMenuDescriptor<StateToken> unJoin;
+
+ protected MenuItem<GroupDTO> unJoinMenuItem;
+
+ public SocialNetworkPresenter(final I18nTranslationService i18n, final StateManager stateManager,
+ final AccessRightsClientManager rightsManager, final Session session,
+ final Provider<SocialNetworkServiceAsync> snServiceProvider, final GroupActionRegistry groupActionRegistry,
+ final Provider<FileDownloadUtils> downloadProvider, final IconResources imgResources) {
+ this.i18n = i18n;
+ this.stateManager = stateManager;
+ this.rightsManager = rightsManager;
+ this.session = session;
+ this.snServiceProvider = snServiceProvider;
+ this.downloadProvider = downloadProvider;
+ this.imgResources = imgResources;
+ createButtons();
+ createMenuActions();
+ otherOperationsUsers = new MenuItemCollection<GroupDTO>();
+ otherLoggedOperationsUsers = new MenuItemCollection<GroupDTO>();
+ otherOperations = new MenuItemCollection<GroupDTO>();
+ otherLoggedOperations = new MenuItemCollection<GroupDTO>();
+ }
+
+ public void addGroupOperation(final MenuItem<GroupDTO> operation, final boolean mustBeLogged) {
+ MenuItemCollection<GroupDTO> collection;
+ collection = mustBeLogged ? otherLoggedOperations : otherOperations;
+ collection.add(operation);
+ }
+
+ public void addUserOperation(final MenuItem<GroupDTO> operation, final boolean mustBeLogged) {
+ MenuItemCollection<GroupDTO> collection;
+ collection = mustBeLogged ? otherLoggedOperationsUsers : otherOperationsUsers;
+ collection.add(operation);
+ }
+
+ private void createButtons() {
+ final ParticipateAction participateAction = new ParticipateAction(session, snServiceProvider, stateManager,
+ rightsManager, i18n, imgResources);
+ final ButtonDescriptor participateBtn = new ButtonDescriptor(participateAction);
+ participateBtn.setLocation(MEMBERS_BOTTON);
+
+ menuOptions = new MenuDescriptor(i18n.t("Options"));
+
+ final UnjoinButtonAction unjoinAction = new UnjoinButtonAction(session, snServiceProvider, stateManager, rightsManager,
+ i18n, imgResources) {
+ @Override
+ public String getGroupName() {
+ return session.getContainerState().getGroup().getShortName();
+ }
+ };
+
+ final OldMenuItemDescriptor unjoinBtn = new OldMenuItemDescriptor(menuOptions, unjoinAction);
+ unjoinBtn.setLocation(MEMBERS_BOTTON);
+ }
+
+ private GridItem<GroupDTO> createDefMemberMenu(final GroupDTO group, final GridGroup gridGroup) {
+ final CustomMenu<GroupDTO> menu = new CustomMenu<GroupDTO>(group);
+ final String longName = group.getLongName();
+ final boolean hasLogo = group.hasLogo();
+ final String toolTip = createTooltipWithLogo(group.getShortName(), group.getStateToken(), hasLogo,
+ group.isPersonal());
+ final String imageHtml = downloadProvider.get().getLogoAvatarHtml(group.getStateToken(), hasLogo,
+ group.isPersonal(), session.getImgIconsize(), 0);
+ final GridItem<GroupDTO> gridItem = new GridItem<GroupDTO>(group, gridGroup, group.getShortName(), imageHtml,
+ longName, longName, " ", longName, toolTip, menu);
+ if (!group.isPersonal()) {
+ menu.addMenuItemList(otherOperations);
+ }
+ if (session.isLogged() && !group.isPersonal()) {
+ menu.addMenuItemList(otherLoggedOperations);
+ }
+ if (group.isPersonal()) {
+ menu.addMenuItemList(otherOperationsUsers);
+ }
+ if (session.isLogged() && group.isPersonal()) {
+ menu.addMenuItemList(otherLoggedOperationsUsers);
+ }
+
+ return gridItem;
+ }
+
+ protected GridItem<GroupDTO> createGridItem(final GridGroup groupCategory, final GroupDTO group,
+ final AccessRights rights, final MenuItem<GroupDTO>... gridMenuItems) {
+ final GridItem<GroupDTO> gridItem = createDefMemberMenu(group, groupCategory);
+ final CustomMenu<GroupDTO> menu = gridItem.getMenu();
+ if (rights.isAdministrable()) {
+ for (final MenuItem<GroupDTO> item : gridMenuItems) {
+ menu.addMenuItem(item);
+ }
+ }
+ return gridItem;
+ }
+
+ private void createMenuActions() {
+ gotoGroupMenuItem = new MenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this group homepage"),
+ new Listener<GroupDTO>() {
+ @Override
+ public void onEvent(final GroupDTO groupDTO) {
+ stateManager.gotoToken(groupDTO.getShortName());
+ }
+ });
+ gotoMemberMenuItem = new MenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this member homepage"),
+ new Listener<GroupDTO>() {
+ @Override
+ public void onEvent(final GroupDTO groupDTO) {
+ stateManager.gotoToken(groupDTO.getShortName());
+ }
+ });
+
+ unJoinMenuItem = new MenuItem<GroupDTO>("images/del.gif", i18n.t("Do not participate anymore in this group"),
+ new Listener<GroupDTO>() {
+ @Override
+ public void onEvent(final GroupDTO groupDTO) {
+ removeMemberAction(groupDTO);
+ }
+ });
+ changeToCollabMenuItem = new MenuItem<GroupDTO>("images/arrow-down-green.gif",
+ i18n.t("Change to collaborator"), new Listener<GroupDTO>() {
+ @Override
+ public void onEvent(final GroupDTO group) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().setAdminAsCollab(session.getUserHash(),
+ session.getCurrentState().getStateToken(), group.getShortName(),
+ new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member type changed"));
+ stateManager.setSocialNetwork(result);
+ }
+ });
+ }
+ });
+ removeMemberMenuItem = new MenuItem<GroupDTO>("images/del.gif", i18n.t("Remove this member"),
+ new Listener<GroupDTO>() {
+ @Override
+ public void onEvent(final GroupDTO group) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().deleteMember(session.getUserHash(),
+ session.getCurrentState().getStateToken(), group.getShortName(),
+ new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member removed"));
+ stateManager.reload();
+ // in the
+ // future,
+ // only if
+ // I cannot
+ // be
+ // affected:
+ // snService.stateManager.reloadSocialNetwork((SocialNetworkResultDTO)
+ // result);
+ }
+ });
+ }
+ });
+ changeToAdminMenuItem = new MenuItem<GroupDTO>("images/arrow-up-green.gif", i18n.t("Change to admin"),
+ new Listener<GroupDTO>() {
+ @Override
+ public void onEvent(final GroupDTO group) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().setCollabAsAdmin(session.getUserHash(),
+ session.getCurrentState().getStateToken(), group.getShortName(),
+ new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member type changed"));
+ stateManager.setSocialNetwork(result);
+ }
+ });
+ }
+ });
+ acceptJoinGroupMenuItem = new MenuItem<GroupDTO>("images/accept.gif", i18n.t("Accept this member"),
+ new Listener<GroupDTO>() {
+ @Override
+ public void onEvent(final GroupDTO group) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().acceptJoinGroup(session.getUserHash(),
+ session.getCurrentState().getStateToken(), group.getShortName(),
+ new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member accepted"));
+ stateManager.setSocialNetwork(result);
+ }
+ });
+ }
+ });
+ denyJoinGroupMenuItem = new MenuItem<GroupDTO>("images/cancel.gif", i18n.t("Reject this member"),
+ new Listener<GroupDTO>() {
+ @Override
+ public void onEvent(final GroupDTO group) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().denyJoinGroup(session.getUserHash(),
+ session.getCurrentState().getStateToken(), group.getShortName(),
+ new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Member rejected"));
+ stateManager.setSocialNetwork(result);
+ }
+ });
+ }
+ });
+ }
+
+ protected String createTooltipWithLogo(final String shortName, final StateToken token, final boolean hasLogo,
+ final boolean isPersonal) {
+ return "<table><tr><td>"
+ + (hasLogo ? downloadProvider.get().getLogoAvatarHtml(token, hasLogo, isPersonal,
+ FileConstants.LOGO_DEF_HEIGHT, 3) : "") + "</td><td>"
+ + i18n.t(isPersonal ? "Nickname: [%s]" : "Group short name: [%s]", shortName) + "</td></tr></table>";
+ }
+
+ public void onDoubleClick(final String groupShortName) {
+ stateManager.gotoToken(groupShortName);
+ }
+
+ public void removeGroupOperation(final MenuItem<GroupDTO> operation, final boolean mustBeLogged) {
+ MenuItemCollection<GroupDTO> collection;
+ collection = mustBeLogged ? otherLoggedOperations : otherOperations;
+ collection.remove(operation);
+ }
+
+ private void removeMemberAction(final GroupDTO groupDTO) {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().unJoinGroup(session.getUserHash(), new StateToken(groupDTO.getShortName()),
+ new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Removed as member"));
+ stateManager.reload();
+ // in the future with user
+ // info:
+ // services.stateManager.reloadSocialNetwork((SocialNetworkResultDTO)
+ // result);
+ }
+ });
+ }
+
+ public void removeUserOperation(final MenuItem<GroupDTO> operation, final boolean mustBeLogged) {
+ MenuItemCollection<GroupDTO> collection;
+ collection = mustBeLogged ? otherLoggedOperationsUsers : otherOperationsUsers;
+ collection.remove(operation);
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UIStatus.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UIStatus.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UIStatus.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UIStatus.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,82 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn;
+
+public class UIStatus {
+
+ private boolean visible;
+ private boolean enabled;
+
+ public UIStatus(final boolean visible, final boolean enabled) {
+ this.visible = visible;
+ this.enabled = enabled;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final UIStatus other = (UIStatus) obj;
+ if (enabled != other.enabled) {
+ return false;
+ }
+ if (visible != other.visible) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (enabled ? 1231 : 1237);
+ result = prime * result + (visible ? 1231 : 1237);
+ return result;
+ }
+
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ public boolean isVisible() {
+ return visible;
+ }
+
+ public void setEnabled(final boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ public void setVisible(final boolean visible) {
+ this.visible = visible;
+ }
+
+ @Override
+ public String toString() {
+ return "(v: " + visible + ", e:" + enabled + ")";
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UnjoinButtonAction.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UnjoinAction.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UnjoinButtonAction.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UnjoinButtonAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,82 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.actions.ActionEvent;
+
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.common.client.utils.OnAcceptCallback;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.state.AccessRightsClientManager;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Provider;
+
+public class UnjoinButtonAction extends RolAction {
+ private String groupName;
+ private final Provider<SocialNetworkServiceAsync> snServiceProvider;
+
+ public UnjoinButtonAction(final Session session, final Provider<SocialNetworkServiceAsync> snServiceProvider,
+ final StateManager stateManager, final AccessRightsClientManager rightsManager,
+ final I18nTranslationService i18n, final IconResources imgResources) {
+ super(session, stateManager, rightsManager, i18n, AccessRolDTO.Editor, i18n.t("Leave this group"),
+ i18n.t("Do not participate anymore in this group"), imgResources.delGreen());
+ this.snServiceProvider = snServiceProvider;
+ super.setVisible(true, false);
+ super.setMustBeAuthenticated(true);
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ NotifyUser.askConfirmation(i18n.t("Leave this group"), i18n.t("Are you sure?"), new OnAcceptCallback() {
+ @Override
+ public void onSuccess() {
+ NotifyUser.showProgressProcessing();
+ snServiceProvider.get().unJoinGroup(session.getUserHash(), new StateToken(getGroupName()),
+ new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ @Override
+ public void onSuccess(final SocialNetworkDataDTO result) {
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Removed as member"));
+ stateManager.reload();
+ // in the future with user info:
+ // stateManager.reloadSocialNetwork((SocialNetworkResultDTO)
+ // result);
+ }
+ });
+ }
+ });
+ }
+
+ public String getGroupName() {
+ return groupName;
+ }
+
+ public void setGroupName(final String groupName) {
+ this.groupName = groupName;
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UserActionRegistry.java (from rev 1239, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserActionRegistry.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UserActionRegistry.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/UserActionRegistry.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,33 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.oldsn;
+
+import org.ourproject.kune.platf.client.actions.ActionRegistry;
+
+import cc.kune.core.shared.dto.UserSimpleDTO;
+
+/**
+ * The Class UserActionRegistry.
+ *
+ * List of actions over a user (initially used for buddies actions)
+ *
+ */
+public class UserActionRegistry extends ActionRegistry<UserSimpleDTO> {
+}
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/other/AddAsBuddieHeaderButton.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/other/AddAsBuddieHeaderButton.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/other/AddAsBuddieHeaderButton.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,103 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn.other;
+
+import org.ourproject.kune.chat.client.ChatEngine;
+import org.ourproject.kune.platf.client.actions.OldAbstractAction;
+import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
+import org.ourproject.kune.platf.client.actions.Action;
+import org.ourproject.kune.platf.client.actions.ActionEvent;
+import org.ourproject.kune.platf.client.actions.PropertyChangeEvent;
+import org.ourproject.kune.platf.client.actions.PropertyChangeListener;
+import org.ourproject.kune.platf.client.actions.ui.ButtonDescriptor;
+import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
+import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
+
+import cc.kune.core.client.resources.icons.IconConstants;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.events.Listener;
+import com.calclab.suco.client.events.Listener0;
+import com.calclab.suco.client.ioc.Provider;
+
+public class AddAsBuddieHeaderButton {
+
+ public static class AddAsBuddieAction extends AbstractExtendedAction {
+ private final Provider<ChatEngine> chatEngine;
+ private final Session session;
+
+ public AddAsBuddieAction(final Provider<ChatEngine> chatEngine, final Session session,
+ final StateManager stateManager, final I18nTranslationService i18n, final IconResources img) {
+ super();
+ this.chatEngine = chatEngine;
+ this.session = session;
+ stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
+ public void onEvent(final StateAbstractDTO state) {
+ setState(state);
+ }
+ });
+ chatEngine.get().addOnRosterChanged(new Listener0() {
+ public void onEvent() {
+ setState(session.getCurrentState());
+ }
+ });
+ putValue(Action.NAME, i18n.t("Add as a buddie"));
+ putValue(Action.SMALL_ICON, IconConstants.toPath(img.addGreen()));
+ }
+
+ public void actionPerformed(final ActionEvent event) {
+ chatEngine.get().addNewBuddie(session.getCurrentState().getGroup().getShortName());
+ NotifyUser.info("Added as buddie. Waiting buddie response");
+ setEnabled(false);
+ }
+
+ private void setState(final StateAbstractDTO state) {
+ final String groupName = state.getGroup().getShortName();
+ final boolean isPersonal = state.getGroup().isPersonal();
+ final boolean isLogged = session.isLogged();
+ if (isLogged && isPersonal && (!chatEngine.get().isBuddie(groupName))
+ && (!session.getCurrentUser().getShortName().equals(groupName))) {
+ setEnabled(true);
+ } else {
+ setEnabled(false);
+ }
+ }
+ }
+
+ public AddAsBuddieHeaderButton(final Provider<ChatEngine> chatEngine, final Session session,
+ final StateManager stateManager, final I18nTranslationService i18n, final IconResources img,
+ final EntityHeader entityHeader) {
+ final AddAsBuddieAction buddieAction = new AddAsBuddieAction(chatEngine, session, stateManager, i18n, img);
+ final ButtonDescriptor button = new ButtonDescriptor(buddieAction);
+ button.setVisible(false);
+ buddieAction.addPropertyChangeListener(new PropertyChangeListener() {
+ public void propertyChange(final PropertyChangeEvent event) {
+ if (event.getPropertyName().equals(OldAbstractAction.ENABLED)) {
+ button.setVisible((Boolean) event.getNewValue());
+ }
+ }
+ });
+ entityHeader.addAction(button);
+ }
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/other/AddAsBuddieHeaderButton.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionBuddiesSummaryToolbar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionBuddiesSummaryToolbar.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionBuddiesSummaryToolbar.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn.toolbar;
+
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
+
+import cc.kune.core.shared.dto.UserSimpleDTO;
+
+public interface ActionBuddiesSummaryToolbar extends ActionToolbar<UserSimpleDTO> {
+
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionBuddiesSummaryToolbar.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionBuddiesSummaryToolbarPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionBuddiesSummaryToolbarPresenter.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionBuddiesSummaryToolbarPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,34 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn.toolbar;
+
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
+
+import cc.kune.core.shared.dto.UserSimpleDTO;
+
+public class ActionBuddiesSummaryToolbarPresenter extends ActionToolbarPresenter<UserSimpleDTO> implements
+ ActionBuddiesSummaryToolbar {
+
+ public ActionBuddiesSummaryToolbarPresenter(ActionToolbarView<UserSimpleDTO> toolbar) {
+ super(toolbar);
+ }
+
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionBuddiesSummaryToolbarPresenter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionGroupSummaryToolbar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionGroupSummaryToolbar.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionGroupSummaryToolbar.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn.toolbar;
+
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
+
+import cc.kune.core.shared.domain.utils.StateToken;
+
+public interface ActionGroupSummaryToolbar extends ActionToolbar<StateToken> {
+
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionGroupSummaryToolbar.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionGroupSummaryToolbarPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionGroupSummaryToolbarPresenter.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionGroupSummaryToolbarPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,33 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn.toolbar;
+
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
+
+import cc.kune.core.shared.domain.utils.StateToken;
+
+public class ActionGroupSummaryToolbarPresenter extends ActionToolbarPresenter<StateToken> implements
+ ActionGroupSummaryToolbar {
+
+ public ActionGroupSummaryToolbarPresenter(ActionToolbarView<StateToken> toolbar) {
+ super(toolbar);
+ }
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionGroupSummaryToolbarPresenter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionParticipationSummaryToolbarPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionParticipationSummaryToolbarPresenter.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionParticipationSummaryToolbarPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,34 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn.toolbar;
+
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPresenter;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
+
+import cc.kune.core.shared.domain.utils.StateToken;
+
+public class ActionParticipationSummaryToolbarPresenter extends ActionToolbarPresenter<StateToken> implements
+ ActionParticipationToolbar {
+
+ public ActionParticipationSummaryToolbarPresenter(ActionToolbarView<StateToken> toolbar) {
+ super(toolbar);
+ }
+
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionParticipationSummaryToolbarPresenter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionParticipationToolbar.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionParticipationToolbar.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionParticipationToolbar.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.oldsn.toolbar;
+
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
+
+import cc.kune.core.shared.domain.utils.StateToken;
+
+public interface ActionParticipationToolbar extends ActionToolbar<StateToken> {
+
+}
Property changes on: trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/toolbar/ActionParticipationToolbar.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.workspace.client.options;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
import org.ourproject.kune.platf.client.app.GroupOptionsCollection;
import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
@@ -47,7 +47,7 @@
}
@Override
- public void addAction(final GuiActionDescrip descriptor) {
+ public void addAction(final OldGuiActionDescrip descriptor) {
entityHeader.addAction(descriptor);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,10 +19,10 @@
*/
package org.ourproject.kune.workspace.client.options;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
public interface GroupOptionsView extends EntityOptionsView {
- void addAction(GuiActionDescrip descriptor);
+ void addAction(OldGuiActionDescrip descriptor);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -22,7 +22,7 @@
import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
import org.ourproject.kune.platf.client.actions.Action;
import org.ourproject.kune.platf.client.actions.ActionEvent;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
import org.ourproject.kune.workspace.client.sitebar.siteusermenu.SiteUserOptions;
@@ -73,7 +73,7 @@
};
userPrefsAction.putValue(Action.NAME, i18n.t("Your preferences"));
userPrefsAction.putValue(Action.SMALL_ICON, img.prefs());
- final MenuItemDescriptor prefsItem = new MenuItemDescriptor(userPrefsAction);
+ final OldMenuItemDescriptor prefsItem = new OldMenuItemDescriptor(userPrefsAction);
prefsItem.setPosition(1);
userOptions.addAction(prefsItem);
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,12 +20,12 @@
package org.ourproject.kune.workspace.client.options.logo;
import org.ourproject.kune.platf.client.ui.dialogs.DefaultFormUtils;
-import org.ourproject.kune.platf.client.ui.download.FileConstants;
import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
import org.ourproject.kune.workspace.client.options.EntityOptionsView;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import cc.kune.core.client.resources.CoreMessages;
+import cc.kune.core.client.services.FileConstants;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.gwtext.client.core.Connection;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,9 +19,9 @@
*/
package org.ourproject.kune.workspace.client.options.logo;
-import org.ourproject.kune.platf.client.ui.download.FileConstants;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import cc.kune.core.client.services.FileConstants;
import cc.kune.core.shared.i18n.I18nTranslationService;
public class GroupOptionsLogoPanel extends EntityOptionsLogoPanel {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,9 +19,9 @@
*/
package org.ourproject.kune.workspace.client.options.logo;
-import org.ourproject.kune.platf.client.ui.download.FileConstants;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import cc.kune.core.client.services.FileConstants;
import cc.kune.core.shared.i18n.I18nTranslationService;
public class UserOptionsLogoPanel extends EntityOptionsLogoPanel {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,15 +19,15 @@
*/
package org.ourproject.kune.workspace.client.options.pscape;
-import org.ourproject.kune.platf.client.ui.BasicThumb;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
-import org.ourproject.kune.platf.client.ui.download.ImageSize;
import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
import org.ourproject.kune.workspace.client.options.EntityOptionsView;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
import org.ourproject.kune.workspace.client.themes.WsThemeSelector;
+import cc.kune.common.client.ui.BasicThumb;
import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.services.ImageSize;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.i18n.I18nTranslationService;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -21,8 +21,8 @@
import org.ourproject.kune.platf.client.services.SearcherConstants;
import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.LinkDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearchPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearchPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearchPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,8 +19,8 @@
*/
package org.ourproject.kune.workspace.client.search;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.shared.i18n.I18nTranslationService;
public class GroupLiveSearchPanel extends EntityLiveSearcherPanel {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcherPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcherPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcherPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,8 +19,8 @@
*/
package org.ourproject.kune.workspace.client.search;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.shared.i18n.I18nTranslationService;
public class UserLiveSearcherPanel extends EntityLiveSearcherPanel {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -24,9 +24,9 @@
import org.ourproject.kune.platf.client.actions.Action;
import org.ourproject.kune.platf.client.actions.ActionEvent;
import org.ourproject.kune.platf.client.actions.ui.AbstractActionExtensiblePresenter;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuSeparatorDescriptor;
import cc.kune.common.client.ui.KuneWindowUtils;
@@ -49,7 +49,7 @@
}
@Override
- public void addAction(final GuiActionDescrip descriptor) {
+ public void addAction(final OldGuiActionDescrip descriptor) {
descriptor.setParent(menuDescriptor);
view.addAction(descriptor);
}
@@ -76,7 +76,7 @@
};
bugsAction.putValue(Action.NAME, i18n.t("Report Kune issues/problems"));
bugsAction.putValue(Action.SMALL_ICON, img.bug());
- final MenuItemDescriptor item = new MenuItemDescriptor(bugsAction);
+ final OldMenuItemDescriptor item = new OldMenuItemDescriptor(bugsAction);
addAction(item);
// final KeyStroke shortcut = Shortcut.getShortcut(true, true, false,
@@ -90,6 +90,6 @@
aboutAction.putValue(Action.SMALL_ICON, img.kuneIcon16());
// aboutAction.setShortcut(shortcut);
// shortcutReg.put(shortcut, aboutAction);
- addAction(new MenuItemDescriptor(aboutAction));
+ addAction(new OldMenuItemDescriptor(aboutAction));
}
}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -27,13 +27,13 @@
import org.ourproject.kune.platf.client.actions.ActionEvent;
import org.ourproject.kune.platf.client.actions.common.GotoGroupAction;
import org.ourproject.kune.platf.client.actions.ui.AbstractActionExtensiblePresenter;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
import cc.kune.core.client.resources.CoreMessages;
import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.dto.GroupDTO;
@@ -80,7 +80,7 @@
}
@Override
- public void addAction(final GuiActionDescrip descriptor) {
+ public void addAction(final OldGuiActionDescrip descriptor) {
descriptor.setParent(menuDescriptor);
view.addAction(descriptor);
}
@@ -99,7 +99,7 @@
: "images/group-def-icon.gif";
final GotoGroupAction gotoGroupAction = new GotoGroupAction(logoImageUrl, group.getShortName(),
group.getLongName(), stateManager);
- view.addAction(new MenuItemDescriptor(partiMenu, gotoGroupAction));
+ view.addAction(new OldMenuItemDescriptor(partiMenu, gotoGroupAction));
}
private void createActions() {
@@ -118,7 +118,7 @@
};
userHomeAction.putValue(Action.NAME, i18n.t(CoreMessages.YOUR_HOMEPAGE));
userHomeAction.putValue(Action.SMALL_ICON, img.groupHome());
- final MenuItemDescriptor item = new MenuItemDescriptor(userHomeAction);
+ final OldMenuItemDescriptor item = new OldMenuItemDescriptor(userHomeAction);
item.setPosition(0);
addAction(item);
}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummary.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummary.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummary.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,24 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.socialnet;
-
-
-public interface BuddiesSummary {
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,133 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.socialnet;
-
-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.MenuItemsContainer;
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
-import org.ourproject.kune.platf.client.ui.AbstractToolbar;
-import org.ourproject.kune.platf.client.ui.BasicThumb;
-import org.ourproject.kune.workspace.client.skel.SummaryPanel;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
-import cc.kune.core.client.resources.CoreMessages;
-import cc.kune.core.shared.dto.UserSimpleDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.events.Listener;
-import com.google.gwt.dom.client.Element;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-import com.gwtext.client.widgets.menu.Menu;
-
-public class BuddiesSummaryPanel extends SummaryPanel implements BuddiesSummaryView {
-
- private final MenuItemsContainer<UserSimpleDTO> menuItemsContainer;
- private final FlowPanel flowPanel;
- private final Label otherBuddiesLabel;
- private final I18nTranslationService i18n;
- private final ActionManager actionManager;
- private final AbstractToolbar toolbar;
- private final Label noBuddiesPublic;
-
- public BuddiesSummaryPanel(final BuddiesSummaryPresenter presenter, final WorkspaceSkeleton ws,
- final I18nTranslationService i18n, final ActionManager actionManager,
- final ActionToolbarView<UserSimpleDTO> actionToolbarView) {
- super(i18n.t("Buddies"), i18n.t("This user buddies"), ws);
- this.actionManager = actionManager;
- menuItemsContainer = new MenuItemsContainer<UserSimpleDTO>();
- this.i18n = i18n;
- final VerticalPanel vp = new VerticalPanel();
- flowPanel = new FlowPanel();
- otherBuddiesLabel = new Label();
- otherBuddiesLabel.addStyleName("kune-Margin-Small-trbl");
- vp.add(flowPanel);
- vp.add(otherBuddiesLabel);
- toolbar = ((ActionToolbarPanel<UserSimpleDTO>) actionToolbarView).getToolbar();
- toolbar.setBlankStyle();
- vp.add((Widget) toolbar);
- super.add(vp);
- addInSummary();
- noBuddiesPublic = new Label(i18n.t(CoreMessages.BUDDIES_NOT_PUBLIC));
- noBuddiesPublic.addStyleName("kune-Margin-7-trbl");
- noBuddiesPublic.addStyleName("k-text-gray");
- }
-
- public void addBuddie(final UserSimpleDTO user, final ActionItemCollection<UserSimpleDTO> actionCollection,
- final String avatarUrl, final String tooltipTitle, final String tooltip) {
- final ClickHandler listener = new ClickHandler() {
- public void onClick(final ClickEvent event) {
- final Element sender = event.getRelativeElement();
- final Menu menu = menuItemsContainer.get(user.getShortName());
- if (menu.getItems().length > 0) {
- menu.showAt(sender.getAbsoluteLeft(), sender.getAbsoluteTop() + 5);
- }
- }
- };
- menuItemsContainer.createItemMenu(user.getShortName(), actionCollection,
- new Listener<ActionItem<UserSimpleDTO>>() {
- public void onEvent(final ActionItem<UserSimpleDTO> actionItem) {
- doAction(actionItem);
- }
- });
-
- final BasicThumb thumb = new BasicThumb(avatarUrl.equals(NOAVATAR) ? "images/persons/person2-32.png"
- : avatarUrl, AVATARSIZE, user.getShortName(), AVATARLABELMAXSIZE, false, listener);
- thumb.setTooltip(tooltipTitle, tooltip);
- flowPanel.add(thumb);
- }
-
- @Override
- public void clear() {
- flowPanel.clear();
- clearOtherUsers();
- menuItemsContainer.clear();
- toolbar.removeAll();
- super.doLayoutIfNeeded();
- }
-
- public void clearOtherUsers() {
- otherBuddiesLabel.setText("");
- }
-
- public void setNoBuddies() {
- otherBuddiesLabel.setText(i18n.t("This user has no buddies"));
- }
-
- public void setOtherUsers(final String text) {
- otherBuddiesLabel.setText(text);
- }
-
- public void showBuddiesNotVisible() {
- flowPanel.add(noBuddiesPublic);
- super.doLayoutIfNeeded();
- }
-
- private void doAction(final ActionItem<UserSimpleDTO> actionItem) {
- actionManager.doAction(actionItem);
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,239 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.socialnet;
-
-import java.util.List;
-
-import org.ourproject.kune.chat.client.ChatEngine;
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.ActionEnableCondition;
-import org.ourproject.kune.platf.client.actions.ActionMenuItemDescriptor;
-import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
-import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
-import org.ourproject.kune.platf.client.actions.RadioMustBeChecked;
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
-import org.ourproject.kune.platf.client.services.ImageUtils;
-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 cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
-import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
-import cc.kune.core.client.rpcservices.UserServiceAsync;
-import cc.kune.core.client.state.AccessRightsClientManager;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.UserBuddiesVisibility;
-import cc.kune.core.shared.domain.utils.AccessRights;
-import cc.kune.core.shared.dto.AccessRolDTO;
-import cc.kune.core.shared.dto.SocialNetworkDataDTO;
-import cc.kune.core.shared.dto.StateAbstractDTO;
-import cc.kune.core.shared.dto.UserBuddiesDataDTO;
-import cc.kune.core.shared.dto.UserSimpleDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
-
-public class BuddiesSummaryPresenter extends SocialNetworkPresenter implements BuddiesSummary {
-
- public static final String BUDDIES_VISIBILITY_GROUP = "k-bsp-bud-visib";
-
- private BuddiesSummaryView view;
- private final StateManager stateManager;
- private final UserActionRegistry actionRegistry;
- private final I18nTranslationService i18n;
- private final Provider<ChatEngine> chatEngineProvider;
- private final Session session;
- private final ActionBuddiesSummaryToolbar toolbar;
- private final Provider<UserServiceAsync> userServiceAsync;
- private final Provider<FileDownloadUtils> fileDownUtilsProvider;
-
- public BuddiesSummaryPresenter(final StateManager stateManager, final Session session,
- final Provider<UserServiceAsync> userServiceAsync, final UserActionRegistry actionRegistry,
- final I18nTranslationService i18n, final Provider<ChatEngine> chatEngineProvider,
- final ActionBuddiesSummaryToolbar toolbar, final Provider<FileDownloadUtils> fileDownUtilsProvider,
- final ImageUtils imageUtils, final Provider<SocialNetworkServiceAsync> snServiceAsync,
- final GroupActionRegistry groupActionRegistry, final AccessRightsClientManager accessRightManager,
- final IconResources img) {
- super(i18n, stateManager, accessRightManager, session, snServiceAsync, groupActionRegistry,
- fileDownUtilsProvider, img);
- this.stateManager = stateManager;
- this.session = session;
- this.userServiceAsync = userServiceAsync;
- this.actionRegistry = actionRegistry;
- this.i18n = i18n;
- this.chatEngineProvider = chatEngineProvider;
- this.toolbar = toolbar;
- this.fileDownUtilsProvider = fileDownUtilsProvider;
- stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
- @Override
- public void onEvent(final StateAbstractDTO state) {
- setState(state);
- }
- });
- stateManager.onSocialNetworkChanged(new Listener<StateAbstractDTO>() {
- @Override
- public void onEvent(final StateAbstractDTO state) {
- setState(state);
- }
- });
- registerActions();
- }
-
- public View getView() {
- return view;
- }
-
- public void init(final BuddiesSummaryView view) {
- this.view = view;
- }
-
- protected void setState(final StateAbstractDTO state) {
- if (state.getGroup().isPersonal()) {
- view.clear();
- final UserBuddiesDataDTO userBuddies = state.getUserBuddies();
- if (state.getSocialNetworkData().isBuddiesVisible()) {
- final List<UserSimpleDTO> buddies = userBuddies.getBuddies();
- for (final UserSimpleDTO user : buddies) {
- final String avatarUrl = user.hasLogo() ? fileDownUtilsProvider.get().getLogoImageUrl(
- user.getStateToken()) : BuddiesSummaryView.NOAVATAR;
- final String tooltip = super.createTooltipWithLogo(user.getShortName(), user.getStateToken(),
- user.hasLogo(), true);
- view.addBuddie(user, actionRegistry.getCurrentActions(user, session.isLogged(), new AccessRights(
- true, true, true), false), avatarUrl, user.getName(), tooltip);
- }
- final boolean hasLocalBuddies = buddies.size() > 0;
- final int numExtBuddies = userBuddies.getOtherExtBuddies();
- if (numExtBuddies > 0) {
- if (hasLocalBuddies) {
- // i18n: plural
- view.setOtherUsers(i18n.t(numExtBuddies == 1 ? "and [%d] external user"
- : "and [%d] external users", numExtBuddies));
- } else {
- view.setOtherUsers(i18n.t(numExtBuddies == 1 ? "[%d] external user" : "[%d] external users",
- numExtBuddies));
- }
- } else {
- if (hasLocalBuddies) {
- view.clearOtherUsers();
- } else {
- view.setNoBuddies();
- }
- }
- toolbar.disableMenusAndClearButtons();
- toolbar.addActions(
- actionRegistry.getCurrentActions(session.getCurrentUser(), session.isLogged(),
- state.getGroupRights(), true), ActionToolbar.IN_ANY);
- toolbar.attach();
- view.show();
- } else {
- view.showBuddiesNotVisible();
- view.show();
- }
- } else {
- view.hide();
- }
- }
-
- private void createAddNewBuddiesAction() {
- final ActionToolbarMenuDescriptor<UserSimpleDTO> addNewBuddiesAction = new ActionToolbarMenuDescriptor<UserSimpleDTO>(
- AccessRolDTO.Administrator, buddiesBottom, new Listener<UserSimpleDTO>() {
- @Override
- public void onEvent(final UserSimpleDTO parameter) {
- NotifyUser.info("In development");
- }
- });
- addNewBuddiesAction.setTextDescription(i18n.t("Add a new buddy"));
- addNewBuddiesAction.setParentMenuTitle(i18n.t("Options"));
- addNewBuddiesAction.setIconUrl("images/add-green.gif");
- actionRegistry.addAction(addNewBuddiesAction);
- }
-
- private void createSetBuddiesVisibilityAction(final String textDescription, final UserBuddiesVisibility visibility) {
- final ActionToolbarMenuRadioDescriptor<UserSimpleDTO> buddiesVisibilityAction = new ActionToolbarMenuRadioDescriptor<UserSimpleDTO>(
- AccessRolDTO.Administrator, buddiesBottom, new Listener<UserSimpleDTO>() {
- @Override
- public void onEvent(final UserSimpleDTO parameter) {
- userServiceAsync.get().setBuddiesVisibility(session.getUserHash(),
- session.getCurrentState().getGroup().getStateToken(), visibility,
- new AsyncCallbackSimple<Void>() {
- @Override
- public void onSuccess(final Void result) {
- NotifyUser.info(i18n.t("Buddies visibility changed"));
- }
- });
- }
- }, BUDDIES_VISIBILITY_GROUP, new RadioMustBeChecked() {
- @Override
- public boolean mustBeChecked() {
- final StateAbstractDTO currentState = session.getCurrentState();
- if (currentState.getGroup().isPersonal()) {
- final SocialNetworkDataDTO socialNetworkData = currentState.getSocialNetworkData();
- return socialNetworkData.getUserBuddiesVisibility().equals(visibility);
- }
- return false;
- }
- });
- buddiesVisibilityAction.setTextDescription(textDescription);
- buddiesVisibilityAction.setParentMenuTitle(i18n.t("Options"));
- buddiesVisibilityAction.setParentSubMenuTitle(i18n.t("Those who can view your buddies list"));
- actionRegistry.addAction(buddiesVisibilityAction);
- }
-
- private void registerActions() {
- final ActionMenuItemDescriptor<UserSimpleDTO> addAsBuddie = new ActionMenuItemDescriptor<UserSimpleDTO>(
- AccessRolDTO.Viewer, new Listener<UserSimpleDTO>() {
- @Override
- public void onEvent(final UserSimpleDTO user) {
- chatEngineProvider.get().addNewBuddie(user.getShortName());
- }
- });
- addAsBuddie.setMustBeAuthenticated(true);
- addAsBuddie.setTextDescription(i18n.t("Add as a buddie"));
- addAsBuddie.setIconUrl("images/add-green.png");
- addAsBuddie.setEnableCondition(new ActionEnableCondition<UserSimpleDTO>() {
- @Override
- public boolean mustBeEnabled(final UserSimpleDTO user) {
- return !chatEngineProvider.get().isBuddie(user.getShortName());
- }
- });
- actionRegistry.addAction(addAsBuddie);
-
- final ActionMenuItemDescriptor<UserSimpleDTO> go = new ActionMenuItemDescriptor<UserSimpleDTO>(
- AccessRolDTO.Viewer, new Listener<UserSimpleDTO>() {
- @Override
- public void onEvent(final UserSimpleDTO user) {
- stateManager.gotoToken(user.getShortName());
- }
- });
- go.setMustBeAuthenticated(false);
- go.setTextDescription(i18n.t("Visit this user's homepage"));
- go.setIconUrl("images/group-home.gif");
- actionRegistry.addAction(go);
-
- createAddNewBuddiesAction();
- createSetBuddiesVisibilityAction(i18n.t("anyone"), UserBuddiesVisibility.anyone);
- createSetBuddiesVisibilityAction(i18n.t("only your buddies"), UserBuddiesVisibility.yourbuddies);
- createSetBuddiesVisibilityAction(i18n.t("only you"), UserBuddiesVisibility.onlyyou);
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,49 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.ActionItemCollection;
-
-import cc.kune.core.shared.dto.UserSimpleDTO;
-
-public interface BuddiesSummaryView extends View {
-
- String NOAVATAR = "";
- int AVATARSIZE = 32;
- int AVATARLABELMAXSIZE = 15;
-
- void addBuddie(UserSimpleDTO user, ActionItemCollection<UserSimpleDTO> actionCollection, String avatarUrl,
- String tooltipTitle, String tooltip);
-
- void clear();
-
- void clearOtherUsers();
-
- void hide();
-
- void setNoBuddies();
-
- void setOtherUsers(String text);
-
- void show();
-
- void showBuddiesNotVisible();
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupActionRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupActionRegistry.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupActionRegistry.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,30 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.actions.ActionRegistry;
-
-import cc.kune.core.shared.domain.utils.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/workspace/client/socialnet/GroupMembersSummary.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummary.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummary.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,36 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.ui.MenuItem;
-
-import cc.kune.core.shared.dto.GroupDTO;
-
-public interface GroupMembersSummary {
-
- void addGroupOperation(MenuItem<GroupDTO> operation, boolean mustBeLogged);
-
- void addUserOperation(MenuItem<GroupDTO> operation, boolean mustBeLogged);
-
- void removeGroupOperation(MenuItem<GroupDTO> operation, boolean mustBeLogged);
-
- void removeUserOperation(MenuItem<GroupDTO> operation, boolean mustBeLogged);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,139 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
-import org.ourproject.kune.platf.client.ui.AbstractToolbar;
-import org.ourproject.kune.platf.client.ui.gridmenu.GridDragConfiguration;
-import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
-import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel;
-import org.ourproject.kune.workspace.client.skel.SummaryPanel;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.resources.CoreMessages;
-import cc.kune.core.shared.domain.utils.StateToken;
-import cc.kune.core.shared.dto.GroupDTO;
-
-import com.calclab.suco.client.events.Listener;
-import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.core.client.Scheduler.ScheduledCommand;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.Widget;
-import com.gwtext.client.widgets.BoxComponent;
-import com.gwtext.client.widgets.MessageBox;
-import com.gwtext.client.widgets.event.ContainerListenerAdapter;
-
-public class GroupMembersSummaryPanel extends SummaryPanel implements GroupMembersSummaryView {
- // private static final int MAX_HEIGHT = 110;
- private final GridMenuPanel<GroupDTO> gridMenuPanel;
- private final I18nUITranslationService i18n;
- private final Label noMembersPublic;
- private final GroupMembersSummaryPresenter presenter;
- private final AbstractToolbar toolbar;
-
- public GroupMembersSummaryPanel(final GroupMembersSummaryPresenter presenter, final I18nUITranslationService i18n,
- final WorkspaceSkeleton ws, final ActionToolbarView<StateToken> actionToolbarView) {
- super(i18n.t("Group members"), i18n.t("People and groups collaborating in this group"), ws);
- this.presenter = presenter;
- this.i18n = i18n;
-
- final GridDragConfiguration dragConf = new GridDragConfiguration("kk",
- i18n.t("Drop into the chat area to start a chat.") + "<br/>"
- + i18n.t("Drop into a room to invite the user to join the chat room"));
- gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This is an orphaned project, if you are interested "
- + "please request to join to work on it"), dragConf, true, true, false, true, false);
- final Listener<String> go = new Listener<String>() {
- @Override
- public void onEvent(final String groupShortName) {
- presenter.onDoubleClick(groupShortName);
- }
- };
- // gridMenuPanel.onClick(go);
- gridMenuPanel.onDoubleClick(go);
- gridMenuPanel.getBottomBar().setCls("k-blank-toolbar");
- super.add(gridMenuPanel);
-
- noMembersPublic = new Label(i18n.t(CoreMessages.MEMBERS_NOT_PUBLIC));
- noMembersPublic.addStyleName("kune-Margin-7-trbl");
- noMembersPublic.addStyleName("k-text-gray");
- noMembersPublic.setVisible(false);
- super.add(noMembersPublic);
-
- toolbar = ((ActionToolbarPanel<StateToken>) actionToolbarView).getToolbar();
- toolbar.setBlankStyle();
- super.add((Widget) toolbar);
- super.addInSummary();
- ws.addListenerInEntitySummary(new ContainerListenerAdapter() {
- @Override
- public void onResize(final BoxComponent component, final int adjWidth, final int adjHeight,
- final int rawWidth, final int rawHeight) {
- gridMenuPanel.setWidth(adjWidth);
- }
- });
- }
-
- @Override
- public void addItem(final GridItem<GroupDTO> gridItem) {
- gridMenuPanel.setVisible(true);
- gridMenuPanel.addItem(gridItem);
- doLayoutIfNeeded();
- }
-
- @Override
- public void clear() {
- gridMenuPanel.removeAll();
- toolbar.removeAll();
- noMembersPublic.setVisible(false);
- doLayoutIfNeeded();
- }
-
- @Override
- public void confirmAddCollab(final String groupShortName, final String groupLongName) {
- final String groupName = groupLongName + " (" + groupShortName + ")";
- MessageBox.confirm(i18n.t("Confirm member joining"), i18n.t("Add [%s] as a member?", groupName),
- new MessageBox.ConfirmCallback() {
- @Override
- public void execute(final String btnID) {
- if (btnID.equals("yes")) {
- Scheduler.get().scheduleDeferred(new ScheduledCommand() {
- @Override
- public void execute() {
- presenter.addCollab(groupShortName);
- }
- });
- }
- }
- });
- }
-
- @Override
- public void setDraggable(final boolean draggable) {
- // gridMenuPanel.setDraggable(draggable);
- }
-
- @Override
- public void showMembersNotVisible() {
- noMembersPublic.setVisible(true);
- gridMenuPanel.setVisible(false);
- doLayoutIfNeeded();
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,294 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.socialnet;
-
-import java.util.List;
-
-import org.ourproject.kune.chat.client.ChatEngine;
-import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
-import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
-import org.ourproject.kune.platf.client.actions.RadioMustBeChecked;
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbar;
-import org.ourproject.kune.platf.client.services.ImageDescriptor;
-import org.ourproject.kune.platf.client.services.ImageUtils;
-import org.ourproject.kune.platf.client.ui.MenuItem;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
-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 cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
-import cc.kune.core.client.state.AccessRightsClientManager;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.AdmissionType;
-import cc.kune.core.shared.domain.SocialNetworkVisibility;
-import cc.kune.core.shared.domain.utils.AccessRights;
-import cc.kune.core.shared.domain.utils.StateToken;
-import cc.kune.core.shared.dto.AccessListsDTO;
-import cc.kune.core.shared.dto.AccessRolDTO;
-import cc.kune.core.shared.dto.GroupDTO;
-import cc.kune.core.shared.dto.InitDataDTO;
-import cc.kune.core.shared.dto.LinkDTO;
-import cc.kune.core.shared.dto.SocialNetworkDTO;
-import cc.kune.core.shared.dto.SocialNetworkDataDTO;
-import cc.kune.core.shared.dto.StateAbstractDTO;
-
-import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
-
-public class GroupMembersSummaryPresenter extends SocialNetworkPresenter implements GroupMembersSummary {
-
- public static final String MEMBERS_VISIBILITY_GROUP = "k-gmsp-memb-visib";
- public static final String NEW_MEMBERS_POLICY_GROUP = "k-gmsp-new-memb-pol";
-
- private GroupMembersSummaryView view;
- private final I18nUITranslationService i18n;
- private final GridGroup adminCategory;
- private final GridGroup collabCategory;
- private final GridGroup pendigCategory;
- private final Session session;
- private final Provider<SocialNetworkServiceAsync> snServiceProvider;
- private final StateManager stateManager;
- private final GroupActionRegistry groupActionRegistry;
- private final Provider<GroupLiveSearcher> liveSearcherProvider;
- private final Provider<GroupServiceAsync> groupServiceProvider;
-
- public GroupMembersSummaryPresenter(final I18nUITranslationService i18n, final StateManager stateManager,
- final ImageUtils imageUtils, final Session session,
- final Provider<SocialNetworkServiceAsync> snServiceProvider,
- final Provider<GroupServiceAsync> groupServiceProvider,
- final Provider<GroupLiveSearcher> liveSearcherProvider, final Provider<ChatEngine> chatEngineProvider,
- final GroupActionRegistry groupActionRegistry, final ActionGroupSummaryToolbar toolbar,
- final Provider<FileDownloadUtils> downloadProvider, final AccessRightsClientManager accessRightsManager,
- final IconResources img) {
- super(i18n, stateManager, accessRightsManager, session, snServiceProvider, groupActionRegistry,
- downloadProvider, img);
- this.i18n = i18n;
- this.stateManager = stateManager;
- this.session = session;
- this.snServiceProvider = snServiceProvider;
- this.groupServiceProvider = groupServiceProvider;
- this.liveSearcherProvider = liveSearcherProvider;
- this.groupActionRegistry = groupActionRegistry;
- final Listener<StateAbstractDTO> setStateListener = new Listener<StateAbstractDTO>() {
- @Override
- public void onEvent(final StateAbstractDTO state) {
- setState(state);
- toolbar.disableMenusAndClearButtons();
- toolbar.addActions(groupActionRegistry.getCurrentActions(state.getGroup().getStateToken(),
- session.isLogged(), state.getGroupRights(), true), ActionToolbar.IN_ANY);
- toolbar.attach();
- }
- };
- stateManager.onStateChanged(setStateListener);
- stateManager.onSocialNetworkChanged(setStateListener);
- session.onInitDataReceived(new Listener<InitDataDTO>() {
- @Override
- public void onEvent(final InitDataDTO initData) {
- addUserOperation(new MenuItem<GroupDTO>("images/new-chat.gif", i18n.t("Start a chat with this member"),
- new Listener<GroupDTO>() {
- @Override
- public void onEvent(final GroupDTO group) {
- chatEngineProvider.get().show();
- if (chatEngineProvider.get().isLoggedIn()) {
- chatEngineProvider.get().chat(
- XmppURI.jid(group.getShortName() + "@" + initData.getChatDomain()));
- } else {
- NotifyUser.important(i18n.t("To start a chat you need to be 'online'"));
- }
- }
- }), true);
- }
- });
- final String adminsTitle = i18n.t("Admins");
- final String collabsTitle = i18n.t("Collaborators");
- final String pendingTitle = i18n.t("Pending");
- adminCategory = new GridGroup(adminsTitle, adminsTitle, i18n.t("People that can admin this group"), true);
- collabCategory = new GridGroup(collabsTitle, collabsTitle,
- i18n.t("Other people that collaborate with this group"), true);
- pendigCategory = new GridGroup(pendingTitle, pendingTitle,
- i18n.t("People pending to be accepted in this group by the admins"),
- imageUtils.getImageHtml(ImageDescriptor.alert), true);
- super.addGroupOperation(gotoGroupMenuItem, false);
- super.addUserOperation(gotoMemberMenuItem, false);
- createActions();
- }
-
- public void addCollab(final String groupShortName) {
- NotifyUser.showProgressProcessing();
- snServiceProvider.get().addCollabMember(session.getUserHash(), session.getCurrentState().getStateToken(),
- groupShortName, new AsyncCallbackSimple<SocialNetworkDataDTO>() {
- @Override
- public void onSuccess(final SocialNetworkDataDTO result) {
- NotifyUser.hideProgress();
- NotifyUser.info(i18n.t("Member added as collaborator"));
- stateManager.setSocialNetwork(result);
- }
-
- });
- }
-
- public void init(final GroupMembersSummaryView view) {
- this.view = view;
- }
-
- private void createActions() {
- final ActionToolbarMenuDescriptor<StateToken> addMember = new ActionToolbarMenuDescriptor<StateToken>(
- AccessRolDTO.Administrator, membersBottom, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken parameter) {
- liveSearcherProvider.get().onSelection(new Listener<LinkDTO>() {
- @Override
- public void onEvent(final LinkDTO link) {
- view.confirmAddCollab(link.getShortName(), link.getLongName());
- }
- });
- liveSearcherProvider.get().show();
- }
- });
- addMember.setIconUrl("images/add-green.gif");
- addMember.setTextDescription(i18n.t("Add member"));
- addMember.setToolTip(i18n.t("Add an user or a group as member of this group"));
- addMember.setParentMenuTitle(i18n.t("Options"));
-
- groupActionRegistry.addAction(addMember);
- // groupActionRegistry.addAction(unJoin);
-
- // groupActionRegistry.addAction(participate);
- createSetMembersVisibilityAction(i18n.t("anyone"), SocialNetworkVisibility.anyone);
- createSetMembersVisibilityAction(i18n.t("only members"), SocialNetworkVisibility.onlymembers);
- createSetMembersVisibilityAction(i18n.t("only admins"), SocialNetworkVisibility.onlyadmins);
- createNewMembersPolicyAction(i18n.t("moderate request to join"), AdmissionType.Moderated);
- createNewMembersPolicyAction(i18n.t("auto accept request to join"), AdmissionType.Open);
- }
-
- private void createNewMembersPolicyAction(final String textDescription, final AdmissionType admissionPolicy) {
- final ActionToolbarMenuRadioDescriptor<StateToken> newMembersPolicy = new ActionToolbarMenuRadioDescriptor<StateToken>(
- AccessRolDTO.Administrator, membersBottom, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken parameter) {
- groupServiceProvider.get().setGroupNewMembersJoiningPolicy(session.getUserHash(),
- session.getCurrentState().getGroup().getStateToken(), admissionPolicy,
- new AsyncCallbackSimple<Void>() {
- @Override
- public void onSuccess(final Void result) {
- NotifyUser.info(i18n.t("Members joining policy changed"));
- }
- });
- }
- }, NEW_MEMBERS_POLICY_GROUP, new RadioMustBeChecked() {
- @Override
- public boolean mustBeChecked() {
- final StateAbstractDTO currentState = session.getCurrentState();
- return currentState.getGroup().getAdmissionType().equals(admissionPolicy);
- }
- });
- newMembersPolicy.setTextDescription(textDescription);
- newMembersPolicy.setParentMenuTitle(i18n.t("Options"));
- newMembersPolicy.setParentSubMenuTitle(i18n.t("New members policy"));
- groupActionRegistry.addAction(newMembersPolicy);
- }
-
- private void createSetMembersVisibilityAction(final String textDescription, final SocialNetworkVisibility visibility) {
- final ActionToolbarMenuRadioDescriptor<StateToken> showMembers = new ActionToolbarMenuRadioDescriptor<StateToken>(
- AccessRolDTO.Administrator, membersBottom, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken parameter) {
- groupServiceProvider.get().setSocialNetworkVisibility(session.getUserHash(),
- session.getCurrentState().getGroup().getStateToken(), visibility,
- new AsyncCallbackSimple<Void>() {
- @Override
- public void onSuccess(final Void result) {
- NotifyUser.info(i18n.t("Members visibility changed"));
- }
- });
- }
- }, MEMBERS_VISIBILITY_GROUP, new RadioMustBeChecked() {
- @Override
- public boolean mustBeChecked() {
- final StateAbstractDTO currentState = session.getCurrentState();
- if (!currentState.getGroup().isPersonal()) {
- final SocialNetworkDataDTO socialNetworkData = currentState.getSocialNetworkData();
- return socialNetworkData.getSocialNetworkVisibility().equals(visibility);
- }
- return false;
- }
- });
- showMembers.setTextDescription(textDescription);
- showMembers.setParentMenuTitle(i18n.t("Options"));
- showMembers.setParentSubMenuTitle(i18n.t("Those who can view this member list"));
- groupActionRegistry.addAction(showMembers);
- }
-
- @SuppressWarnings("unchecked")
- private void setGroupMembers(final SocialNetworkDTO socialNetwork, final AccessRights rights) {
- final AccessListsDTO accessLists = socialNetwork.getAccessLists();
-
- final List<GroupDTO> adminsList = accessLists.getAdmins().getList();
- final List<GroupDTO> collabList = accessLists.getEditors().getList();
- final List<GroupDTO> pendingCollabsList = socialNetwork.getPendingCollaborators().getList();
-
- // final int numAdmins = adminsList.size();
-
- final boolean userIsAdmin = rights.isAdministrable();
- final boolean userCanView = rights.isVisible();
-
- view.clear();
-
- view.setDraggable(session.isLogged());
-
- if (userCanView) {
- for (final GroupDTO admin : adminsList) {
- view.addItem(createGridItem(adminCategory, admin, rights, changeToCollabMenuItem, removeMemberMenuItem));
- }
- for (final GroupDTO collab : collabList) {
- view.addItem(createGridItem(collabCategory, collab, rights, changeToAdminMenuItem, removeMemberMenuItem));
- }
- if (userIsAdmin) {
- for (final GroupDTO pendingCollab : pendingCollabsList) {
- view.addItem(createGridItem(pendigCategory, pendingCollab, rights, acceptJoinGroupMenuItem,
- denyJoinGroupMenuItem));
- }
- }
- }
- view.setVisible(true);
- }
-
- private void setState(final StateAbstractDTO state) {
- if (state.getGroup().isPersonal()) {
- view.setVisible(false);
- } else {
- if (state.getSocialNetworkData().isMembersVisible()) {
- setGroupMembers(state.getGroupMembers(), state.getGroupRights());
- } else {
- view.clear();
- view.showMembersNotVisible();
- view.setVisible(true);
- }
- }
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,40 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
-
-import cc.kune.core.shared.dto.GroupDTO;
-
-public interface GroupMembersSummaryView {
-
- void addItem(GridItem<GroupDTO> gridItem);
-
- void clear();
-
- void confirmAddCollab(String groupShortName, String groupLongName);
-
- void setDraggable(boolean draggable);
-
- void setVisible(boolean visible);
-
- void showMembersNotVisible();
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipateAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipateAction.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipateAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,73 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.actions.ActionEvent;
-import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
-
-import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
-import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
-import cc.kune.core.client.state.AccessRightsClientManager;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.dto.AccessRolDTO;
-import cc.kune.core.shared.dto.SocialNetworkRequestResult;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.ioc.Provider;
-
-public class ParticipateAction extends RolAction {
- private final Provider<SocialNetworkServiceAsync> snServiceProvider;
-
- public ParticipateAction(final Session session, final Provider<SocialNetworkServiceAsync> snServiceProvider,
- final StateManager stateManager, final AccessRightsClientManager rightsManager,
- final I18nTranslationService i18n, final IconResources imgResources) {
- super(session, stateManager, rightsManager, i18n, AccessRolDTO.Viewer, i18n.t("Participate"),
- i18n.t("Request to participate in this group"), imgResources.addGreen());
- this.snServiceProvider = snServiceProvider;
- super.setVisible(false, true);
- super.setMustBeAuthenticated(false);
- }
-
- public void actionPerformed(final ActionEvent event) {
- NotifyUser.showProgressProcessing();
- snServiceProvider.get().requestJoinGroup(session.getUserHash(), session.getCurrentState().getStateToken(),
- new AsyncCallbackSimple<SocialNetworkRequestResult>() {
- public void onSuccess(final SocialNetworkRequestResult result) {
- NotifyUser.hideProgress();
- switch ((result)) {
- case accepted:
- NotifyUser.info(i18n.t("You are now member of this group"));
- stateManager.reload();
- break;
- case denied:
- NotifyUser.important(i18n.t("Sorry this is a closed group"));
- break;
- case moderated:
- NotifyUser.info(i18n.t("Membership requested. Waiting for admins decision"));
- break;
- default:
- NotifyUser.info(i18n.t("Programatic error in ParticipateAction"));
- }
- }
- });
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummary.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummary.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummary.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,24 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.socialnet;
-
-public interface ParticipationSummary {
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,80 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView;
-import org.ourproject.kune.platf.client.ui.AbstractToolbar;
-import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
-import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel;
-import org.ourproject.kune.workspace.client.skel.SummaryPanel;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
-import cc.kune.core.shared.domain.utils.StateToken;
-import cc.kune.core.shared.dto.GroupDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.events.Listener;
-import com.google.gwt.user.client.ui.Widget;
-import com.gwtext.client.widgets.BoxComponent;
-import com.gwtext.client.widgets.event.ContainerListenerAdapter;
-
-public class ParticipationSummaryPanel extends SummaryPanel implements ParticipationSummaryView {
-
- private final GridMenuPanel<GroupDTO> gridMenuPanel;
- private final AbstractToolbar toolbar;
-
- public ParticipationSummaryPanel(final ParticipationSummaryPresenter presenter, final I18nTranslationService i18n,
- final WorkspaceSkeleton ws, final ActionToolbarView<StateToken> actionToolbarView) {
- super(i18n.t("Participates in"), i18n.t("Groups in which the user participates"), ws);
- gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This user does not belong to any group"), false, false,
- false, false, false);
- final Listener<String> go = new Listener<String>() {
- public void onEvent(final String groupShortName) {
- presenter.onDoubleClick(groupShortName);
- }
- };
- // gridMenuPanel.onClick(go);
- gridMenuPanel.onDoubleClick(go);
- super.add(gridMenuPanel);
- toolbar = ((ActionToolbarPanel<StateToken>) actionToolbarView).getToolbar();
- toolbar.setBlankStyle();
- super.add((Widget) toolbar);
- addInSummary();
- ws.addListenerInEntitySummary(new ContainerListenerAdapter() {
- @Override
- public void onResize(final BoxComponent component, final int adjWidth, final int adjHeight,
- final int rawWidth, final int rawHeight) {
- gridMenuPanel.setWidth(adjWidth);
- }
- });
- }
-
- public void addItem(final GridItem<GroupDTO> gridItem) {
- gridMenuPanel.addItem(gridItem);
- }
-
- @Override
- public void clear() {
- gridMenuPanel.removeAll();
- toolbar.removeAll();
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,103 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.socialnet;
-
-import java.util.List;
-
-import org.ourproject.kune.platf.client.services.ImageUtils;
-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 cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
-import cc.kune.core.client.state.AccessRightsClientManager;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.utils.AccessRights;
-import cc.kune.core.shared.dto.GroupDTO;
-import cc.kune.core.shared.dto.ParticipationDataDTO;
-import cc.kune.core.shared.dto.StateAbstractDTO;
-
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
-
-public class ParticipationSummaryPresenter extends SocialNetworkPresenter implements ParticipationSummary {
-
- private ParticipationSummaryView view;
- private final GridGroup adminCategory;
- private GridGroup collabCategory;
- private final GridGroup collabOnlyCategory;
-
- public ParticipationSummaryPresenter(final I18nUITranslationService i18n, final StateManager stateManager,
- final ImageUtils imageUtils, final Session session,
- final Provider<SocialNetworkServiceAsync> snServiceProvider, final GroupActionRegistry groupActionRegistry,
- final ActionParticipationToolbar actionParticipationToolbar,
- final Provider<FileDownloadUtils> downloadProvider, final AccessRightsClientManager accessRightsManager,
- final IconResources img) {
- super(i18n, stateManager, accessRightsManager, session, snServiceProvider, groupActionRegistry,
- downloadProvider, img);
- adminCategory = new GridGroup("admin in:", " ", i18n.tWithNT("Administrate these groups",
- "talking about a person"), false);
- collabCategory = new GridGroup(i18n.t("and as collaborator in:"), " ", i18n.t("Collaborate in these groups"),
- false);
- collabOnlyCategory = new GridGroup(i18n.t("collaborator in:"), " ", i18n.t("Collaborate in these groups"),
- false);
- super.addGroupOperation(gotoGroupMenuItem, false);
- final Listener<StateAbstractDTO> setStateListener = new Listener<StateAbstractDTO>() {
- @Override
- public void onEvent(final StateAbstractDTO state) {
- setState(state);
- }
- };
- stateManager.onStateChanged(setStateListener);
- stateManager.onSocialNetworkChanged(setStateListener);
- }
-
- public void init(final ParticipationSummaryView view) {
- this.view = view;
- }
-
- @SuppressWarnings("unchecked")
- private void setState(final StateAbstractDTO state) {
- final ParticipationDataDTO participation = state.getParticipation();
- final AccessRights rights = state.getGroupRights();
- view.clear();
- final List<GroupDTO> groupsIsAdmin = participation.getGroupsIsAdmin();
- final List<GroupDTO> groupsIsCollab = participation.getGroupsIsCollab();
- final int numAdmins = groupsIsAdmin.size();
- final int numCollaborators = groupsIsCollab.size();
- if (numAdmins == 0) {
- collabCategory = collabOnlyCategory;
- }
- for (final GroupDTO group : groupsIsAdmin) {
- view.addItem(createGridItem(adminCategory, group, rights, unJoinMenuItem));
- }
- for (final GroupDTO group : groupsIsCollab) {
- view.addItem(createGridItem(collabCategory, group, rights, unJoinMenuItem));
- }
- if (numAdmins > 0 || numCollaborators > 0) {
- view.setVisible(true);
- } else {
- view.setVisible(false);
- }
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryView.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,35 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
-
-import cc.kune.core.shared.dto.GroupDTO;
-
-public interface ParticipationSummaryView extends View {
-
- void addItem(GridItem<GroupDTO> createGridItem);
-
- void clear();
-
- void setVisible(boolean b);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolAction.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,96 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
-import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip;
-
-import cc.kune.core.client.state.AccessRightsClientManager;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.utils.AccessRights;
-import cc.kune.core.shared.dto.AccessRolDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.events.Listener2;
-import com.google.gwt.resources.client.ImageResource;
-
-public abstract class RolAction extends AbstractExtendedAction {
-
- public static UIStatus refreshStatus(final AccessRolDTO rolRequired, final boolean authNeed,
- final boolean isLogged, final boolean visibleForMembers, final boolean visibleForNonMemb,
- final AccessRights newRights) {
- boolean newVisibility = false;
- boolean newEnabled = false;
- if (authNeed && !isLogged) {
- newVisibility = newEnabled = false;
- } else {
- // Auth ok
- newEnabled = RolComparator.isEnabled(rolRequired, newRights);
- if (newEnabled) {
- final boolean isMember = RolComparator.isMember(newRights);
- newEnabled = newVisibility = isMember && visibleForMembers || !isMember && visibleForNonMemb;
- } else {
- newVisibility = false;
- }
- }
- return new UIStatus(newVisibility, newEnabled);
- }
-
- protected final Session session;
- protected final StateManager stateManager;
- protected final I18nTranslationService i18n;
- private boolean visibleForNonMemb;
- private boolean visibleForMembers;
- private boolean authNeed;
-
- public RolAction(final Session session, final StateManager stateManager,
- final AccessRightsClientManager rightsManager, final I18nTranslationService i18n,
- final AccessRolDTO rolRequired, final String text, final String tooltip, final ImageResource icon) {
- super(text, tooltip, icon);
- this.session = session;
- this.stateManager = stateManager;
- this.i18n = i18n;
- this.visibleForMembers = true;
- this.visibleForNonMemb = true;
- this.authNeed = false;
- rightsManager.onRightsChanged(new Listener2<AccessRights, AccessRights>() {
- public void onEvent(final AccessRights prevRights, final AccessRights newRights) {
- setStatus(refreshStatus(rolRequired, authNeed, session.isLogged(), visibleForMembers,
- visibleForNonMemb, newRights));
- }
-
- });
- }
-
- public void setMustBeAuthenticated(final boolean authNeed) {
- this.authNeed = authNeed;
- }
-
- public void setVisible(final boolean forMembers, final boolean forNonMembers) {
- this.visibleForMembers = forMembers;
- this.visibleForNonMemb = forNonMembers;
- }
-
- private void setStatus(final UIStatus refreshStatus) {
- setEnabled(refreshStatus.isEnabled());
- putValue(GuiActionDescrip.VISIBLE, refreshStatus.isVisible());
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolComparator.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolComparator.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/RolComparator.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,45 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.socialnet;
-
-import cc.kune.core.shared.domain.utils.AccessRights;
-import cc.kune.core.shared.dto.AccessRolDTO;
-
-public final class RolComparator {
-
- public static boolean isEnabled(final AccessRolDTO rolRequired, final AccessRights rights) {
- switch (rolRequired) {
- case Administrator:
- return rights.isAdministrable();
- case Editor:
- return rights.isEditable();
- case Viewer:
- return rights.isVisible();
- }
- return false;
- }
-
- public static boolean isMember(final AccessRights newRights) {
- return newRights.isAdministrable() || newRights.isEditable();
- }
-
- private RolComparator() {
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,329 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.socialnet;
-
-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.ui.ButtonDescriptor;
-import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
-import org.ourproject.kune.platf.client.ui.MenuItem;
-import org.ourproject.kune.platf.client.ui.MenuItemCollection;
-import org.ourproject.kune.platf.client.ui.download.FileConstants;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
-import org.ourproject.kune.platf.client.ui.gridmenu.CustomMenu;
-import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup;
-import org.ourproject.kune.platf.client.ui.gridmenu.GridItem;
-import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
-
-import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
-import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
-import cc.kune.core.client.state.AccessRightsClientManager;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.utils.AccessRights;
-import cc.kune.core.shared.domain.utils.StateToken;
-import cc.kune.core.shared.dto.GroupDTO;
-import cc.kune.core.shared.dto.SocialNetworkDataDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
-
-public class SocialNetworkPresenter {
-
- private static final String MEMBERS_BOTTON = "members_bottom";
-
- protected final ActionToolbarPosition membersBottom = new ActionToolbarPosition("sn-bottomtoolbar");
- protected final ActionToolbarPosition buddiesBottom = new ActionToolbarPosition("sn-bottomtoolbar");
- protected MenuItem<GroupDTO> changeToCollabMenuItem;
- protected MenuItem<GroupDTO> removeMemberMenuItem;
- protected MenuItem<GroupDTO> changeToAdminMenuItem;
- protected MenuItem<GroupDTO> acceptJoinGroupMenuItem;
- protected MenuItem<GroupDTO> denyJoinGroupMenuItem;
- protected MenuItem<GroupDTO> gotoMemberMenuItem;
- protected MenuItem<GroupDTO> gotoGroupMenuItem;
- protected MenuItem<GroupDTO> unJoinMenuItem;
- private final I18nTranslationService i18n;
- private final StateManager stateManager;
- private final Provider<SocialNetworkServiceAsync> snServiceProvider;
- private final Session session;
- private final MenuItemCollection<GroupDTO> otherOperations;
- private final MenuItemCollection<GroupDTO> otherLoggedOperations;
- private final MenuItemCollection<GroupDTO> otherOperationsUsers;
- private final MenuItemCollection<GroupDTO> otherLoggedOperationsUsers;
- protected ActionToolbarMenuDescriptor<StateToken> unJoin;
- protected ActionToolbarButtonDescriptor<StateToken> participate;
- private final Provider<FileDownloadUtils> downloadProvider;
- private final AccessRightsClientManager rightsManager;
- private final IconResources imgResources;
-
- private MenuDescriptor menuOptions;
-
- public SocialNetworkPresenter(final I18nTranslationService i18n, final StateManager stateManager,
- final AccessRightsClientManager rightsManager, final Session session,
- final Provider<SocialNetworkServiceAsync> snServiceProvider, final GroupActionRegistry groupActionRegistry,
- final Provider<FileDownloadUtils> downloadProvider, final IconResources imgResources) {
- this.i18n = i18n;
- this.stateManager = stateManager;
- this.rightsManager = rightsManager;
- this.session = session;
- this.snServiceProvider = snServiceProvider;
- this.downloadProvider = downloadProvider;
- this.imgResources = imgResources;
- createButtons();
- createMenuActions();
- otherOperationsUsers = new MenuItemCollection<GroupDTO>();
- otherLoggedOperationsUsers = new MenuItemCollection<GroupDTO>();
- otherOperations = new MenuItemCollection<GroupDTO>();
- otherLoggedOperations = new MenuItemCollection<GroupDTO>();
- }
-
- public void addGroupOperation(final MenuItem<GroupDTO> operation, final boolean mustBeLogged) {
- MenuItemCollection<GroupDTO> collection;
- collection = mustBeLogged ? otherLoggedOperations : otherOperations;
- collection.add(operation);
- }
-
- public void addUserOperation(final MenuItem<GroupDTO> operation, final boolean mustBeLogged) {
- MenuItemCollection<GroupDTO> collection;
- collection = mustBeLogged ? otherLoggedOperationsUsers : otherOperationsUsers;
- collection.add(operation);
- }
-
- public void onDoubleClick(final String groupShortName) {
- stateManager.gotoToken(groupShortName);
- }
-
- public void removeGroupOperation(final MenuItem<GroupDTO> operation, final boolean mustBeLogged) {
- MenuItemCollection<GroupDTO> collection;
- collection = mustBeLogged ? otherLoggedOperations : otherOperations;
- collection.remove(operation);
- }
-
- public void removeUserOperation(final MenuItem<GroupDTO> operation, final boolean mustBeLogged) {
- MenuItemCollection<GroupDTO> collection;
- collection = mustBeLogged ? otherLoggedOperationsUsers : otherOperationsUsers;
- collection.remove(operation);
- }
-
- protected GridItem<GroupDTO> createGridItem(final GridGroup groupCategory, final GroupDTO group,
- final AccessRights rights, final MenuItem<GroupDTO>... gridMenuItems) {
- final GridItem<GroupDTO> gridItem = createDefMemberMenu(group, groupCategory);
- final CustomMenu<GroupDTO> menu = gridItem.getMenu();
- if (rights.isAdministrable()) {
- for (final MenuItem<GroupDTO> item : gridMenuItems) {
- menu.addMenuItem(item);
- }
- }
- return gridItem;
- }
-
- protected String createTooltipWithLogo(final String shortName, final StateToken token, final boolean hasLogo,
- final boolean isPersonal) {
- return "<table><tr><td>"
- + (hasLogo ? downloadProvider.get().getLogoAvatarHtml(token, hasLogo, isPersonal,
- FileConstants.LOGO_DEF_HEIGHT, 3) : "") + "</td><td>"
- + i18n.t(isPersonal ? "Nickname: [%s]" : "Group short name: [%s]", shortName) + "</td></tr></table>";
- }
-
- private void createButtons() {
- final ParticipateAction participateAction = new ParticipateAction(session, snServiceProvider, stateManager,
- rightsManager, i18n, imgResources);
- final ButtonDescriptor participateBtn = new ButtonDescriptor(participateAction);
- participateBtn.setLocation(MEMBERS_BOTTON);
-
- menuOptions = new MenuDescriptor(i18n.t("Options"));
-
- final UnjoinAction unjoinAction = new UnjoinAction(session, snServiceProvider, stateManager, rightsManager,
- i18n, imgResources) {
- @Override
- public String getGroupName() {
- return session.getContainerState().getGroup().getShortName();
- }
- };
-
- final MenuItemDescriptor unjoinBtn = new MenuItemDescriptor(menuOptions, unjoinAction);
- unjoinBtn.setLocation(MEMBERS_BOTTON);
- }
-
- private GridItem<GroupDTO> createDefMemberMenu(final GroupDTO group, final GridGroup gridGroup) {
- final CustomMenu<GroupDTO> menu = new CustomMenu<GroupDTO>(group);
- final String longName = group.getLongName();
- final boolean hasLogo = group.hasLogo();
- final String toolTip = createTooltipWithLogo(group.getShortName(), group.getStateToken(), hasLogo,
- group.isPersonal());
- final String imageHtml = downloadProvider.get().getLogoAvatarHtml(group.getStateToken(), hasLogo,
- group.isPersonal(), session.getImgIconsize(), 0);
- final GridItem<GroupDTO> gridItem = new GridItem<GroupDTO>(group, gridGroup, group.getShortName(), imageHtml,
- longName, longName, " ", longName, toolTip, menu);
- if (!group.isPersonal()) {
- menu.addMenuItemList(otherOperations);
- }
- if (session.isLogged() && !group.isPersonal()) {
- menu.addMenuItemList(otherLoggedOperations);
- }
- if (group.isPersonal()) {
- menu.addMenuItemList(otherOperationsUsers);
- }
- if (session.isLogged() && group.isPersonal()) {
- menu.addMenuItemList(otherLoggedOperationsUsers);
- }
-
- return gridItem;
- }
-
- private void createMenuActions() {
- gotoGroupMenuItem = new MenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this group homepage"),
- new Listener<GroupDTO>() {
- @Override
- public void onEvent(final GroupDTO groupDTO) {
- stateManager.gotoToken(groupDTO.getShortName());
- }
- });
- gotoMemberMenuItem = new MenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this member homepage"),
- new Listener<GroupDTO>() {
- @Override
- public void onEvent(final GroupDTO groupDTO) {
- stateManager.gotoToken(groupDTO.getShortName());
- }
- });
-
- unJoinMenuItem = new MenuItem<GroupDTO>("images/del.gif", i18n.t("Do not participate anymore in this group"),
- new Listener<GroupDTO>() {
- @Override
- public void onEvent(final GroupDTO groupDTO) {
- removeMemberAction(groupDTO);
- }
- });
- changeToCollabMenuItem = new MenuItem<GroupDTO>("images/arrow-down-green.gif",
- i18n.t("Change to collaborator"), new Listener<GroupDTO>() {
- @Override
- public void onEvent(final GroupDTO group) {
- NotifyUser.showProgressProcessing();
- snServiceProvider.get().setAdminAsCollab(session.getUserHash(),
- session.getCurrentState().getStateToken(), group.getShortName(),
- new AsyncCallbackSimple<SocialNetworkDataDTO>() {
- @Override
- public void onSuccess(final SocialNetworkDataDTO result) {
- NotifyUser.hideProgress();
- NotifyUser.info(i18n.t("Member type changed"));
- stateManager.setSocialNetwork(result);
- }
- });
- }
- });
- removeMemberMenuItem = new MenuItem<GroupDTO>("images/del.gif", i18n.t("Remove this member"),
- new Listener<GroupDTO>() {
- @Override
- public void onEvent(final GroupDTO group) {
- NotifyUser.showProgressProcessing();
- snServiceProvider.get().deleteMember(session.getUserHash(),
- session.getCurrentState().getStateToken(), group.getShortName(),
- new AsyncCallbackSimple<SocialNetworkDataDTO>() {
- @Override
- public void onSuccess(final SocialNetworkDataDTO result) {
- NotifyUser.hideProgress();
- NotifyUser.info(i18n.t("Member removed"));
- stateManager.reload();
- // in the
- // future,
- // only if
- // I cannot
- // be
- // affected:
- // snService.stateManager.reloadSocialNetwork((SocialNetworkResultDTO)
- // result);
- }
- });
- }
- });
- changeToAdminMenuItem = new MenuItem<GroupDTO>("images/arrow-up-green.gif", i18n.t("Change to admin"),
- new Listener<GroupDTO>() {
- @Override
- public void onEvent(final GroupDTO group) {
- NotifyUser.showProgressProcessing();
- snServiceProvider.get().setCollabAsAdmin(session.getUserHash(),
- session.getCurrentState().getStateToken(), group.getShortName(),
- new AsyncCallbackSimple<SocialNetworkDataDTO>() {
- @Override
- public void onSuccess(final SocialNetworkDataDTO result) {
- NotifyUser.hideProgress();
- NotifyUser.info(i18n.t("Member type changed"));
- stateManager.setSocialNetwork(result);
- }
- });
- }
- });
- acceptJoinGroupMenuItem = new MenuItem<GroupDTO>("images/accept.gif", i18n.t("Accept this member"),
- new Listener<GroupDTO>() {
- @Override
- public void onEvent(final GroupDTO group) {
- NotifyUser.showProgressProcessing();
- snServiceProvider.get().acceptJoinGroup(session.getUserHash(),
- session.getCurrentState().getStateToken(), group.getShortName(),
- new AsyncCallbackSimple<SocialNetworkDataDTO>() {
- @Override
- public void onSuccess(final SocialNetworkDataDTO result) {
- NotifyUser.hideProgress();
- NotifyUser.info(i18n.t("Member accepted"));
- stateManager.setSocialNetwork(result);
- }
- });
- }
- });
- denyJoinGroupMenuItem = new MenuItem<GroupDTO>("images/cancel.gif", i18n.t("Reject this member"),
- new Listener<GroupDTO>() {
- @Override
- public void onEvent(final GroupDTO group) {
- NotifyUser.showProgressProcessing();
- snServiceProvider.get().denyJoinGroup(session.getUserHash(),
- session.getCurrentState().getStateToken(), group.getShortName(),
- new AsyncCallbackSimple<SocialNetworkDataDTO>() {
- @Override
- public void onSuccess(final SocialNetworkDataDTO result) {
- NotifyUser.hideProgress();
- NotifyUser.info(i18n.t("Member rejected"));
- stateManager.setSocialNetwork(result);
- }
- });
- }
- });
- }
-
- private void removeMemberAction(final GroupDTO groupDTO) {
- NotifyUser.showProgressProcessing();
- snServiceProvider.get().unJoinGroup(session.getUserHash(), new StateToken(groupDTO.getShortName()),
- new AsyncCallbackSimple<SocialNetworkDataDTO>() {
- @Override
- public void onSuccess(final SocialNetworkDataDTO result) {
- NotifyUser.hideProgress();
- NotifyUser.info(i18n.t("Removed as member"));
- stateManager.reload();
- // in the future with user
- // info:
- // services.stateManager.reloadSocialNetwork((SocialNetworkResultDTO)
- // result);
- }
- });
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UIStatus.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UIStatus.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UIStatus.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,82 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.socialnet;
-
-public class UIStatus {
-
- private boolean visible;
- private boolean enabled;
-
- public UIStatus(final boolean visible, final boolean enabled) {
- this.visible = visible;
- this.enabled = enabled;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- final UIStatus other = (UIStatus) obj;
- if (enabled != other.enabled) {
- return false;
- }
- if (visible != other.visible) {
- return false;
- }
- return true;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + (enabled ? 1231 : 1237);
- result = prime * result + (visible ? 1231 : 1237);
- return result;
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public boolean isVisible() {
- return visible;
- }
-
- public void setEnabled(final boolean enabled) {
- this.enabled = enabled;
- }
-
- public void setVisible(final boolean visible) {
- this.visible = visible;
- }
-
- @Override
- public String toString() {
- return "(v: " + visible + ", e:" + enabled + ")";
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UnjoinAction.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UnjoinAction.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UnjoinAction.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,79 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.actions.ActionEvent;
-import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
-
-import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
-import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
-import cc.kune.core.client.state.AccessRightsClientManager;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.utils.StateToken;
-import cc.kune.core.shared.dto.AccessRolDTO;
-import cc.kune.core.shared.dto.SocialNetworkDataDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.events.Listener0;
-import com.calclab.suco.client.ioc.Provider;
-
-public class UnjoinAction extends RolAction {
- private final Provider<SocialNetworkServiceAsync> snServiceProvider;
- private String groupName;
-
- public UnjoinAction(final Session session, final Provider<SocialNetworkServiceAsync> snServiceProvider,
- final StateManager stateManager, final AccessRightsClientManager rightsManager,
- final I18nTranslationService i18n, final IconResources imgResources) {
- super(session, stateManager, rightsManager, i18n, AccessRolDTO.Editor, i18n.t("Leave this group"),
- i18n.t("Do not participate anymore in this group"), imgResources.delGreen());
- this.snServiceProvider = snServiceProvider;
- super.setVisible(true, false);
- super.setMustBeAuthenticated(true);
- }
-
- public void actionPerformed(final ActionEvent event) {
- NotifyUser.askConfirmation(i18n.t("Leave this group"), i18n.t("Are you sure?"), new Listener0() {
- public void onEvent() {
- NotifyUser.showProgressProcessing();
- snServiceProvider.get().unJoinGroup(session.getUserHash(), new StateToken(getGroupName()),
- new AsyncCallbackSimple<SocialNetworkDataDTO>() {
- public void onSuccess(final SocialNetworkDataDTO result) {
- NotifyUser.hideProgress();
- NotifyUser.info(i18n.t("Removed as member"));
- stateManager.reload();
- // in the future with user info:
- // stateManager.reloadSocialNetwork((SocialNetworkResultDTO)
- // result);
- }
- });
- }
- });
- }
-
- public String getGroupName() {
- return groupName;
- }
-
- public void setGroupName(final String groupName) {
- this.groupName = groupName;
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserActionRegistry.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserActionRegistry.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserActionRegistry.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,33 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.socialnet;
-
-import org.ourproject.kune.platf.client.actions.ActionRegistry;
-
-import cc.kune.core.shared.dto.UserSimpleDTO;
-
-/**
- * The Class UserActionRegistry.
- *
- * List of actions over a user (initially used for buddies actions)
- *
- */
-public class UserActionRegistry extends ActionRegistry<UserSimpleDTO> {
-}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManagerImpl.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManagerImpl.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManagerImpl.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -20,8 +20,8 @@
package org.ourproject.kune.workspace.client.themes;
import org.cobogw.gwt.user.client.CSS;
-import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
+import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.shared.domain.utils.StateToken;
import com.calclab.suco.client.events.Listener;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelectorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelectorPresenter.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeSelectorPresenter.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -26,7 +26,7 @@
import org.ourproject.kune.platf.client.actions.ui.ActionExtensibleView;
import org.ourproject.kune.platf.client.actions.ui.CssStyleDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
-import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
import cc.kune.core.client.state.Session;
import cc.kune.core.shared.dto.InitDataDTO;
@@ -95,7 +95,7 @@
private void createTheme(final String theme) {
final ThemeAction action = new ThemeAction(theme);
- final MenuItemDescriptor themeItem = new MenuItemDescriptor(menu, action);
+ final OldMenuItemDescriptor themeItem = new OldMenuItemDescriptor(menu, action);
// selectItemInUI.add(new Listener<String>() {
// public void onEvent(final String themeToSelect) {
// if (theme.equals(themeToSelect)) {
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/upload/AbstractUploader.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/upload/AbstractUploader.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/upload/AbstractUploader.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -19,8 +19,9 @@
\*/
package org.ourproject.kune.workspace.client.upload;
-import org.ourproject.kune.platf.client.ui.download.FileConstants;
+import cc.kune.core.client.services.FileConstants;
+
import com.gwtext.client.core.UrlParam;
public class AbstractUploader {
Modified: trunk/src/main/webapp/WEB-INF/publicspace/public/templates/basic/basic.css
===================================================================
--- trunk/src/main/webapp/WEB-INF/publicspace/public/templates/basic/basic.css 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/webapp/WEB-INF/publicspace/public/templates/basic/basic.css 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,7 +1,38 @@
+html {
+ background-color: #DD8A3D;
+}
-html {background-color: #DD8A3D;}
+body {
+ color: black;
+ font-family: 'Ubuntu', Arial;
+ font-size: 18px,
+}
-.page {width: 60em; height: 30em; margin: 2em auto; padding: 1em; background-color: #fff; overflow: hidden;}
-.page h1 {color: black; letter-spacing:-0.05em; line-height:1em; margin:1em 0 0.5em 4em; }
-.page .menu {float: left; padding: 1em; width: 9em; background-color: #efefef; margin-right: 1em;}
-.page .content {}
\ No newline at end of file
+.page {
+ width: 800px;
+ margin: 2em auto;
+ padding: 1em;
+ background-color: #fff;
+ overflow: hidden;
+}
+
+.page h1 {
+ color: black;
+ letter-spacing: -0.05em;
+ line-height: 1em;
+ margin: 1em 0 0.5em 4em;
+ padding: 20px 20px 20px 50px;
+ font-size: 26px;
+}
+
+.page .menu {
+ float: left;
+ padding: 1em;
+ width: 9em;
+ background-color: #efefef;
+ margin-right: 1em;
+}
+
+.page .content {
+ display: table-cell
+}
\ No newline at end of file
Modified: trunk/src/main/webapp/WEB-INF/publicspace/public/templates/basic/docs.liquid.html
===================================================================
--- trunk/src/main/webapp/WEB-INF/publicspace/public/templates/basic/docs.liquid.html 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/main/webapp/WEB-INF/publicspace/public/templates/basic/docs.liquid.html 2011-02-10 03:07:28 UTC (rev 1243)
@@ -1,5 +1,5 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-"http://www.w3.org/TR/html4/strict.dtd">
+ "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
@@ -11,13 +11,27 @@
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="{{ 'basic.css' | asset }}">
<!--[if lt IE 7.]>
- <script defer type="text/javascript" src="js/pngfix.js"></script>
- <![endif]-->
+ <script defer type="text/javascript" src="js/pngfix.js"></script>
+ <![endif]-->
+ <script src="//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script>
+ <script>
+ WebFont.load({
+ google : {
+ families : [ 'Ubuntu' ]
+ }
+ });
+ </script>
+ <link
+ href='http://fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold,bolditalic'
+ rel='stylesheet' type='text/css'>
+ <link type="text/css" rel="stylesheet"
+ href="/ws/fontface/ubuntufontface.css">
+ <link type="text/css" rel="stylesheet" href="/ws/ws.css">
</head>
<body>
<div class="page">
<h1>{{ content.title }}</h1>
- <div class="menu">Here the container</div>
+ <div class="menu"> </div>
<div class="content">{{ content.body }}</div>
</div>
</body>
Modified: trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/test/java/org/ourproject/kune/platf/server/manager/file/FileDownloadManagerTest.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -30,10 +30,10 @@
import org.junit.Ignore;
import org.junit.Test;
import org.mockito.Mockito;
-import org.ourproject.kune.platf.client.ui.download.ImageSize;
import org.ourproject.kune.platf.integration.IntegrationTestHelper;
import org.ourproject.kune.platf.server.properties.KuneProperties;
+import cc.kune.core.client.services.ImageSize;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.domain.BasicMimeType;
import cc.kune.domain.Content;
Modified: trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolActionTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolActionTest.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolActionTest.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -23,6 +23,8 @@
import org.junit.Before;
import org.junit.Test;
+import org.ourproject.kune.workspace.client.oldsn.RolAction;
+import org.ourproject.kune.workspace.client.oldsn.UIStatus;
import cc.kune.core.shared.domain.utils.AccessRights;
import cc.kune.core.shared.dto.AccessRolDTO;
Modified: trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolComparatorTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolComparatorTest.java 2011-02-08 16:36:26 UTC (rev 1242)
+++ trunk/src/test/java/org/ourproject/kune/workspace/client/socialnet/RolComparatorTest.java 2011-02-10 03:07:28 UTC (rev 1243)
@@ -23,6 +23,7 @@
import static org.junit.Assert.assertTrue;
import org.junit.Test;
+import org.ourproject.kune.workspace.client.oldsn.RolComparator;
import cc.kune.core.shared.domain.utils.AccessRights;
import cc.kune.core.shared.dto.AccessRolDTO;
More information about the kune-commits
mailing list