[kune-commits] r1401 - in trunk: . src/main/java/cc/kune/barters/client src/main/java/cc/kune/blogs/client src/main/java/cc/kune/chat/client src/main/java/cc/kune/chat/client/actions src/main/java/cc/kune/client src/main/java/cc/kune/core/client/registry src/main/java/cc/kune/core/server src/main/java/cc/kune/docs/client src/main/java/cc/kune/gspace/client/tool src/main/java/cc/kune/gspace/client/viewers src/main/java/cc/kune/meets/client src/main/java/cc/kune/wiki/client
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Thu Jun 9 23:04:19 CEST 2011
Author: vjrj_
Date: 2011-06-09 23:04:18 +0200 (Thu, 09 Jun 2011)
New Revision: 1401
Added:
trunk/src/main/java/cc/kune/core/client/registry/EmptyMessagesRegistry.java
Modified:
trunk/INSTALL
trunk/src/main/java/cc/kune/barters/client/BartersClientTool.java
trunk/src/main/java/cc/kune/blogs/client/BlogsClientTool.java
trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java
trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java
trunk/src/main/java/cc/kune/chat/client/ChatGinjector.java
trunk/src/main/java/cc/kune/chat/client/ChatParts.java
trunk/src/main/java/cc/kune/chat/client/actions/OpenChatAction.java
trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
trunk/src/main/java/cc/kune/client/KuneGinjector.java
trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java
trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
trunk/src/main/java/cc/kune/docs/client/DocsClientTool.java
trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java
trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java
trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java
trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java
trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java
Log:
Some fixes/enhacments: in chat actions, empty message in folders, tools order
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/INSTALL 2011-06-09 21:04:18 UTC (rev 1401)
@@ -85,6 +85,11 @@
https://sites.google.com/a/waveprotocol.org/wave-protocol/federation/openfire-installation
if you want to use Kune in production and federate with other Wave capable servers.
+===Increase open file limits in system===
+
+Follow:
+http://posidev.com/blog/2009/06/04/set-ulimit-parameters-on-ubuntu/
+
===Install jmagick===
Install jmagick-jni. In debian: apt-get install libjmagick6-jni (version 6.2.6-0) also you need or:
Modified: trunk/src/main/java/cc/kune/barters/client/BartersClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/barters/client/BartersClientTool.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/barters/client/BartersClientTool.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -63,6 +63,8 @@
registerContentTypeIcon(TYPE_FOLDER, navResources.folder());
registerContentTypeIcon(TYPE_ROOT, navResources.folder());
registerContentTypeIcon(TYPE_BARTER, navResources.barter());
+ registerEmptyMessages(TYPE_FOLDER, "There folder is empty");
+ registerEmptyMessages(TYPE_ROOT, "There isn't any barter");
}
}
Modified: trunk/src/main/java/cc/kune/blogs/client/BlogsClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/client/BlogsClientTool.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/blogs/client/BlogsClientTool.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -65,6 +65,8 @@
registerContentTypeIcon(TYPE_BLOG, navResources.blog());
registerContentTypeIcon(TYPE_POST, navResources.post());
registerUploadTypesAndMimes(TYPE_UPLOADEDFILE);
+ registerEmptyMessages(TYPE_ROOT, "There isn't any blog, create one");
+ registerEmptyMessages(TYPE_BLOG, "This blog hasn't any post, create one");
}
}
Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -21,6 +21,8 @@
import static cc.kune.chat.shared.ChatConstants.NAME;
import static cc.kune.chat.shared.ChatConstants.TYPE_ROOM;
+import cc.kune.chat.client.resources.ChatResources;
+import cc.kune.common.client.utils.TextUtils;
import cc.kune.core.client.i18n.I18nUITranslationService;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.client.resources.nav.NavResources;
@@ -32,12 +34,15 @@
public class ChatClientTool extends FoldableAbstractClientTool {
private final NavResources navResources;
+ private final ChatResources res;
@Inject
public ChatClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
- final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources) {
+ final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources,
+ final ChatResources res) {
super(NAME, i18n.t("chatrooms"), toolSelector, cntCapRegistry);
this.navResources = navResources;
+ this.res = res;
registerIcons();
}
@@ -47,7 +52,9 @@
}
private void registerIcons() {
- registerContentTypeIcon(TYPE_ROOM, navResources.room());
+ registerContentTypeIcon(TYPE_ROOM, res.groupChat());
+ registerEmptyMessages(TYPE_ROOM, "Here you will see the archive of old conversations"
+ + TextUtils.IN_DEVELOPMENT_P);
}
}
Modified: trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -22,7 +22,6 @@
import cc.kune.chat.client.actions.AddAsBuddieHeaderButton;
import cc.kune.chat.client.actions.ChatClientActions;
import cc.kune.chat.client.actions.ChatSitebarActions;
-import cc.kune.chat.client.actions.OpenGroupPublicChatRoomButton;
import com.google.inject.Singleton;
import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
@@ -38,9 +37,8 @@
bind(ChatClient.class).to(ChatClientDefault.class).in(Singleton.class);
bind(ChatOptions.class).in(Singleton.class);
bind(ChatSitebarActions.class).in(Singleton.class);
- bind(ChatParts.class).asEagerSingleton();
bind(AddAsBuddieHeaderButton.class).in(Singleton.class);
- bind(OpenGroupPublicChatRoomButton.class).in(Singleton.class);
+ // bind(OpenGroupPublicChatRoomButton.class).in(Singleton.class);
bind(ChatClientTool.class).in(Singleton.class);
bind(ChatClientActions.class).in(Singleton.class);
}
Modified: trunk/src/main/java/cc/kune/chat/client/ChatGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatGinjector.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/chat/client/ChatGinjector.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -23,6 +23,8 @@
public interface ChatGinjector extends Ginjector {
+ ChatClient getChatClient();
+
ChatParts getChatParts();
}
Modified: trunk/src/main/java/cc/kune/chat/client/ChatParts.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatParts.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/chat/client/ChatParts.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -23,7 +23,6 @@
import cc.kune.chat.client.actions.ChatClientActions;
import cc.kune.chat.client.actions.ChatSitebarActions;
import cc.kune.chat.client.actions.OpenGroupPublicChatRoomAction;
-import cc.kune.chat.client.actions.OpenGroupPublicChatRoomButton;
import cc.kune.chat.client.actions.StartChatWithMemberAction;
import cc.kune.chat.client.actions.StartChatWithThisBuddieAction;
import cc.kune.chat.client.actions.StartChatWithUserAction;
@@ -69,7 +68,7 @@
final Provider<StartChatWithThisBuddieAction> startChatWithBuddieAction,
final ChatClientActions chatActions,
final Provider<OpenGroupPublicChatRoomAction> openGroupRoomAction,
- final Provider<OpenGroupPublicChatRoomButton> openGroupRoom,
+ // final Provider<OpenGroupPublicChatRoomButton> openGroupRoom,
final ContentViewerSelector viewerSelector, final FolderViewerPresenter folderViewer) {
viewerSelector.register(folderViewer, true, ChatConstants.TYPE_ROOT);
viewerSelector.register(folderViewer, true, ChatConstants.TYPE_ROOM);
@@ -126,7 +125,7 @@
userItemsRegistry.get().add(startChatWithBuddieItem);
groupConfActions.get().add(openChatAndInvite.get());
buddieButton.get();
- openGroupRoom.get();
+ // openGroupRoom.get();
}
});
}
Modified: trunk/src/main/java/cc/kune/chat/client/actions/OpenChatAction.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/actions/OpenChatAction.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/chat/client/actions/OpenChatAction.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -6,6 +6,7 @@
import cc.kune.core.client.state.Session;
import cc.kune.core.shared.dto.AbstractContentSimpleDTO;
import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.StateContainerDTO;
import com.google.inject.Inject;
import com.google.inject.Provider;
@@ -25,7 +26,9 @@
@Override
public void actionPerformed(final ActionEvent event) {
final ChatClient chat = chatClient.get();
- final String roomName = ((AbstractContentSimpleDTO) event.getTarget()).getName();
+ final Object target = event.getTarget();
+ final String roomName = (target instanceof AbstractContentSimpleDTO) ? ((AbstractContentSimpleDTO) target).getName()
+ : ((StateContainerDTO) session.getCurrentState()).getTitle();
chat.joinRoom(roomName, session.getCurrentUserInfo().getShortName());
chat.show();
}
Modified: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -76,12 +76,15 @@
ginjector.getUserNotifierPresenter();
ginjector.getSpinerPresenter();
ginjector.getGroupMembersPresenter();
- ginjector.getBartersParts();
+
+ /* Tools (order in GUI) */
+ ginjector.getDocsParts();
ginjector.getBlogsParts();
+ ginjector.getWikiParts();
ginjector.getChatParts();
- ginjector.getDocsParts();
+ ginjector.getBartersParts();
ginjector.getMeetingsParts();
- ginjector.getWikiParts();
+
ginjector.getSiteLogoPresenter();
ginjector.getSpacesTabPresenter();
ginjector.getChatClient();
Modified: trunk/src/main/java/cc/kune/client/KuneGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -23,7 +23,6 @@
import cc.kune.barters.client.BartersGinjector;
import cc.kune.blogs.client.BlogsGinModule;
import cc.kune.blogs.client.BlogsGinjector;
-import cc.kune.chat.client.ChatClient;
import cc.kune.chat.client.ChatGinModule;
import cc.kune.chat.client.ChatGinjector;
import cc.kune.common.client.actions.gwtui.GwtGuiProvider;
@@ -73,8 +72,8 @@
import com.google.inject.Provider;
import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler;
- at GinModules({ KuneGinModule.class, CoreGinModule.class, ChatGinModule.class, WaveGinModule.class,
- PSpaceGinModule.class, GSpaceGinModule.class, DocsGinModule.class, BlogsGinModule.class,
+ at GinModules({ KuneGinModule.class, CoreGinModule.class, WaveGinModule.class, PSpaceGinModule.class,
+ GSpaceGinModule.class, DocsGinModule.class, BlogsGinModule.class, ChatGinModule.class,
WikiGinModule.class, BartersGinModule.class, MeetingsGinModule.class })
public interface KuneGinjector extends Ginjector, GSpaceGinjector, DocsGinjector, BlogsGinjector,
WikiGinjector, BartersGinjector, MeetingsGinjector, ChatGinjector {
@@ -86,8 +85,6 @@
AsyncProvider<UserSNPresenter> getBuddiesAndParticipationPresenter();
- ChatClient getChatClient();
-
AsyncProvider<CookiesManager> getCookiesManager();
CoreParts getCoreParts();
Modified: trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/core/client/registry/ContentCapabilitiesRegistry.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -23,183 +23,190 @@
public class ContentCapabilitiesRegistry {
- private final AclEditableRegistry aclEditable;
- private final AuthorableRegistry authorable;
- private final CanBeHomepageRegistry canBeHomepage;
- private final ComentableRegistry comentable;
- private final DragableRegistry dragable;
- private final DropableRegistry dropable;
- private final EmailSubscribeAbleRegistry emailSubscribeAble;
- private final IconsRegistry iconsRegistry;
- private final LicensableRegistry licensable;
- private final PublishModerableRegistry publishModerable;
- private final RateableRegistry rateable;
- private final RenamableRegistry renamable;
- private final TageableRegistry tageable;
- private final TranslatableRegistry translatable;
- private final VersionableRegistry versionable;
- private final XmppComentableRegistry xmppComentable;
- private final XmppNotifyCapableRegistry xmppNotifyCapable;
+ private final AclEditableRegistry aclEditable;
+ private final AuthorableRegistry authorable;
+ private final CanBeHomepageRegistry canBeHomepage;
+ private final ComentableRegistry comentable;
+ private final DragableRegistry dragable;
+ private final DropableRegistry dropable;
+ private final EmailSubscribeAbleRegistry emailSubscribeAble;
+ private final EmptyMessagesRegistry emptyMessagesRegistry;
+ private final IconsRegistry iconsRegistry;
+ private final LicensableRegistry licensable;
+ private final PublishModerableRegistry publishModerable;
+ private final RateableRegistry rateable;
+ private final RenamableRegistry renamable;
+ private final TageableRegistry tageable;
+ private final TranslatableRegistry translatable;
+ private final VersionableRegistry versionable;
+ private final XmppComentableRegistry xmppComentable;
+ private final XmppNotifyCapableRegistry xmppNotifyCapable;
- @Inject
- public ContentCapabilitiesRegistry(final AuthorableRegistry authorableRegistry,
- final AclEditableRegistry aclEditableRegistry, final IconsRegistry iconsRegistry,
- final CanBeHomepageRegistry canBeHomepage, final ComentableRegistry comentable,
- final DragableRegistry dragable, final DropableRegistry dropable,
- final EmailSubscribeAbleRegistry emailSubscribeAble, final LicensableRegistry licensable,
- final PublishModerableRegistry publishModerable, final RateableRegistry rateable,
- final TageableRegistry tageable, final RenamableRegistry renamable,
- final TranslatableRegistry translatable, final VersionableRegistry versionable,
- final XmppComentableRegistry xmppComentable, final XmppNotifyCapableRegistry xmppNotifyCapable) {
- this.authorable = authorableRegistry;
- this.aclEditable = aclEditableRegistry;
- this.iconsRegistry = iconsRegistry;
- this.canBeHomepage = canBeHomepage;
- this.comentable = comentable;
- this.dragable = dragable;
- this.dropable = dropable;
- this.emailSubscribeAble = emailSubscribeAble;
- this.licensable = licensable;
- this.publishModerable = publishModerable;
- this.rateable = rateable;
- this.tageable = tageable;
- this.renamable = renamable;
- this.translatable = translatable;
- this.versionable = versionable;
- this.xmppComentable = xmppComentable;
- this.xmppNotifyCapable = xmppNotifyCapable;
- }
+ @Inject
+ public ContentCapabilitiesRegistry(final AuthorableRegistry authorableRegistry,
+ final AclEditableRegistry aclEditableRegistry, final IconsRegistry iconsRegistry,
+ final CanBeHomepageRegistry canBeHomepage, final ComentableRegistry comentable,
+ final DragableRegistry dragable, final DropableRegistry dropable,
+ final EmailSubscribeAbleRegistry emailSubscribeAble, final LicensableRegistry licensable,
+ final PublishModerableRegistry publishModerable, final RateableRegistry rateable,
+ final TageableRegistry tageable, final RenamableRegistry renamable,
+ final TranslatableRegistry translatable, final VersionableRegistry versionable,
+ final EmptyMessagesRegistry emptyMessagesRegistry, final XmppComentableRegistry xmppComentable,
+ final XmppNotifyCapableRegistry xmppNotifyCapable) {
+ this.authorable = authorableRegistry;
+ this.aclEditable = aclEditableRegistry;
+ this.iconsRegistry = iconsRegistry;
+ this.canBeHomepage = canBeHomepage;
+ this.comentable = comentable;
+ this.dragable = dragable;
+ this.dropable = dropable;
+ this.emailSubscribeAble = emailSubscribeAble;
+ this.licensable = licensable;
+ this.publishModerable = publishModerable;
+ this.rateable = rateable;
+ this.tageable = tageable;
+ this.renamable = renamable;
+ this.translatable = translatable;
+ this.versionable = versionable;
+ this.emptyMessagesRegistry = emptyMessagesRegistry;
+ this.xmppComentable = xmppComentable;
+ this.xmppNotifyCapable = xmppNotifyCapable;
+ }
- public boolean canBeHomepage(final String typeId) {
- return canBeHomepage.contains(typeId);
- }
+ public boolean canBeHomepage(final String typeId) {
+ return canBeHomepage.contains(typeId);
+ }
- public AclEditableRegistry getAclEditable() {
- return aclEditable;
- }
+ public AclEditableRegistry getAclEditable() {
+ return aclEditable;
+ }
- public AuthorableRegistry getAuthorable() {
- return authorable;
- }
+ public AuthorableRegistry getAuthorable() {
+ return authorable;
+ }
- public CanBeHomepageRegistry getCanBeHomepage() {
- return canBeHomepage;
- }
+ public CanBeHomepageRegistry getCanBeHomepage() {
+ return canBeHomepage;
+ }
- public ComentableRegistry getComentable() {
- return comentable;
- }
+ public ComentableRegistry getComentable() {
+ return comentable;
+ }
- public DragableRegistry getDragable() {
- return dragable;
- }
+ public DragableRegistry getDragable() {
+ return dragable;
+ }
- public DropableRegistry getDropable() {
- return dropable;
- }
+ public DropableRegistry getDropable() {
+ return dropable;
+ }
- public EmailSubscribeAbleRegistry getEmailSubscribeAble() {
- return emailSubscribeAble;
- }
+ public EmailSubscribeAbleRegistry getEmailSubscribeAble() {
+ return emailSubscribeAble;
+ }
- public IconsRegistry getIconsRegistry() {
- return iconsRegistry;
- }
+ public EmptyMessagesRegistry getEmptyMessagesRegistry() {
+ return emptyMessagesRegistry;
+ }
- public LicensableRegistry getLicensable() {
- return licensable;
- }
+ public IconsRegistry getIconsRegistry() {
+ return iconsRegistry;
+ }
- public PublishModerableRegistry getPublishModerable() {
- return publishModerable;
- }
+ public LicensableRegistry getLicensable() {
+ return licensable;
+ }
- public RateableRegistry getRateable() {
- return rateable;
- }
+ public PublishModerableRegistry getPublishModerable() {
+ return publishModerable;
+ }
- public RenamableRegistry getRenamable() {
- return renamable;
- }
+ public RateableRegistry getRateable() {
+ return rateable;
+ }
- public TageableRegistry getTageable() {
- return tageable;
- }
+ public RenamableRegistry getRenamable() {
+ return renamable;
+ }
- public TranslatableRegistry getTranslatable() {
- return translatable;
- }
+ public TageableRegistry getTageable() {
+ return tageable;
+ }
- public VersionableRegistry getVersionable() {
- return versionable;
- }
+ public TranslatableRegistry getTranslatable() {
+ return translatable;
+ }
- public XmppComentableRegistry getXmppComentable() {
- return xmppComentable;
- }
+ public VersionableRegistry getVersionable() {
+ return versionable;
+ }
- public XmppNotifyCapableRegistry getXmppNotificyCapable() {
- return xmppNotifyCapable;
- }
+ public XmppComentableRegistry getXmppComentable() {
+ return xmppComentable;
+ }
- public boolean isAclEditable(final String typeId) {
- return aclEditable.contains(typeId);
- }
+ public XmppNotifyCapableRegistry getXmppNotificyCapable() {
+ return xmppNotifyCapable;
+ }
- public boolean isAuthorable(final String typeId) {
- return authorable.contains(typeId);
- }
+ public boolean isAclEditable(final String typeId) {
+ return aclEditable.contains(typeId);
+ }
- public boolean isComentable(final String typeId) {
- return comentable.contains(typeId);
- }
+ public boolean isAuthorable(final String typeId) {
+ return authorable.contains(typeId);
+ }
- public boolean isDragable(final String typeId) {
- return dragable.contains(typeId);
- }
+ public boolean isComentable(final String typeId) {
+ return comentable.contains(typeId);
+ }
- public boolean isDropable(final String typeId) {
- return dropable.contains(typeId);
- }
+ public boolean isDragable(final String typeId) {
+ return dragable.contains(typeId);
+ }
- public boolean isEmailSubscribeAble(final String typeId) {
- return emailSubscribeAble.contains(typeId);
- }
+ public boolean isDropable(final String typeId) {
+ return dropable.contains(typeId);
+ }
- public boolean isLicensable(final String typeId) {
- return licensable.contains(typeId);
- }
+ public boolean isEmailSubscribeAble(final String typeId) {
+ return emailSubscribeAble.contains(typeId);
+ }
- public boolean isPublishModerable(final String typeId) {
- return publishModerable.contains(typeId);
- }
+ public boolean isLicensable(final String typeId) {
+ return licensable.contains(typeId);
+ }
- public boolean isRateable(final String typeId) {
- return rateable.contains(typeId);
- }
+ public boolean isPublishModerable(final String typeId) {
+ return publishModerable.contains(typeId);
+ }
- public boolean isRenamable(final String typeId) {
- return renamable.contains(typeId);
- }
+ public boolean isRateable(final String typeId) {
+ return rateable.contains(typeId);
+ }
- public boolean isTageable(final String typeId) {
- return tageable.contains(typeId);
- }
+ public boolean isRenamable(final String typeId) {
+ return renamable.contains(typeId);
+ }
- public boolean isTranslatable(final String typeId) {
- return translatable.contains(typeId);
- }
+ public boolean isTageable(final String typeId) {
+ return tageable.contains(typeId);
+ }
- public boolean isVersionable(final String typeId) {
- return versionable.contains(typeId);
- }
+ public boolean isTranslatable(final String typeId) {
+ return translatable.contains(typeId);
+ }
- public boolean isXmppComentable(final String typeId) {
- return xmppComentable.contains(typeId);
- }
+ public boolean isVersionable(final String typeId) {
+ return versionable.contains(typeId);
+ }
- public boolean isXmppNotifyCapable(final String typeId) {
- return xmppNotifyCapable.contains(typeId);
- }
+ public boolean isXmppComentable(final String typeId) {
+ return xmppComentable.contains(typeId);
+ }
+ public boolean isXmppNotifyCapable(final String typeId) {
+ return xmppNotifyCapable.contains(typeId);
+ }
+
}
Added: trunk/src/main/java/cc/kune/core/client/registry/EmptyMessagesRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/registry/EmptyMessagesRegistry.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/registry/EmptyMessagesRegistry.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -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.registry;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class EmptyMessagesRegistry {
+ private final Map<String, String> registry;
+
+ public EmptyMessagesRegistry() {
+ registry = new HashMap<String, String>();
+ }
+
+ public String getContentTypeIcon(final String typeId) {
+ return registry.get(typeId);
+ }
+
+ public void register(final String contentTypeId, final String message) {
+ registry.put(contentTypeId, message);
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/registry/EmptyMessagesRegistry.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -150,10 +150,10 @@
builder.use(new PlatformServerModule());
builder.use(new DocumentServerModule());
builder.use(new BlogServerModule());
+ builder.use(new WikiServerModule());
+ builder.use(new ChatServerModule());
builder.use(new BarterServerModule());
builder.use(new MeetingServerModule());
- builder.use(new WikiServerModule());
- builder.use(new ChatServerModule());
// builder.use(new GalleryServerModule());
builder.use(new RESTServicesModule());
builder.use(configModule);
Modified: trunk/src/main/java/cc/kune/docs/client/DocsClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/client/DocsClientTool.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/docs/client/DocsClientTool.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -65,6 +65,8 @@
registerContentTypeIcon(TYPE_ROOT, navResources.folder());
registerContentTypeIcon(TYPE_DOCUMENT, navResources.page());
registerUploadTypesAndMimes(TYPE_UPLOADEDFILE);
+ registerEmptyMessages(TYPE_FOLDER, "This folder is empty");
+ registerEmptyMessages(TYPE_ROOT, "This folder is empty");
}
}
Modified: trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/gspace/client/tool/FoldableAbstractClientTool.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -66,6 +66,10 @@
contentCapabilitiesRegistry.getEmailSubscribeAble().register(typeIds);
}
+ public void registerEmptyMessages(final String contentTypeId, final String message) {
+ contentCapabilitiesRegistry.getEmptyMessagesRegistry().register(contentTypeId, message);
+ }
+
protected void registerLicensableTypes(final String... typeIds) {
contentCapabilitiesRegistry.getLicensable().register(typeIds);
}
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -22,6 +22,7 @@
import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
import cc.kune.common.client.ui.HasEditHandler;
import cc.kune.common.client.ui.UiUtils;
+import cc.kune.common.client.utils.TextUtils;
import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
import cc.kune.core.shared.dto.StateContainerDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
@@ -38,6 +39,7 @@
public abstract class AbstractFolderViewerPanel extends ViewImpl implements FolderViewerView {
private final ContentCapabilitiesRegistry capabilitiesRegistry;
private final ContentTitleWidget contentTitle;
+ private final InlineLabel emptyLabel;
private final FlowPanel emptyPanel;
protected final GSpaceArmor gsArmor;
protected final I18nTranslationService i18n;
@@ -49,7 +51,7 @@
this.i18n = i18n;
this.capabilitiesRegistry = capabilitiesRegistry;
emptyPanel = new FlowPanel();
- final InlineLabel emptyLabel = new InlineLabel(i18n.t("This is empty."));
+ emptyLabel = new InlineLabel(i18n.t("This is empty."));
emptyLabel.setStyleName("k-empty-msg");
emptyPanel.setStyleName("k-empty-folder-panel");
emptyPanel.add(emptyLabel);
@@ -113,7 +115,9 @@
}
@Override
- public void showEmptyMsg() {
+ public void showEmptyMsg(final String contentTypeId) {
gsArmor.getDocContainer().add(emptyPanel);
+ final String msg = capabilitiesRegistry.getEmptyMessagesRegistry().getContentTypeIcon(contentTypeId);
+ emptyLabel.setText(TextUtils.empty(msg) ? i18n.t("This is empty.") : i18n.t(msg));
}
}
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -97,7 +97,7 @@
void setEditableTitle(String title);
- void showEmptyMsg();
+ void showEmptyMsg(String contentTypeId);
}
protected static final String CSSBTN = "k-button";
@@ -195,7 +195,7 @@
private void createChildItems(final ContainerDTO container, final AccessRights containerRights) {
if (container.getContents().size() + container.getChilds().size() == 0) {
- getView().showEmptyMsg();
+ getView().showEmptyMsg(container.getTypeId());
} else {
// Folders
for (final ContainerSimpleDTO childFolder : container.getChilds()) {
Modified: trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/meets/client/MeetingsClientTool.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -61,6 +61,7 @@
private void registerIcons() {
registerContentTypeIcon(TYPE_ROOT, navResources.folder());
registerContentTypeIcon(TYPE_MEETING, navResources.calendar());
+ registerEmptyMessages(TYPE_ROOT, "There isn't any meeting");
}
}
Modified: trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java 2011-06-09 15:15:55 UTC (rev 1400)
+++ trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java 2011-06-09 21:04:18 UTC (rev 1401)
@@ -65,6 +65,8 @@
registerContentTypeIcon(TYPE_ROOT, navResources.folder());
registerContentTypeIcon(TYPE_WIKIPAGE, navResources.wikipage());
registerUploadTypesAndMimes(TYPE_UPLOADEDFILE);
+ registerEmptyMessages(TYPE_FOLDER, "There folder is empty");
+ registerEmptyMessages(TYPE_ROOT, "This wiki is empty");
}
}
More information about the kune-commits
mailing list