[kune-commits] r1281 - in trunk: script src/main/java/cc/kune/chat/client src/main/java/cc/kune/client src/main/java/cc/kune/core/client src/main/java/cc/kune/core/client/sitebar src/main/java/cc/kune/core/client/tags src/main/java/cc/kune/core/public src/main/java/cc/kune/domain/finders src/main/java/org/ourproject/kune/app/public/css src/main/java/org/ourproject/kune/platf/server/manager src/main/java/org/ourproject/kune/workspace/client src/main/java/org/ourproject/kune/workspace/client/cxt src/main/java/org/ourproject/kune/workspace/client/tags src/test/java/cc/kune/core/client src/test/java/cc/kune/core/client/tags src/test/java/org/ourproject/kune/workspace/client src/test/java/testsuites
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Thu Mar 17 19:03:06 CET 2011
Author: vjrj_
Date: 2011-03-17 19:03:05 +0100 (Thu, 17 Mar 2011)
New Revision: 1281
Added:
trunk/src/main/java/cc/kune/core/client/tags/
trunk/src/main/java/cc/kune/core/client/tags/TagsSummary.java
trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java
trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPresenter.java
trunk/src/test/java/cc/kune/core/client/tags/
Removed:
trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummary.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java
trunk/src/test/java/org/ourproject/kune/workspace/client/tags/
Modified:
trunk/script/kune server debug.launch
trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
trunk/src/main/java/cc/kune/client/KuneGinjector.java
trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
trunk/src/main/java/cc/kune/core/client/CoreParts.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/cc/kune/core/public/ws.html
trunk/src/main/java/cc/kune/domain/finders/TagUserContentFinder.java
trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java
trunk/src/test/java/cc/kune/core/client/tags/TagsSummaryPresenterTest.java
trunk/src/test/java/testsuites/OthersTestSuite.java
Log:
tags widget
Modified: trunk/script/kune server debug.launch
===================================================================
--- trunk/script/kune server debug.launch 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/script/kune server debug.launch 2011-03-17 18:03:05 UTC (rev 1281)
@@ -13,6 +13,7 @@
<mapAttribute key="org.eclipse.jdt.launching.CONNECT_MAP">
<mapEntry key="hostname" value="localhost"/>
<mapEntry key="port" value="8001"/>
+<mapEntry key="timeout" value="20000"/>
</mapAttribute>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="kune"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_CONNECTOR_ID" value="org.eclipse.jdt.launching.socketAttachConnector"/>
Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -292,7 +292,7 @@
final HtmlConfig htmlConfig = HtmlConfig.getFromMeta();
config.dockConfig.headerSize = 0;
config.dockConfig.rosterWidth = 150;
- config.dockConfig.rosterDock = "right";
+ config.dockConfig.rosterDock = "left";
final KuneHablarWidget widget = new KuneHablarWidget(config.layout, config.tabHeaderSize);
final Hablar hablar = widget.getHablar();
HablarComplete.install(hablar, config);
Modified: trunk/src/main/java/cc/kune/client/KuneGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -44,6 +44,7 @@
import cc.kune.core.client.sn.UserSNPresenter;
import cc.kune.core.client.state.SiteTokenListeners;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.tags.TagsSummaryPresenter;
import cc.kune.core.client.ui.footer.license.EntityLicensePresenter;
import cc.kune.core.client.ws.CorePresenter;
import cc.kune.core.client.ws.entheader.EntityHeaderPresenter;
@@ -108,6 +109,8 @@
AsyncProvider<PSpacePresenter> getPSpacePresenter();
+ AsyncProvider<TagsSummaryPresenter> getTagsSummaryPresenter();
+
AsyncProvider<RegisterPresenter> getRegisterPresenter();
AsyncProvider<SignInPresenter> getSignInPresenter();
Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -89,6 +89,8 @@
import cc.kune.core.client.state.SiteTokenListeners;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.client.state.StateManagerDefault;
+import cc.kune.core.client.tags.TagsSummaryPanel;
+import cc.kune.core.client.tags.TagsSummaryPresenter;
import cc.kune.core.client.ui.footer.license.EntityLicensePanel;
import cc.kune.core.client.ui.footer.license.EntityLicensePresenter;
import cc.kune.core.client.ws.CorePresenter;
@@ -115,7 +117,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see com.google.gwt.inject.client.AbstractGinModule#configure()
*/
@Override
@@ -135,16 +137,13 @@
SpinerPresenter.SpinerProxy.class);
bindPresenter(UserNotifierPresenter.class, UserNotifierPresenter.UserNotifierView.class,
UserNotifierViewImpl.class, UserNotifierProxy.class);
-
bindPresenter(SpaceSelectorPresenter.class, SpaceSelectorPresenter.SpaceSelectorView.class,
SpaceSelectorViewImpl.class, SpaceSelectorPresenter.SpaceSelectorProxy.class);
bindPresenter(SiteLogoPresenter.class, SiteLogoPresenter.SiteLogoView.class, SiteLogoViewImpl.class,
SiteLogoPresenter.SiteLogoProxy.class);
-
bindPresenter(SitebarActionsPresenter.class, SitebarActionsPresenter.SitebarActionsView.class,
SitebarActionsPanel.class, SitebarActionsPresenter.SitebarActionsProxy.class);
bind(SitebarActions.class).to(SitebarActionsPresenter.class).in(Singleton.class);
-
bindPresenter(NewGroupPresenter.class, NewGroupView.class, NewGroupPanel.class,
NewGroupPresenter.NewGroupProxy.class);
bindPresenter(GroupSNPresenter.class, GroupSNPresenter.GroupSNView.class, GroupSNPanel.class,
@@ -155,11 +154,15 @@
EntityLicensePanel.class, EntityLicensePresenter.EntityLicenseProxy.class);
bindPresenter(EntityHeaderPresenter.class, EntityHeaderPresenter.EntityHeaderView.class,
EntityHeaderPanel.class, EntityHeaderPresenter.EntityHeaderProxy.class);
-
- bind(UserPassAutocompleteManager.class).to(UserPassAutocompleteManagerImpl.class).in(Singleton.class);
bindPresenter(SignInPresenter.class, SignInView.class, SignInPanel.class, SignInPresenter.SignInProxy.class);
bindPresenter(RegisterPresenter.class, RegisterView.class, RegisterPanel.class,
RegisterPresenter.RegisterProxy.class);
+ bindPresenter(UserConfirmPresenter.class, UserConfirmPresenter.UserConfirmView.class, UserConfirmPanel.class,
+ UserConfirmPresenter.UserConfirmProxy.class);
+ bindPresenter(TagsSummaryPresenter.class, TagsSummaryPresenter.TagsSummaryView.class, TagsSummaryPanel.class,
+ TagsSummaryPresenter.TagsSummaryProxy.class);
+
+ bind(UserPassAutocompleteManager.class).to(UserPassAutocompleteManagerImpl.class).in(Singleton.class);
bind(SignIn.class).to(SignInPresenter.class).in(Singleton.class);
bind(Register.class).to(RegisterPresenter.class).in(Singleton.class);
bind(NewGroup.class).to(NewGroupPresenter.class).in(Singleton.class);
@@ -167,8 +170,6 @@
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);
Modified: trunk/src/main/java/cc/kune/core/client/CoreParts.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreParts.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/cc/kune/core/client/CoreParts.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -8,6 +8,7 @@
import cc.kune.core.client.sn.actions.registry.GroupSNConfActions;
import cc.kune.core.client.sn.actions.registry.UserSNConfActions;
import cc.kune.core.client.state.Session;
+import cc.kune.core.client.tags.TagsSummaryPresenter;
import cc.kune.core.client.ui.footer.license.EntityLicensePresenter;
import com.google.inject.Inject;
@@ -20,7 +21,7 @@
final Provider<UserSNPresenter> buddiesAndParticipationPresenter,
final Provider<GroupSNConfActions> groupMembersConfActions,
final Provider<UserSNConfActions> userSNConfActions, final Provider<SiteUserOptionsPresenter> userOptions,
- final Provider<EntityLicensePresenter> licenseFooter) {
+ final Provider<EntityLicensePresenter> licenseFooter, final Provider<TagsSummaryPresenter> tagsPresenter) {
session.onInitDataReceived(true, new AppStartHandler() {
@Override
public void onAppStart(final AppStartEvent event) {
@@ -30,6 +31,7 @@
buddiesAndParticipationPresenter.get();
userOptions.get();
licenseFooter.get();
+ tagsPresenter.get();
}
});
}
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -167,11 +167,11 @@
right.addAction(newGroupLink.get());
right.addAction(separator);
right.addAction(OPTIONS_MENU);
+ right.addAction(gotoKuneDevSite);
right.addAction(reportBugs);
- right.addAction(gotoKuneDevSite);
+ right.addAction(new MenuItemDescriptor(OPTIONS_MENU, aboutAction));
right.addAction(menuSeparator);
right.addAction(new MenuItemDescriptor(OPTIONS_MENU, wavePowered));
- right.addAction(new MenuItemDescriptor(OPTIONS_MENU, aboutAction));
}
Copied: trunk/src/main/java/cc/kune/core/client/tags/TagsSummary.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummary.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tags/TagsSummary.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tags/TagsSummary.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.client.tags;
+
+import cc.kune.core.shared.domain.TagCloudResult;
+
+public interface TagsSummary {
+
+ void setGroupTags(TagCloudResult tagCloud);
+
+}
Copied: trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPanel.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -0,0 +1,84 @@
+/*
+ *
+ * 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.tags;
+
+import cc.kune.core.client.tags.TagsSummaryPresenter.TagsSummaryView;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.WsArmor;
+
+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.Widget;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.ViewImpl;
+
+public class TagsSummaryPanel extends ViewImpl implements TagsSummaryView {
+
+ private final FlowPanel flowPanel;
+ private final I18nTranslationService i18n;
+
+ @Inject
+ public TagsSummaryPanel(final I18nTranslationService i18n, final WsArmor ws) {
+ this.i18n = i18n;
+ FlowPanel mainPanel = new FlowPanel();
+ flowPanel = new FlowPanel();
+ flowPanel.setWidth("100%");
+ Label header = new Label(i18n.t("Tags"));
+ header.setTitle(i18n.t("Keywords or terms associated with this group"));
+ // super.setBorderStylePrimaryName("k-dropdownouter-tags");
+ flowPanel.addStyleName("kune-Margin-Small-trbl");
+ flowPanel.addStyleName("k-tsp-cloud");
+ header.addStyleName("k-sn-maintitle");
+ mainPanel.addStyleName("k-sn-mainpanel");
+ mainPanel.add(header);
+ mainPanel.add(flowPanel);
+ ws.getEntityToolsSouth().add(mainPanel);
+ }
+
+ public void addTag(final String name, final Long count, final String style, ClickHandler clickHandler) {
+ final Label label = new Label(name);
+ // i18n pluralization
+ if (count > 1) {
+ label.setTitle(i18n.t("There are [%d] items with this tag", count));
+ } else {
+ label.setTitle(i18n.t("There are [%d] item with this tag", count));
+ }
+ label.addClickHandler(clickHandler);
+ label.addStyleName("k-tsp-tag");
+ label.addStyleName(style);
+ flowPanel.add(label);
+ }
+
+ @Override
+ public void clear() {
+ flowPanel.clear();
+ }
+
+ @Override
+ public void setVisible(boolean visible) {
+ flowPanel.setVisible(visible);
+ }
+
+ @Override
+ public Widget asWidget() {
+ return flowPanel;
+ }
+}
Copied: trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPresenter.java (from rev 1279, trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPresenter.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/tags/TagsSummaryPresenter.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -0,0 +1,125 @@
+/*
+ *
+ * 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.tags;
+
+import cc.kune.common.client.log.Log;
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateChangedEvent;
+import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.domain.TagCloudResult;
+import cc.kune.core.shared.domain.TagCount;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.core.shared.dto.StateContainerDTO;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+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 TagsSummaryPresenter extends
+ Presenter<TagsSummaryPresenter.TagsSummaryView, TagsSummaryPresenter.TagsSummaryProxy> implements TagsSummary {
+
+ public interface TagsSummaryView extends View {
+ void addTag(String name, Long count, String style, ClickHandler clickHandler);
+
+ void clear();
+
+ void setVisible(boolean visible);
+ }
+
+ @ProxyCodeSplit
+ public interface TagsSummaryProxy extends Proxy<TagsSummaryPresenter> {
+ }
+
+ private static final int MINSIZE = 11;
+ private static final int MAXSIZE = 26;
+
+ @Override
+ protected void revealInParent() {
+ RevealRootContentEvent.fire(this, this);
+ }
+
+ @Inject
+ public TagsSummaryPresenter(EventBus eventBus, TagsSummaryView view, TagsSummaryProxy proxy, final Session session,
+ final StateManager stateManager) {
+ super(eventBus, view, proxy);
+ stateManager.onStateChanged(true, new StateChangedHandler() {
+ @Override
+ public void onStateChanged(StateChangedEvent event) {
+ StateAbstractDTO state = event.getState();
+ if (state instanceof StateContainerDTO) {
+ setState((StateContainerDTO) state);
+ } else {
+ getView().setVisible(false);
+ }
+ }
+ });
+ }
+
+ public void doSearchTag(final String name) {
+ // searcherProvider.get().doSearchOfType(
+ // "group:" + session.getCurrentState().getGroup().getShortName() +
+ // " tag:" + name,
+ // SiteSearcherType.content);
+ NotifyUser.info("Searcher in development");
+ }
+
+ public void setGroupTags(final TagCloudResult tagCloud) {
+ setCloud(tagCloud);
+ getView().setVisible(true);
+ }
+
+ // @PMD:REVIEWED:DefaultPackage: by vjrj on 27/05/09 3:13
+ void setState(final StateContainerDTO state) {
+ if (state.getTagCloudResult() != null && state.getTagCloudResult().getTagCountList().size() > 0) {
+ Log.debug(state.getTagCloudResult().toString());
+ setCloud(state.getTagCloudResult());
+ getView().setVisible(true);
+ } else {
+ getView().setVisible(false);
+ }
+ }
+
+ private void setCloud(final TagCloudResult tagCloudResult) {
+ // Inspired in snippet http://www.bytemycode.com/snippets/snippet/415/
+ getView().clear();
+ final int max = tagCloudResult.getMaxValue();
+ final int min = tagCloudResult.getMinValue();
+ final int diff = max - min;
+ final int step = (MAXSIZE - MINSIZE) / (diff == 0 ? 1 : diff);
+ for (final TagCount tagCount : tagCloudResult.getTagCountList()) {
+ final String name = tagCount.getName();
+ final int size = Math.round((MINSIZE + (tagCount.getCount().floatValue() - min) * step));
+ getView().addTag(name, tagCount.getCount(), "kune-ft" + size + "px", new ClickHandler() {
+ @Override
+ public void onClick(ClickEvent event) {
+ doSearchTag(name);
+ }
+ });
+ }
+ }
+}
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-03-17 18:03:05 UTC (rev 1281)
@@ -329,7 +329,8 @@
.gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-HDragger {
background-color: white;
- background: url("images/spliter-top.png") no-repeat scroll center bottom white;
+ background: url("images/spliter-top.png") no-repeat scroll center bottom
+ white;
cursor: col-resize;
}
@@ -398,12 +399,12 @@
padding: 1px 7px 0 0 !important;
}
-.k-sitebar-wave-status, .k-sitebar-wave-status-online {
- color: red;
+.k-sitebar-wave-status,.k-sitebar-wave-status-online {
+ color: red;
}
-.k-sitebar-wave-status, .k-sitebar-wave-status-offline {
- color: green;
+.k-sitebar-wave-status,.k-sitebar-wave-status-offline {
+ color: green;
}
.k-sitebar button:hover {
@@ -974,79 +975,91 @@
}
.k-sn-join {
- float:left;
+ float: left;
}
.k-entitytextlogo-border {
- border: 2px solid #F2F2F2;
+ border: 2px solid #F2F2F2;
}
.k-entitytextlogo-no-border {
- border: none;
+ border: none;
}
.k-entitytextlogo {
- height: 60px;
- margin: 5px;
- overflow: hidden;
- width: 468px;
+ height: 60px;
+ margin: 5px;
+ overflow: hidden;
+ width: 468px;
}
.k-entitytextlogo table {
- vertical-align: middle;
+ vertical-align: middle;
}
.k-elogo-l-l {
- font-size: 46px;
+ font-size: 46px;
}
.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-tsp-tag {
+ float: left;
+ padding: 3px;
+ cursor: pointer;
+ color: #5B4683;
+}
+
+.k-tsp-cloud {
+ line-height: 1.5em;
+ text-align: center;
+}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/core/public/ws.html
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.html 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/cc/kune/core/public/ws.html 2011-03-17 18:03:05 UTC (rev 1281)
@@ -14,7 +14,7 @@
<meta name="hablar.hasVCard" content="false" />
<meta name="hablar.search" content="false" />
<meta name="hablar.hasSound" content="false" />
-<meta name="hablar.hasCopyToClipboard" content="false" />
+<meta name="hablar.hasCopyToClipboard" content="true" />
<!--<meta name="hablar.hasLogger" content="true" />-->
<meta name="hablar.hasSignals" content="false" />
<meta name="hablar.roster" content="true" />
Modified: trunk/src/main/java/cc/kune/domain/finders/TagUserContentFinder.java
===================================================================
--- trunk/src/main/java/cc/kune/domain/finders/TagUserContentFinder.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/cc/kune/domain/finders/TagUserContentFinder.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -41,10 +41,10 @@
public List<Tag> findTags(@Named("user") final User user, @Named("content") final Content content);
@Finder(query = "SELECT Count(tuc.content.id) FROM TagUserContent tuc JOIN tuc.tag t WHERE tuc.content.container.owner = :group GROUP BY t.name ORDER BY count(*) ASC LIMIT 0,1")
- public int getMaxGrouped(@Named("group") final Group group);
+ public Long getMaxGrouped(@Named("group") final Group group);
@Finder(query = "SELECT Count(tuc.content.id) FROM TagUserContent tuc JOIN tuc.tag t WHERE tuc.content.container.owner = :group GROUP BY t.name ORDER BY count(*) DESC LIMIT 0,1")
- public int getMinGrouped(@Named("group") final Group group);
+ public Long getMinGrouped(@Named("group") final Group group);
@Finder(query = "SELECT NEW cc.kune.core.shared.domain.TagCount(t.name, COUNT(tuc.content.id)) "
+ "FROM TagUserContent tuc JOIN tuc.tag t WHERE tuc.content.container.owner = :group "
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-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2011-03-17 18:03:05 UTC (rev 1281)
@@ -813,18 +813,6 @@
overflow: hidden;
}
-.k-tsp-tag {
- float: left;
- padding: 3px;
- cursor: pointer;
- color: #0000FF;
-}
-
-.k-tsp-cloud {
- line-height: 1.5em;
- text-align: center;
-}
-
.k-link-icon {
background-image: url(img/link.gif) !important;
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/manager/TagUserContentManagerDefault.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -62,18 +62,15 @@
}
private int getMaxCount(final Group group) {
- // return finder.getMaxGrouped(group);
- return 0;
+ return finder.getMaxGrouped(group).intValue();
}
private int getMinCount(final Group group) {
- // return finder.getMinGrouped(group);
- return 0;
+ return finder.getMinGrouped(group).intValue();
}
private List<TagCount> getSummaryByGroup(final Group group) {
- return new ArrayList<TagCount>();
- // return finder.getTagsGroups(group);
+ return finder.getTagsGroups(group);
}
@Override
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -168,9 +168,6 @@
import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignOutLinkPresenter;
import org.ourproject.kune.workspace.client.skel.ActionCntCtxToolbarPanel;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.tags.TagsSummary;
-import org.ourproject.kune.workspace.client.tags.TagsSummaryPanel;
-import org.ourproject.kune.workspace.client.tags.TagsSummaryPresenter;
import org.ourproject.kune.workspace.client.themes.WsBackManager;
import org.ourproject.kune.workspace.client.themes.WsBackManagerImpl;
import org.ourproject.kune.workspace.client.themes.WsThemeManager;
@@ -212,6 +209,7 @@
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.SiteCommonTokens;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.tags.TagsSummary;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.StateTokenUtils;
import cc.kune.core.shared.dto.UserSimpleDTO;
@@ -592,17 +590,17 @@
// }
// });
- register(ApplicationComponentGroup.class, new Factory<TagsSummary>(TagsSummary.class) {
- @Override
- public TagsSummary create() {
- final TagsSummaryPresenter presenter = new TagsSummaryPresenter(i(Session.class),
- p(SiteSearcher.class), i(StateManager.class));
- final TagsSummaryPanel panel = new TagsSummaryPanel(presenter, i(I18nUITranslationService.class),
- i(WorkspaceSkeleton.class));
- presenter.init(panel);
- return presenter;
- }
- });
+// register(ApplicationComponentGroup.class, new Factory<TagsSummary>(TagsSummary.class) {
+// @Override
+// public TagsSummary create() {
+// final TagsSummaryPresenter presenter = new TagsSummaryPresenter(i(Session.class),
+// p(SiteSearcher.class), i(StateManager.class));
+// final TagsSummaryPanel panel = new TagsSummaryPanel(presenter, i(I18nUITranslationService.class),
+// i(WorkspaceSkeleton.class));
+// presenter.init(panel);
+// return presenter;
+// }
+// });
register(ApplicationComponentGroup.class, new Factory<NoHomePage>(NoHomePage.class) {
@Override
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/cxt/ContextPropEditorPresenter.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -24,13 +24,13 @@
import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
-import org.ourproject.kune.workspace.client.tags.TagsSummary;
import org.ourproject.kune.workspace.client.title.EntitySubTitle;
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.client.rpcservices.ContentServiceAsync;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.tags.TagsSummary;
import cc.kune.core.shared.domain.TagCloudResult;
import cc.kune.core.shared.dto.AccessListsDTO;
import cc.kune.core.shared.dto.I18nLanguageDTO;
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummary.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummary.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummary.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -1,28 +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.tags;
-
-import cc.kune.core.shared.domain.TagCloudResult;
-
-public interface TagsSummary {
-
- void setGroupTags(TagCloudResult tagCloud);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -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.tags;
-
-import org.ourproject.kune.platf.client.ui.KuneUiUtils;
-import org.ourproject.kune.workspace.client.skel.SummaryPanel;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
-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.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-public class TagsSummaryPanel extends SummaryPanel implements TagsSummaryView {
-
- private final FlowPanel flowPanel;
- private final TagsSummaryPresenter presenter;
- private final I18nTranslationService i18n;
-
- public TagsSummaryPanel(final TagsSummaryPresenter presenter, final I18nTranslationService i18n,
- final WorkspaceSkeleton ws) {
- super(i18n.t("Tags"), i18n.t("Keywords or terms associated with this group"), ws);
- this.i18n = i18n;
- this.presenter = presenter;
- flowPanel = new FlowPanel();
- final VerticalPanel vp = new VerticalPanel();
- vp.add(flowPanel);
- vp.setWidth("100%");
- vp.setCellWidth(flowPanel, "100%");
- super.add(vp);
- // super.setBorderStylePrimaryName("k-dropdownouter-tags");
- flowPanel.addStyleName("kune-Margin-Small-trbl");
- flowPanel.addStyleName("k-tsp-cloud");
- addInSummary();
- }
-
- public void addTag(final String name, final Long count, final String style) {
- final Label label = new Label(name);
- // i18n pluralization
- if (count > 1) {
- KuneUiUtils.setQuickTip(label, i18n.t("There are [%d] items with this tag", count));
- } else {
- KuneUiUtils.setQuickTip(label, i18n.t("There are [%d] item with this tag", count));
- }
- label.addClickHandler(new ClickHandler() {
- public void onClick(final ClickEvent event) {
- presenter.doSearchTag(name);
- }
- });
- label.addStyleName("k-tsp-tag");
- label.addStyleName(style);
- flowPanel.add(label);
- }
-
- @Override
- public void clear() {
- flowPanel.clear();
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -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.tags;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.search.SiteSearcher;
-import org.ourproject.kune.workspace.client.search.SiteSearcherType;
-
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.TagCloudResult;
-import cc.kune.core.shared.domain.TagCount;
-import cc.kune.core.shared.dto.StateAbstractDTO;
-import cc.kune.core.shared.dto.StateContainerDTO;
-
-import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
-
-public class TagsSummaryPresenter implements TagsSummary {
-
- private static final int MINSIZE = 11;
- private static final int MAXSIZE = 26;
-
- private TagsSummaryView view;
- private final Provider<SiteSearcher> searcherProvider;
- private final Session session;
-
- public TagsSummaryPresenter(final Session session, final Provider<SiteSearcher> searcherProvider,
- final StateManager stateManager) {
- this.session = session;
- this.searcherProvider = searcherProvider;
- stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
- public void onEvent(final StateAbstractDTO state) {
- if (state instanceof StateContainerDTO) {
- setState((StateContainerDTO) state);
- } else {
- view.setVisible(false);
- }
- }
- });
- }
-
- public void doSearchTag(final String name) {
- searcherProvider.get().doSearchOfType(
- "group:" + session.getCurrentState().getGroup().getShortName() + " tag:" + name,
- SiteSearcherType.content);
- }
-
- public View getView() {
- return view;
- }
-
- public void init(final TagsSummaryView view) {
- this.view = view;
- }
-
- public void setGroupTags(final TagCloudResult tagCloud) {
- setCloud(tagCloud);
- view.expand();
- }
-
- // @PMD:REVIEWED:DefaultPackage: by vjrj on 27/05/09 3:13
- void setState(final StateContainerDTO state) {
- if (state.getTagCloudResult() != null && state.getTagCloudResult().getTagCountList().size() > 0) {
- Log.debug(state.getTagCloudResult().toString());
- setCloud(state.getTagCloudResult());
- } else {
- view.setVisible(false);
- }
- }
-
- private void setCloud(final TagCloudResult tagCloudResult) {
- // Inspired in snippet http://www.bytemycode.com/snippets/snippet/415/
- view.clear();
- final int max = tagCloudResult.getMaxValue();
- final int min = tagCloudResult.getMinValue();
- final int diff = max - min;
- final int step = (MAXSIZE - MINSIZE) / (diff == 0 ? 1 : diff);
- for (final TagCount tagCount : tagCloudResult.getTagCountList()) {
- final int size = Math.round((MINSIZE + (tagCount.getCount().floatValue() - min) * step));
- view.addTag(tagCount.getName(), tagCount.getCount(), "kune-ft" + size + "px");
- }
- view.setVisible(true);
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -1,34 +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.tags;
-
-import org.ourproject.kune.platf.client.View;
-
-public interface TagsSummaryView extends View {
-
- void addTag(String name, Long count, String style);
-
- void clear();
-
- void expand();
-
- void setVisible(boolean visible);
-
-}
Copied: trunk/src/test/java/cc/kune/core/client/tags (from rev 1279, trunk/src/test/java/org/ourproject/kune/workspace/client/tags)
Modified: trunk/src/test/java/cc/kune/core/client/tags/TagsSummaryPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenterTest.java 2011-03-15 20:11:19 UTC (rev 1279)
+++ trunk/src/test/java/cc/kune/core/client/tags/TagsSummaryPresenterTest.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -17,23 +17,23 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.tags;
+package cc.kune.core.client.tags;
import java.util.ArrayList;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
-import org.ourproject.kune.workspace.client.search.SiteSearcher;
+import cc.kune.core.client.state.EventBusTester;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.tags.TagsSummaryPresenter.TagsSummaryProxy;
+import cc.kune.core.client.tags.TagsSummaryPresenter.TagsSummaryView;
import cc.kune.core.shared.domain.TagCloudResult;
import cc.kune.core.shared.domain.TagCount;
import cc.kune.core.shared.dto.StateContainerDTO;
-import com.calclab.suco.client.ioc.Provider;
-
public class TagsSummaryPresenterTest {
private TagsSummaryPresenter tagsSummaryPresenter;
@@ -44,12 +44,12 @@
public void before() {
final Session session = Mockito.mock(Session.class);
final StateManager stateManager = Mockito.mock(StateManager.class);
- final SiteSearcher searcher = Mockito.mock(SiteSearcher.class);
- final Provider searcherProvider = Mockito.mock(Provider.class);
- Mockito.when(searcherProvider.get()).thenReturn(searcher);
+ // final SiteSearcher searcher = Mockito.mock(SiteSearcher.class);
+ TagsSummaryProxy proxy = Mockito.mock(TagsSummaryProxy.class);
+ // Mockito.when(searcherProvider.get()).thenReturn(searcher);
view = Mockito.mock(TagsSummaryView.class);
- tagsSummaryPresenter = new TagsSummaryPresenter(session, searcherProvider, stateManager);
- tagsSummaryPresenter.init(view);
+ EventBusTester eventBus = new EventBusTester();
+ tagsSummaryPresenter = new TagsSummaryPresenter(eventBus, view, proxy, session, stateManager);
}
@Test
Modified: trunk/src/test/java/testsuites/OthersTestSuite.java
===================================================================
--- trunk/src/test/java/testsuites/OthersTestSuite.java 2011-03-16 01:10:10 UTC (rev 1280)
+++ trunk/src/test/java/testsuites/OthersTestSuite.java 2011-03-17 18:03:05 UTC (rev 1281)
@@ -35,9 +35,10 @@
import org.ourproject.kune.workspace.client.licensewizard.LicenseWizardPresenterTest;
import org.ourproject.kune.workspace.client.socialnet.SNRolActionTest;
import org.ourproject.kune.workspace.client.socialnet.RolComparatorTest;
-import org.ourproject.kune.workspace.client.tags.TagsSummaryPresenterTest;
import org.ourproject.kune.workspace.client.tool.ToolSelectorPresenterTest;
+import cc.kune.core.client.tags.TagsSummaryPresenterTest;
+
/**
* Rescan with :
*
More information about the kune-commits
mailing list