kune-commits
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
November 2011
- 1 participants
- 57 discussions
#104: Welcome like Tumblr, in the first visit
---------------------------+-------------------
Reporter: sam <samer@…> | Owner: vjrj
Type: enhancement | Status: new
Priority: critical | Milestone:
Component: Group space | Version:
Keywords: | Blocked By:
Blocking: |
---------------------------+-------------------
No one reads the first welcome document that explains Kune behaviour.
Thus, when a new user arrives, faces several issues:
1) cannot edit anything
2) cannot do much neither create new stuff. Even if he/she discovers how
to sign up, the user doesn't know yet how to edit anything.
3) doesn't realize that the top-left icons exist, so the experience is
very limited.
[Bastien tried it for 30 seconds and George for dont know how long, both
with similar results.]
Proposal: highlight the initial experience, such as Tumblr (or Flattr)
does. Guide users to sign-up, guide users to the personal space... give
for granted no one reads the welcoming doc and introduce Kune's first
visit with a practical basic interactive tutorial. Idea: start Kune in a
task list with the tasks that are left to do: "sign up", "visit personal
space", "create a poll gadget", etc.
I consider it maximum priority, as it can kick out many initial testers,
that don't manage in 30 seconds to understand its behaviour.
--
Ticket URL: <http://kune.ourproject.org/issues/ticket/104>
kune issues <http://kune.ourproject.org/issues/>
1
3
Author: vjrj_
Date: 2011-11-30 02:31:04 +0100 (Wed, 30 Nov 2011)
New Revision: 1632
Added:
trunk/src/main/java/cc/kune/core/server/rack/AdminThread.java
trunk/src/main/java/cc/kune/events/client/actions/AbstractCalendarViewSelectBtn.java
trunk/src/main/java/cc/kune/events/client/actions/Calendar1DayViewSelectBtn.java
trunk/src/main/java/cc/kune/events/client/actions/Calendar3DaysViewSelectBtn.java
trunk/src/main/java/cc/kune/events/client/actions/Calendar7DaysViewSelectBtn.java
trunk/src/main/java/cc/kune/events/client/actions/CalendarGoNextAction.java
trunk/src/main/java/cc/kune/events/client/actions/CalendarGoNextBtn.java
trunk/src/main/java/cc/kune/events/client/actions/CalendarGoPrevAction.java
trunk/src/main/java/cc/kune/events/client/actions/CalendarGoPrevBtn.java
trunk/src/main/java/cc/kune/events/client/actions/CalendarGoTodayAction.java
trunk/src/main/java/cc/kune/events/client/actions/CalendarGoTodayBtn.java
trunk/src/main/java/cc/kune/events/client/actions/CalendarMonthViewSelectBtn.java
trunk/src/main/java/cc/kune/events/client/actions/CalendarViewSelectAction.java
trunk/src/main/java/cc/kune/events/client/viewer/
trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewer.java
trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java
trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPresenter.java
trunk/src/main/java/cc/kune/events/server/CalendarServerUtils.java
trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerView.java
trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerUtils.java
trunk/src/main/java/cc/kune/gspace/client/viewers/ToolbarStyles.java
trunk/src/test/java/cc/kune/events/
trunk/src/test/java/cc/kune/events/server/
trunk/src/test/java/cc/kune/events/server/CalendarServerUtilsTest.java
Modified:
trunk/.classpath
trunk/pom.xml
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/cc/kune/events/KuneEvents.gwt.xml
trunk/src/main/java/cc/kune/events/client/EventsGinModule.java
trunk/src/main/java/cc/kune/events/client/EventsGinjector.java
trunk/src/main/java/cc/kune/events/client/EventsParts.java
trunk/src/main/java/cc/kune/events/client/actions/EventsClientActions.java
trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java
trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java
trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java
trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java
trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java
trunk/src/test/java/cc/kune/gspace/client/viewers/FolderViewerPresenterTest.java
Log:
CLOSED - # 163: Empty messages in Views where not logged shoul be different to logged
http://kune.ourproject.org/issues/ticket/163
NEW - # 158: Add a Calendar view to event tool
http://kune.ourproject.org/issues/ticket/158
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/.classpath 2011-11-30 01:31:04 UTC (rev 1632)
@@ -12,6 +12,7 @@
<classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" sourcepath="M2_REPO/aopalliance/aopalliance/1.0/aopalliance-1.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar" sourcepath="M2_REPO/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/waveprotocol/box/0.3.7/box-0.3.7.jar"/>
<classpathentry kind="var" path="M2_REPO/org/waveprotocol/box-src/0.3.7/box-src-0.3.7.jar" sourcepath="M2_REPO/org/waveprotocol/box-src/0.3.7/box-src-0.3.7-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar"/>
@@ -49,6 +50,7 @@
<classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-assisted-inject/2.0/guice-assisted-inject-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-persist/3.0/guice-persist-3.0.jar" sourcepath="M2_REPO/com/google/inject/extensions/guice-persist/3.0/guice-persist-3.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0.jar" sourcepath="M2_REPO/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/bradrydzewski/gwt-cal/0.9.3-dndCreation/gwt-cal-0.9.3-dndCreation.jar"/>
<classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/dnd/gwt-dnd/gwt-dnd/3.0.1/gwt-dnd-3.0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/adamtacy/gwt-fx/r464/gwt-fx-r464.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-gin/1.0-r137/gwt-gin-1.0-r137.jar"/>
@@ -83,6 +85,7 @@
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpclient/4.1.2/httpclient-4.1.2-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpmime/4.1.2/httpmime-4.1.2.jar" sourcepath="M2_REPO/org/apache/httpcomponents/httpmime/4.1.2/httpmime-4.1.2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mnode/ical4j/ical4j/1.0.2/ical4j-1.0.2.jar" sourcepath="M2_REPO/org/mnode/ical4j/ical4j/1.0.2/ical4j-1.0.2-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/javassist/javassist/3.4.GA/javassist-3.4.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/org/slf4j/jcl-over-slf4j/1.6.1/jcl-over-slf4j-1.6.1.jar" sourcepath="M2_REPO/org/slf4j/jcl-over-slf4j/1.6.1/jcl-over-slf4j-1.6.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/com/beust/jcommander/1.12/jcommander-1.12.jar" sourcepath="M2_REPO/com/beust/jcommander/1.12/jcommander-1.12-sources.jar"/>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/pom.xml 2011-11-30 01:31:04 UTC (rev 1632)
@@ -694,6 +694,17 @@
<artifactId>mail</artifactId>
<version>1.4.4</version>
</dependency>
+ <!-- calendar -->
+ <dependency>
+ <groupId>com.bradrydzewski</groupId>
+ <artifactId>gwt-cal</artifactId>
+ <version>0.9.3-dndCreation</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mnode.ical4j</groupId>
+ <artifactId>ical4j</artifactId>
+ <version>1.0.2</version>
+ </dependency>
</dependencies>
<!-- <dependency> -->
@@ -805,13 +816,13 @@
<key>kune.server.config</key>
<value>src/main/resources/kune.properties</value>
</systemProperty>
-<!-- <systemProperty> -->
-<!-- <key>kune.db.persistence.name</key> -->
- <!-- Persistence name, choose between: production, development,
- test_db (testing environment using mysql db), test (testing environment using
- h2 db). See persistence.xml -->
-<!-- <value>development</value> -->
-<!-- </systemProperty> -->
+ <!-- <systemProperty> -->
+ <!-- <key>kune.db.persistence.name</key> -->
+ <!-- Persistence name, choose between: production, development,
+ test_db (testing environment using mysql db), test (testing environment using
+ h2 db). See persistence.xml -->
+ <!-- <value>development</value> -->
+ <!-- </systemProperty> -->
<systemProperty>
<key>wave.server.config</key>
<value>src/main/resources/wave-server.properties</value>
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-11-30 01:31:04 UTC (rev 1632)
@@ -1558,4 +1558,17 @@
.k-dotted-tabpanel .gwt-TabLayoutPanelTab-selected {
background-color: #dd8a3d;
+}
+
+/* Calendar */
+
+.gwt-cal-MonthView {
+ bottom: 0 !important;
+ height: auto !important;
+ left: 0 !important;
+ overflow: auto !important;
+ position: absolute !important;
+ right: 0 !important;
+ top: 0 !important;
+ width: auto !important;
}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/core/server/rack/AdminThread.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/rack/AdminThread.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/rack/AdminThread.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,41 @@
+package cc.kune.core.server.rack;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+import com.google.inject.Singleton;
+
+@Singleton
+public class AdminThread extends Thread {
+
+ private ServerSocket socket;
+
+ public AdminThread() {
+ setDaemon(true);
+ setName("StopMonitor");
+ try {
+ socket = new ServerSocket(8079, 1, InetAddress.getByName("127.0.0.1"));
+ } catch (final Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @Override
+ public void run() {
+ System.out.println("*** running jetty 'stop' thread");
+ Socket accept;
+ try {
+ accept = socket.accept();
+ final BufferedReader reader = new BufferedReader(new InputStreamReader(accept.getInputStream()));
+ reader.readLine();
+ System.out.println("*** stopping jetty embedded server");
+ accept.close();
+ socket.close();
+ } catch (final Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/events/KuneEvents.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/events/KuneEvents.gwt.xml 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/events/KuneEvents.gwt.xml 2011-11-30 01:31:04 UTC (rev 1632)
@@ -1,6 +1,9 @@
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.1.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.1.0/distro-source/core/…">
<module>
- <inherits name="cc.kune.core.KuneCore" />
- <source path="client" />
- <source path="shared" />
+ <inherits name="cc.kune.core.KuneCore"/>
+ <source path="client"/>
+ <source path="shared"/>
+ <inherits name='com.bradrydzewski.gwt.calendar.Calendar'/>
+ <inherits name='com.bradrydzewski.gwt.calendar.theme.google.Google'/>
+ <inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>
</module>
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/events/client/EventsGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/EventsGinModule.java 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/events/client/EventsGinModule.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -19,17 +19,37 @@
*/
package cc.kune.events.client;
+import cc.kune.common.client.ExtendedGinModule;
+import cc.kune.events.client.actions.Calendar1DayViewSelectBtn;
+import cc.kune.events.client.actions.Calendar3DaysViewSelectBtn;
+import cc.kune.events.client.actions.Calendar7DaysViewSelectBtn;
+import cc.kune.events.client.actions.CalendarGoNextBtn;
+import cc.kune.events.client.actions.CalendarGoPrevBtn;
+import cc.kune.events.client.actions.CalendarGoTodayBtn;
+import cc.kune.events.client.actions.CalendarMonthViewSelectBtn;
import cc.kune.events.client.actions.EventsClientActions;
+import cc.kune.events.client.viewer.CalendarViewer;
+import cc.kune.events.client.viewer.CalendarViewerPanel;
+import cc.kune.events.client.viewer.CalendarViewerPresenter;
import com.google.inject.Singleton;
-import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
-public class EventsGinModule extends AbstractPresenterModule {
+public class EventsGinModule extends ExtendedGinModule {
@Override
protected void configure() {
- bind(EventsClientTool.class).in(Singleton.class);
- bind(EventsClientActions.class).in(Singleton.class);
+ s(EventsClientTool.class);
+ s(EventsClientActions.class);
+ s(Calendar1DayViewSelectBtn.class);
+ s(Calendar3DaysViewSelectBtn.class);
+ s(Calendar7DaysViewSelectBtn.class);
+ s(CalendarMonthViewSelectBtn.class);
+ s(CalendarGoPrevBtn.class);
+ s(CalendarGoNextBtn.class);
+ s(CalendarGoTodayBtn.class);
+ bindPresenter(CalendarViewerPresenter.class, CalendarViewerPresenter.CalendarViewerView.class,
+ CalendarViewerPanel.class, CalendarViewerPresenter.CalendarViewerProxy.class);
+ bind(CalendarViewer.class).to(CalendarViewerPresenter.class).in(Singleton.class);
}
}
Modified: trunk/src/main/java/cc/kune/events/client/EventsGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/EventsGinjector.java 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/events/client/EventsGinjector.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -19,10 +19,14 @@
*/
package cc.kune.events.client;
+import cc.kune.events.client.viewer.CalendarViewerPresenter;
+
+import com.google.gwt.inject.client.AsyncProvider;
import com.google.gwt.inject.client.Ginjector;
public interface EventsGinjector extends Ginjector {
+ AsyncProvider<CalendarViewerPresenter> getCalendarViewerPresenter();
+
EventsParts getMeetingsParts();
-
}
Modified: trunk/src/main/java/cc/kune/events/client/EventsParts.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/EventsParts.java 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/events/client/EventsParts.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -21,10 +21,10 @@
import cc.kune.core.client.state.Session;
import cc.kune.events.client.actions.EventsClientActions;
+import cc.kune.events.client.viewer.CalendarViewer;
import cc.kune.events.shared.EventsConstants;
import cc.kune.gspace.client.tool.ContentViewerSelector;
import cc.kune.gspace.client.viewers.ContentViewerPresenter;
-import cc.kune.gspace.client.viewers.FolderViewerPresenter;
import com.google.inject.Inject;
import com.google.inject.Provider;
@@ -34,9 +34,10 @@
@Inject
public EventsParts(final Session session, final Provider<EventsClientTool> clientTool,
final ContentViewerSelector viewerSelector, final EventsClientActions meetsActions,
- final ContentViewerPresenter contentViewer, final FolderViewerPresenter folderViewer) {
+ final ContentViewerPresenter contentViewer, final CalendarViewer calendarViewer) {
clientTool.get();
+ // remove this...
viewerSelector.register(contentViewer, true, EventsConstants.TYPE_MEETING);
- viewerSelector.register(folderViewer, true, EventsConstants.TYPE_ROOT);
+ viewerSelector.register(calendarViewer, true, EventsConstants.TYPE_ROOT);
}
}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/events/client/actions/AbstractCalendarViewSelectBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/AbstractCalendarViewSelectBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/AbstractCalendarViewSelectBtn.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,18 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.gspace.client.viewers.ToolbarStyles;
+
+import com.bradrydzewski.gwt.calendar.client.CalendarViews;
+
+public class AbstractCalendarViewSelectBtn extends ButtonDescriptor {
+
+ public AbstractCalendarViewSelectBtn(final CalendarViewSelectAction action, final String text,
+ final int days, final CalendarViews view) {
+ super(text, action);
+ action.setDays(days);
+ action.setView(view);
+ this.withStyles(ToolbarStyles.CSSBTNC);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/events/client/actions/Calendar1DayViewSelectBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/Calendar1DayViewSelectBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/Calendar1DayViewSelectBtn.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,16 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.bradrydzewski.gwt.calendar.client.CalendarViews;
+import com.google.inject.Inject;
+
+public class Calendar1DayViewSelectBtn extends AbstractCalendarViewSelectBtn {
+
+ @Inject
+ public Calendar1DayViewSelectBtn(final CalendarViewSelectAction action,
+ final I18nTranslationService i18n) {
+ super(action, i18n.t("1 Day"), 1, CalendarViews.DAY);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/events/client/actions/Calendar3DaysViewSelectBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/Calendar3DaysViewSelectBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/Calendar3DaysViewSelectBtn.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,16 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.bradrydzewski.gwt.calendar.client.CalendarViews;
+import com.google.inject.Inject;
+
+public class Calendar3DaysViewSelectBtn extends AbstractCalendarViewSelectBtn {
+
+ @Inject
+ public Calendar3DaysViewSelectBtn(final CalendarViewSelectAction action,
+ final I18nTranslationService i18n) {
+ super(action, i18n.t("3 Days"), 3, CalendarViews.DAY);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/events/client/actions/Calendar7DaysViewSelectBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/Calendar7DaysViewSelectBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/Calendar7DaysViewSelectBtn.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,16 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.bradrydzewski.gwt.calendar.client.CalendarViews;
+import com.google.inject.Inject;
+
+public class Calendar7DaysViewSelectBtn extends AbstractCalendarViewSelectBtn {
+
+ @Inject
+ public Calendar7DaysViewSelectBtn(final CalendarViewSelectAction action,
+ final I18nTranslationService i18n) {
+ super(action, i18n.t("7 Days"), 7, CalendarViews.DAY);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/events/client/actions/CalendarGoNextAction.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/CalendarGoNextAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/CalendarGoNextAction.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,24 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.events.client.viewer.CalendarViewer;
+
+import com.google.inject.Inject;
+
+public class CalendarGoNextAction extends RolAction {
+
+ private final CalendarViewer calViewer;
+
+ @Inject
+ public CalendarGoNextAction(final CalendarViewer calViewer) {
+ super(AccessRolDTO.Viewer, false);
+ this.calViewer = calViewer;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ calViewer.increment();
+ }
+}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/events/client/actions/CalendarGoNextBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/CalendarGoNextBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/CalendarGoNextBtn.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,17 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.viewers.ToolbarStyles;
+
+import com.google.inject.Inject;
+
+public class CalendarGoNextBtn extends ButtonDescriptor {
+
+ @Inject
+ public CalendarGoNextBtn(final CalendarGoNextAction action, final I18nTranslationService i18n) {
+ super("»", action);
+ this.withToolTip(i18n.t("Next")).withStyles(ToolbarStyles.CSSBTNR);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/events/client/actions/CalendarGoPrevAction.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/CalendarGoPrevAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/CalendarGoPrevAction.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,24 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.events.client.viewer.CalendarViewer;
+
+import com.google.inject.Inject;
+
+public class CalendarGoPrevAction extends RolAction {
+
+ private final CalendarViewer calViewer;
+
+ @Inject
+ public CalendarGoPrevAction(final CalendarViewer calViewer) {
+ super(AccessRolDTO.Viewer, false);
+ this.calViewer = calViewer;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ calViewer.decrement();
+ }
+}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/events/client/actions/CalendarGoPrevBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/CalendarGoPrevBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/CalendarGoPrevBtn.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,17 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.viewers.ToolbarStyles;
+
+import com.google.inject.Inject;
+
+public class CalendarGoPrevBtn extends ButtonDescriptor {
+
+ @Inject
+ public CalendarGoPrevBtn(final CalendarGoPrevAction action, final I18nTranslationService i18n) {
+ super("«", action);
+ this.withToolTip(i18n.t("Previous")).withStyles(ToolbarStyles.CSSBTNL);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/events/client/actions/CalendarGoTodayAction.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/CalendarGoTodayAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/CalendarGoTodayAction.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,24 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.events.client.viewer.CalendarViewer;
+
+import com.google.inject.Inject;
+
+public class CalendarGoTodayAction extends RolAction {
+
+ private final CalendarViewer calViewer;
+
+ @Inject
+ public CalendarGoTodayAction(final CalendarViewer calViewer) {
+ super(AccessRolDTO.Viewer, false);
+ this.calViewer = calViewer;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ calViewer.goToday();
+ }
+}
Added: trunk/src/main/java/cc/kune/events/client/actions/CalendarGoTodayBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/CalendarGoTodayBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/CalendarGoTodayBtn.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,17 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.viewers.ToolbarStyles;
+
+import com.google.inject.Inject;
+
+public class CalendarGoTodayBtn extends ButtonDescriptor {
+
+ @Inject
+ public CalendarGoTodayBtn(final CalendarGoTodayAction action, final I18nTranslationService i18n) {
+ super(i18n.t("Today"), action);
+ this.withToolTip(i18n.t("Go To Today")).withStyles(ToolbarStyles.CSSBTN);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/events/client/actions/CalendarMonthViewSelectBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/CalendarMonthViewSelectBtn.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/CalendarMonthViewSelectBtn.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,16 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.bradrydzewski.gwt.calendar.client.CalendarViews;
+import com.google.inject.Inject;
+
+public class CalendarMonthViewSelectBtn extends AbstractCalendarViewSelectBtn {
+
+ @Inject
+ public CalendarMonthViewSelectBtn(final CalendarViewSelectAction action,
+ final I18nTranslationService i18n) {
+ super(action, i18n.t("Month"), 1, CalendarViews.MONTH);
+ }
+
+}
Added: trunk/src/main/java/cc/kune/events/client/actions/CalendarViewSelectAction.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/CalendarViewSelectAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/actions/CalendarViewSelectAction.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,39 @@
+package cc.kune.events.client.actions;
+
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.core.client.actions.RolAction;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.events.client.viewer.CalendarViewer;
+
+import com.bradrydzewski.gwt.calendar.client.CalendarViews;
+import com.google.inject.Inject;
+
+public class CalendarViewSelectAction extends RolAction {
+
+ private final CalendarViewer calViewer;
+ private int days;
+ private CalendarViews view;
+
+ @Inject
+ public CalendarViewSelectAction(final CalendarViewer calViewer) {
+ super(AccessRolDTO.Viewer, false);
+ this.calViewer = calViewer;
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ if (days != 0) {
+ calViewer.setView(view, days);
+ } else {
+ calViewer.setView(view);
+ }
+ }
+
+ public void setDays(final int days) {
+ this.days = days;
+ }
+
+ public void setView(final CalendarViews view) {
+ this.view = view;
+ }
+}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/events/client/actions/EventsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/actions/EventsClientActions.java 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/events/client/actions/EventsClientActions.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -49,16 +49,36 @@
final Provider<DelMeetingMenuItem> delContentMenuItem,
final Provider<ContentViewerOptionsMenu> optionsMenuContent,
final Provider<ParticipateInContentBtn> participateBtn,
- final Provider<RefreshContentMenuItem> refresh) {
+ final Provider<Calendar1DayViewSelectBtn> cal1DayBtn,
+ final Provider<Calendar3DaysViewSelectBtn> cal3DaysBtn,
+ final Provider<Calendar7DaysViewSelectBtn> cal7DaysBtn,
+ final Provider<CalendarMonthViewSelectBtn> calMonthBtn,
+ final Provider<CalendarGoPrevBtn> calPrevBtn, final Provider<CalendarGoNextBtn> calNextBtn,
+ final Provider<CalendarGoTodayBtn> goToday, final Provider<RefreshContentMenuItem> refresh) {
super(session, stateManager, i18n, registry);
actionsRegistry.addAction(ActionGroups.TOOLBAR, optionsMenuContent, all);
actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
- actionsRegistry.addAction(ActionGroups.TOOLBAR, newMeetingsBtn, containers);
- actionsRegistry.addAction(ActionGroups.TOOLBAR, participateBtn, contents);
- actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, all);
- actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, contents);
- actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem, containersNoRoot);
- actionsRegistry.addAction(ActionGroups.ITEM_MENU, delContentMenuItem, contents);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, goToday, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, calPrevBtn, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, cal1DayBtn, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, cal3DaysBtn, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, cal7DaysBtn, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, calMonthBtn, containers);
+ actionsRegistry.addAction(ActionGroups.TOOLBAR, calNextBtn, containers);
+
+ // For now, commented:
+ // actionsRegistry.addAction(ActionGroups.TOOLBAR, newMeetingsBtn,
+ // containers);
+ // actionsRegistry.addAction(ActionGroups.TOOLBAR, participateBtn,
+ // contents);
+ // actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, all);
+ // actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem,
+ // contents);
+ // actionsRegistry.addAction(ActionGroups.ITEM_MENU, openContentMenuItem,
+ // containersNoRoot);
+ // actionsRegistry.addAction(ActionGroups.ITEM_MENU, delContentMenuItem,
+ // contents);
+
}
@Override
Added: trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewer.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewer.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewer.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,23 @@
+package cc.kune.events.client.viewer;
+
+import java.util.Date;
+
+import cc.kune.gspace.client.tool.ContentViewer;
+
+import com.bradrydzewski.gwt.calendar.client.CalendarViews;
+
+public interface CalendarViewer extends ContentViewer {
+ void decrement();
+
+ Date getDate();
+
+ void goToday();
+
+ void increment();
+
+ void setDate(Date date);
+
+ void setView(CalendarViews view);
+
+ void setView(CalendarViews view, int days);
+}
Added: trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPanel.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,208 @@
+package cc.kune.events.client.viewer;
+
+import java.util.ArrayList;
+import java.util.Date;
+
+import cc.kune.common.client.actions.ui.bind.GuiProvider;
+import cc.kune.core.client.dnd.FolderViewerDropController;
+import cc.kune.core.client.dnd.KuneDragController;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.events.client.viewer.CalendarViewerPresenter.CalendarViewerView;
+import cc.kune.gspace.client.GSpaceArmor;
+import cc.kune.gspace.client.viewers.AbstractFolderViewerPanel;
+import cc.kune.gspace.client.viewers.FolderItemDescriptor;
+
+import com.bradrydzewski.gwt.calendar.client.Appointment;
+import com.bradrydzewski.gwt.calendar.client.AppointmentStyle;
+import com.bradrydzewski.gwt.calendar.client.Calendar;
+import com.bradrydzewski.gwt.calendar.client.CalendarViews;
+import com.bradrydzewski.gwt.calendar.client.event.CreateHandler;
+import com.bradrydzewski.gwt.calendar.client.event.DateRequestHandler;
+import com.bradrydzewski.gwt.calendar.client.event.DeleteHandler;
+import com.bradrydzewski.gwt.calendar.client.event.MouseOverHandler;
+import com.bradrydzewski.gwt.calendar.client.event.TimeBlockClickHandler;
+import com.bradrydzewski.gwt.calendar.client.event.UpdateHandler;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.DoubleClickHandler;
+import com.google.gwt.event.logical.shared.OpenHandler;
+import com.google.gwt.event.logical.shared.SelectionHandler;
+import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.event.shared.HandlerRegistration;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class CalendarViewerPanel extends AbstractFolderViewerPanel implements CalendarViewerView {
+
+ private final Calendar calendar;
+
+ @Inject
+ public CalendarViewerPanel(final GSpaceArmor gsArmor, final I18nTranslationService i18n,
+ final GuiProvider guiProvider, final CoreResources res,
+ final ContentCapabilitiesRegistry capabilitiesRegistry, final KuneDragController dragController,
+ final Provider<FolderViewerDropController> dropControllerProv) {
+ super(gsArmor, i18n, capabilitiesRegistry, dragController, dropControllerProv);
+ calendar = new Calendar();
+ // calendar.setWidth("auto");
+ // calendar.setHeight("auto");
+ widget = calendar;
+ }
+
+ @Override
+ public void addAppointment(final Appointment appointment) {
+ calendar.addAppointment(appointment);
+ }
+
+ @Override
+ public void addAppointment(final String title, final Date date) {
+ // Should this be used or serialize from server side?
+ final Appointment appt = new Appointment();
+ appt.setStart(date);
+ appt.setEnd(date);
+ appt.setTitle(title);
+ appt.setStyle(AppointmentStyle.ORANGE);
+ calendar.addAppointment(appt);
+ // FIXME NotiUser
+ }
+
+ @Override
+ public void addAppointments(final ArrayList<Appointment> appointments) {
+ calendar.addAppointments(appointments);
+ }
+
+ @Override
+ public HandlerRegistration addCreateHandler(final CreateHandler<Appointment> handler) {
+ return calendar.addCreateHandler(handler);
+ }
+
+ @Override
+ public HandlerRegistration addDateRequestHandler(final DateRequestHandler<Date> handler) {
+ return calendar.addDateRequestHandler(handler);
+ }
+
+ @Override
+ public HandlerRegistration addDeleteHandler(final DeleteHandler<Appointment> handler) {
+ return calendar.addDeleteHandler(handler);
+ }
+
+ @Override
+ public void addItem(final FolderItemDescriptor item, final ClickHandler clickHandler,
+ final DoubleClickHandler doubleClickHandler) {
+ // TODO Auto-generated method stub
+ }
+
+ @Override
+ public HandlerRegistration addMouseOverHandler(final MouseOverHandler<Appointment> handler) {
+ return calendar.addMouseOverHandler(handler);
+ }
+
+ @Override
+ public HandlerRegistration addOpenHandler(final OpenHandler<Appointment> handler) {
+ return calendar.addOpenHandler(handler);
+ }
+
+ @Override
+ public HandlerRegistration addSelectionHandler(final SelectionHandler<Appointment> handler) {
+ return calendar.addSelectionHandler(handler);
+ }
+
+ @Override
+ public HandlerRegistration addTimeBlockClickHandler(final TimeBlockClickHandler<Date> handler) {
+ return calendar.addTimeBlockClickHandler(handler);
+ }
+
+ @Override
+ public HandlerRegistration addUpdateHandler(final UpdateHandler<Appointment> handler) {
+ return calendar.addUpdateHandler(handler);
+ }
+
+ @Override
+ public void attach() {
+ super.attach();
+ gsArmor.enableCenterScroll(false);
+ }
+
+ @Override
+ public void clearAppointments() {
+ calendar.clearAppointments();
+ }
+
+ @Override
+ public void doLayout() {
+ calendar.doLayout();
+ }
+
+ @Override
+ public void fireEvent(final GwtEvent<?> event) {
+ calendar.fireEvent(event);
+ }
+
+ @Override
+ public Date getDate() {
+ return calendar.getDate();
+ }
+
+ @Override
+ public Appointment getSelectedAppointment() {
+ return calendar.getSelectedAppointment();
+ }
+
+ @Override
+ public void goToday() {
+ calendar.setDate(new Date()); // calendar date, not required
+ }
+
+ @Override
+ public boolean hasAppointmentSelected() {
+ return calendar.hasAppointmentSelected();
+ }
+
+ @Override
+ public void removeAppointment(final Appointment appointment) {
+ calendar.removeAppointment(appointment);
+ }
+
+ @Override
+ public void removeAppointment(final Appointment appointment, final boolean fireEvents) {
+ calendar.removeAppointment(appointment, fireEvents);
+ }
+
+ @Override
+ public void resumeLayout() {
+ calendar.resumeLayout();
+ }
+
+ @Override
+ public void setDate(final Date date) {
+ calendar.setDate(date);
+ }
+
+ @Override
+ public void setSelectedAppointment(final Appointment appointment) {
+ calendar.setSelectedAppointment(appointment);
+ }
+
+ @Override
+ public void setSelectedAppointment(final Appointment appointment, final boolean fireEvents) {
+ calendar.setSelectedAppointment(appointment, fireEvents);
+ }
+
+ @Override
+ public void setView(final CalendarViews view) {
+ calendar.setView(view);
+ calendar.scrollToHour(6);
+ }
+
+ @Override
+ public void setView(final CalendarViews view, final int days) {
+ calendar.setView(view, days);
+ calendar.scrollToHour(6);
+ }
+
+ @Override
+ public void suspendLayout() {
+ calendar.suspendLayout();
+ }
+
+}
Added: trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPresenter.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/client/viewer/CalendarViewerPresenter.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,176 @@
+package cc.kune.events.client.viewer;
+
+import java.util.Date;
+
+import javax.annotation.Nonnull;
+
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.core.shared.dto.HasContent;
+import cc.kune.gspace.client.viewers.AbstractFolderViewerView;
+import cc.kune.gspace.client.viewers.FolderViewerUtils;
+
+import com.bradrydzewski.gwt.calendar.client.Appointment;
+import com.bradrydzewski.gwt.calendar.client.CalendarViews;
+import com.bradrydzewski.gwt.calendar.client.HasAppointments;
+import com.bradrydzewski.gwt.calendar.client.HasLayout;
+import com.bradrydzewski.gwt.calendar.client.event.CreateHandler;
+import com.bradrydzewski.gwt.calendar.client.event.HasDateRequestHandlers;
+import com.bradrydzewski.gwt.calendar.client.event.HasDeleteHandlers;
+import com.bradrydzewski.gwt.calendar.client.event.HasMouseOverHandlers;
+import com.bradrydzewski.gwt.calendar.client.event.HasTimeBlockClickHandlers;
+import com.bradrydzewski.gwt.calendar.client.event.HasUpdateHandlers;
+import com.bradrydzewski.gwt.calendar.client.event.TimeBlockClickEvent;
+import com.bradrydzewski.gwt.calendar.client.event.TimeBlockClickHandler;
+import com.google.gwt.event.logical.shared.HasOpenHandlers;
+import com.google.gwt.event.logical.shared.HasSelectionHandlers;
+import com.google.gwt.event.logical.shared.SelectionEvent;
+import com.google.gwt.event.logical.shared.SelectionHandler;
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.event.shared.HandlerRegistration;
+import com.google.gwt.user.datepicker.client.CalendarUtil;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.Presenter;
+import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
+import com.gwtplatform.mvp.client.proxy.Proxy;
+import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;
+
+public class CalendarViewerPresenter extends
+ Presenter<CalendarViewerPresenter.CalendarViewerView, CalendarViewerPresenter.CalendarViewerProxy>
+ implements CalendarViewer {
+
+ @ProxyCodeSplit
+ public interface CalendarViewerProxy extends Proxy<CalendarViewerPresenter> {
+ }
+
+ public interface CalendarViewerView extends HasSelectionHandlers<Appointment>,
+ HasDeleteHandlers<Appointment>, HasOpenHandlers<Appointment>, HasTimeBlockClickHandlers<Date>,
+ HasUpdateHandlers<Appointment>, HasDateRequestHandlers<Date>, HasMouseOverHandlers<Appointment>,
+ HasLayout, HasAppointments, AbstractFolderViewerView {
+
+ void addAppointment(String title, Date date);
+
+ HandlerRegistration addCreateHandler(CreateHandler<Appointment> handler);
+
+ Date getDate();
+
+ void goToday();
+
+ void setDate(Date date);
+
+ void setView(CalendarViews view);
+
+ void setView(CalendarViews view, int days);
+
+ }
+
+ private static final CalendarViews DEF_VIEW = CalendarViews.DAY;
+ private CalendarViews currentCalView;
+ private int currentDaysView = 7;
+ private final FolderViewerUtils folderViewerUtils;
+
+ @Inject
+ public CalendarViewerPresenter(final EventBus eventBus, final CalendarViewerView view,
+ final CalendarViewerProxy proxy, final FolderViewerUtils folderViewerUtils) {
+ super(eventBus, view, proxy);
+ this.folderViewerUtils = folderViewerUtils;
+ addListeners();
+ setViewImpl(DEF_VIEW, currentDaysView);
+ }
+
+ private void addListeners() {
+ getView().addTimeBlockClickHandler(new TimeBlockClickHandler<Date>() {
+ @Override
+ public void onTimeBlockClick(final TimeBlockClickEvent<Date> event) {
+ getView().addAppointment("Only a test", event.getTarget());
+ NotifyUser.info("Appointment added but not yet saved (this is under development)");
+ }
+ });
+ getView().addSelectionHandler(new SelectionHandler<Appointment>() {
+ @Override
+ public void onSelection(final SelectionEvent<Appointment> event) {
+ // getView().removeAppointment(event.getSelectedItem());
+ }
+ });
+ }
+
+ @Override
+ public void attach() {
+ getView().attach();
+ }
+
+ @Override
+ public void decrement() {
+ incrementDate(false);
+ }
+
+ @Override
+ public void detach() {
+ getView().detach();
+ }
+
+ @Override
+ public Date getDate() {
+ return getView().getDate();
+ }
+
+ @Override
+ public void goToday() {
+ getView().goToday();
+ }
+
+ @Override
+ public void increment() {
+ incrementDate(true);
+ }
+
+ private void incrementDate(final boolean positive) {
+ final Date date = getDate();
+ switch (currentCalView) {
+ case DAY:
+ case AGENDA:
+ CalendarUtil.addDaysToDate(date, currentDaysView * (positive ? 1 : -1));
+ break;
+ case MONTH:
+ CalendarUtil.addMonthsToDate(date, (positive ? 1 : -1));
+ break;
+ }
+ setDate(date);
+ }
+
+ @Override
+ protected void revealInParent() {
+ RevealRootContentEvent.fire(this, this);
+ }
+
+ @Override
+ public void setContent(@Nonnull final HasContent state) {
+ folderViewerUtils.setContent(getView(), state);
+ }
+
+ @Override
+ public void setDate(final Date date) {
+ getView().setDate(date);
+ }
+
+ @Override
+ public void setView(final CalendarViews calView) {
+ setViewImpl(calView);
+ }
+
+ @Override
+ public void setView(final CalendarViews calView, final int days) {
+ setViewImpl(calView, days);
+ }
+
+ private void setViewImpl(final CalendarViews calView) {
+ this.currentCalView = calView;
+ this.currentDaysView = 1;
+ getView().setView(calView);
+ }
+
+ private void setViewImpl(final CalendarViews calView, final int days) {
+ this.currentCalView = calView;
+ this.currentDaysView = days;
+ getView().setView(calView, days);
+ }
+}
Added: trunk/src/main/java/cc/kune/events/server/CalendarServerUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/events/server/CalendarServerUtils.java (rev 0)
+++ trunk/src/main/java/cc/kune/events/server/CalendarServerUtils.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,71 @@
+package cc.kune.events.server;
+
+import net.fortuna.ical4j.model.Date;
+import net.fortuna.ical4j.model.DateTime;
+import net.fortuna.ical4j.model.Property;
+import net.fortuna.ical4j.model.TimeZone;
+import net.fortuna.ical4j.model.TimeZoneRegistry;
+import net.fortuna.ical4j.model.TimeZoneRegistryFactory;
+import net.fortuna.ical4j.model.component.VEvent;
+import net.fortuna.ical4j.model.component.VTimeZone;
+import net.fortuna.ical4j.model.parameter.Value;
+import net.fortuna.ical4j.model.property.Description;
+import net.fortuna.ical4j.model.property.DtEnd;
+import net.fortuna.ical4j.model.property.DtStart;
+import net.fortuna.ical4j.model.property.Location;
+import net.fortuna.ical4j.model.property.Summary;
+
+import com.bradrydzewski.gwt.calendar.client.Appointment;
+
+public class CalendarServerUtils {
+
+ public static VEvent from(final Appointment app) {
+ final TimeZoneRegistry registry = TimeZoneRegistryFactory.getInstance().createRegistry();
+ final TimeZone timezone = registry.getTimeZone("GMT");
+ final VTimeZone tz = timezone.getVTimeZone();
+
+ // FIXME here v timezone!!!
+ final DateTime start = new DateTime(app.getStart().getTime());
+ start.setTimeZone(timezone);
+ final DateTime end = new DateTime(app.getEnd().getTime());
+ end.setTimeZone(timezone);
+ VEvent event;
+ if (app.isAllDay()) {
+ event = new VEvent();
+ event.getProperties().add(new DtStart(new Date(app.getStart().getTime())));
+ event.getProperties().add(new DtEnd(new Date(app.getEnd().getTime())));
+ event.getProperties().getProperty(Property.DTSTART).getParameters().add(Value.DATE);
+ event.getProperties().getProperty(Property.DTEND).getParameters().add(Value.DATE);
+ } else {
+ event = new VEvent(start, end, app.getTitle());
+ event.getProperties().getProperty(Property.DTSTART).getParameters().add(Value.DATE_TIME);
+ event.getProperties().getProperty(Property.DTEND).getParameters().add(Value.DATE_TIME);
+ }
+ event.getProperties().add(new Summary(app.getTitle()));
+ event.getProperties().add(new Description(app.getDescription()));
+ event.getProperties().add(new Location(app.getLocation()));
+ // FIXME uid
+ // event.getProperties().add( new UidGenerator()app.getId()));
+ return event;
+ }
+
+ public static Appointment to(final VEvent event) {
+ final Appointment app = new Appointment();
+
+ // FIXME: see spec
+ app.setDescription(event.getDescription().getValue());
+ app.setStart(new java.util.Date(event.getStartDate().getDate().getTime()));
+ app.setEnd(new java.util.Date(event.getEndDate().getDate().getTime()));
+
+ // FIXME: see spec
+ app.setLocation(event.getLocation().getValue());
+ // final Uid uid = event.getUid();
+ // if (uid != null) {
+ // app.setId(uid.getValue());
+ // }
+ app.setAllDay(!(event.getStartDate().getDate() instanceof DateTime));
+ app.setTitle(event.getSummary().getValue());
+ return app;
+ }
+
+}
Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceArmor.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -35,7 +35,7 @@
ForIsWidget getDocFooter();
- IsActionExtensible getEntityFooterToolbar();
+ IsActionExtensible getDocFooterToolbar();
ForIsWidget getDocHeader();
@@ -43,6 +43,8 @@
ForIsWidget getEntityFooter();
+ IsActionExtensible getEntityFooterToolbar();
+
ForIsWidget getEntityHeader();
ForIsWidget getEntityToolsCenter();
@@ -51,8 +53,6 @@
ForIsWidget getEntityToolsSouth();
- IsActionExtensible getDocFooterToolbar();
-
IsActionExtensible getHeaderToolbar();
SimplePanel getHomeSpace();
Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -114,6 +114,7 @@
import cc.kune.gspace.client.viewers.ContentViewerPresenter;
import cc.kune.gspace.client.viewers.FolderViewerAsTablePanel;
import cc.kune.gspace.client.viewers.FolderViewerPresenter;
+import cc.kune.gspace.client.viewers.FolderViewerUtils;
import cc.kune.gspace.client.viewers.NoHomePageViewer;
import cc.kune.gspace.client.viewers.PathToolbarUtils;
@@ -129,7 +130,7 @@
@Override
protected void configure() {
s(PathToolbarUtils.class);
-
+ s(FolderViewerUtils.class);
bindPresenter(EntityLicensePresenter.class, EntityLicensePresenter.EntityLicenseView.class,
EntityLicensePanel.class, EntityLicensePresenter.EntityLicenseProxy.class);
bindPresenter(TagsSummaryPresenter.class, TagsSummaryPresenter.TagsSummaryView.class,
Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -74,8 +74,10 @@
final Provider<GiveUsFeedbackBtn> giveUsFeedback,
final Provider<I18nToTranslateGridPanel> toTrans,
final Provider<I18nTranslatorTabsCollection> gtranslator,
- final Provider<WriteToBuddyHeaderButton> writeToBuddie) {
+ final Provider<WriteToBuddyHeaderButton> writeToBuddie
+ ) {
+
session.onAppStart(true, new AppStartHandler() {
@Override
public void onAppStart(final AppStartEvent event) {
Added: trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerView.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,36 @@
+package cc.kune.gspace.client.viewers;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
+import cc.kune.common.client.ui.HasEditHandler;
+import cc.kune.core.shared.dto.StateContainerDTO;
+
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.DoubleClickHandler;
+import com.gwtplatform.mvp.client.View;
+
+public interface AbstractFolderViewerView extends View {
+ void addItem(FolderItemDescriptor item, ClickHandler clickHandler,
+ DoubleClickHandler doubleClickHandler);
+
+ void attach();
+
+ void clear();
+
+ void detach();
+
+ void editTitle();
+
+ HasEditHandler getEditTitle();
+
+ void highlightTitle();
+
+ void setContainer(StateContainerDTO state);
+
+ void setEditableTitle(String title);
+
+ void setFooterActions(GuiActionDescCollection actions);
+
+ void setSubheaderActions(GuiActionDescCollection actions);
+
+ void showEmptyMsg(String message);
+}
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -21,44 +21,20 @@
import javax.annotation.Nonnull;
-import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
import cc.kune.common.client.ui.EditEvent;
import cc.kune.common.client.ui.EditEvent.EditHandler;
-import cc.kune.common.client.ui.HasEditHandler;
-import cc.kune.common.client.utils.TextUtils;
-import cc.kune.core.client.actions.ActionRegistryByType;
-import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
-import cc.kune.core.client.registry.IconsRegistry;
-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;
-import cc.kune.core.shared.domain.utils.AccessRights;
import cc.kune.core.shared.domain.utils.StateToken;
-import cc.kune.core.shared.dto.AbstractContentSimpleDTO;
-import cc.kune.core.shared.dto.BasicMimeTypeDTO;
-import cc.kune.core.shared.dto.ContainerDTO;
-import cc.kune.core.shared.dto.ContainerSimpleDTO;
-import cc.kune.core.shared.dto.ContentSimpleDTO;
import cc.kune.core.shared.dto.HasContent;
-import cc.kune.core.shared.dto.StateContainerDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.actions.ActionGroups;
import cc.kune.gspace.client.actions.RenameAction;
import cc.kune.gspace.client.actions.RenameListener;
import cc.kune.gspace.client.tool.ContentViewer;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.dom.client.DoubleClickEvent;
-import com.google.gwt.event.dom.client.DoubleClickHandler;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.HandlerRegistration;
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;
@@ -71,103 +47,25 @@
public interface FolderViewerProxy extends Proxy<FolderViewerPresenter> {
}
- public interface FolderViewerView extends View {
-
+ public interface FolderViewerView extends AbstractFolderViewerView {
long NO_DATE = 0;
-
- void addItem(FolderItemDescriptor item, ClickHandler clickHandler,
- DoubleClickHandler doubleClickHandler);
-
- void attach();
-
- void clear();
-
- void detach();
-
- void editTitle();
-
- HasEditHandler getEditTitle();
-
- void highlightTitle();
-
- void setContainer(StateContainerDTO state);
-
- void setEditableTitle(String title);
-
- void setFooterActions(GuiActionDescCollection actions);
-
- void setSubheaderActions(GuiActionDescCollection actions);
-
- void showEmptyMsg(String message);
}
- private final ActionRegistryByType actionsRegistry;
- private final ContentCapabilitiesRegistry capabilitiesRegistry;
- private final Provider<FileDownloadUtils> downloadUtilsProvider;
private HandlerRegistration editHandler;
- private final I18nTranslationService i18n;
- private final IconsRegistry iconsRegistry;
- private final PathToolbarUtils pathToolbarUtils;
+ private final FolderViewerUtils folderViewerUtils;
private final Provider<RenameAction> renameAction;
private final Session session;
- private final StateManager stateManager;
- private final boolean useGenericImageIcon;
@Inject
public FolderViewerPresenter(final EventBus eventBus, final FolderViewerView view,
- final FolderViewerProxy proxy, final Session session, final StateManager stateManager,
- final I18nTranslationService i18n, final ActionRegistryByType actionsRegistry,
- final Provider<FileDownloadUtils> downloadUtilsProvider,
- final Provider<RenameAction> renameAction, final ContentCapabilitiesRegistry capabilitiesRegistry,
- final PathToolbarUtils pathToolbarUtils) {
+ final FolderViewerProxy proxy, final Session session, final Provider<RenameAction> renameAction,
+ final FolderViewerUtils folderViewerUtils) {
super(eventBus, view, proxy);
this.session = session;
- this.stateManager = stateManager;
- this.i18n = i18n;
- this.actionsRegistry = actionsRegistry;
- this.downloadUtilsProvider = downloadUtilsProvider;
- this.capabilitiesRegistry = capabilitiesRegistry;
- this.pathToolbarUtils = pathToolbarUtils;
- iconsRegistry = capabilitiesRegistry.getIconsRegistry();
- useGenericImageIcon = false;
+ this.folderViewerUtils = folderViewerUtils;
this.renameAction = renameAction;
}
- private void addItem(final AbstractContentSimpleDTO content, final BasicMimeTypeDTO mimeType,
- final ContentStatus status, final StateToken parentStateToken, final AccessRights rights,
- final long modifiedOn) {
- final StateToken stateToken = content.getStateToken();
- final String typeId = content.getTypeId();
- final String name = content.getName();
- final Object icon = mimeType != null ? getIcon(stateToken, typeId, mimeType) : getIcon(stateToken,
- typeId, status);
- final String tooltip = getTooltip(stateToken, mimeType, capabilitiesRegistry.isDragable(typeId)
- && rights.isAdministrable());
- if (status.equals(ContentStatus.inTheDustbin)
- && (!capabilitiesRegistry.showDeleted(typeId) && !session.getShowDeletedContent())) {
- // Don't show
- // NotifyUser.info("Deleted, don't show");
- } else {
- final FolderItemDescriptor item = new FolderItemDescriptor(genId(stateToken),
- genId(parentStateToken), icon, name, tooltip, status, stateToken, modifiedOn,
- capabilitiesRegistry.isDragable(typeId) && rights.isAdministrable(),
- capabilitiesRegistry.isDropable(typeId) && rights.isAdministrable(),
- actionsRegistry.getCurrentActions(content, typeId, status, session.isLogged(), rights,
- ActionGroups.ITEM_MENU));
- getView().addItem(item, new ClickHandler() {
- @Override
- public void onClick(final ClickEvent event) {
- stateManager.gotoStateToken(stateToken);
- }
- }, new DoubleClickHandler() {
- @Override
- public void onDoubleClick(final DoubleClickEvent event) {
- stateManager.gotoStateToken(stateToken);
- }
- });
- }
- }
-
@Override
public void attach() {
getView().attach();
@@ -176,33 +74,6 @@
}
}
- private void createChildItems(final ContainerDTO container, final AccessRights containerRights) {
- if (container.getContents().size() + container.getChilds().size() == 0) {
- String msg = null;
- final String typeId = container.getTypeId();
- if (session.isLogged()) {
- msg = capabilitiesRegistry.getEmptyMessagesRegistry().getContentTypeIcon(typeId);
- } else {
- msg = capabilitiesRegistry.getEmptyMessagesRegistryNotLogged().getContentTypeIcon(typeId);
- }
- final String emptyMessage = TextUtils.empty(msg) ? i18n.t("This is empty.") : i18n.t(msg);
- getView().showEmptyMsg(emptyMessage);
- } else {
- // Folders
- for (final ContainerSimpleDTO childFolder : container.getChilds()) {
- addItem(childFolder, null, ContentStatus.publishedOnline,
- childFolder.getStateToken().copy().setFolder(childFolder.getParentFolderId()),
- containerRights, FolderViewerView.NO_DATE);
- }
- // Other contents (docs, etc)
- for (final ContentSimpleDTO content : container.getContents()) {
- assert content != null;
- addItem(content, content.getMimeType(), content.getStatus(),
- content.getStateToken().copy().clearDocument(), content.getRights(), content.getModifiedOn());
- }
- }
- }
-
private void createEditHandler() {
// Duplicate in DocViewerPresenter
editHandler = getView().getEditTitle().addEditHandler(new EditHandler() {
@@ -233,34 +104,6 @@
getView().editTitle();
}
- private String genId(final StateToken token) {
- return "k-cnav-" + token.toString().replace(StateToken.SEPARATOR, "-");
- }
-
- private Object getIcon(final StateToken token, final String contentTypeId,
- final BasicMimeTypeDTO mimeType) {
- if (!useGenericImageIcon && mimeType != null && mimeType.getType().equals("image")) {
- return downloadUtilsProvider.get().getImageResizedUrl(token, ImageSize.ico);
- } else {
- return iconsRegistry.getContentTypeIcon(contentTypeId, mimeType);
- }
- }
-
- private Object getIcon(final StateToken stateToken, final String typeId, final ContentStatus status) {
- return iconsRegistry.getContentTypeIcon(typeId, status);
- }
-
- private String getTooltip(final StateToken token, final BasicMimeTypeDTO mimeType,
- final boolean draggable) {
- if (mimeType != null && (mimeType.isImage() || mimeType.isPdf())) {
- // Used for previews
- return null;
- } else {
- return draggable ? i18n.t("Double click to open. Drag and drop to move this to another place")
- : i18n.t("Double click to open");
- }
- }
-
public void highlightTitle() {
getView().highlightTitle();
}
@@ -276,17 +119,6 @@
@Override
public void setContent(@Nonnull final HasContent state) {
- getView().clear();
- final StateContainerDTO stateContainer = (StateContainerDTO) state;
- getView().setContainer(stateContainer);
- final AccessRights rights = stateContainer.getContainerRights();
- // NotifyUser.info("Rights: " + rights, true);
- final GuiActionDescCollection actions = actionsRegistry.getCurrentActions(stateContainer.getGroup(),
- stateContainer.getTypeId(), session.isLogged(), rights, ActionGroups.TOOLBAR);
- final ContainerDTO container = stateContainer.getContainer();
- final GuiActionDescCollection pathActions = pathToolbarUtils.createPath(container, true);
- getView().setSubheaderActions(actions);
- getView().setFooterActions(pathActions);
- createChildItems(container, stateContainer.getContainerRights());
+ folderViewerUtils.setContent(getView(), state);
}
}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerUtils.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerUtils.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,171 @@
+package cc.kune.gspace.client.viewers;
+
+import javax.annotation.Nonnull;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
+import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.client.actions.ActionRegistryByType;
+import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
+import cc.kune.core.client.registry.IconsRegistry;
+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;
+import cc.kune.core.shared.domain.utils.AccessRights;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.AbstractContentSimpleDTO;
+import cc.kune.core.shared.dto.BasicMimeTypeDTO;
+import cc.kune.core.shared.dto.ContainerDTO;
+import cc.kune.core.shared.dto.ContainerSimpleDTO;
+import cc.kune.core.shared.dto.ContentSimpleDTO;
+import cc.kune.core.shared.dto.HasContent;
+import cc.kune.core.shared.dto.StateContainerDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.ActionGroups;
+import cc.kune.gspace.client.viewers.FolderViewerPresenter.FolderViewerView;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.DoubleClickEvent;
+import com.google.gwt.event.dom.client.DoubleClickHandler;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class FolderViewerUtils {
+
+ private final ActionRegistryByType actionsRegistry;
+ private final ContentCapabilitiesRegistry capabilitiesRegistry;
+ private final Provider<FileDownloadUtils> downloadUtilsProvider;
+ private final I18nTranslationService i18n;
+ private final IconsRegistry iconsRegistry;
+ private final PathToolbarUtils pathToolbarUtils;
+ private final Session session;
+ private final StateManager stateManager;
+ private AbstractFolderViewerView view;
+
+ @Inject
+ public FolderViewerUtils(final ContentCapabilitiesRegistry capabilitiesRegistry,
+ final Session session, final Provider<FileDownloadUtils> downloadUtilsProvider,
+ final I18nTranslationService i18n, final ActionRegistryByType actionsRegistry,
+ final StateManager stateManager, final PathToolbarUtils pathToolbarUtils) {
+ this.capabilitiesRegistry = capabilitiesRegistry;
+ this.session = session;
+ this.downloadUtilsProvider = downloadUtilsProvider;
+ this.i18n = i18n;
+ this.actionsRegistry = actionsRegistry;
+ this.stateManager = stateManager;
+ this.iconsRegistry = capabilitiesRegistry.getIconsRegistry();
+ this.pathToolbarUtils = pathToolbarUtils;
+ }
+
+ private void addItem(final AbstractContentSimpleDTO content, final BasicMimeTypeDTO mimeType,
+ final ContentStatus status, final StateToken parentStateToken, final AccessRights rights,
+ final long modifiedOn) {
+ final StateToken stateToken = content.getStateToken();
+ final String typeId = content.getTypeId();
+ final String name = content.getName();
+ final Object icon = mimeType != null ? getIcon(stateToken, typeId, mimeType) : getIcon(stateToken,
+ typeId, status);
+ final String tooltip = getTooltip(stateToken, mimeType, capabilitiesRegistry.isDragable(typeId)
+ && rights.isAdministrable());
+ if (status.equals(ContentStatus.inTheDustbin)
+ && (!capabilitiesRegistry.showDeleted(typeId) && !session.getShowDeletedContent())) {
+ // Don't show
+ // NotifyUser.info("Deleted, don't show");
+ } else {
+ final FolderItemDescriptor item = new FolderItemDescriptor(genId(stateToken),
+ genId(parentStateToken), icon, name, tooltip, status, stateToken, modifiedOn,
+ capabilitiesRegistry.isDragable(typeId) && rights.isAdministrable(),
+ capabilitiesRegistry.isDropable(typeId) && rights.isAdministrable(),
+ actionsRegistry.getCurrentActions(content, typeId, status, session.isLogged(), rights,
+ ActionGroups.ITEM_MENU));
+ getView().addItem(item, new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ stateManager.gotoStateToken(stateToken);
+ }
+ }, new DoubleClickHandler() {
+ @Override
+ public void onDoubleClick(final DoubleClickEvent event) {
+ stateManager.gotoStateToken(stateToken);
+ }
+ });
+ }
+ }
+
+ private void createChildItems(final ContainerDTO container, final AccessRights containerRights) {
+ if (container.getContents().size() + container.getChilds().size() == 0) {
+ String msg = null;
+ final String typeId = container.getTypeId();
+ if (session.isLogged()) {
+ msg = capabilitiesRegistry.getEmptyMessagesRegistry().getContentTypeIcon(typeId);
+ } else {
+ msg = capabilitiesRegistry.getEmptyMessagesRegistryNotLogged().getContentTypeIcon(typeId);
+ }
+ final String emptyMessage = TextUtils.empty(msg) ? i18n.t("This is empty.") : i18n.t(msg);
+ getView().showEmptyMsg(emptyMessage);
+ } else {
+ // Folders
+ for (final ContainerSimpleDTO childFolder : container.getChilds()) {
+ addItem(childFolder, null, ContentStatus.publishedOnline,
+ childFolder.getStateToken().copy().setFolder(childFolder.getParentFolderId()),
+ containerRights, FolderViewerView.NO_DATE);
+ }
+ // Other contents (docs, etc)
+ for (final ContentSimpleDTO content : container.getContents()) {
+ assert content != null;
+ addItem(content, content.getMimeType(), content.getStatus(),
+ content.getStateToken().copy().clearDocument(), content.getRights(), content.getModifiedOn());
+ }
+ }
+ }
+
+ private String genId(final StateToken token) {
+ return "k-cnav-" + token.toString().replace(StateToken.SEPARATOR, "-");
+ }
+
+ private Object getIcon(final StateToken token, final String contentTypeId,
+ final BasicMimeTypeDTO mimeType) {
+ if (mimeType != null && mimeType.getType().equals("image")) {
+ return downloadUtilsProvider.get().getImageResizedUrl(token, ImageSize.ico);
+ } else {
+ return iconsRegistry.getContentTypeIcon(contentTypeId, mimeType);
+ }
+ }
+
+ private Object getIcon(final StateToken stateToken, final String typeId, final ContentStatus status) {
+ return iconsRegistry.getContentTypeIcon(typeId, status);
+ }
+
+ private String getTooltip(final StateToken token, final BasicMimeTypeDTO mimeType,
+ final boolean draggable) {
+ if (mimeType != null && (mimeType.isImage() || mimeType.isPdf())) {
+ // Used for previews
+ return null;
+ } else {
+ return draggable ? i18n.t("Double click to open. Drag and drop to move this to another place")
+ : i18n.t("Double click to open");
+ }
+ }
+
+ private AbstractFolderViewerView getView() {
+ return view;
+ }
+
+ public void setContent(final AbstractFolderViewerView view, @Nonnull final HasContent state) {
+ this.view = view;
+ getView().clear();
+ final StateContainerDTO stateContainer = (StateContainerDTO) state;
+ getView().setContainer(stateContainer);
+ final AccessRights rights = stateContainer.getContainerRights();
+ // NotifyUser.info("Rights: " + rights, true);
+ final GuiActionDescCollection actions = actionsRegistry.getCurrentActions(stateContainer.getGroup(),
+ stateContainer.getTypeId(), session.isLogged(), rights, ActionGroups.TOOLBAR);
+ final ContainerDTO container = stateContainer.getContainer();
+ final GuiActionDescCollection pathActions = pathToolbarUtils.createPath(container, true);
+ getView().setSubheaderActions(actions);
+ getView().setFooterActions(pathActions);
+ createChildItems(container, stateContainer.getContainerRights());
+ }
+}
Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -37,11 +37,6 @@
public class PathToolbarUtils {
- protected static final String CSSBTN = "k-button, k-fl";
- protected static final String CSSBTNC = "k-button, k-button-center, k-fl";
- protected static final String CSSBTNL = "k-button, k-button-left, k-fl";
- protected static final String CSSBTNR = "k-button, k-button-right, k-fl";
-
private final Provider<FolderViewerDropController> dropController;
private final EventBus eventBus;
private final I18nTranslationService i18n;
@@ -61,15 +56,15 @@
String calculateStyle(final int pos, final int length) {
if (length == 1) {
- return CSSBTN;
+ return ToolbarStyles.CSSBTN;
}
if (pos == 0) {
- return CSSBTNL;
+ return ToolbarStyles.CSSBTNL;
}
if (pos == length - 1) {
- return CSSBTNR;
+ return ToolbarStyles.CSSBTNR;
}
- return CSSBTNC;
+ return ToolbarStyles.CSSBTNC;
}
public GuiActionDescCollection createPath(final ContainerDTO container, final boolean withDrop) {
Added: trunk/src/main/java/cc/kune/gspace/client/viewers/ToolbarStyles.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/ToolbarStyles.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/ToolbarStyles.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,8 @@
+package cc.kune.gspace.client.viewers;
+
+public class ToolbarStyles {
+ public static final String CSSBTN = "k-button, k-fl";
+ public static final String CSSBTNC = "k-button, k-button-center, k-fl";
+ public static final String CSSBTNL = "k-button, k-button-left, k-fl";
+ public static final String CSSBTNR = "k-button, k-button-right, k-fl";
+}
\ No newline at end of file
Added: trunk/src/test/java/cc/kune/events/server/CalendarServerUtilsTest.java
===================================================================
--- trunk/src/test/java/cc/kune/events/server/CalendarServerUtilsTest.java (rev 0)
+++ trunk/src/test/java/cc/kune/events/server/CalendarServerUtilsTest.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -0,0 +1,81 @@
+package cc.kune.events.server;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Date;
+
+import net.fortuna.ical4j.model.DateTime;
+import net.fortuna.ical4j.model.component.VEvent;
+import net.fortuna.ical4j.util.Dates;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+import com.bradrydzewski.gwt.calendar.client.Appointment;
+
+public class CalendarServerUtilsTest {
+
+ private static final String DESCRIPTION = "some description";
+ private static final String ID = "some id";
+ private static final String TITLE = "some title";
+
+ private void checkConversionFromAndTo(final Appointment initialApp, final boolean allDay) {
+ final VEvent vevent = CalendarServerUtils.from(initialApp);
+ assertEquals(initialApp.getDescription(), vevent.getDescription().getValue());
+ assertEquals(initialApp.getTitle(), vevent.getSummary().getValue());
+ if (allDay) {
+ final Date start = initialApp.getStart();
+ start.setHours(0);
+ start.setMinutes(0);
+ start.setSeconds(0);
+ assertEquals(start, new Date(vevent.getStartDate().getDate().getTime()));
+ assertEquals(initialApp.getEnd(), vevent.getEndDate().getDate());
+ } else {
+ assertEquals(initialApp.getStart().getTime(), vevent.getStartDate().getDate().getTime());
+ assertEquals(initialApp.getEnd().getTime(), vevent.getEndDate().getDate().getTime());
+ }
+ assertEquals(allDay, initialApp.isAllDay());
+ assertEquals(allDay, !(vevent.getStartDate().getDate() instanceof DateTime));
+ // final Uid uid = vevent.getUid();
+ // assertEquals(initialApp.getId(), uid != null ? uid.getValue() : null);
+ final Appointment reconvertedApp = CalendarServerUtils.to(vevent);
+ assertEquals(initialApp.getTitle(), reconvertedApp.getTitle());
+ assertEquals(initialApp.getDescription(), reconvertedApp.getDescription());
+ // assertEquals(initialApp.getId(), endApp.getId());
+ assertEquals(allDay, reconvertedApp.isAllDay());
+ assertEquals(initialApp.getStart().getTime(), reconvertedApp.getStart().getTime());
+ assertEquals(initialApp.getEnd().getTime(), reconvertedApp.getEnd().getTime());
+ assertTrue(initialApp.compareTo(reconvertedApp) == 0);
+ }
+
+ @Test
+ public void testFromToFrom() {
+ final Appointment initialApp = new Appointment();
+ initialApp.setTitle(TITLE);
+ initialApp.setDescription(DESCRIPTION);
+ initialApp.setStart(new Date(Dates.getCurrentTimeRounded()));
+ initialApp.setEnd(new Date(Dates.getCurrentTimeRounded()));
+ initialApp.setId(ID);
+ final boolean allDay = false;
+ initialApp.setAllDay(allDay);
+
+ checkConversionFromAndTo(initialApp, allDay);
+ }
+
+ @Ignore
+ @Test
+ public void testFromToFromAllDay() {
+ final Appointment initialApp = new Appointment();
+ initialApp.setTitle(TITLE);
+ initialApp.setDescription(DESCRIPTION);
+ initialApp.setStart(new Date(Dates.getCurrentTimeRounded()));
+ initialApp.setEnd(new Date(Dates.getCurrentTimeRounded()));
+ initialApp.setId(ID);
+ final boolean allDay = true;
+ initialApp.setAllDay(allDay);
+
+ checkConversionFromAndTo(initialApp, allDay);
+ }
+
+}
Modified: trunk/src/test/java/cc/kune/gspace/client/viewers/FolderViewerPresenterTest.java
===================================================================
--- trunk/src/test/java/cc/kune/gspace/client/viewers/FolderViewerPresenterTest.java 2011-11-29 01:15:20 UTC (rev 1631)
+++ trunk/src/test/java/cc/kune/gspace/client/viewers/FolderViewerPresenterTest.java 2011-11-30 01:31:04 UTC (rev 1632)
@@ -19,10 +19,6 @@
*/
package cc.kune.gspace.client.viewers;
-import static cc.kune.gspace.client.viewers.PathToolbarUtils.CSSBTN;
-import static cc.kune.gspace.client.viewers.PathToolbarUtils.CSSBTNC;
-import static cc.kune.gspace.client.viewers.PathToolbarUtils.CSSBTNL;
-import static cc.kune.gspace.client.viewers.PathToolbarUtils.CSSBTNR;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
@@ -43,27 +39,27 @@
@Test
public void with1() {
- assertEquals(CSSBTN, presenter.calculateStyle(0, 1));
+ assertEquals(ToolbarStyles.CSSBTN, presenter.calculateStyle(0, 1));
}
@Test
public void with2() {
- assertEquals(CSSBTNL, presenter.calculateStyle(0, 2));
- assertEquals(CSSBTNR, presenter.calculateStyle(1, 2));
+ assertEquals(ToolbarStyles.CSSBTNL, presenter.calculateStyle(0, 2));
+ assertEquals(ToolbarStyles.CSSBTNR, presenter.calculateStyle(1, 2));
}
@Test
public void with3() {
- assertEquals(CSSBTNL, presenter.calculateStyle(0, 3));
- assertEquals(CSSBTNC, presenter.calculateStyle(1, 3));
- assertEquals(CSSBTNR, presenter.calculateStyle(2, 3));
+ assertEquals(ToolbarStyles.CSSBTNL, presenter.calculateStyle(0, 3));
+ assertEquals(ToolbarStyles.CSSBTNC, presenter.calculateStyle(1, 3));
+ assertEquals(ToolbarStyles.CSSBTNR, presenter.calculateStyle(2, 3));
}
@Test
public void with4() {
- assertEquals(CSSBTNL, presenter.calculateStyle(0, 4));
- assertEquals(CSSBTNC, presenter.calculateStyle(1, 4));
- assertEquals(CSSBTNC, presenter.calculateStyle(2, 4));
- assertEquals(CSSBTNR, presenter.calculateStyle(3, 4));
+ assertEquals(ToolbarStyles.CSSBTNL, presenter.calculateStyle(0, 4));
+ assertEquals(ToolbarStyles.CSSBTNC, presenter.calculateStyle(1, 4));
+ assertEquals(ToolbarStyles.CSSBTNC, presenter.calculateStyle(2, 4));
+ assertEquals(ToolbarStyles.CSSBTNR, presenter.calculateStyle(3, 4));
}
}
1
0
29 Nov '11
Author: vjrj_
Date: 2011-11-29 02:15:20 +0100 (Tue, 29 Nov 2011)
New Revision: 1631
Modified:
trunk/src/main/java/cc/kune/chat/client/actions/ChatSitebarActions.java
Log:
CLOSED - # 172: Remove "available for chat" status
http://kune.ourproject.org/issues/ticket/172
Modified: trunk/src/main/java/cc/kune/chat/client/actions/ChatSitebarActions.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/actions/ChatSitebarActions.java 2011-11-28 16:19:48 UTC (rev 1630)
+++ trunk/src/main/java/cc/kune/chat/client/actions/ChatSitebarActions.java 2011-11-29 01:15:20 UTC (rev 1631)
@@ -19,15 +19,21 @@
*/
package cc.kune.chat.client.actions;
+import org.waveprotocol.box.webclient.client.ClientEvents;
+import org.waveprotocol.box.webclient.client.events.NetworkStatusEvent;
+import org.waveprotocol.box.webclient.client.events.NetworkStatusEventHandler;
+
import cc.kune.chat.client.ChatClient;
import cc.kune.chat.client.ChatInstances;
import cc.kune.chat.client.resources.ChatResources;
import cc.kune.common.client.actions.AbstractAction;
import cc.kune.common.client.actions.AbstractExtendedAction;
import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuRadioItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuSeparatorDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuTitleItemDescriptor;
+import cc.kune.core.client.events.WindowFocusEvent;
import cc.kune.core.client.sitebar.SiteUserOptions;
import cc.kune.core.client.sitebar.SiteUserOptionsPresenter;
import cc.kune.core.client.state.Session;
@@ -41,7 +47,9 @@
import com.calclab.emite.im.client.presence.PresenceManager;
import com.calclab.emite.im.client.presence.events.OwnPresenceChangedEvent;
import com.calclab.emite.im.client.presence.events.OwnPresenceChangedHandler;
+import com.google.gwt.event.shared.EventBus;
import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.user.client.Timer;
import com.google.inject.Inject;
public class ChatSitebarActions {
@@ -63,39 +71,32 @@
@Override
public void actionPerformed(final ActionEvent event) {
- // presenceManager.changeOwnPresence(Presence.build(NO_STATUS,
- // Show.xa));
session.logout();
}
}
public class ChangeOnlineStatusAction extends AbstractExtendedAction {
+ private final ImageResource icon;
private final PresenceManager manager;
private final Presence thisPresence;
public ChangeOnlineStatusAction(final PresenceManager presenceManager, final String statusText,
final Show show, final ImageResource icon) {
this.manager = presenceManager;
+ this.icon = icon;
thisPresence = Presence.build(statusText, show);
- presenceManager.addOwnPresenceChangedHandler(new OwnPresenceChangedHandler() {
-
- @Override
- public void onOwnPresenceChanged(final OwnPresenceChangedEvent event) {
- updateStatusIcon(icon, event.getCurrentPresence());
- }
-
- });
- updateStatusIcon(icon, presenceManager.getOwnPresence());
+ updateStatusIcon(presenceManager.getOwnPresence());
}
@Override
public void actionPerformed(final ActionEvent event) {
if (!chatClient.loginIfNecessary()) {
+ awayTimer.cancel();
manager.changeOwnPresence(thisPresence);
}
nextPresence = thisPresence;
}
- private void updateStatusIcon(final ImageResource icon, final Presence currentPresence) {
+ public void updateStatusIcon(final Presence currentPresence) {
if (thisPresence.getShow().equals(currentPresence.getShow())
&& ((currentPresence.getStatus() == null) || currentPresence.getStatus().equals(
thisPresence.getStatus()))) {
@@ -104,12 +105,17 @@
}
}
- private static final String CHAT_STATUS = "k-chat-status-group";
private static final String GROUP_CHAT_STATUS = "k-group-chat-status";
private static final String NO_STATUS = null;
+ private MenuRadioItemDescriptor awayItem;
+ private Timer awayTimer;
+ private MenuRadioItemDescriptor busyItem;
private final ChatClient chatClient;
+ private final EventBus eventBus;
private final I18nTranslationService i18n;
private Presence nextPresence = Presence.build(NO_STATUS, Show.notSpecified);
+ private MenuRadioItemDescriptor offlineItem;
+ private MenuRadioItemDescriptor onlineItem;
private final PresenceManager presenceManager;
private final ChatResources res;
private final SiteUserOptions userOptions;
@@ -118,14 +124,16 @@
@Inject
public ChatSitebarActions(final Session session, final ChatClient chatClient,
final SiteUserOptions userOptions, final I18nTranslationService i18n, final ChatResources res,
- final ChatInstances chatInstances) {
+ final ChatInstances chatInstances, final EventBus eventBus) {
this.chatClient = chatClient;
this.userOptions = userOptions;
this.i18n = i18n;
this.res = res;
+ this.eventBus = eventBus;
xmppSession = chatInstances.xmppSession;
presenceManager = chatInstances.presenceManager;
createActions();
+ createListener();
}
private void createActions() {
@@ -133,54 +141,120 @@
SiteUserOptionsPresenter.LOGGED_USER_MENU, i18n.t("Set your chat status"));
userOptions.addAction(new MenuSeparatorDescriptor(SiteUserOptionsPresenter.LOGGED_USER_MENU));
userOptions.addAction(chatActionsTitle);
- final MenuRadioItemDescriptor onlineItem = createChatStatusAction(res.online(), i18n.t("Available"),
+ onlineItem = createChatStatusAction(res.online(), i18n.t("Available"),
onlineAction(NO_STATUS, Show.notSpecified, res.online()));
- final MenuRadioItemDescriptor availableItem = createChatStatusAction(res.xa(),
- i18n.t("Available for chat"), onlineAction(NO_STATUS, Show.chat, res.xa()));
- final MenuRadioItemDescriptor awayItem = createChatStatusAction(res.away(), i18n.t("Away"),
+ awayItem = createChatStatusAction(res.away(), i18n.t("Away"),
onlineAction(NO_STATUS, Show.away, res.away()));
- final MenuRadioItemDescriptor busyItem = createChatStatusAction(res.busy(), i18n.t("Busy"),
+ busyItem = createChatStatusAction(res.busy(), i18n.t("Busy"),
onlineAction(NO_STATUS, Show.dnd, res.busy()));
- final MenuRadioItemDescriptor offlineItem = createChatStatusAction(res.offline(),
- i18n.t("Sign out of chat"), new ChangeOfflineStatusAction(xmppSession, res.offline()));
- xmppSession.addSessionStateChangedHandler(false, new StateChangedHandler() {
+ offlineItem = createChatStatusAction(res.offline(), i18n.t("Sign out of chat"),
+ new ChangeOfflineStatusAction(xmppSession, res.offline()));
+ }
+ private MenuRadioItemDescriptor createChatStatusAction(final ImageResource icon, final String text,
+ final AbstractAction action) {
+ final MenuRadioItemDescriptor item = new MenuRadioItemDescriptor(
+ SiteUserOptionsPresenter.LOGGED_USER_MENU, action, GROUP_CHAT_STATUS);
+ item.putValue(AbstractAction.NAME, text);
+ item.putValue(AbstractAction.SMALL_ICON, icon);
+ return item;
+ }
+
+ private void createListener() {
+ awayTimer = new Timer() {
@Override
+ public void run() {
+ final Presence awayPresence = Presence.build(NO_STATUS, Show.away);
+ if (chatClient.isLoggedIn()) {
+ presenceManager.changeOwnPresence(awayPresence);
+ updateMenuPresence(awayPresence);
+ }
+ }
+ };
+ xmppSession.addSessionStateChangedHandler(false, new StateChangedHandler() {
+ @Override
public void onStateChanged(final StateChangedEvent event) {
if (xmppSession.isReady()) {
+ awayTimer.cancel();
presenceManager.changeOwnPresence(nextPresence);
- switch (nextPresence.getShow()) {
- case notSpecified:
- onlineItem.setChecked(true);
- break;
- case dnd:
- busyItem.setChecked(true);
- break;
- case chat:
- availableItem.setChecked(true);
- break;
- case away:
- awayItem.setChecked(true);
- break;
- }
+ updateMenuPresence(nextPresence);
} else {
offlineItem.setChecked(true);
}
}
});
+ presenceManager.addOwnPresenceChangedHandler(new OwnPresenceChangedHandler() {
+ @Override
+ public void onOwnPresenceChanged(final OwnPresenceChangedEvent event) {
+ updateMenuPresence(event.getCurrentPresence());
+ }
+ });
+ eventBus.addHandler(WindowFocusEvent.getType(), new WindowFocusEvent.WindowFocusHandler() {
+ @Override
+ public void onWindowFocus(final WindowFocusEvent event) {
+ if (event.isHasFocus()) {
+ awayTimer.cancel();
+ if (chatClient.isLoggedIn()) {
+ new Timer() {
+ @Override
+ public void run() {
+ presenceManager.changeOwnPresence(nextPresence);
+ }
+ }.schedule(1000);
+ }
+ } else {
+ awayTimer.schedule(3000);
+ }
+ }
+ });
+ ClientEvents.get().addNetworkStatusEventHandler(new NetworkStatusEventHandler() {
+ @Override
+ public void onNetworkStatus(final NetworkStatusEvent event) {
+ switch (event.getStatus()) {
+ case CONNECTED:
+ case RECONNECTED:
+ new Timer() {
+ @Override
+ public void run() {
+ ChatSitebarActions.this.chatClient.loginIfNecessary();
+ }
+ }.schedule(2000);
+ break;
+ case DISCONNECTED:
+ case RECONNECTING:
+ break;
+ }
+ }
+ });
}
- private MenuRadioItemDescriptor createChatStatusAction(final ImageResource icon, final String text,
- final AbstractAction action) {
- final MenuRadioItemDescriptor item = new MenuRadioItemDescriptor(
- SiteUserOptionsPresenter.LOGGED_USER_MENU, action, GROUP_CHAT_STATUS);
- item.putValue(AbstractAction.NAME, text);
- item.putValue(AbstractAction.SMALL_ICON, icon);
- return item;
- }
-
private AbstractExtendedAction onlineAction(final String statusText, final Show show,
final ImageResource icon) {
return new ChangeOnlineStatusAction(presenceManager, statusText, show, icon);
}
+
+ private void updateMenuPresence(final Presence presence) {
+ switch (presence.getShow()) {
+ case notSpecified:
+ onlineItem.setChecked(true);
+ updateSitebarIconPresence(presence, onlineItem);
+ break;
+ case dnd:
+ busyItem.setChecked(true);
+ updateSitebarIconPresence(presence, busyItem);
+ break;
+ case chat:
+ onlineItem.setChecked(true);
+ updateSitebarIconPresence(presence, onlineItem);
+ break;
+ case away:
+ awayItem.setChecked(true);
+ updateSitebarIconPresence(presence, awayItem);
+ break;
+ }
+ }
+
+ private void updateSitebarIconPresence(final Presence presence, final MenuItemDescriptor itemDescriptor) {
+ ((ChatSitebarActions.ChangeOnlineStatusAction) itemDescriptor.getAction()).updateStatusIcon(presence);
+ }
}
1
0
Author: vjrj_
Date: 2011-11-28 17:19:48 +0100 (Mon, 28 Nov 2011)
New Revision: 1630
Modified:
trunk/script/server.sh
Log:
server.sh improved
Modified: trunk/script/server.sh
===================================================================
--- trunk/script/server.sh 2011-11-27 17:47:15 UTC (rev 1629)
+++ trunk/script/server.sh 2011-11-28 16:19:48 UTC (rev 1630)
@@ -20,12 +20,18 @@
# Default values
+
+if [ -z $KUNE_HOME ]
+then
+ KUNE_HOME=/etc/kune
+fi
+
# See src/main/resources/kune.properties in svn
-KUNE_CONFIG=/etc/kune.properties
+KUNE_CONFIG=$KUNE_HOME/kune.properties
# See src/main/resources/wave-server.properties in svn
-WAVE_CONFIG=/etc/kune/wave-server.properties
+WAVE_CONFIG=$KUNE_HOME/wave-server.properties
# See src/main/resources/jaas.config in svn
-JAAS_CONFIG=src/main/resources/jaas.config
+JAAS_CONFIG=$KUNE_HOME/jaas.config
SUSPEND="n"
DEBUG=""
@@ -55,7 +61,13 @@
;;
p)
# Debug port
- DEBUG_PORT=,address=$OPTARG
+ PORT=$OPTARG
+ if ! [[ $PORT =~ ^[0-9]+$ ]]
+ then
+ usage
+ exit 1
+ fi
+ DEBUG_PORT=",address=$PORT"
;;
u)
SUSPEND="y"
@@ -99,7 +111,7 @@
if [[ -z $JAR ]]
then
# Just run kune using the code and mave
- mvn exec:java
+ mvn exec:java -Dexec.args="$DEBUG_FLAGS"
else
if [[ -n $DAEMON ]]
then
@@ -121,4 +133,4 @@
-Dwave.server.config=$WAVE_CONFIG \
-jar $JAR
fi
-fi
\ No newline at end of file
+fi
1
0
r1629 - in trunk: . src/main/java/cc/kune/core/server src/main/java/cc/kune/core/server/init src/main/java/cc/kune/core/server/properties src/main/resources src/main/resources/META-INF src/test/java/cc/kune/core/server src/test/java/cc/kune/core/server/integration
by Vicente J. Ruiz Jurado 27 Nov '11
by Vicente J. Ruiz Jurado 27 Nov '11
27 Nov '11
Author: vjrj_
Date: 2011-11-27 18:47:15 +0100 (Sun, 27 Nov 2011)
New Revision: 1629
Added:
trunk/src/main/java/cc/kune/core/server/init/KuneJpaPersistModule.java
Removed:
trunk/src/main/java/cc/kune/core/server/properties/PropertiesFileName.java
Modified:
trunk/INSTALL
trunk/TROUBLESHOOT
trunk/pom.xml
trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java
trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java
trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java
trunk/src/main/resources/META-INF/persistence.xml
trunk/src/main/resources/kune.properties
trunk/src/test/java/cc/kune/core/server/TestHelper.java
trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java
Log:
CLOSED - # 160: Document and make more easy the way to select persistence units
http://kune.ourproject.org/issues/ticket/160
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/INSTALL 2011-11-27 17:47:15 UTC (rev 1629)
@@ -14,7 +14,7 @@
===MYSQL configuration===
-====Before db creation====
+====Before db creation====
You have to configure mysql to support UTF8 by editing your c:\Windows\my.ini or /etc/mysql/my.cnf (on Unix) file and adding something like:
@@ -65,7 +65,7 @@
- src/main/resources/META-INF/persistence.xml
- src/main/webapp/WEB-INF/publicspace/config/database.yml
-also if you want to select the database used (by default kune_dev). The db used in runtime is hardcoded (by now) in KuneRackModule.java
+also if you want to select the database used (by default kune_dev) you have to configure it in kune.properties.
===Source code (if you are installing Kune for development)===
@@ -75,7 +75,7 @@
# (in the trunk directory)
mvn compile -Dliquibase.should.run=false && mvn gwt:compile
-NOTE: If you change the previous db passwords after this compiling, you have to repeat the "mvn compile" because if not, probably you will use an old persistence.xml. See TROUBLESHOOT for more details.
+NOTE: If you change the previous db passwords after this compiling, you have to repeat the "mvn compile" because if not, probably you will use an old kune.properties. See TROUBLESHOOT for more details.
===Configure directories===
@@ -148,11 +148,11 @@
bin/server.sh -j kune.jar # -h for more options
-Once started for the first time the db is initialized. Then you should stop (Ctrl-C) and start the db migration process:
+Once started for the first time the db is initialized. Then you should stop (Ctrl-C) and start the db migration process:
./script/liquibase-migrate.sh
-=== Normal kune server start (after initialization) ===
+=== Normal kune server start (after initialization) ===
After that, you can start the server using the script:
@@ -170,8 +170,8 @@
==Production environment instructions==
-With
- mvn package
+With
+ mvn package
an executable target/kune-VERSION-jar-with-dependencies.jar is generated in target directory. That you can use to start kune:
bin/server.sh -j kune.jar
@@ -182,9 +182,9 @@
Copy and adapt as much as possible to your needs these files:
-- src/main/resources/kune.properties
-- src/main/resources/wave-server.properties
-- src/main/resources/log4j.properties
+- src/main/resources/kune.properties
+- src/main/resources/wave-server.properties
+- src/main/resources/log4j.properties
- src/main/webapp/ws.html
The best way to configure kune is to copy that files (for instance in /etc/kune/), to create a custom directory for ws.html and other of your custom html stuff (for instance /var/www/kune/), and add that directory to resources_base in wave-server.properties, for instance:
@@ -231,7 +231,7 @@
Configure the 'Group chat service' (in Group Chat > Group Chat Settings tab) with "rooms" additionally or instead of "conference" (or change kune.chat.roomHost in <trunk>/src/main/resources/kune.properties)
Change in 'Server > Server Manager > System Properties':
- provider.auth.className to org.jivesoftware.openfire.auth.JDBCAuthProvider instead of
+ provider.auth.className to org.jivesoftware.openfire.auth.JDBCAuthProvider instead of
org.jivesoftware.openfire.auth.DefaultAuthProvider
provider.user.className to org.jivesoftware.openfire.user.JDBCUserProvider instead of
org.jivesoftware.openfire.user.DefaultUserProvider
@@ -247,7 +247,7 @@
* In debian (with a .deb installation) you can to edit the configuration in /etc/openfire directory.
* In Mac: /usr/local/openfire/conf
-Add these lines to conf/openfire.xml and check that the user/passwd of the db is the same here and in the persistence.xml:
+Add these lines to conf/openfire.xml and check that the user/passwd of the db is the same here and in kune.properties (the ones configured before):
<pre>
<jive>
@@ -284,7 +284,7 @@
</jive>
</pre>
-Instead of:
+Instead of:
<jdbcAuthProvider/>
<jdbcUserProvider/>
<admin/>
@@ -297,7 +297,7 @@
Also you'll most likely want to change which usernames are authorized to login to the admin console adding then to <authorizedUsernames>.
Restart openfire: /etc/init.d/openfire restart
-after that the previous values will be incorpored to Server > Server Manager > System Properties
+after that the previous values will be incorpored to Server > Server Manager > System Properties
After the section 'Run the server for the first time' you'll be able to use the password of the admin user of the kune instalation (specified in kune.properties), or other admin new users you want to register using kune and configure in the authorizedUsernames attribute.
@@ -337,7 +337,7 @@
<Files *.nocache.*>
ExpiresActive Off
- </Files>
+ </Files>
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
@@ -351,11 +351,11 @@
You should configure a SMTP server for use by Kune. See kune.site.smtp.* in kune.properties and check that your email system works propertly. For instance test something like:
- echo "Bests," | mailx -s "Testing mail in kune instalation" PUT_HERE@YOUR_EMAIL # or something similar
+ echo "Bests," | mailx -s "Testing mail in kune instalation" PUT_HERE@YOUR_EMAIL # or something similar
http://java.sun.com/developer/onlineTraining/JavaMail/contents.html#Protoco…
http://java.sun.com/developer/onlineTraining/JavaMail/contents.html#JavaMai…
-And:
+And:
http://javamail.kenai.com/nonav/javadocs/com/sun/mail/smtp/package-summary.…
for more specific configuration parameters that maybe you need with your smtp server.
Modified: trunk/TROUBLESHOOT
===================================================================
--- trunk/TROUBLESHOOT 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/TROUBLESHOOT 2011-11-27 17:47:15 UTC (rev 1629)
@@ -75,9 +75,9 @@
== Mysql: Caused by: java.sql.SQLException: Access denied for user 'kune'@'localhost' (using password: YES) ==
-Check that the password you have use in the database creation it's the same like the src/main/resources/META-INF/persistence.xml. If it's wrong maybe you have to remove the mysql user (DROP USER) and repeat the GRANT sentences of the INSTALL.
+Check that the password you have use in the database creation it's the same like the kune.properties. If it's wrong maybe you have to remove the mysql user (DROP USER) and repeat the GRANT sentences of the INSTALL.
-Also, be sure you do a "mvn compile" if you change the persistence.xml file to not use the old one.
+Also, be sure you do a "mvn compile" if you are running kune from the source and you change the kune.properties file to not use the old one.
If you have this problem with openfire it's not enough to change the password in openfire.xml because probably it's already stored in the ofProperty openfire table and you need to change the password there.
@@ -89,16 +89,11 @@
A check list:
- these files should be the same:
+ diff src/main/resources/kune.properties target/kune-0.1.0-SNAPSHOT/WEB-INF/classes/kune.properties
+ and:
diff src/main/resources/META-INF/persistence.xml target/kune-0.1.0-SNAPSHOT/WEB-INF/classes/META-INF/persistence.xml
-if not "mvn compile -Dliquibase.should.run=false"
-- the persistence-unit you use, that is hardcoded (by now) in
-src/main/java/cc/kune/core/server/KuneRackModule.java
-(...)
- public KuneRackModule() {
- this("production", "/ws", null);
- }
-(...)
-find that name in persistence.xml (we are using production, but can be other). The db user/password configured in persistence.xml for that name should be the same to that one you used in the GRANT sentence of mysql database creation.
+ if not "mvn compile -Dliquibase.should.run=false"
+also check the persistence unit that you are using and find that name in persistence.xml (we are using development, but can be other). The db user/password configured in kune.properties for that name should be the same to that one you used in the GRANT sentence of mysql database creation.
To debug mysql logs, you can uncomment:
#general_log_file = /var/log/mysql/mysql.log
@@ -141,7 +136,7 @@
Set M2_REPO to eclipse in Preferences > Java > Build Path > Classpath Variable (normally to /home/youruser/.m2/repository/)
-== Error generating CoreResources ==
+== Error generating CoreResources ==
[INFO] Computing all possible rebind results for 'cc.kune.core.client.resources.CoreResources' [INFO] Rebinding cc.kune.core.client.resources.CoreResources [INFO] Invoking generator com.google.gwt.resources.rebind.context.StaticClientBundleGenerator [INFO] [ERROR] Generator 'com.google.gwt.resources.rebind.context.StaticClientBundleGenerator' threw an exception while rebinding 'cc.kune.cor
[INFO] at com.google.gwt.dev.util.Util.computeStrongName(Util.java:170) [INFO] at com.google.gwt.dev.util.Util.computeStrongName(Util.java:145) [INFO] at com.google.gwt.resources.rebind.context.StaticResourceContext.deploy(StaticResourceContext.java:61)
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/pom.xml 2011-11-27 17:47:15 UTC (rev 1629)
@@ -805,6 +805,13 @@
<key>kune.server.config</key>
<value>src/main/resources/kune.properties</value>
</systemProperty>
+<!-- <systemProperty> -->
+<!-- <key>kune.db.persistence.name</key> -->
+ <!-- Persistence name, choose between: production, development,
+ test_db (testing environment using mysql db), test (testing environment using
+ h2 db). See persistence.xml -->
+<!-- <value>development</value> -->
+<!-- </systemProperty> -->
<systemProperty>
<key>wave.server.config</key>
<value>src/main/resources/wave-server.properties</value>
Modified: trunk/src/main/java/cc/kune/core/server/KuneRackModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/src/main/java/cc/kune/core/server/KuneRackModule.java 2011-11-27 17:47:15 UTC (rev 1629)
@@ -19,6 +19,8 @@
*/
package cc.kune.core.server;
+import java.util.Properties;
+
import org.apache.commons.configuration.SystemConfiguration;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -41,7 +43,8 @@
import cc.kune.core.server.manager.file.FileGwtUploadServlet;
import cc.kune.core.server.manager.file.FileUploadManager;
import cc.kune.core.server.manager.file.UserLogoDownloadManager;
-import cc.kune.core.server.properties.PropertiesFileName;
+import cc.kune.core.server.properties.KuneProperties;
+import cc.kune.core.server.properties.KunePropertiesDefault;
import cc.kune.core.server.rack.RackBuilder;
import cc.kune.core.server.rack.RackModule;
import cc.kune.core.server.rack.filters.ForwardFilter;
@@ -75,24 +78,44 @@
public static final Log LOG = LogFactory.getLog(KuneRackModule.class);
private final Module configModule;
private final String suffix;
+ final SystemConfiguration sysConf = new SystemConfiguration();
public KuneRackModule() {
- this("development", "/ws", null);
+ this(null, "/ws", null);
}
- public KuneRackModule(final String jpaUnit, final String suffix, final Scope sessionScope) {
-
+ public KuneRackModule(final String settedJpaUnit, final String suffix, final Scope sessionScope) {
this.suffix = suffix;
- final SystemConfiguration sysConf = new SystemConfiguration();
final String kuneConfig = sysConf.getString("kune.server.config");
-
configModule = new AbstractModule() {
@Override
public void configure() {
- install(FinderRegistry.init(new JpaPersistModule(jpaUnit)));
+ final KunePropertiesDefault kuneProperties = new KunePropertiesDefault(kuneConfig);
+ bind(KuneProperties.class).toInstance(kuneProperties);
+ final String configuredJpaUnit = kuneProperties.get(KuneProperties.SITE_DB_PERSISTENCE_NAME);
+
+ // precedence method param > properties
+ final String jpaUnit = settedJpaUnit != null ? settedJpaUnit
+ : configuredJpaUnit != null ? configuredJpaUnit : "development";
+ LOG.info("Using persistence unit: " + jpaUnit);
+
+ final JpaPersistModule jpaPersistModule = new JpaPersistModule(jpaUnit);
+
+ if (!jpaUnit.equals("test")) {
+ final Properties dbProperties = new Properties();
+ dbProperties.setProperty("hibernate.connection.url",
+ kuneProperties.get(KuneProperties.SITE_DB_URL));
+ dbProperties.setProperty("hibernate.connection.username",
+ kuneProperties.get(KuneProperties.SITE_DB_USER));
+ dbProperties.setProperty("hibernate.connection.password",
+ kuneProperties.get(KuneProperties.SITE_DB_PASSWORD));
+ jpaPersistModule.properties(dbProperties);
+ }
+
+ install(FinderRegistry.init(jpaPersistModule));
bindInterceptor(Matchers.annotatedWith(LogThis.class), new NotInObject(),
new LoggerMethodInterceptor());
- bindConstant().annotatedWith(PropertiesFileName.class).to(kuneConfig);
+ // bindConstant().annotatedWith(PropertiesFileName.class).to(kuneConfig);
if (sessionScope != null) {
bindScope(SessionScoped.class, sessionScope);
}
Modified: trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/src/main/java/cc/kune/core/server/PlatformServerModule.java 2011-11-27 17:47:15 UTC (rev 1629)
@@ -85,8 +85,6 @@
import cc.kune.core.server.manager.impl.UserManagerDefault;
import cc.kune.core.server.mapper.DozerMapper;
import cc.kune.core.server.mapper.Mapper;
-import cc.kune.core.server.properties.KuneProperties;
-import cc.kune.core.server.properties.KunePropertiesDefault;
import cc.kune.core.server.rpc.ContentRPC;
import cc.kune.core.server.rpc.GroupRPC;
import cc.kune.core.server.rpc.I18nRPC;
@@ -179,7 +177,7 @@
bindManagers();
bindRPC();
bindServices();
- bind(KuneProperties.class).to(KunePropertiesDefault.class);
+ // bind(KuneProperties.class).to(KunePropertiesDefault.class);
bind(Mapper.class).to(DozerMapper.class);
bind(ServerToolRegistry.class);
// bind(FileUploadManager.class).in(ServletScopes.REQUEST);
Added: trunk/src/main/java/cc/kune/core/server/init/KuneJpaPersistModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/init/KuneJpaPersistModule.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/server/init/KuneJpaPersistModule.java 2011-11-27 17:47:15 UTC (rev 1629)
@@ -0,0 +1,5 @@
+package cc.kune.core.server.init;
+
+public class KuneJpaPersistModule {
+
+}
Modified: trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/src/main/java/cc/kune/core/server/properties/KuneProperties.java 2011-11-27 17:47:15 UTC (rev 1629)
@@ -43,6 +43,10 @@
String SITE_ADMIN_PASSWD = "kune.admin.password";
String SITE_ADMIN_SHORTNAME = "kune.admin.shortName";
String SITE_COMMON_NAME = "kune.default.site.commonname";
+ String SITE_DB_PASSWORD = "kune.db.password";
+ String SITE_DB_PERSISTENCE_NAME = "kune.db.persistence.name";
+ String SITE_DB_URL = "kune.db.url";
+ String SITE_DB_USER = "kune.db.user";
String SITE_DEF_LICENSE = "kune.default.license";
String SITE_DOMAIN = "kune.site.domain";
String SITE_GROUP_AVAILABLE_TOOLS = "kune.tools.groupSiteAvailableTools";
Modified: trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/src/main/java/cc/kune/core/server/properties/KunePropertiesDefault.java 2011-11-27 17:47:15 UTC (rev 1629)
@@ -38,7 +38,7 @@
private final String fileName;
@Inject
- public KunePropertiesDefault(@PropertiesFileName final String fileName) {
+ public KunePropertiesDefault(final String fileName) {
this.fileName = fileName;
try {
config = new CompositeConfiguration();
Deleted: trunk/src/main/java/cc/kune/core/server/properties/PropertiesFileName.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/properties/PropertiesFileName.java 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/src/main/java/cc/kune/core/server/properties/PropertiesFileName.java 2011-11-27 17:47:15 UTC (rev 1629)
@@ -1,31 +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.server.properties;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import com.google.inject.BindingAnnotation;
-
-@BindingAnnotation
-(a)Retention(RetentionPolicy.RUNTIME)
-public @interface PropertiesFileName {
-
-}
Modified: trunk/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/src/main/resources/META-INF/persistence.xml 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/src/main/resources/META-INF/persistence.xml 2011-11-27 17:47:15 UTC (rev 1629)
@@ -38,9 +38,13 @@
<property name="use_sql_comments" value="true"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
+
+ <!-- Configured and overrided by kune.properties -->
<property name="hibernate.connection.url"
value="jdbc:mysql://localhost/kune_prod?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8"/>
+ <!-- Configured and overrided by kune.properties -->
<property name="hibernate.connection.username" value="kune"/>
+ <!-- Configured and overrided by kune.properties -->
<property name="hibernate.connection.password" value="db4kune"/>
<!-- http://stackoverflow.com/questions/221379/hibernate-hbm2ddl-auto-update-in-…
@@ -97,9 +101,12 @@
<property name="use_sql_comments" value="true"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
+ <!-- Configured and overrided by kune.properties -->
<property name="hibernate.connection.url"
value="jdbc:mysql://localhost/kune_dev?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8"/>
+ <!-- Configured and overrided by kune.properties -->
<property name="hibernate.connection.username" value="kune"/>
+ <!-- Configured and overrided by kune.properties -->
<property name="hibernate.connection.password" value="db4kune"/>
<!-- http://stackoverflow.com/questions/221379/hibernate-hbm2ddl-auto-update-in-…
@@ -154,9 +161,12 @@
<property name="use_sql_comments" value="false"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
+ <!-- Configured and overrided by kune.properties -->
<property name="hibernate.connection.url"
value="jdbc:mysql://localhost/kune_test?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8"/>
+ <!-- Configured and overrided by kune.properties -->
<property name="hibernate.connection.username" value="kune"/>
+ <!-- Configured and overrided by kune.properties -->
<property name="hibernate.connection.password" value="db4kune"/>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<!-- <property name="hibernate.hbm2ddl.auto" value="create" /> -->
Modified: trunk/src/main/resources/kune.properties
===================================================================
--- trunk/src/main/resources/kune.properties 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/src/main/resources/kune.properties 2011-11-27 17:47:15 UTC (rev 1629)
@@ -22,14 +22,30 @@
# ws.html has a similar value for UI client
kune.default.site.commonname = this site
-# Email
+### Email
+
kune.site.smtp.host = localhost
kune.site.smtp.defaultfrom = noreply@localhost
# If we should avoid the use of smtp (use only for avoid emails during development)
kune.site.smtp.skip = true
-### licenses
+### Database
+# Persistence name, choose between:
+# - production : production environment
+# - development: development enviroment
+# - test_db: testing environment using mysql db
+# - test: testing environment using h2 db (memory)
+kune.db.persistence.name = development
+
+# check that the db, user and passwd exists and has the correct rights (see INSTALL)
+# This only used in production/develoment & test_db environment (not with h2 db):
+kune.db.url = jdbc:mysql://localhost/kune_dev?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=UTF-8
+kune.db.user = kune
+kune.db.password = db4kune
+
+### Licenses
+
kune.default.license = by-sa-v3.0
# Current CC version, see license table and shortname field (for instance by-sa-v3.0)
kune.currentccversion = v3.0
Modified: trunk/src/test/java/cc/kune/core/server/TestHelper.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/TestHelper.java 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/src/test/java/cc/kune/core/server/TestHelper.java 2011-11-27 17:47:15 UTC (rev 1629)
@@ -35,7 +35,8 @@
import cc.kune.core.server.init.FinderRegistry;
import cc.kune.core.server.integration.HttpServletRequestMocked;
-import cc.kune.core.server.properties.PropertiesFileName;
+import cc.kune.core.server.properties.KuneProperties;
+import cc.kune.core.server.properties.KunePropertiesDefault;
import cc.kune.wave.server.CustomSettingsBinder;
import com.google.inject.Binder;
@@ -64,7 +65,7 @@
public void configure(final Binder binder) {
binder.bindScope(SessionScoped.class, Scopes.SINGLETON);
binder.bindScope(RequestScoped.class, Scopes.SINGLETON);
- binder.bindConstant().annotatedWith(PropertiesFileName.class).to(propetiesFileName);
+ binder.bind(KuneProperties.class).toInstance(new KunePropertiesDefault(propetiesFileName));
binder.bind(HttpServletRequest.class).to(HttpServletRequestMocked.class);
}
});
Modified: trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java
===================================================================
--- trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java 2011-11-27 14:01:08 UTC (rev 1628)
+++ trunk/src/test/java/cc/kune/core/server/integration/IntegrationTestHelper.java 2011-11-27 17:47:15 UTC (rev 1629)
@@ -36,7 +36,8 @@
import cc.kune.core.server.PlatformServerModule;
import cc.kune.core.server.TestConstants;
import cc.kune.core.server.init.FinderRegistry;
-import cc.kune.core.server.properties.PropertiesFileName;
+import cc.kune.core.server.properties.KuneProperties;
+import cc.kune.core.server.properties.KunePropertiesDefault;
import cc.kune.docs.server.DocumentServerModule;
import cc.kune.events.server.EventsServerModule;
import cc.kune.lists.server.ListsServerModule;
@@ -71,7 +72,7 @@
protected void configure() {
bindScope(SessionScoped.class, Scopes.SINGLETON);
bindScope(RequestScoped.class, Scopes.SINGLETON);
- bindConstant().annotatedWith(PropertiesFileName.class).to("kune.properties");
+ bind(KuneProperties.class).toInstance(new KunePropertiesDefault("kune.properties"));
bind(HttpServletRequest.class).to(HttpServletRequestMocked.class);
}
});
1
0
r1628 - in trunk: . debian docs script src/main/java/cc/kune/gspace/client/i18n src/main/resources
by Vicente J. Ruiz Jurado 27 Nov '11
by Vicente J. Ruiz Jurado 27 Nov '11
27 Nov '11
Author: vjrj_
Date: 2011-11-27 15:01:08 +0100 (Sun, 27 Nov 2011)
New Revision: 1628
Added:
trunk/docs/
Removed:
trunk/README_FIRST
trunk/doc/
trunk/script/copy_deploy.sh
trunk/script/deploy_gwt.cmd
Modified:
trunk/
trunk/INSTALL
trunk/README
trunk/debian/TODO
trunk/pom.xml
trunk/script/demo-deploy.sh
trunk/script/recordScreenCast.sh
trunk/script/server.sh
trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.java
trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml
trunk/src/main/resources/wave-server.properties
Log:
CLOSED - # 171: Package kune in one unique jar
http://kune.ourproject.org/issues/ticket/171
Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
- pmd-eclipse.log
.pmd
www-test
screenlog.0
client
public
target
target-local
Main-compile
.settings
.gwt-cache
repository
derby.log
star-yellow-grey.png
run.sh
tomcat
gwt-out
synccss.sh
.externalToolBuilders
.wtpmodules
www
testRepository
kune-OLD-jcr
KuneApp.launch
KuneApp NOSERVER.launch
old_src
org.ourproject.kune.app.Kune
org.ourproject.kune.iml
org.ourproject.kune.ipr
org.ourproject.kune.iws
nbproject
hibernate.reveng.xml
.gwt-tmp
target-eclipse
.checkstyle
.classpath-bien
pom.xml.*
.gwt
.jdee_sources
.jdee_classpath
prj.el
.factorypath
target.old
_accounts
_certificates
_deltas
logs
test-output
.recommenders
_sessions
chromedriver.log
kune-screencast*
+ pmd-eclipse.log
.pmd
www-test
screenlog.0
client
public
target
target-local
Main-compile
.settings
.gwt-cache
repository
derby.log
star-yellow-grey.png
tomcat
gwt-out
synccss.sh
.externalToolBuilders
.wtpmodules
www
testRepository
kune-OLD-jcr
KuneApp.launch
KuneApp NOSERVER.launch
old_src
org.ourproject.kune.app.Kune
org.ourproject.kune.iml
org.ourproject.kune.ipr
org.ourproject.kune.iws
nbproject
hibernate.reveng.xml
.gwt-tmp
target-eclipse
.checkstyle
.classpath-bien
pom.xml.*
.gwt
.jdee_sources
.jdee_classpath
prj.el
.factorypath
target.old
_accounts
_certificates
_deltas
logs
test-output
.recommenders
_sessions
chromedriver.log
kune-screencast*
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/INSTALL 2011-11-27 14:01:08 UTC (rev 1628)
@@ -6,8 +6,12 @@
* Install java-jdk (>=6), maven2, mysql (> 5.0) and eclipse (well, this depends on what IDE do you use for development). In debian and derivatives:
- sudo apt-get install subversion maven2 mercurial openjdk-6-jdk mysql-server
+For development environment:
+ sudo apt-get install subversion maven2 mercurial openjdk-6-jdk mysql-server libjmagick6-jni
+For production environment:
+ sudo apt-get install openjdk-6-jdk mysql-server libjmagick6-jni
+
===MYSQL configuration===
====Before db creation====
@@ -51,7 +55,7 @@
GRANT ALL PRIVILEGES ON kune_openfire.* TO kune@localhost IDENTIFIED BY 'db4kune';
FLUSH PRIVILEGES;
-Although using this password ('db4kune') is useful for a quick and dirty getting started installation, you should consider seriously changing it to something different, since you are in high risk! In this case you should change the password acordingly in this other locations:
+Although using this password ('db4kune') is useful for a quick and dirty getting started installation (useful for development), you should consider seriously changing it to something different, since you are in high risk! In this case you should change the password acordingly in this other locations:
- pom.xml
- script/liquibase-migrate.sh
@@ -63,7 +67,7 @@
also if you want to select the database used (by default kune_dev). The db used in runtime is hardcoded (by now) in KuneRackModule.java
-===Source code===
+===Source code (if you are installing Kune for development)===
See the DEVGUIDE for instructions of how to download the Kune code.
@@ -73,8 +77,11 @@
NOTE: If you change the previous db passwords after this compiling, you have to repeat the "mvn compile" because if not, probably you will use an old persistence.xml. See TROUBLESHOOT for more details.
-===Configure upload directory===
+===Configure directories===
+ sudo mkdir -p /var/www/kune/
+ sudo chown yourUser:yourUser /var/www/kune/
+
sudo mkdir -p /var/lib/kune/uploads/
sudo chown yourUser:yourUser /var/lib/kune/uploads
@@ -133,32 +140,61 @@
Run the server for the first time and initialize the db:
- mvn exec:java
+I you are installing kuen for development:
+ bin/server.sh # or mvn exec:java
+
+or for production
+
+ bin/server.sh -j kune.jar # -h for more options
+
Once started for the first time the db is initialized. Then you should stop (Ctrl-C) and start the db migration process:
./script/liquibase-migrate.sh
=== Normal kune server start (after initialization) ===
-After that, as a norma, you can start the server using the script:
+After that, you can start the server using the script:
- ./script/server.sh
+ bin/server.sh
-or running:
+or (again) running in production:
- mvn exec:java
+ bin/server.sh -j kune.jar # -h for more options
===Connecting to the server===
Open your browser and connect to http://localhost:8888/
+(or any other port you configured in wave-server.properties)
+
==Production environment instructions==
With
mvn package
-an executable target/kune-VERSION.one-jar.jar is generated in target directory.
+an executable target/kune-VERSION-jar-with-dependencies.jar is generated in target directory. That you can use to start kune:
+bin/server.sh -j kune.jar
+
+TODO: configure/select db via properties
+
+=== Adapting Kune to your site ===
+
+Copy and adapt as much as possible to your needs these files:
+
+- src/main/resources/kune.properties
+- src/main/resources/wave-server.properties
+- src/main/resources/log4j.properties
+- src/main/webapp/ws.html
+
+The best way to configure kune is to copy that files (for instance in /etc/kune/), to create a custom directory for ws.html and other of your custom html stuff (for instance /var/www/kune/), and add that directory to resources_base in wave-server.properties, for instance:
+
+resource_bases = your-www-dir,target/kune-0.1.0-SNAPSHOT/,src/main/webapp/
+
+The ws.html file is the home that you get at start-up and have some configurations also. You can change the html inside to your needs but follow the commentaries and try not to remove important parts that make kune to start. Also to change the main logo, favicon, etc.
+
+Note: Remember that if you are running kune using the source code (via mvn) and you change this src files in some point, you have to make 'mvn compile' so are copied to the target directoy. This is not applicable when you run kune via jar.
+
==Appendix A: Configuration of Openfire xmpp server==
Install openfire in your system: http://www.igniterealtime.org/downloads/index.jsp
Modified: trunk/README
===================================================================
--- trunk/README 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/README 2011-11-27 14:01:08 UTC (rev 1628)
@@ -10,16 +10,3 @@
and for BUGS for inform about problems/feedback etc.
-== Adapting Kune to your site ==
-
-Adapt as much as possible to your needs this files:
-
-- src/main/resources/kune.properties
-- src/main/resources/wave-server.properties
-- src/main/resources/log4j.properties
-- src/main/webapp/ws.html
-
-The last one is the home that you get at start-up and have some configurations also. You can change the html inside to your needs but follow the commentaries and try not to remove important parts that make kune to start.
-
-Note: Remember that if you change this files in some point, you have to make 'mvn compile' so are copied to the target directoy.
-
Deleted: trunk/README_FIRST
===================================================================
--- trunk/README_FIRST 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/README_FIRST 2011-11-27 14:01:08 UTC (rev 1628)
@@ -1,4 +0,0 @@
-WARNING
-Please note that we are doing a big refactorization of Kune to adapt it to Wave. Also we are starting to use other libraries (for instance gin for IoC instead of our old Suco library). Then maybe /trunk/ it's a litle bit inestable because of that (for our old more stable code see tag 0.0.6-pre-wiab).
-
-New code (and refactorized) is under cc.kune package. Our old code (not yet refactorized or deprecated) is under org.ourproject.kune package waiting for be adapted or removed.
Modified: trunk/debian/TODO
===================================================================
--- trunk/debian/TODO 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/debian/TODO 2011-11-27 14:01:08 UTC (rev 1628)
@@ -2,5 +2,4 @@
- create /var/lib/kune/uploads and give permissions
- create /var/lib/kune/lucene
- deps: libjmagick6-jni, csstidy
-- cp -a $EXTSRC/source/locale/ src/main/java/org/ourproject/kune/app/public/js/ext/source/
Copied: trunk/docs (from rev 1611, trunk/doc)
Property changes on: trunk/docs
___________________________________________________________________
Name: svn:ignore
+ screencasts
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/pom.xml 2011-11-27 14:01:08 UTC (rev 1628)
@@ -139,8 +139,6 @@
</snapshots>
</pluginRepository>
<!-- cc -->
- <!-- <pluginRepository> <id>gwt-maven</id> <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo</url>
- </pluginRepository> -->
<pluginRepository>
<id>Codehaus Snapshots</id>
<url>http://snapshots.repository.codehaus.org/</url>
@@ -163,14 +161,6 @@
</url>
<name>Google Web Toolkit Plugin Repository</name>
</pluginRepository>
- <pluginRepository>
- <id>onejar-maven-plugin.googlecode.com-snap</id>
- <url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo-snapshot</url>
- </pluginRepository>
- <pluginRepository>
- <id>onejar-maven-plugin.googlecode.com</id>
- <url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo</url>
- </pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
@@ -276,8 +266,6 @@
<artifactId>dozer</artifactId>
<version>4.0</version>
</dependency>
- <!-- <dependency> <groupId>com.calclab</groupId> <artifactId>suco</artifactId>
- <version>0.6.5</version> </dependency> -->
<dependency>
<groupId>jmagick</groupId>
<artifactId>jmagick</artifactId>
@@ -370,8 +358,6 @@
<artifactId>hibernate-c3p0</artifactId>
<version>3.3.1.GA</version>
</dependency>
- <!-- <dependency> <groupId>c3p0</groupId> <artifactId>c3p0</artifactId>
- <version>0.9.1.2</version> </dependency> -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
@@ -382,25 +368,21 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
- <!-- =roo -->
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
- <!-- =roo -->
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
- <!-- =roo -->
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
- <!-- =roo -->
</dependency>
<!-- REST: xml and json (stax) -->
<dependency>
@@ -484,7 +466,6 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
- <!-- =roo -->
<scope>test</scope>
</dependency>
<dependency>
@@ -851,14 +832,12 @@
</configuration>
</plugin>
<plugin>
- <!-- =roo -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-beta-1</version>
<!-- <configuration> <webXml>target/web.xml</webXml> </configuration> -->
</plugin>
<plugin>
- <!-- =roo -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
@@ -870,7 +849,6 @@
</configuration>
</plugin>
<plugin>
- <!-- =roo -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.2</version>
@@ -879,7 +857,6 @@
</configuration>
</plugin>
<plugin>
- <!-- =roo + custom -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8.1</version>
@@ -918,10 +895,15 @@
</executions>
</plugin>
<plugin>
- <!-- =roo -->
+ <!-- See: http://bit.ly/rQBe3Z -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
+ <archive>
+ <manifest>
+ <mainClass>cc.kune.wave.server.WaveMain</mainClass>
+ </manifest>
+ </archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
@@ -930,6 +912,7 @@
<scope>runtime</scope>
<unpackOptions>
<excludes>
+ <!-- FIXME this is needed? -->
<exclude>**/gxt/**</exclude>
<exclude>**/extjs/**</exclude>
<exclude>**extjs**</exclude>
@@ -941,7 +924,6 @@
</configuration>
</plugin>
<plugin>
- <!-- =roo sin spring executions -->
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
@@ -964,13 +946,11 @@
</configuration>
</plugin>
<plugin>
- <!-- =roo -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
- <!-- =roo -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-idea-plugin</artifactId>
<version>2.2</version>
@@ -980,7 +960,6 @@
</configuration>
</plugin>
<plugin>
- <!-- =roo -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0</version>
@@ -989,11 +968,9 @@
</configuration>
</plugin>
<plugin>
- <!-- =roo -->
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
- <version>7.1.2.v20100523</version>
- <!-- <version>7.2.1.v20101111</version> -->
+ <version>8.0.1.v20110908</version>
<configuration>
<webAppConfig>
<!-- <contextPath>/${project.name}</contextPath> -->
@@ -1016,7 +993,6 @@
<goal>test-process</goal> </goals> </execution> </executions> </plugin> -->
<!-- BETTER user: http://code.google.com/p/acris/wiki/AnnotationProcessing -->
<plugin>
- <!-- =roo -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwtmaven.version}</version>
@@ -1065,12 +1041,6 @@
</dependency>
</dependencies>
</plugin>
- <!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>deb-maven-plugin</artifactId>
- <version>1.0-SNAPSHOT</version> <configuration> <description>kune free/open/libre
- collaboration platform</description> <maintainer>Kune Development Team <kune-devel(a)lists.ourproject.org></maintainer>
- <section>web</section> <priority>optional</priority> <architecture>all</architecture>
- </configuration> <executions> <execution> <goals> <goal>deb</goal> </goals>
- </execution> </executions> </plugin> -->
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-plugin</artifactId>
@@ -1120,120 +1090,11 @@
</archive>
</configuration>
<executions>
- <!-- <execution> -->
- <!-- <id>core</id> -->
- <!-- <phase>package</phase> -->
- <!-- <goals> -->
- <!-- <goal>jar</goal> -->
- <!-- </goals> -->
- <!-- <configuration> -->
- <!-- <classifier>core</classifier> -->
- <!-- <includes> -->
- <!-- <include>**/KunePlatform.gwt.xml**</include> -->
- <!-- <include>**/i18n/I18nTranslationService.**</include> -->
- <!-- <include>**/i18n/I18nTranslationServiceMocked.** </include> -->
- <!-- <include>**/TextUtils.**</include> -->
- <!-- <include>**/IconLabelEditable.**</include> -->
- <!-- <include>**/QuickTipsHelper.**</include> -->
- <!-- <include>**/RichText.gwt.xml**</include> -->
- <!-- <include>**/BasicDialog.**</include> -->
- <!-- <include>**/HorizontalLine.**</include> -->
- <!-- <include>**/AbstractLabel.**</include> -->
- <!-- <include>**/IconLabel.**</include> -->
- <!-- <include> **/EditableIconLabel.**</include> -->
- <!-- <include> **/EditableClickListener.**</include> -->
- <!-- <include>**/KuneStringUtils.**</include> -->
- <!-- <include>**/IconHyperlink*.**</include> -->
- <!-- <include>**/LabelWrapper*.**</include> -->
- <!-- <include>**/KuneUiUtils.**</include> -->
- <!-- <include>**/View.**</include> -->
- <!-- <include>**/platf/**</include> <include>**/platf/client/extend/**</include> -->
- <!-- <include>**/platf/client/*java</include> <include>**/platf/client/app/**</include> -->
- <!-- <include>**/platf/client/dispatch/**</include> -->
- <!-- </includes> -->
- <!-- </configuration> -->
- <!-- </execution> -->
- <!-- <execution> -->
- <!-- <id>helloworldmodule</id> -->
- <!-- <phase>package</phase> -->
- <!-- <goals> -->
- <!-- <goal>jar</goal> -->
- <!-- </goals> -->
- <!-- <configuration> -->
- <!-- <classifier>helloworldmodule</classifier> -->
- <!-- <includes> -->
- <!-- <include>**/HelloWorld*</include> -->
- <!-- </includes> -->
- <!-- </configuration> -->
- <!-- </execution> -->
</executions>
</plugin>
- <plugin>
- <groupId>org.dstovall</groupId>
- <artifactId>onejar-maven-plugin</artifactId>
- <version>1.4.4-SNAPSHOT</version>
- <executions>
- <execution>
- <configuration>
- <!-- Optional -->
- <onejarVersion>0.97</onejarVersion>
- <!-- Optional, use only if you need to include native libraries
- (dll's) -->
- <!-- <binlibs> -->
- <!-- <fileSet> -->
- <!-- <directory>${project.build.directory}/${project.build.finalName}</directory> -->
- <!-- <includes> -->
- <!-- <include>**</include> -->
- <!-- </includes> -->
- <!-- </fileSet> -->
- <!-- </binlibs> -->
- <!-- Optional, default is false -->
- <attachToBuild>true</attachToBuild>
- <!-- Optional, default is "onejar" -->
- <classifier>onejar</classifier>
- </configuration>
- <goals>
- <goal>one-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <!-- <plugin> -->
- <!-- <groupId>org.codehaus.mojo</groupId> -->
- <!-- <artifactId>selenium-maven-plugin</artifactId> -->
- <!-- <configuration> -->
- <!-- <port>4441</port> -->
- <!-- </configuration> -->
- <!-- <executions> -->
- <!-- <execution> -->
- <!-- <phase>pre-integration-test</phase> -->
- <!-- <goals> -->
- <!-- <goal>start-server</goal> -->
- <!-- </goals> -->
- <!-- <configuration> -->
- <!-- <background>true</background> -->
- <!-- </configuration> -->
- <!-- </execution> -->
- <!-- </executions> -->
- <!-- </plugin> -->
- <!-- <plugin> <artifactId>maven-clean-plugin</artifactId> <version>2.2</version>
- <configuration> <filesets> <fileset> <directory>src/main/webapp/gwt/</directory>
- <includes> <include>**/org.ourproject.kune.app.Kune*</include> <followSymlinks>false</followSymlinks>
- </includes> </fileset> </filesets> </configuration> </plugin> -->
</plugins>
- <!-- <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory> -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes
</outputDirectory>
- <!-- <outputDirectory>war/WEB-INF/classes</outputDirectory> -->
- <!-- <testOutputDirectory>war/WEB-INF/test-classes</testOutputDirectory> -->
- <!-- <resources> -->
- <!-- <resource> -->
- <!-- <directory>src/main/resources</directory> -->
- <!-- </resource> -->
- <!-- <resource> -->
- <!-- <directory>src/main/java</directory> -->
- <!-- </resource> -->
- <!-- </resources> -->
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
Deleted: trunk/script/copy_deploy.sh
===================================================================
--- trunk/script/copy_deploy.sh 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/script/copy_deploy.sh 2011-11-27 14:01:08 UTC (rev 1628)
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-#script/css-compact-and-tidy.sh
-script/css-update.sh
-
-rm src/main/webapp/gwt/org.ourproject.kune.app.Kune/ -R
-mkdir src/main/webapp/gwt/org.ourproject.kune.app.Kune/
-cp target/kune-0.0.5/org.ourproject.kune.app.Kune/ src/main/webapp/gwt/ -R
Modified: trunk/script/demo-deploy.sh
===================================================================
--- trunk/script/demo-deploy.sh 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/script/demo-deploy.sh 2011-11-27 14:01:08 UTC (rev 1628)
@@ -1,4 +1,4 @@
#!/bin/bash
# from time to time use --delete
-rsync --delete --progress -C -r -p target/kune-0.0.5/org.ourproject.kune.app.Kune/ [email protected]:/home/ourproject/kunedemo/src/main/webapp/gwt/org.ourproject.kune.app.Kune/
+rsync --delete --progress -C -r -p target/kune-0.1.0-SNAPSHOT/ws/ [email protected]:/home/vjrj/kune-current/target-last/kune-0.1.0-SNAPSHOT/ws/
Deleted: trunk/script/deploy_gwt.cmd
===================================================================
--- trunk/script/deploy_gwt.cmd 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/script/deploy_gwt.cmd 2011-11-27 14:01:08 UTC (rev 1628)
@@ -1 +0,0 @@
-copy target\kune-0.0.5\org.ourproject.kune.Main\* src\main\webapp\gwt\org.ourproject.kune
Modified: trunk/script/recordScreenCast.sh
===================================================================
--- trunk/script/recordScreenCast.sh 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/script/recordScreenCast.sh 2011-11-27 14:01:08 UTC (rev 1628)
@@ -16,5 +16,5 @@
if [[ $? -eq 0 ]]
then
- recordmydesktop -x 0 -y 83 --width $RWIDTH --height $RHEIGHT --fps 25 --no-sound -o kune-screencast.ogv
+ recordmydesktop -x 0 -y 83 --width $RWIDTH --height $RHEIGHT --fps 25 --no-sound -o doc/screencasts/kune-screencast.ogv
fi
Modified: trunk/script/server.sh
===================================================================
--- trunk/script/server.sh 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/script/server.sh 2011-11-27 14:01:08 UTC (rev 1628)
@@ -1,3 +1,124 @@
#!/bin/bash
-mvn exec:java
+# This script will start the kune server via a generated jar with the dependencies
+
+usage() {
+ echo "$0 [-j <jar file>] [-k <kune-config>] [-w <wave-config>] [-s <jaas config>] [Debug options] [other options]
+ Example: $0 -j target/kune-0.1.0-SNAPSHOT-jar-with-dependencies.jar -l IGNORE -d -p -u 20000
+
+Options:
+-j <jar file> : runs jar file generated via mvn package -Dmaven.test.skip=true
+-a: run as a daemon (only root user)
+-l LOGLEVEL : IGNORE|DEBUG|INFO|WARN
+
+Debug Options:
+-d: debug
+-u: Suspend the start (useful for debug the boot)
+-p: port of debugger
+"
+}
+
+# Default values
+
+# See src/main/resources/kune.properties in svn
+KUNE_CONFIG=/etc/kune.properties
+# See src/main/resources/wave-server.properties in svn
+WAVE_CONFIG=/etc/kune/wave-server.properties
+# See src/main/resources/jaas.config in svn
+JAAS_CONFIG=src/main/resources/jaas.config
+
+SUSPEND="n"
+DEBUG=""
+DEBUG_PORT=""
+LOG_LEVEL="INFO"
+LOGFILE=/var/log/kune.log
+PIDFILE=/var/run/kune.pid
+
+while getopts “hj:k:w:s:up:l:da” OPTION
+do
+ case $OPTION in
+ h)
+ usage
+ exit 1
+ ;;
+ j)
+ JAR=$OPTARG
+ ;;
+ k)
+ KUNE_CONFIG=$OPTARG
+ ;;
+ w)
+ WAVE_CONFIG=$OPTARG
+ ;;
+ s)
+ JAAS_CONFIG=$OPTARG
+ ;;
+ p)
+ # Debug port
+ DEBUG_PORT=,address=$OPTARG
+ ;;
+ u)
+ SUSPEND="y"
+ ;;
+ a)
+ DAEMON="y"
+ ;;
+ l)
+ # TODO: use/configure src/main/resources/log4j.properties
+ LOG_LEVEL=$OPTARG
+ ;;
+ d)
+ DEBUG="y"
+ ;;
+ ?)
+ usage
+ exit
+ ;;
+ esac
+done
+
+if [[ $LOG_LEVEL -ne "IGNORE" || $LOG_LEVEL -ne "DEBUG" || $LOG_LEVEL -ne "INFO" || $LOG_LEVEL -ne "WARN" ]]
+then
+ usage
+ exit 1
+fi
+
+if [[ -n $DEBUG ]]
+then
+ DEBUG_FLAGS=-Xrunjdwp:transport=dt_socket,server=y,suspend=$SUSPEND$DEBUG_PORT
+fi
+
+USER=`id -u -n`
+if [[ -n $DAEMON && USER -ne "root" ]]
+then
+ echo "Error: Only root user can run kune as a deamon"
+ usage
+ exit 1
+fi
+
+if [[ -z $JAR ]]
+then
+ # Just run kune using the code and mave
+ mvn exec:java
+else
+ if [[ -n $DAEMON ]]
+ then
+ # FIXME Not sure if this is neccesary (if already configured in "/etc/security/limits.conf"
+ ulimit -n 65000
+ # http://stackoverflow.com/questions/534648/how-to-daemonize-a-java-program
+ nohup java $DEBUG_FLAGS \
+ -Dorg.eclipse.jetty.util.log.$LOG_LEVEL=true \
+ -Djava.security.auth.login.config=$JAAS_CONFIG \
+ -Dkune.server.config=$KUNE_CONFIG \
+ -Dwave.server.config=$WAVE_CONFIG \
+ -jar $JAR </dev/null > $LOGFILE 2>&1 &
+ echo $! > $PIDFILE
+ else
+ exec java $DEBUG_FLAGS \
+ -Dorg.eclipse.jetty.util.log.$LOG_LEVEL=true \
+ -Djava.security.auth.login.config=$JAAS_CONFIG \
+ -Dkune.server.config=$KUNE_CONFIG \
+ -Dwave.server.config=$WAVE_CONFIG \
+ -jar $JAR
+ fi
+fi
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.java 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.java 2011-11-27 14:01:08 UTC (rev 1628)
@@ -130,7 +130,9 @@
toTranslateTitle.setText(i18n.t("translate this:"));
noteForTranslatorsTittle.setText(i18n.t("Notes:"));
keyboardRecomendationTitle.setText(i18n.t("Tip:"));
- keyboardRecomendation.setText(i18n.t("Click Alt+PageUp or Alt+PageDown to move up/down in the list while translating, and Alt-V to copy the original text. The translations are autosaved"));
+ keyboardRecomendation.setText(i18n.t("You can resize the above textarea.")
+ + " "
+ + i18n.t("Click Alt+PageUp or Alt+PageDown to move up/down in the list while translating, and Alt-V to copy the original text. The translations are autosaved"));
}
private void saveIfNeeded() {
Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorForm.ui.xml 2011-11-27 14:01:08 UTC (rev 1628)
@@ -39,6 +39,10 @@
padding: 5px;
}
+ .textarea {
+ resize: both;
+ }
+
.tip {
width: 180px;
padding: 5px;
@@ -74,7 +78,7 @@
</g:FlowPanel>
<g:FlowPanel addStyleNames="{style.row}">
<g:Label ui:field="toLanguageTitle" addStyleNames="{style.titles} {style.cell}"/>
- <g:TextArea ui:field='translation' addStyleNames="{style.cell}"
+ <g:TextArea ui:field='translation' addStyleNames="{style.cell}{style.textarea}"
visibleLines="5"/>
<g:FlowPanel styleName="k-button"
addStyleNames="{style.cell} {style.copyicon} k-button k-btn k-5corners">
Modified: trunk/src/main/resources/wave-server.properties
===================================================================
--- trunk/src/main/resources/wave-server.properties 2011-11-24 03:35:38 UTC (rev 1627)
+++ trunk/src/main/resources/wave-server.properties 2011-11-27 14:01:08 UTC (rev 1628)
@@ -15,7 +15,7 @@
# A comma separated list of webApp source directories
# Default value: ./war
-resource_bases = target/kune-0.1.0-SNAPSHOT/,src/main/webapp/
+resource_bases = /var/www/kune/,target/kune-0.1.0-SNAPSHOT/,src/main/webapp/
### Server-specific variables
###
1
0
r1627 - in trunk/src: main/java/cc/kune/core/client/groups/newgroup main/java/cc/kune/core/client/sitebar test/java/cc/kune/selenium test/java/cc/kune/selenium/login test/java/cc/kune/selenium/spaces
by Vicente J. Ruiz Jurado 24 Nov '11
by Vicente J. Ruiz Jurado 24 Nov '11
24 Nov '11
Author: vjrj_
Date: 2011-11-24 04:35:38 +0100 (Thu, 24 Nov 2011)
New Revision: 1627
Added:
trunk/src/test/java/cc/kune/selenium/spaces/NewGroupPageObject.java
trunk/src/test/java/cc/kune/selenium/spaces/NewGroupSeleniumTests.java
Modified:
trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java
trunk/src/test/java/cc/kune/selenium/KuneSeleniumDefaults.java
trunk/src/test/java/cc/kune/selenium/SeleniumConf.java
trunk/src/test/java/cc/kune/selenium/login/RegisterSeleniumTests.java
trunk/src/test/java/cc/kune/selenium/spaces/SitePageObject.java
Log:
NEW - # 127: Generate some screencast while doing automate testing
http://kune.ourproject.org/issues/ticket/127
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-11-24 01:57:56 UTC (rev 1626)
+++ trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java 2011-11-24 03:35:38 UTC (rev 1627)
@@ -139,6 +139,7 @@
publicDescField.setTabIndex(3);
publicDescField.setFieldLabel(i18n.t("Public description"));
publicDescField.setName(PUBLICDESC_FIELD);
+ publicDescField.setId(PUBLICDESC_FIELD);
publicDescField.setWidth(DefaultForm.BIG_FIELD_WIDTH);
publicDescField.setAllowBlank(false);
publicDescField.setMinLength(10);
@@ -198,6 +199,8 @@
tag.setTabIndex(4);
tag.setFieldLabel(i18n.t("Group tags"));
tag.setName(TAGS_FIELD);
+ // FIXME if we us this for several tags, we should use different ids
+ tag.setId(TAGS_FIELD);
tag.setWidth(DefaultForm.BIG_FIELD_WIDTH);
tag.setAllowBlank(false);
Tooltip.to(tag, i18n.t("type some keyword that define your group"));
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java 2011-11-24 01:57:56 UTC (rev 1626)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java 2011-11-24 03:35:38 UTC (rev 1627)
@@ -30,7 +30,6 @@
import com.google.inject.Inject;
public class SitebarNewGroupLink extends ButtonDescriptor {
-
public static class SitebarNewGroupAction extends AbstractExtendedAction {
private final StateManager stateManager;
@@ -40,6 +39,7 @@
super();
this.stateManager = stateManager;
putValue(Action.NAME, i18n.t("Create New Group"));
+
putValue(Action.TOOLTIP, i18n.t("Create a new group for your initiative or organization "
+ "(NGO, collective, academic group...)"));
}
@@ -47,15 +47,16 @@
@Override
public void actionPerformed(final ActionEvent event) {
stateManager.gotoHistoryToken(SiteTokens.NEWGROUP);
- // stateManager.gotoHistoryTokenButRedirectToCurrent(SiteTokens.NEWGROUP);
}
}
+ public static final String NEW_GROUP_BTN_ID = "k-site-newgroup-btn";
+
@Inject
public SitebarNewGroupLink(final SitebarNewGroupAction action, final SitebarActions sitebarActions) {
super(action);
- setStyles("k-no-backimage, k-btn-sitebar, k-fl, k-noborder, k-nobackcolor");
- setParent(sitebarActions.getRightToolbar());
+ withId(NEW_GROUP_BTN_ID).withStyles("k-no-backimage, k-btn-sitebar, k-fl, k-noborder, k-nobackcolor");
+ withParent(sitebarActions.getRightToolbar());
}
}
Modified: trunk/src/test/java/cc/kune/selenium/KuneSeleniumDefaults.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/KuneSeleniumDefaults.java 2011-11-24 01:57:56 UTC (rev 1626)
+++ trunk/src/test/java/cc/kune/selenium/KuneSeleniumDefaults.java 2011-11-24 03:35:38 UTC (rev 1627)
@@ -42,12 +42,14 @@
import cc.kune.core.client.state.TokenUtils;
import cc.kune.core.client.sub.SubtitlesWidget;
import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.GroupType;
import cc.kune.selenium.chat.ChatPageObject;
import cc.kune.selenium.general.EntityHeaderPageObject;
import cc.kune.selenium.login.LoginPageObject;
import cc.kune.selenium.login.RegisterPageObject;
import cc.kune.selenium.spaces.GroupSpacePageObject;
import cc.kune.selenium.spaces.HomeSpacePageObject;
+import cc.kune.selenium.spaces.NewGroupPageObject;
import cc.kune.selenium.spaces.SitePageObject;
import cc.kune.selenium.spaces.UserSpacePageObject;
@@ -63,11 +65,12 @@
private final String baseUrl;
protected final ChatPageObject chat;
protected final EntityHeaderPageObject entityHeader;
- protected final GroupSpacePageObject groupSpace;
+ protected GroupSpacePageObject groupSpace;
protected final HomeSpacePageObject homeSpace;
private final Injector injector;
protected LoginPageObject login;
private final ResourceBundle messages;
+ protected NewGroupPageObject newGroup;
protected RegisterPageObject register;
protected final SitePageObject site;
protected UserSpacePageObject userSpace;
@@ -76,7 +79,9 @@
public KuneSeleniumDefaults() {
baseUrl = "http://" + SeleniumConf.SITE.getDomain() + "/" + SeleniumConf.SITE.getParams() + "#";
injector = INJECTOR;
+ final ElementLocatorFactory locator = injector.getInstance(ElementLocatorFactory.class);
webdriver = injector.getInstance(WebDriver.class);
+
login = injector.getInstance(LoginPageObject.class);
register = injector.getInstance(RegisterPageObject.class);
entityHeader = injector.getInstance(EntityHeaderPageObject.class);
@@ -85,8 +90,8 @@
homeSpace = injector.getInstance(HomeSpacePageObject.class);
userSpace = injector.getInstance(UserSpacePageObject.class);
groupSpace = injector.getInstance(GroupSpacePageObject.class);
- messages = injector.getInstance(ResourceBundle.class);
- final ElementLocatorFactory locator = injector.getInstance(ElementLocatorFactory.class);
+ newGroup = injector.getInstance(NewGroupPageObject.class);
+
PageFactory.initElements(locator, login);
PageFactory.initElements(locator, register);
PageFactory.initElements(locator, entityHeader);
@@ -95,6 +100,9 @@
PageFactory.initElements(locator, homeSpace);
PageFactory.initElements(locator, userSpace);
PageFactory.initElements(locator, groupSpace);
+ PageFactory.initElements(locator, newGroup);
+
+ messages = injector.getInstance(ResourceBundle.class);
}
public void answerOnNextPrompt(final String answer) {
@@ -182,6 +190,13 @@
webdriver.get(baseUrl);
}
+ @DataProvider(name = "newGroups")
+ public Object[][] newGroups() {
+ return new Object[][] { { "grp0", "Ecologist Group", GroupType.PROJECT },
+ { "grp1", "Chomsky Fan Club", GroupType.ORGANIZATION }, { "grp2", "吗台湾", GroupType.CLOSED },
+ { "grp3", "روبا", GroupType.COMMUNITY } };
+ }
+
public void open(final String url) {
webdriver.get(url);
}
Modified: trunk/src/test/java/cc/kune/selenium/SeleniumConf.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/SeleniumConf.java 2011-11-24 01:57:56 UTC (rev 1626)
+++ trunk/src/test/java/cc/kune/selenium/SeleniumConf.java 2011-11-24 03:35:38 UTC (rev 1627)
@@ -30,8 +30,8 @@
}
public enum Site {
- demo("kune.beta.iepala.es"), eurosur("beta.eurosur.org"), kunecc("kune.cc"), localhost("localhost",
- "&log_level=INFO&gwt.codesvr=127.0.0.1:9997");
+ demo("kune.beta.iepala.es"), eurosur("beta.eurosur.org"), kunecc("kune.cc"), localhost(
+ "localhost:8888", "&log_level=INFO&gwt.codesvr=127.0.0.1:9997");
private String domain;
private String params;
@@ -57,7 +57,7 @@
public static final Driver DRIVER = Driver.firefox;
/* Configure this for use other lang, site, or driver */
public static final Lang LANG = Lang.es;
- public static final Site SITE = Site.eurosur;
+ public static final Site SITE = Site.localhost;
public static final int TIMEOUT = 25;
SeleniumConf() {
Modified: trunk/src/test/java/cc/kune/selenium/login/RegisterSeleniumTests.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/login/RegisterSeleniumTests.java 2011-11-24 01:57:56 UTC (rev 1626)
+++ trunk/src/test/java/cc/kune/selenium/login/RegisterSeleniumTests.java 2011-11-24 03:35:38 UTC (rev 1627)
@@ -53,7 +53,7 @@
// home space
showTitleSlide(t("Home space (your welcome page)"),
t("Here you can see a summary of your activity in this site"));
- site.homeBtn().click();
+ site.homeSpaceBtn.click();
sleep(2000);
homeSpace.getSndStats().click();
sleep(2000);
@@ -62,8 +62,8 @@
// user space
showTitleSlide(t("User space (your Inbox)"), t("contents in which you participate"));
- showTooltip(site.userBtn());
- site.userBtn().click();
+ showTooltip(site.userSpaceBtn);
+ site.userSpaceBtn.click();
showMsg(t("You can see this like an advanced email system..."));
userSpace.getFirstWave().click();
sleep(2000);
@@ -88,8 +88,8 @@
// group space
showTitleSlide(t("Your personal public space"), t("here you can have your blog, etc"));
sleep(500);
- site.groupBtn().click();
- site.groupBtn().click();
+ site.groupSpaceBtn.click();
+ site.groupSpaceBtn.click();
showMsg(t("Let's start adding some buddie to our social network"));
sleep(1000);
groupSpace.addBuddieBtn().click();
@@ -124,7 +124,7 @@
chat.getSend(jids).click();
showMsg(t("And you can chat event while going back/forward with your browser"));
- site.homeBtn().click();
+ site.homeSpaceBtn.click();
sleep(2000);
chat.getTalkBox(jids).sendKeys(t("la la la"));
chat.getSend(jids).click();
Added: trunk/src/test/java/cc/kune/selenium/spaces/NewGroupPageObject.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/spaces/NewGroupPageObject.java (rev 0)
+++ trunk/src/test/java/cc/kune/selenium/spaces/NewGroupPageObject.java 2011-11-24 03:35:38 UTC (rev 1627)
@@ -0,0 +1,50 @@
+/*
+ *
+ * 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.selenium.spaces;
+
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.FindBy;
+
+import cc.kune.core.client.groups.newgroup.NewGroupPanel;
+import cc.kune.selenium.PageObject;
+import cc.kune.selenium.SeleniumConstants;
+
+public class NewGroupPageObject extends PageObject {
+
+ @FindBy(id = NewGroupPanel.CLOSED_GROUP_TYPE_ID)
+ public WebElement closedType;
+ @FindBy(id = NewGroupPanel.COMM_GROUP_TYPE_ID)
+ public WebElement communityType;
+ @FindBy(id = NewGroupPanel.LONGNAME_FIELD + SeleniumConstants.INPUT)
+ public WebElement longName;
+ @FindBy(id = NewGroupPanel.ORG_GROUP_TYPE_ID)
+ public WebElement orgType;
+ @FindBy(id = NewGroupPanel.PROJ_GROUP_TYPE_ID)
+ public WebElement projectType;
+ @FindBy(id = NewGroupPanel.PUBLICDESC_FIELD + SeleniumConstants.INPUT)
+ public WebElement publicDescription;
+ @FindBy(id = SeleniumConstants.GWTDEV + NewGroupPanel.REGISTER_BUTTON)
+ public WebElement registerBtn;
+ @FindBy(id = NewGroupPanel.SHORTNAME_FIELD + SeleniumConstants.INPUT)
+ public WebElement shortName;
+ @FindBy(id = NewGroupPanel.TAGS_FIELD + SeleniumConstants.INPUT)
+ public WebElement tags;
+
+}
Added: trunk/src/test/java/cc/kune/selenium/spaces/NewGroupSeleniumTests.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/spaces/NewGroupSeleniumTests.java (rev 0)
+++ trunk/src/test/java/cc/kune/selenium/spaces/NewGroupSeleniumTests.java 2011-11-24 03:35:38 UTC (rev 1627)
@@ -0,0 +1,72 @@
+/*
+ *
+ * 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.selenium.spaces;
+
+import org.testng.annotations.Test;
+
+import cc.kune.common.client.errors.UIException;
+import cc.kune.core.shared.dto.GroupType;
+import cc.kune.selenium.KuneSeleniumTest;
+import cc.kune.selenium.SeleniumConstants;
+import cc.kune.selenium.SeleniumUtils;
+
+public class NewGroupSeleniumTests extends KuneSeleniumTest {
+
+ @Test(dataProvider = "newGroups")
+ public void basicSignIn(final String shortname, final String longname, final GroupType groupType) {
+ SeleniumUtils.fastSpeed(true);
+ login.assertIsDisconnected();
+
+ login.signIn(SeleniumConstants.USER_SHORNAME, SeleniumConstants.USER_PASSWD);
+ login.assertIsConnectedAs(SeleniumConstants.USER_SHORNAME);
+ site.groupSpaceBtn.click();
+ site.newGroupBtn.click();
+
+ final String prefix = getTempString();
+
+ newGroup.shortName.sendKeys(shortname + prefix);
+ final String longNameTranslated = t(longname) + " " + prefix;
+ newGroup.longName.sendKeys(longNameTranslated);
+ newGroup.publicDescription.sendKeys(t("This is only a test group"));
+ newGroup.tags.sendKeys("tag1 tag2");
+ switch (groupType) {
+ case PROJECT:
+ newGroup.projectType.click();
+ break;
+ case ORGANIZATION:
+ newGroup.orgType.click();
+ break;
+ case CLOSED:
+ newGroup.closedType.click();
+ break;
+ case COMMUNITY:
+ newGroup.closedType.click();
+ break;
+ default:
+ throw new UIException("New group types?");
+ }
+ newGroup.registerBtn.click();
+
+ entityHeader.waitForEntityTitle(longNameTranslated);
+
+ login.assertIsDisconnected();
+ }
+
+}
Modified: trunk/src/test/java/cc/kune/selenium/spaces/SitePageObject.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/spaces/SitePageObject.java 2011-11-24 01:57:56 UTC (rev 1626)
+++ trunk/src/test/java/cc/kune/selenium/spaces/SitePageObject.java 2011-11-24 03:35:38 UTC (rev 1627)
@@ -23,6 +23,7 @@
import org.openqa.selenium.support.FindBy;
import cc.kune.core.client.notify.confirm.UserConfirmPanel;
+import cc.kune.core.client.sitebar.SitebarNewGroupLink;
import cc.kune.core.client.sitebar.search.SitebarSearchPanel;
import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter.SpaceSelectorView;
import cc.kune.selenium.PageObject;
@@ -35,41 +36,15 @@
@FindBy(id = SeleniumConstants.GWTDEV + UserConfirmPanel.OK_ID)
public WebElement confirmationOk;
@FindBy(id = SeleniumConstants.GWTDEV + SpaceSelectorView.GROUP_SPACE_ID)
- protected WebElement groupSpaceBtn;
+ public WebElement groupSpaceBtn;
@FindBy(id = SeleniumConstants.GWTDEV + SpaceSelectorView.HOME_SPACE_ID)
- protected WebElement homeSpaceBtn;
+ public WebElement homeSpaceBtn;
+ @FindBy(id = SeleniumConstants.GWTDEV + SitebarNewGroupLink.NEW_GROUP_BTN_ID)
+ public WebElement newGroupBtn;
@FindBy(id = SeleniumConstants.GWTDEV + SpaceSelectorView.PUBLIC_SPACE_ID)
- protected WebElement publicSpaceBtn;
+ public WebElement publicSpaceBtn;
@FindBy(id = SeleniumConstants.GWTDEV + SitebarSearchPanel.SITE_SEARCH_TEXTBOX)
public WebElement searchTextBox;
@FindBy(id = SeleniumConstants.GWTDEV + SpaceSelectorView.USER_SPACE_ID)
- protected WebElement userSpaceBtn;
-
- public SitePageObject() {
- }
-
- public WebElement getConfirmationCancel() {
- return confirmationCancel;
- }
-
- public WebElement getConfirmationOk() {
- return confirmationOk;
- }
-
- public WebElement groupBtn() {
- return groupSpaceBtn;
- }
-
- public WebElement homeBtn() {
- return homeSpaceBtn;
- }
-
- public WebElement publicBtn() {
- return publicSpaceBtn;
- }
-
- public WebElement userBtn() {
- return userSpaceBtn;
- }
-
+ public WebElement userSpaceBtn;
}
1
0
r1626 - in trunk/src/main/java/cc/kune: core/client/groups/newgroup wave/client
by Vicente J. Ruiz Jurado 24 Nov '11
by Vicente J. Ruiz Jurado 24 Nov '11
24 Nov '11
Author: vjrj_
Date: 2011-11-24 02:57:56 +0100 (Thu, 24 Nov 2011)
New Revision: 1626
Modified:
trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
trunk/src/main/java/cc/kune/wave/client/WebClient.java
Log:
Fix bug in New Group Creation (thanks to Oren Goldberg for the feedback)
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-11-24 00:49:46 UTC (rev 1625)
+++ trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java 2011-11-24 01:57:56 UTC (rev 1626)
@@ -146,7 +146,8 @@
publicDescField.setValidationDelay(1000);
form.add(publicDescField);
- form.add(createTagField(tag1));
+ tag1 = createTagField(tag1);
+ form.add(tag1);
// form.add(createTagField(tag2));
// form.add(createTagField(tag3));
Modified: trunk/src/main/java/cc/kune/wave/client/WebClient.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WebClient.java 2011-11-24 00:49:46 UTC (rev 1625)
+++ trunk/src/main/java/cc/kune/wave/client/WebClient.java 2011-11-24 01:57:56 UTC (rev 1626)
@@ -184,12 +184,12 @@
final String message = stack.asString().replace("<br>", "\n");
REMOTE_LOG.severe(message);
NotifyUser.logError(message);
- NotifyUser.showProgress("Error in editor");
+ NotifyUser.showProgress("Error");
new Timer() {
@Override
public void run() {
NotifyUser.hideProgress();
- }}.schedule(3000);
+ }}.schedule(5000);
}
});
}
1
0
r1625 - in trunk: . img/screenshots script src/main/java/cc/kune src/main/java/cc/kune/core/client/i18n src/main/java/cc/kune/gspace/client/i18n src/main/resources src/test/java/cc/kune/selenium src/test/java/cc/kune/selenium/chat src/test/java/cc/kune/selenium/login
by Vicente J. Ruiz Jurado 24 Nov '11
by Vicente J. Ruiz Jurado 24 Nov '11
24 Nov '11
Author: vjrj_
Date: 2011-11-24 01:49:46 +0100 (Thu, 24 Nov 2011)
New Revision: 1625
Added:
trunk/COPYRIGHT.txt
trunk/img/screenshots/kune-register.png
trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_fr.properties
Modified:
trunk/CREDITS
trunk/pom.xml
trunk/script/recordScreenCast.sh
trunk/src/main/java/cc/kune/Kune.gwt.xml
trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java
trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties
trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties
trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java
trunk/src/main/resources/TestConstants_en.properties
trunk/src/main/resources/TestConstants_es.properties
trunk/src/test/java/cc/kune/selenium/CustomWebDriverEventListener.java
trunk/src/test/java/cc/kune/selenium/KuneSeleniumDefaults.java
trunk/src/test/java/cc/kune/selenium/SeleniumConf.java
trunk/src/test/java/cc/kune/selenium/SeleniumConstants.java
trunk/src/test/java/cc/kune/selenium/SeleniumUtils.java
trunk/src/test/java/cc/kune/selenium/chat/ChatPageObject.java
trunk/src/test/java/cc/kune/selenium/login/RegisterPageObject.java
trunk/src/test/java/cc/kune/selenium/login/RegisterSeleniumTests.java
Log:
NEW - # 127: Generate some screencast while doing automate testing
http://kune.ourproject.org/issues/ticket/127
NEW - # 163: Empty messages in Views where not logged shoul be different to logged
http://kune.ourproject.org/issues/ticket/163
Added: trunk/COPYRIGHT.txt
===================================================================
--- trunk/COPYRIGHT.txt (rev 0)
+++ trunk/COPYRIGHT.txt 2011-11-24 00:49:46 UTC (rev 1625)
@@ -0,0 +1 @@
+link COPYRIGHT
\ No newline at end of file
Property changes on: trunk/COPYRIGHT.txt
___________________________________________________________________
Name: svn:special
+ *
Modified: trunk/CREDITS
===================================================================
--- trunk/CREDITS 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/CREDITS 2011-11-24 00:49:46 UTC (rev 1625)
@@ -24,6 +24,6 @@
* Daniel Jiménez for the initial help and coordination
* Johnattan Rupire, William Austen Bradbury and Rana Hassan for their web contributions and
translations
-* Bastien Guerry for his French translation and for his ideas, feedback, support, inspiration
+* Bastien Guerry for his French translation and his ideas, feedback, support and inspiration
* and <URL:http://ourproject.org> and again <URL:http://xsto.info> and
<URL:http://iepala.es> for sharing with us their resources
Added: trunk/img/screenshots/kune-register.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/screenshots/kune-register.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/pom.xml 2011-11-24 00:49:46 UTC (rev 1625)
@@ -1171,12 +1171,12 @@
<plugin>
<groupId>org.dstovall</groupId>
<artifactId>onejar-maven-plugin</artifactId>
- <version>1.4.4</version>
+ <version>1.4.4-SNAPSHOT</version>
<executions>
<execution>
<configuration>
<!-- Optional -->
- <!-- <onejarVersion>0.97</onejarVersion> -->
+ <onejarVersion>0.97</onejarVersion>
<!-- Optional, use only if you need to include native libraries
(dll's) -->
<!-- <binlibs> -->
Modified: trunk/script/recordScreenCast.sh
===================================================================
--- trunk/script/recordScreenCast.sh 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/script/recordScreenCast.sh 2011-11-24 00:49:46 UTC (rev 1625)
@@ -6,21 +6,15 @@
RHEIGHT=649
#SEARCH=Eurosur
#SEARCH=Jane
-SEARCH=Firefox
-xdotool search --sync --onlyvisible "$SEARCH" windowactivate
-xdotool key --clearmodifiers alt+F5
-xdotool search --sync --onlyvisible "$SEARCH" windowsize %@ $WIDTH $HEIGHT
-xdotool search --onlyvisible --name "$SEARCH" windowmove %@ 0 0
+
+# Not needed, now firefox webdriver can be resized
+#SEARCH=Firefox
+#xdotool search --sync --onlyvisible "$SEARCH" windowactivate
+#xdotool key --clearmodifiers alt+F5
+#xdotool search --sync --onlyvisible "$SEARCH" windowsize %@ $WIDTH $HEIGHT
+#xdotool search --onlyvisible --name "$SEARCH" windowmove %@ 0 0
+
if [[ $? -eq 0 ]]
then
recordmydesktop -x 0 -y 83 --width $RWIDTH --height $RHEIGHT --fps 25 --no-sound -o kune-screencast.ogv
fi
-
-#WID=`xdotool search --onlyvisible --name "$1" | head -1`
-#xdotool search --onlyvisible --name "Firefox" windowmove %@ 0 0
-#recordmydesktop --windowid $WID --fps 25 --no-sound -o foo.ogv
-#xdotool search --onlyvisible "gtk-recordMyDesktop" windowmove %@ 1000 1000
-#WID=`xdotool search --class "$1" | head -1`
-#WID=`xdotool search --onlyvisible --maxdepth 2 --class "$1 "`
-#xdotool windowmove $WID 0 0
-#xdotool windowsize $WID 806 707
Modified: trunk/src/main/java/cc/kune/Kune.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-11-24 00:49:46 UTC (rev 1625)
@@ -58,6 +58,7 @@
<!-- I18n ===================================================== -->
<extend-property name="locale" values="en" />
<extend-property name="locale" values="es" />
+ <extend-property name="locale" values="fr" />
<!-- Hardcoded locale (to override emite italian support) ===== -->
<!-- <set-property name="locale" value="en" /> -->
<!-- Hardcoded log level ====================================== -->
Modified: trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java 2011-11-24 00:49:46 UTC (rev 1625)
@@ -32,6 +32,8 @@
String addGadget();
+ String addNewMember();
+
String aDecentralizedWayToOfferOrAskForServicesAndGoodsToYourGroupsOrToAnyoneBarteringMeansTheExchangeOfGoo();
String administrators();
@@ -216,6 +218,12 @@
String doubleClickToOpen();
+ String doubleClickToOpenDragAndDropToMoveThisToAnotherPlace();
+
+ String doYouWantToAddParamAsAMemberOfParam();
+
+ String doYouWantToAddParamToYourContacts();
+
String doYouWantToJoinThisGroup();
String doYouWantToWriteAMessageToTheAdministratorsOfThisGroup();
@@ -244,6 +252,8 @@
String error();
+ String errorConfiguringTheTool();
+
String errorSettingTheLogo();
String errorsInfo();
@@ -346,6 +356,8 @@
String memberAccepted();
+ String memberAddedAsCollaborator();
+
String memberRemoved();
String membershipRequestedWaitingForAdminsDecision();
@@ -366,6 +378,10 @@
String name();
+ String nameOfTheNewChatroom();
+
+ String nameOfTheNewList();
+
String nConversationsUnread();
String newAdvancedPoll();
@@ -434,6 +450,8 @@
String notTranslated();
+ String nowadaysTheGadgetsMapsPollsEtcAreExperimentalInSomeBrowsersYouMightExperienceProblemsWithCertainGadg();
+
String nRecentConversationsUnread();
String nSubscribedNPosts();
@@ -498,12 +516,16 @@
String pleaseCopyPasteThisInfoToReportProblems();
+ String pleaseSignInOrRegisterToCreateAGroup();
+
String pleaseSignInOrRegisterToGetFullAccessToParamToolsAndContents();
String pleaseSupport();
String post();
+ String postCreatedEditIt();
+
String preview();
String processing();
@@ -584,6 +606,8 @@
String selectTheLicenseYouPreferUsingForSharingYourGroupContentsWithOtherPeople();
+ String serverErrorSavingTheTranslation();
+
String setYourChatStatus();
String setYourGroupPreferencesHere();
@@ -596,12 +620,20 @@
String signIn();
+ String signInOrCreateAnAccountToAccessToYourInbox();
+
+ String signInOrCreateAnAccountToParticipateInThisGroup();
+
+ String signInOrRegisterToHelpWithTheTranslation();
+
String signInToCollaborate();
String signOut();
String signOutOfChat();
+ String sorryThisGadgetHasProblemsWithItsnHeightWeHopeThisWillBeFixedSoonn();
+
String startACollaborativeDocumentForTheMeetingMinutes();
String startAPublicAssemblyWithMembers();
@@ -612,6 +644,8 @@
String subscribe();
+ String subscribed();
+
String subscribeToThisList();
String successUploading();
@@ -654,10 +688,14 @@
String theSocialNetworkOfThisUserIsNotPublic();
+ String theUsernamePasswordIsIncorrect();
+
String thisBlogHasnTAnyPostCreateOne();
String thisDemoOfKune();
+ String thisEmailAddressIsBeingUsedByAnotherUserPleaseTryWithAnotherOne();
+
String thisFolderIsEmpty();
String thisIsACopyleftLicense();
@@ -692,6 +730,10 @@
String thisListIsNowRestrictedToThePublic();
+ String thisNameAlreadyExistsItIsUsedWhenAFileOrAFolderWithTheSameNameAlreadyExists();
+
+ String thisNameInAlreadyInUsePleaseTryWithADifferentName();
+
String thisNameIsAlreadyInUsePleaseTryWithADifferentName();
String thisSite();
@@ -714,6 +756,8 @@
String tip();
+ String titleOfTheNewPost();
+
String to();
String toHelpWithTheTranslationOfThisSoftwarePleaseContactBeforeWithThisSiteAdministrators();
@@ -734,6 +778,16 @@
String typeSomethingToSearchForUsersAndGroupsInParam();
+ String typeSomethingToSearchForUsersInParam();
+
+ String typeTheNameOfTheUserAndSelectHimHer();
+
+ String unsubscribe();
+
+ String unsubscribed();
+
+ String unsubscribeToThisList();
+
String useACopyleftLicenseRecommended();
String useAnotherKindOfLicenseAdvanced();
@@ -802,6 +856,8 @@
String youAreNowMemberOfThisGroup();
+ String youAreTryingToMoveThisToTheSameLocation();
+
String youCanAlsoUploadABackground();
String youCanChangeThisLicenseLater();
@@ -810,8 +866,12 @@
String youCannotDisableThisToolBecauseItSWhereYourHomePageIsLocatedToDoThatYouHaveToSelectOtherContentAsThe();
+ String youCannotWriteToNonBuddies();
+
String youDidNotSignInSoYouCanJustSeeSomePublicContentsInParamButNotEditOrCollaborateWithOthersPleaseParamO();
+ String youDoNotHaveRightsToPerformThatAction();
+
String yourGroups();
String yourHomepage();
Modified: trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties 2011-11-24 00:49:46 UTC (rev 1625)
@@ -410,4 +410,37 @@
aCalendarToScheduleActivitiesAndEvents = A calendar to schedule activities and events
aRoomWhereYouCanHaveAGroupChatWithManyUsersAtOnceRoomsCanBePublicOrPrivateUsersCanBeFromParamOrOther = A 'room' where you can have a group-chat with many users at once. Rooms can be public or private. Users can be from [%s] or other sites (compatible with gmail chat)
wikiPagesAreDocumentsThatCanBeEditedByAnyVisitorInParamInsteadOfOnlyByTheGroupThisAcceleratesUpdatin = Wiki-pages are Documents that can be edited by any visitor (in [%s]), instead of only by the group. This accelerates updating and construction
-errorSettingTheLogo = Error setting the logo
\ No newline at end of file
+errorSettingTheLogo = Error setting the logo
+signInOrCreateAnAccountToAccessToYourInbox = Sign in or create an account to access to your inbox
+sorryThisGadgetHasProblemsWithItsnHeightWeHopeThisWillBeFixedSoonn = Sorry, this gadget has problems with its
+ height. We hope this will be fixed soon
+
+addNewMember = Add new member
+typeTheNameOfTheUserAndSelectHimHer = Type the name of the user and select him/her:
+typeSomethingToSearchForUsersInParam = Type something to search for users in [%s]
+doubleClickToOpenDragAndDropToMoveThisToAnotherPlace = Double click to open. Drag and drop to move this to another place
+theUsernamePasswordIsIncorrect = The username/password is incorrect
+subscribed = Subscribed
+unsubscribe = Unsubscribe
+unsubscribeToThisList = Unsubscribe to this list
+unsubscribed = Unsubscribed
+doYouWantToAddParamToYourContacts = Do you want to add '[%s]' to your contacts?
+youAreTryingToMoveThisToTheSameLocation = You are trying to move this to the same location
+postCreatedEditIt = Post created. Edit it
+pleaseSignInOrRegisterToCreateAGroup = Please, sign in or register to create a group
+signInOrCreateAnAccountToParticipateInThisGroup = Sign in or create an account to participate in this group
+thisNameInAlreadyInUsePleaseTryWithADifferentName = This name in already in use. Please try with a different name
+nowadaysTheGadgetsMapsPollsEtcAreExperimentalInSomeBrowsersYouMightExperienceProblemsWithCertainGadg = Nowadays the gadgets (maps, polls, etc) are experimental. In some browsers you might experience problems with certain gadgets
+errorConfiguringTheTool = Error configuring the tool
+youDoNotHaveRightsToPerformThatAction = You do not have rights to perform that action
+0 = 0
+signInOrRegisterToHelpWithTheTranslation = Sign in or register to help with the translation
+thisNameAlreadyExistsItIsUsedWhenAFileOrAFolderWithTheSameNameAlreadyExists = This name already exists
+doYouWantToAddParamAsAMemberOfParam = Do you want to add '[%s]' as a member of '[%s]'?
+memberAddedAsCollaborator = Member added as collaborator
+thisEmailAddressIsBeingUsedByAnotherUserPleaseTryWithAnotherOne = This email address is being used by another user. Please, try with another one
+youCannotWriteToNonBuddies = You cannot write to non buddies
+nameOfTheNewChatroom = Name of the new chatroom?
+nameOfTheNewList = Name of the new list?
+titleOfTheNewPost = Title of the new post?
+serverErrorSavingTheTranslation = Server error saving the translation
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties 2011-11-24 00:49:46 UTC (rev 1625)
@@ -411,4 +411,10 @@
aCalendarToScheduleActivitiesAndEvents = Un calendario para programar actividades y eventos
aRoomWhereYouCanHaveAGroupChatWithManyUsersAtOnceRoomsCanBePublicOrPrivateUsersCanBeFromParamOrOther = Una 'sala' donde puedes tener una conversación en grupo con muchos/as usuarios/as al mismo tiempo. Las salas pueden ser privadas o públicas. Los/as usuarios/as pueden ser de [%s] o de otros sitios (es compatible con el chat de gmail).
wikiPagesAreDocumentsThatCanBeEditedByAnyVisitorInParamInsteadOfOnlyByTheGroupThisAcceleratesUpdatin = Las páginas Wiki son documentos que pueden ser editados por cualquier usuario/a (de [%s]) en vez de solo por el grupo. Este acelera su actualización y construcción
-errorSettingTheLogo = Error configurando el logo
\ No newline at end of file
+errorSettingTheLogo = Error configurando el logo
+signInOrCreateAnAccountToAccessToYourInbox = Entra o créate una cuenta para acceder a tu carpeta de entrada
+addNewMember = Añadir un nuevo miembro
+unsubscribe = Desubscrito
+unsubscribeToThisList = Desuscribirse de esta lista
+errorConfiguringTheTool = Error de configuración de la herramienta
+doYouWantToAddParamAsAMemberOfParam = ¿Quieres añadir '[%s]' como miembro de '[%s]'?
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_fr.properties
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_fr.properties (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_fr.properties 2011-11-24 00:49:46 UTC (rev 1625)
@@ -0,0 +1,444 @@
+#
+# Autogenerated by trunk/bin/i18n-db2gwt.sh, please not edit directly
+#
+
+writeToYourBuddy = Ecrivez à votre contact
+chatWithThisGroupMember = Discuter avec ce membre du groupe
+chatWithYourBuddy = Discuter avec votre copain
+addAsABuddy = Ajouter comme contact
+chat = Discuter ;)
+oopsSomethingHasGoneWrongWithOurServersRetryLaterPlease = Oops ! Quelque chose s'est mal passé avec nos serveurs. Merci de réessayer plus tard.
+loading = Chargement
+join = Rejoindre
+requestToJoinInThisGroup = Requête pour rejoindre ce groupe
+writeToTheMembersOfThisGroup = Ecrire aux membres de ce groupe
+writeToTheAdministratorsOfThisGroup = Ecrire aux administrateurs de ce groupe
+leaveThisGroup = Quitter ce groupe
+usersWhoCanViewThisMemberList = Utilisateurs qui peuvent voir cette liste de membres
+options = Options
+newMembersPolicy = Nouvelles conditions pour les membres
+anyone = n'importe qui
+onlyMembers = seulement les membres
+moderateRequestToJoin = Modérer la requête d'inscription
+addANewBuddy = Ajouter un nouveau contact
+closedForNewMembers = fermé pour les nouveaux membres
+autoAcceptRequestToJoin = accepter automatiquement les demandes d'inscription
+onlyAdministrators = Seulement les administrateurs
+onlyYourBuddies = seulement vos contacts
+usersWhoCanViewYourNetwork = Utilisateurs qui peuvent voir votre réseau
+onlyYou = seulement vous
+groupMembers = Membres du groupe
+usersAndGroupsCollaboratingInThisGroup = Utilisateurs et groupes qui collaborent à ce groupe
+administrators = Administrateurs
+usersWhoCanAdministrateThisGroup = Utilisateurs qui peuvent administrer ce groupe
+collaborators = Collaborateurs
+othersWhoCollaborateWithThisGroup = Autres qui collaborent avec ce groupe
+thisIsAnOrphanedProjectIfYouAreInterestedInContributingPleaseRequestToJoin = Ceci est un projet orphelin, si vous désirez contribuer merci de demander à le rejoindre
+pending = En attente
+theMembersOfThisGroupAreNotPublic = Les membres de ce groupe ne sont pas publics
+usersPendingToBeAcceptedInThisGroupByTheAdministrators = Utilisateurs en attente d'être acceptés dans ce groupe par les administrateurs
+changeToCollaborator = Changer vers collaborateur
+changeToAdministrator = Changer vers administrateur
+removeThisMember = Retirer ce membre
+visitThisGroupSHomepage = Visiter la page d'accueil de ce groupe
+visitThisMemberSHomepage = Visiter la page d'accueil de ce membre
+acceptThisMember = Accepter ce membre
+rejectAsMember = Rejeter comme membre
+visitYourHomepage = Visiter votre page d'accueil
+visitHisHerHomepage = Visiter sa page d'accueil
+hisHerNetwork = Son réseau :
+thisUserSGroupsAndBuddies = Les groupes et les contacts de cet utilisateur
+buddies = Contacts
+thisUserSBuddies = Les contacts de cet utilisateur
+joinsIn = Rejoint dans
+groupsWhichThisUserJoined = Groupes rejoints par cet utilisateur
+yourGroups = Vos groupes
+yourHomepage = Votre page d'accueil
+thisSite = ce site
+yourHomePageInParam = Votre page d'accueil dans [%s]
+userSpaceItShowsAListOfAllDocumentsAndContentsInWhichYouParticipate = Espace utilisateur : il montre une liste de tous les documents et contenus auxquels vous participez
+groupAndPersonalSpaceWhereYouCanCreateAndPublishContentsForYourPersonalOrGroupWebSpaces = Groupe et espace personnel : là où vous pouvez créer et publier les contenus pour vos espaces web personnel ou de groupe
+publicSpaceWhereYouCanSeeAPreviewOfHowYourPersonalOrGroupSpaceLooksLikeOnTheWeb = Espace public : où vous pouvez avoir un aperçu de la manière dont vos espaces personnels ou groupe apparaîtront sur le web
+latestPublications = Dernières publications
+stats = Stats
+registeredUsers = Utilisateurs enregistrés :
+hostedGroups = Groupes hébergés :
+latestCreatedGroups = Derniers groupes créés
+latestActivityInYourGroups = Dernières activités dans votre groupe
+tags = Tags
+keywordsOrTermsAssociatedWithThisGroup = Mots-clefs ou termes associés à ce groupe
+typeSomethingToSearchForUsersAndGroupsInParam = Tapez quelque chose pour chercher des utilisateurs et des groupes dans [%s]
+search = Recherche
+close = Fermer
+groupOptions = Options du groupe
+setYourGroupPreferencesHere = Définissez vos préférences de groupe ici
+userOptions = Options utilisateur
+helpWithTheTranslation = Participez à la traduction
+yourPreferences = Vos préférences
+giveUsFeedback = Envoyez-nous vos impressions !
+writeUsWithSomeFeedbackForHelpUsToImproveTheseServices = Envoyez-nous des retours pour nous aider à améliorer ces services
+showHideTheChatWindow = Montrer/cacher la fenêtre de discussion
+setYourChatStatus = Indiquez votre statut pour la discussion
+available = Disponible
+availableForChat = Disponible pour discuter
+away = Indisponible
+busy = Occupé
+signOutOfChat = Se déconnecter de la discussion
+groupSPublicChatRoom = Salle de discussion publique du groupe
+enterToThisGroupPublicChatRoom = Entrez dans la salle de discussion publique de ce groupe
+startAPublicAssemblyWithMembers = Démarrer une assemblée publique avec les membres
+enterToThisGroupPublicChatRoomAndInviteMembers = Entrez dans la salle de discussion publique de ce groupe et invitez des membres
+reportKuneIssuesProblems = Rapporter des problèmes au sujet de Kune
+apacheWavePowered = Propulsé par Apache Wave
+aboutKune = À propos de kune
+errorsInfo = Informations sur l'erreur
+signInToCollaborate = Connectez-vous pour collaborer
+pleaseSignInOrRegisterToGetFullAccessToParamToolsAndContents = Merci de vous connecter ou de vous inscrire pour avoir un accès complet aux outils et contenus de [%s]
+signOut = Se déconnecter
+createNewGroup = Créer un Nouveau Groupe
+createANewGroupForYourInitiativeOrOrganizationNgoCollectiveAcademicGroup = Créer un nouveau groupe pour votre initiative ou organisation (ONG, collectif, groupe académique, ...)
+chatWithThisPerson = Discuter avec cette personne
+kuneDevelopmentSite = site du développement de Kune
+andNExternalUser = ajouter [%d] utilisateur externe
+thisIsOnlyAPreviewOfHowThisPageWouldLookLikeToTheGeneralPublicOnTheInternet = Ceci n'est qu'un aperçu de ce à quoi la page ressemblera pour le public sur internet.
+preview = Prévisualisation
+paramUnderLicenseParam = © [%s], sous licence: [%s]
+clickToRename = Cliquez pour renommer
+createANewDocumentIfYouChooseToPublishItThisDocumentWillAppearAsANewPageInThePublicWeb = Créer un Nouveau Document. Si vous choisissez de le publier, ce document apparaîtra comme une nouvelle "Page" sur le web public
+reloadCurrentPage = Recharger la page actuelle
+newDocument = Nouveau document
+goUpOpenTheContainerFolder = Monter d'un niveau : ouvrir le dossier supérieur
+edit = Modifier
+chatAbout = Discuter à propos de
+chatAndCommentOnThis = Discuter et commenter cela
+nConversationsUnread = [%d] conversations non lues
+memberAccepted = Membre accepté
+general = Général
+changeThisValues = Changer ces valeurs :
+theNameMustBeBetween3And15LowercaseWesternCharactersAndOrNumbers = Le nom doit comprendre entre 3 et 15 caractères européens en bas de casse et/ou des chiffres
+shortName = Nom court
+longName = Nom long
+tools = Outils
+hereYouCanSelectTheToolsUsed = Ici vous pouvez choisir les outils utilisés :
+thisToolCannotBeDisabledAsLongAsItsWhereTheGroupsHomePageIsLocatedChangeTheDefaultHomePageToAnotherT = Cet outil ne peut pas être désactivé tant qu'il est dans la page d'accueil du groupe. Changez la page d'accueil par défaut pour un autre outil et essayez de nouveau.
+choose = Choisir
+changeThisWorkspaceTheme = Changer le thème de cet espace de travail :
+selectAnImageFromYourComputerAsTheLogoForThisGroupForBestResultsUseANxnPixelImageBiggerImagesWillBeA = Choisissez une image de votre ordinateur comme logo de ce groupe. Pour de meilleurs résultats, utilisez une image de [%d]x[%d] pixels. Les images plus grandes seront automatiquement retaillées
+style = Style
+currentBackgroundImage = image de fond actuelle :
+youCanAlsoUploadABackground = Vous pouvez aussi téléverser un arrière-plan :
+change = Changer
+clear = Effacer
+removeCurrentBackgroundImage = Enlever l'image de fond actuelle
+selectAndConfigureThePublicSpaceThemeOfThisGroup = Choisir et configurer le thème de l'espace public de ce groupe :
+clickToSelectAndConfigureThisTheme = Cliquez pour choisir et configurer ce thème
+redblackAThemeName = rougenoir
+purpleAThemeName = pourpre
+greenAThemeName = vert
+highcontrastAThemeName = contraste fort
+blackwhiteAThemeName = noirblanc
+eurosurAThemeName = eurosur
+campAThemeName = camp
+defaultAThemeName = par défaut
+blueAThemeName = bleu
+redAThemeName = rouge
+greyAThemeName = gris
+saharaAThemeName = sahara
+pinkAThemeName = rose
+transparentAThemeName = transparent
+whiteblackAThemeName = blancnoir
+license = Licence
+thisIsTheDefaultLicenseForAllTheContentsOfThisGroupAlthoughYouCanChooseADifferentLicenseForSpecificC = Ceci est la licence par défaut pour tous les contenus de ce groupe (même si vous pouvez choisir une licence différente pour des contenus particuliers)
+enterLanguage = Indiquez la langue
+searching = Recherche...
+yourLanguage = Votre langue
+name = Nom
+security = Sécurité
+changeYourPassword = Changer votre mot de passe :
+currentPassword = Mot de passe actuel
+thePasswordMustBeBetween6And40Characters = Le mot de passe doit faire entre 6 et 40 caractères
+newPassword = Nouveau mot de passe
+newPasswordRepeatIt = Nouveau mot de passe (répéter)
+changeIt = Changer cela
+youCannotDisableThisToolBecauseItSWhereYourHomePageIsLocatedToDoThatYouHaveToSelectOtherContentAsThe = Vous ne pouvez pas désactiver cet outil parce que c'est là qu'est située votre page d'accueil. Pour faire cela, vous devez sélectionner un autre contenu comme contenu d'accueil par défaut, mais avec un autre outil.
+selectAnImageFromYourComputerAsYourAvatarForBestResultsUseANxnPixelImageBiggerImagesWillBeAutomatica = Choisissez une image de votre ordinateur pour votre avatar. Pour de meilleurs résultats, utilisez une image de [%d]x[%d] pixels. Les images plus grandes seront automatiquement retaillées
+passwordChangedSuccessfully = Mot de passe modifié avec succès
+newGadget = Nouveau Gadget
+voting = Vote
+media = Média
+calendar = Calendrier
+others = Autres
+thisDemoOfKune = cette démonstration de kune
+paramBio = [%s] Bio
+thisUserHasNotWrittenItsBiographyYet = Cet utilisateur n'a pas encore écrit sa biographie
+longTermTasks = Tâches à long terme
+midTermTasks = Tâches à moyen terme
+shortTermUrgentTasks = Tâches à court terme (urgentes)
+aLongTermTaskSample = Un exemple de tâche à long terme
+thisIsOnlyATaskSampleYouCanEditItRenameIt = Ceci n'est qu'un exemple de tâche. Vous pouvez la modifier, la renommer
+aMidTermTaskSample = Un exemple de tâche à moyen terme
+aShortTermTaskSample = Un exemple de tâche à court terme
+wikiPageSample = Exemple de page wiki
+thisIsOnlyAWikiPageSampleYouCanEditOrRenameItButAlsoAnyOtherUser = Ceci n'est qu'un exemple de page wiki. Vous pouvez la modifier ou la renommer, aussi bien que n'importe quel autre utilisateur.
+blogSample = Exemple de blog
+aPostSample = Un exemple de post
+thisIsOnlyAPostSampleYouCanEditItRenameThePostAndThisBlog = Ceci est seulement un exemple d'article. Vous pouvez le modifier, renommer l'article et ce blog
+welcome = Bienvenue
+thanksForJoiningParamNowYouCanActivelyParticipateInParamYouCanAlsoUseYourPersonalSpaceToPublishConte = Merci de rejoindre [%s]. Vous pouvez désormais participer activement à [%s]. Vous pouvez aussi utiliser votre espace personnel pour publier des contenus. Note :
+thisUserHasNoBuddiesYet = Cet utilisateur n'a pas encore de contact
+newTask = Nouvelle tâche
+createANewTask = Créer une nouvelle tâche
+doubleClickToOpen = Double-cliquez pour ouvrir
+createANewFolder = Créer un nouveau dossier
+newTaskFolder = Nouveau dossier de tâches
+open = Ouvrir
+delete = Effacer
+actions = Actions
+connecting = Connexion
+offline = Hors-ligne
+newList = Nouvelle liste
+reloadThis = Recharger ceci
+createANewList = Créer une nouvelle liste
+yes = Oui
+confirmPlease = Confirmez, s'il vous plaît :
+thisWillOpenASpecificChatroomToChatAboutThisPageOrDocumentItSUsefulToChatWithOthersAboutSomethingWhi = Ceci ouvrira une salle de discussion spécifique au sujet de cette page ou document (c'est utile de discuter avec les autres au sujet de ce qu'on est en train de lire ou d'écrire). Etes-vous sûr ?
+no = Non
+chatAboutParam = Discuter à propos de : [%s]
+barterSample = example de troc
+thisIsOnlyABarterSampleYouCanInviteOtherParticipantsToThisBarterButAlsoPublishToTheGeneralPublicAllo = Ceci n'est qu'un exemple de troc. Vous pouvez inviter d'autres participants à ce troc, mais aussi publier publiquement pour partager des services, des biens, etc.
+newBarter = Nouveau troc
+newFolder = Nouveau dossier
+createANewBarterHere = Créer un nouveau troc ici
+newWikipage = Nouvelle page wiki
+createANewFolderAFolderWillBeASectionInThePublicWeb = Créer un nouveau dossier. Un dossier sera une "section" sur le web public
+createANewWikipageHereIfYouChooseToPublishItThisDocumentWillAppearAsANewPageInThePublicWeb = Créer une nouvelle wikipage ici. Si vous choisissez de la publier, ce document apparaîtra comme une nouvelle "Page" publiquement sur le web
+selectAsTheHomepage = Choisir comme page d'accueil
+registerANewGroup = Inscrire un nouveau groupe
+register = S'inscrire
+cancel = Annuler
+publicDescription = Description publique
+groupTags = Tags du groupe
+typeSomeKeywordThatDefineYourGroup = tapez quelques mots-clefs qui définissent votre groupe
+groupType = Type du groupe
+project = Projet
+organization = Organisation
+aProjectIsAKindOfGroupInWhichTheJoiningOfNewMembersIsModeratedByTheProjectAdministrators = Un projet est un genre de groupe dans lequel l'inscription de nouveaux membres est modérée par les administrateurs du projet.
+anOrganizationWorksTheSameWayAsAProjectExceptThatItMustBeALegalEntity = Une organisation fonctionne de la même manière qu'un projet, mais doit être une entité légale.
+closed = Fermé
+aClosedGroupIsAPrivateProjectWhichContentsAreOnlyAccessibleToItsMembersByDefault = Un groupe fermé est un projet privé, dont les contenus ne sont accessibles qu'à ses membres (par défaut)
+community = Communauté
+aCommunityIsAGroupOfUsersWithSharedInterestsForInstanceTheEnvironmentalCommunityOrTheLgbtCommunityIt = Une communauté est un groupe d'utilisateurs partageant les mêmes intérêts (par exemple la communauté des écologistes ou la communauté LGBT). Elle est ouverte à tout nouveau membre qui peut la rejoindre librement sans que les administrateurs modèrent.
+paramCreatedNewContentCreatedForInstance = [%s] créé
+notPublishedYet = Pas encore publié
+thisIsOnlyAPreviewOfHowThisWebpageWouldLookLikeToTheGeneralPublicOnTheInternet = Ceci n'est qu'un aperçu de ce à quoi cette page web ressemblera pour le public sur internet.
+createANewDocumentHereIfYouChooseToPublishItThisDocumentWillAppearAsANewPageInThePublicWeb = Créer un Nouveau Document ici. Si vous choisissez de le publier, ce document apparaîtra comme une nouvelle "Page" sur le web public
+newPoll = Nouveau sondage
+newYesNoMaybeVoting = Nouveau vote Oui/Non/Peut-être/+
+newAdvancedPoll = Nouveau Sondage Avancé
+newMeeting = Nouvelle réunion
+newYesNoMiniVoting = Nouveau vote Oui/Non/Mini
+newMeetCoordination = Nouvelle coordination de réunion
+newMap = Nouvelle Carte
+newImageAndLetsAnnotate = Nouvelle image (et annotons)
+newYoutubeVideo = Nouvelle vidéo Youtube
+newAlbum = Nouvel Album
+newTwitterSearch = Nouvelle recherche twitter
+newMindmap = Nouvelle Carte Heuristique
+newBarter = Nouveau Troc
+newImagePainter = Dessiner une nouvelle image
+signIn = Se connecter
+password = Mot de passe
+donTHaveAnAccount = Vous n'avez pas de compte ?
+username = Nom d'utilisateur
+email = Email
+createOne = En créer un.
+thisIsNotAValidEmail = Ceci n'est pas une adresse email valide
+newBlog = Nouveau blog
+createANewBlog = Créer un nouveau blog
+newPost = Nouvel article
+createANewBlogPost = Créer un nouvel article de blog
+thisBlogHasnTAnyPostCreateOne = Ce blog ne contient aucun article, en créer un
+renaming = Renommer
+doYouWantToWriteUsWithSomePositiveOrNegativeFeedbackThisCanHelpUsToImproveTheseServices = Voulez-vous nous écrire pour des retours positifs ou négatifs ? Cela peut nous aider à améliorer ces services
+doYouWantToJoinThisGroup = Voulez-vous rejoindre ce groupe ?
+youAreNowMemberOfThisGroup = Vous êtes désormais un membre de ce groupe
+newRoom = Nouvelle salle
+createANewChatRoom = Créer une nouvelle salle de discussion
+enterToThisRoom = Entrez dans cette salle
+openTheConversationsArchiveOfThisRoom = Ouvrir les archives des conversations pour cette salle
+openArchive = Ouvrir archive
+aboutKuneTitleOfDialog = À propos de Kune
+ok = OK
+processing = Traitement
+aboutParam = À propos de [%s]
+meetingSample = Exemple de réunion
+thisIsOnlyAMeetSampleYouCanInviteOtherParticipantsToThisMeetingButAlsoPublishToTheGeneralPublicAllow = Ceci n'est qu'un exemple de réunion. Vous pouvez inviter d'autres participants à cette réunion, mais aussi publier publiquement pour aider dans l'organisation, l'appel ou l'accélération d'événements.
+markAsDone = Marqué comme "fait"
+createANewPost = Créer un nouvel article
+makeThisListNotPublic = Rendre cette liste non-publique
+subscribeToThisList = S'inscrire à cette liste
+subscribe = S'inscrire
+nSubscribedNPosts = [%d] inscrit(s), [%d] article(s)
+confirmNewBuddy = Confirmer le nouveau camarade
+paramHadAddedYouAsABuddyDoYouWantToAddHimHerAlso = [%s] vous a ajouté comme contact. Voulez-vous aussi l'ajouter ?
+paramCreatedSuccesfully = [%s] créé avec succès
+nRecentConversationsUnread = [%d] conversations récentes non lues
+writeUsWithSomeFeedbackForHelpUsToImproveTheServicesOnParam = Envoyez-nous des retours pour nous aider à améliorer les services de [%s]
+oneRecentConversationUnread = Une conversation récente non lue
+pleaseConfirm = Merci de confirmer
+startACollaborativeDocumentForTheMeetingMinutes = Démarrer un document collaboratif pour les minutes de la réunion ?
+meetingMinutesOfParamOnParam = Minutes de la réunion de [%s] sur [%s]
+youCanCollaborativelyEditThisDocumentWithTheMeetingMinutes = Vous pouvez modifier collaborativement ce document contenant les minutes de la réunion
+createANewMeetingHere = Créer une nouvelle réunion ici
+thereIsnTAnyListCreateOne = Il n'y a aucune liste, en créer une
+create = Créer
+areYouSure = Êtes-vous certain ?
+welcomeToTheParamPublicChatRoom = Bienvenue dans la salle de discussion publique de [%s]
+doYouWantToWriteUsWithSomePositiveOrNegativeFeedbackAboutParamThisCanHelpUsToImproveTheseServices = Voulez-vous nous écrire pour des retours positifs ou négatifs au sujet de '[%s]' ? Cela peut nous aider à améliorer ces services
+feedbackOfParam = Retours de [%s]
+editAndWriteHereYourFeedback = Modifiez et écrivez ici vos retours
+copyTheTextToTranslate = Copiez le texte à traduire
+translateThis = traduire ceci :
+notes = Notes :
+tip = Astuces :
+clickAltpageupOrAltpagedownToMoveUpDownInTheListWhileTranslatingAndAltVToCopyTheOriginalTextTheTrans = Cliquez sur Alt + PageUp ou Alt+PageDown pour vous déplacer vers le haut/bas dans la liste pendant que vous traduisez, et Alt-V pour copier le texte original. Les traductions sont sauvegardées automatiquement.
+notTranslated = Pas traduit
+recommendations = Recommandations
+translated = Traduit
+helpToTranslateKune = Aidez-nous à traduire Kune
+to = à
+toParamForExampleToSpanish = pour [%s] :
+saving = Sauvegarde
+successUploading = Téléversement effectué avec succès
+thereIsnTAnyTaskCreateOne = Il n'y a aucune tâche, en créer une
+searchTheUserYouWantToAddAndInHisHerHomepageClickAddAsABuddy = Recherchez l'utilisateur que vous voulez ajouter et dans sa page d'accueil cliquez sur "Ajouter comme contact"
+doYouWantToWriteAMessageToTheMembersOfThisGroup = Voulez-vous écrire un message aux membres de ce groupe ?
+post = Article
+thisIsEmpty = Ceci est vide.
+documents = documents
+thisFolderIsEmpty = Ce dossier est vide
+barters = trocs
+blogs = blogs
+thereIsnTAnyBarter = Il n'y a aucun troc
+thereIsnTAnyBlogCreateOne = Il n'y a aucun blog, en créer un
+infoAboutErrors = Informations sur les erreurs
+chatrooms = salles de discussions
+events = événements
+pleaseCopyPasteThisInfoToReportProblems = Merci de copier-coller cette information pour rendre compte de problèmes
+seeTheArchiveOfOldConversationsInDevelopment = Voir les archives d'anciennes conversations (en développement)
+thereIsNothingPostedYetPostSomething = Il n'y rien de posté pour l'instant. Postez quelque chose
+lists = listes
+thisWikiIsEmpty = Ce wiki est vide
+thereIsnTAnyMeeting = Il n'y a aucune réunion
+wiki = wiki
+tasks = tâches
+rightNowThePublicWebSpaceOfThisGroupItSUnderConstruction = L'espace public de ce groupe est actuellement en construction
+paramTheDevelopment = [%s] le développement
+pleaseSupport = Merci de nous soutenir
+inDevelopment = (en développement)
+chats = discussions
+theNameMustContainOnlyCharactersNumbersAndDashes = Le nom ne doit contenir que des caractères, des chiffres et des tirets
+chatroomCreated = Salle de discussion créée
+doYouWantToWriteAMessageToYourBuddy = Voulez-vous écrire un message à votre copain ?
+error = Erreur
+toJoinAChatroomYouNeedToBeOnline = Pour rejoindre une salle de discussion, vous devez d'abord être "en ligne"
+licenseWizard = Assistant Licence
+backUsedInButton = « Retour
+nextUsedInButton = Suivant »
+select = Choisir
+finishUsedInButton = Finir
+selectTheLicenseYouPreferUsingForSharingYourGroupContentsWithOtherPeople = Choisissez la licence que vous préférez utiliser pour partager les contenus de votre groupe avec les autres personnes :
+useACopyleftLicenseRecommended = Utiliser une licence copyleft (recommandé)
+useAnotherKindOfLicenseAdvanced = Utiliser un autre type de licence (avancé)
+copyleft = copyleft
+weRecommendParamLicensesSpeciallyForPracticalWorks = Nous recommandons les licences [%s], en particulier pour les oeuvres pratiques
+whyDoWeNeedALicense = Pourquoi avons-nous besoin d'une licence ?
+youCanChangeThisLicenseLater = Vous pouvez changer cette licence plus tard
+selectTheLicenseType = Choisir le type de licence :
+commonLicensesForCulturalWorks = Licences courantes pour les oeuvres culturelles
+otherKindOfLicenses = Autre genre de licence
+selectACreativeCommonsLicenseRecommendedForCulturalWorks = Choisir une licence Creative Commons (recommandé pour les oeuvres culturelles)
+useTheGnuLicensesRecommendedForFreeSoftwareWorksAndOtherKindOfLicenses = Utiliser les licences GNU (recommandé pour les logiciels libres) et d'autres types de licences
+withACreativeCommonsLicenseYouKeepYourCopyrightButAllowPeopleToCopyAndDistributeYourWorkProvidedThey = Avec une licence Creative Commons, vous gardez vos droits d'auteur mais vous autorisez en plus à d'autres de copier et de distribuer votre travail à condition qu'ils vous créditent
+allowAnyUsesOfYourWorkIncludingCommercial = Autoriser toute usage de votre travail, y compris commercial ?
+allowModificationsOfYourWork = Autoriser les modifications de votre travail ?
+theLicensorPermitsOthersToCopyDistributeDisplayAndPerformTheWorkIncludingForCommercialPurposes = La détenteur des droits permet aux autres de copiers, de distribuer, d'afficher et d'utiliser l'oeuvre, y compris à des fins commerciales
+theLicensorPermitsOthersToCopyDistributeDisplayAndPerformTheWorkForNonCommercialPurposesOnly = La détenteur des droits permet aux autres de copiers, de distribuer, d'afficher et d'utiliser l'oeuvre seulement à des fins non commerciales
+theLicensorPermitsOthersToCopyDistributeDisplayAndPerformTheWorkAsWellAsToMakeDerivativeWorksBasedOn = La détenteur des droits permet aux autres de copiers, de distribuer, d'afficher et d'utiliser l'oeuvre, ainsi que de s'en servir pour faire des oeuvres dérivées
+yesAsLongAsOtherShareAlike = Oui, à condition que les autres partagent de la même manière
+theLicensorPermitsOthersToDistributeDerivativeWorksOnlyUnderTheSameLicenseOrOneCompatibleWithTheOneT = Le détenteur des droits permet aux autres de distribuer des oeuvres dérivées seulement sous la même licence ou une licence compatible avec celle qui vaut pour le travail de l'ayant droits
+theLicensorPermitsOthersToCopyDistributeDisplayAndPerformOnlyUnalteredCopiesOfTheWork8212NotDerivati = La détenteur des droits permet aux autres de copiers, de distribuer, d'afficher et d'utiliser seulement des copies verbatim de l'oeuvre &#8212; pas d'oeuvres dérivées à partir d'elle
+thisIsACopyleftLicense = C'est une licence copyleft
+thisIsNotACopyleftLicense = Ceci n'est pas une licence copyleft.
+thisIsAppropriateForFreeCulturalWorks = Ceci est approprié pour des oeuvres culturelles libres
+thisIsNotAppropriateForFreeCulturalWorks = Ceci n'est pas approprié pour des oeuvres culturelles libres.
+reasonsNotToUseANonCommercialLicense = Raisons de ne pas utiliser une licence non-commerciale
+selectOtherKindOfLicenses = Choisir un autre genre de licence :
+selectLicense = Choisir une licence
+membershipRequestedWaitingForAdminsDecision = Demande d'inscription faite. En attente de la décision des admins
+memberTypeChanged = Type du membre modifié
+memberRemoved = Membre retiré
+contentNotFound = Contenu non trouvé
+onlyToAuthorizedTranslators = Seulement les traducteurs autorisés
+toHelpWithTheTranslationOfThisSoftwarePleaseContactBeforeWithThisSiteAdministrators = Pour aider à la traduction de ce logiciel, merci de contacter d'abord les administrateurs de ce site
+visibilityOfYourNetworkChanged = La visibilité de votre réseau a été modifiée
+areYouSureYouWantThisItWillBeDeletedWithAllItsContents = Êtes-vous sûr de vouloir faire ça ? Ce sera effacé avec tout son contenu.
+thisNameIsAlreadyInUsePleaseTryWithADifferentName = Ce nom est déjà utilisé. Merci d'essayer avec un nom différent
+doYouWantToWriteAMessageToTheAdministratorsOfThisGroup = Voulez-vous écrire un message aux administrateurs de ce groupe ?
+listCreated = Liste créée
+thisListIsNowRestrictedToThePublic = Cette liste est désormais restreinte au public
+makeThisListPublic = Rendre cette liste publique
+membersVisibilityChanged = Visibilité des membres changée
+membersJoiningPolicyChanged = Les conditions d'inscription des membres ont été modifiées
+moving = Déplacer
+aContentWithTheSameNameAlreadyExistPleaseRenameIt = A contenu portant le même nom existe déjà. Merci de renommer celui-ci
+removedAsMember = Retiré comme membre
+addGadget = Ajouter un gadget
+theSocialNetworkOfThisUserIsNotPublic = The réseau social de cet utilisateur n'est pas public
+newDoc = Nouveau doc
+clickToGoHereOrDropContentsHereToMoveThem = Cliquez pour aller ici ou déposez des contenus ici pour les déplacer
+thisUserIsAlreadyAGroupMember = Cet utilisateur est déjà membre du groupe
+markAsNotDone = Marquer comme "non fait"
+more = Plus
+youDidNotSignInSoYouCanJustSeeSomePublicContentsInParamButNotEditOrCollaborateWithOthersPleaseParamO = Vous ne vous êtes pas inscrit, donc vous ne pouvez voir que quelques contenus publics de [%s], mais pas modifier ou collaborer avec d'autres. Merci de [%s] ou de [%s] pour avoir un accès complet aux outils et aux contenus de [%s]
+onlyForAuthorizedTranslators = Seulement pour les traducteurs autorisés
+hereYouCanCreateOrUploadYourPersonalGroupOrPublicDocumentsTheseDocumentsCanBeEditedAndCommentedColla = Ici vous pouvez créer ou mettre en ligne vos documents personnels, de groupe ou publics. Ces documents peuvent être édités et commentés de manière collaborative et simultanément. Ces docs peuvent être des pages statiques
+blogsAreAChronologicalListOfPostsOrderedByDateAboutASpecificTopicEachPostCanBeCommentedByTheVisitors = Les blogs sont des listes chronologiques d'articles (rangé par date) sur un thème spécifique. Chaque article peut être commenté par les visiteurs
+aDecentralizedWayToOfferOrAskForServicesAndGoodsToYourGroupsOrToAnyoneBarteringMeansTheExchangeOfGoo = Une manière décentralisée d'offrir (ou de demander) des biens et des services à vos groupes ou à n'importe qui. "Troc" signifie l'échange de biens ou de services par l'accord de deux personnes.
+listsBehaveLikeAMailingListOrAForumYouCanSubscribeAndDiscussAboutSpecificTopics = Les listes fonctionnent comme une liste de discussion ou un forum. Vous pouvez vous inscrire et discuter à propos de sujets particuliers
+aCollaborativeToDoListForTheGroupAnyGroupMemberCanParticipateInAnyProposedTaskAddOthersToATaskCommen = Une liste de TODOs collaborative pour le groupe. Tout membre du groupe peut participer à toute tâche proposée, ajouter d'autres membres pour une tâche, les commenter, ajouter des infos, etc.
+aCalendarToScheduleActivitiesAndEvents = Un calendrier pour planifier les activités et les événements
+aRoomWhereYouCanHaveAGroupChatWithManyUsersAtOnceRoomsCanBePublicOrPrivateUsersCanBeFromParamOrOther = Une 'salle' où vous pouvez tenir une discussion collective avec plusieurs utilisateurs à la fois. Les salles peuvent être publiques ou privées. Les utilisateurs peuvent être de [%s] ou d'autres sites (compatible avec le chat gmail)
+wikiPagesAreDocumentsThatCanBeEditedByAnyVisitorInParamInsteadOfOnlyByTheGroupThisAcceleratesUpdatin = Les pages wiki sont des Documents qui peuvent être édité par tout visiteur (de [%s]), au lieu seulement du groupe. Cela accélère la mise à jour et la construction
+errorSettingTheLogo = Erreur lors de la définition du logo
+signInOrCreateAnAccountToAccessToYourInbox = Connectez-vous ou créez un compte pour accéder à votre messagerie
+sorryThisGadgetHasProblemsWithItsnHeightWeHopeThisWillBeFixedSoonn = Désolé, ce gadget a des problèmes avec sa hauteur. Nous espérons que ce sera réparé bientôt
+addNewMember = Ajouter un nouveau membre
+typeTheNameOfTheUserAndSelectHimHer = Tapez le nom de l'utilisateur et choisissez le :
+typeSomethingToSearchForUsersInParam = Tapez quelque chose pour chercher des utilisateurs dans [%s]
+doubleClickToOpenDragAndDropToMoveThisToAnotherPlace = Double-cliquez pour ouvrir. Glissez-déposez pour déplacer ceci à une autre place
+theUsernamePasswordIsIncorrect = Le nom d'utilisateur/mot de passe est incorrect
+subscribed = Inscrit
+unsubscribe = Se désinscrire
+unsubscribeToThisList = Se désinscrire de cette liste
+unsubscribed = Désinscrit
+doYouWantToAddParamToYourContacts = Voulez-vous ajouter '[%s]' à vos contacts ?
+youAreTryingToMoveThisToTheSameLocation = Vous essayez de déplacer ceci au même endroit
+postCreatedEditIt = Article créé. Modifiez-le
+pleaseSignInOrRegisterToCreateAGroup = S'il vous plaît, connectez-vous ou enregistrez-vous pour créer un groupe
+signInOrCreateAnAccountToParticipateInThisGroup = Connectez-vous ou créez un compte pour participer à ce groupe
+thisNameInAlreadyInUsePleaseTryWithADifferentName = Ce nom est déjà utilisé. Merci d'essayer avec un nom différent
+nowadaysTheGadgetsMapsPollsEtcAreExperimentalInSomeBrowsersYouMightExperienceProblemsWithCertainGadg = Les gadgets (cartes, sondages, etc) sont encore expérimentaux. Dans certains navigateurs, vous pourrez avoir des problèmes avec certains gadgets
+errorConfiguringTheTool = Erreur lors de la configuration de l'outil
+youDoNotHaveRightsToPerformThatAction = Vous n'avez pas les permissions suffisantes pour accomplir cette action
+0 = 0
+signInOrRegisterToHelpWithTheTranslation = Connectez-vous ou créez un compte pour aider à la traduction
+thisNameAlreadyExistsItIsUsedWhenAFileOrAFolderWithTheSameNameAlreadyExists = Ce nom existe déjà
+doYouWantToAddParamAsAMemberOfParam = Voulez-vous ajouter '[%s]' comme membre de '[%s]' ?
+memberAddedAsCollaborator = Membre ajouté comme collaborateur
+thisEmailAddressIsBeingUsedByAnotherUserPleaseTryWithAnotherOne = Cette adresse email est utilisée par un autre utilisateur. Merci d'essayer avec une autre
+youCannotWriteToNonBuddies = Vous ne pouvez pas écrire à des utilisateurs qui ne sont pas dans vos contacts
+nameOfTheNewChatroom = Nom de la nouvelle salle de discussion ?
+nameOfTheNewList = Nom de cette nouvelle liste ?
+titleOfTheNewPost = Titre du nouvel article ?
+serverErrorSavingTheTranslation = Erreur du serveur lors de la sauvegarde de la traduction
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/main/java/cc/kune/gspace/client/i18n/I18nTranslatorPanel.java 2011-11-24 00:49:46 UTC (rev 1625)
@@ -47,7 +47,7 @@
final LanguageSelectorWithoutEnglishPanel lanSelectorPanel,
final I18nToTranslateGridPanel toTranslateGrid, final I18nTranslatedGridPanel translatedGrid,
final I18nTranslateRecomendPanel transRecommend, final CoreResources res) {
- super(TRANSLATOR_PANEL_ID, "", false, false, images, TRANSLATOR_ERROR_ID, i18n.t("Close"), null,
+ super(TRANSLATOR_PANEL_ID, "", true, false, images, TRANSLATOR_ERROR_ID, i18n.t("Close"), null,
null, null, transGroup, i18n.getDirection());
setIcon(res.language());
this.lanSelectorPanel = lanSelectorPanel;
Modified: trunk/src/main/resources/TestConstants_en.properties
===================================================================
--- trunk/src/main/resources/TestConstants_en.properties 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/main/resources/TestConstants_en.properties 2011-11-24 00:49:46 UTC (rev 1625)
@@ -38,4 +38,5 @@
thankYou = Thank you
andYesFeedbackWelcome = and yes, feedback welcome
yourPersonalPublicSpace = Your personal public space
-hereYouCanHaveYourBlogEtc = here you can have your blog, etc
\ No newline at end of file
+hereYouCanHaveYourBlogEtc = here you can have your blog, etc
+letSStartAddingSomeBuddieToOurSocialNetwork = Let's start adding some buddie to our social network
\ No newline at end of file
Modified: trunk/src/main/resources/TestConstants_es.properties
===================================================================
--- trunk/src/main/resources/TestConstants_es.properties 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/main/resources/TestConstants_es.properties 2011-11-24 00:49:46 UTC (rev 1625)
@@ -32,4 +32,5 @@
thankYou = Gracias
andYesFeedbackWelcome = y s�, tu feedback es muy bienvenido
yourPersonalPublicSpace = Tu espacio p�blico personal
-hereYouCanHaveYourBlogEtc = aqu� puedes tener tu blog, etc
\ No newline at end of file
+hereYouCanHaveYourBlogEtc = aqu� puedes tener tu blog, etc
+letSStartAddingSomeBuddieToOurSocialNetwork = Empecemos a�adiendo alg�n/a colega (un contacto) a nuestra red social
\ No newline at end of file
Modified: trunk/src/test/java/cc/kune/selenium/CustomWebDriverEventListener.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/CustomWebDriverEventListener.java 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/test/java/cc/kune/selenium/CustomWebDriverEventListener.java 2011-11-24 00:49:46 UTC (rev 1625)
@@ -30,7 +30,7 @@
@Override
public void afterChangeValueOf(final WebElement element, final WebDriver driver) {
// SeleniumUtils.showCursor(driver);
- sleep(600);
+ sleep(400);
}
@Override
@@ -65,7 +65,7 @@
@Override
public void beforeChangeValueOf(final WebElement element, final WebDriver driver) {
SeleniumUtils.hightlight(element, driver);
- sleep(300);
+ sleep(150);
// SeleniumUtils.hideCursor(driver);
}
@@ -108,6 +108,6 @@
}
private void slow() {
- sleep(1000);
+ sleep(700);
}
}
\ No newline at end of file
Modified: trunk/src/test/java/cc/kune/selenium/KuneSeleniumDefaults.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/KuneSeleniumDefaults.java 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/test/java/cc/kune/selenium/KuneSeleniumDefaults.java 2011-11-24 00:49:46 UTC (rev 1625)
@@ -60,7 +60,7 @@
private static final Log LOG = LogFactory.getLog(KuneSeleniumDefaults.class);
public static boolean mustCloseFinally = false;
- private String baseUrl;
+ private final String baseUrl;
protected final ChatPageObject chat;
protected final EntityHeaderPageObject entityHeader;
protected final GroupSpacePageObject groupSpace;
@@ -74,23 +74,7 @@
private final WebDriver webdriver;
public KuneSeleniumDefaults() {
- final String localeParam = "?locale=" + SeleniumConf.LANG;
- switch (SeleniumConf.SITE) {
- case demo:
- baseUrl = "http://kune.beta.iepala.es/" + localeParam + "#";
- break;
- case localhost:
- baseUrl = "http://127.0.0.1:8888/" + localeParam + "&log_level=INFO&gwt.codesvr=127.0.0.1:9997#";
- break;
- case eurosur:
- baseUrl = "http://beta.eurosur.org/" + localeParam + "#";
- break;
- case kunecc:
- baseUrl = "http://kune.cc/" + localeParam + "#";
- break;
- default:
- break;
- }
+ baseUrl = "http://" + SeleniumConf.SITE.getDomain() + "/" + SeleniumConf.SITE.getParams() + "#";
injector = INJECTOR;
webdriver = injector.getInstance(WebDriver.class);
login = injector.getInstance(LoginPageObject.class);
@@ -173,6 +157,10 @@
{ "test1@localhost", "test" }, { "", "" } };
}
+ public void doScreenshot(final String filename) {
+ SeleniumUtils.doScreenshot(webdriver, filename);
+ }
+
public void get(final String url) {
webdriver.get(url);
}
Modified: trunk/src/test/java/cc/kune/selenium/SeleniumConf.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/SeleniumConf.java 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/test/java/cc/kune/selenium/SeleniumConf.java 2011-11-24 00:49:46 UTC (rev 1625)
@@ -30,13 +30,34 @@
}
public enum Site {
- demo, eurosur, kunecc, localhost
+ demo("kune.beta.iepala.es"), eurosur("beta.eurosur.org"), kunecc("kune.cc"), localhost("localhost",
+ "&log_level=INFO&gwt.codesvr=127.0.0.1:9997");
+
+ private String domain;
+ private String params;
+
+ Site(final String domain) {
+ this(domain, "");
+ }
+
+ Site(final String domain, final String params) {
+ this.domain = domain;
+ this.params = "?locale=" + SeleniumConf.LANG + params;
+ }
+
+ public String getDomain() {
+ return domain;
+ }
+
+ public String getParams() {
+ return params;
+ }
}
public static final Driver DRIVER = Driver.firefox;
/* Configure this for use other lang, site, or driver */
- public static final Lang LANG = Lang.en;
- public static final Site SITE = Site.localhost;
+ public static final Lang LANG = Lang.es;
+ public static final Site SITE = Site.eurosur;
public static final int TIMEOUT = 25;
SeleniumConf() {
Modified: trunk/src/test/java/cc/kune/selenium/SeleniumConstants.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/SeleniumConstants.java 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/test/java/cc/kune/selenium/SeleniumConstants.java 2011-11-24 00:49:46 UTC (rev 1625)
@@ -19,12 +19,15 @@
*/
package cc.kune.selenium;
+import java.io.File;
+
public final class SeleniumConstants {
public static final String FIREFOX_PROFILE_NAME = "selenium";
public static final String GWTDEV = "gwt-debug-";
public static final String INPUT = "-input";
+ public static final String SCREENSHOTS_DIR = "img" + File.separator + "screenshots" + File.separator;
/* Configure this for use other lang, site, or driver */
public static final String USER_EMAIL = "admin(a)example.org";
public static final String USER_LONGNAME = "Administrator";
Modified: trunk/src/test/java/cc/kune/selenium/SeleniumUtils.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/SeleniumUtils.java 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/test/java/cc/kune/selenium/SeleniumUtils.java 2011-11-24 00:49:46 UTC (rev 1625)
@@ -19,10 +19,16 @@
*/
package cc.kune.selenium;
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.OutputType;
import org.openqa.selenium.Point;
+import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
@@ -35,6 +41,16 @@
private static boolean fastSpeed = true;
private static final Log LOG = LogFactory.getLog(SeleniumUtils.class);
+ public static void doScreenshot(final WebDriver webdriver, final String filename) {
+ final File scrFile = ((TakesScreenshot) webdriver).getScreenshotAs(OutputType.FILE);
+ try {
+ FileUtils.copyFile(scrFile, new File(SeleniumConstants.SCREENSHOTS_DIR + "kune-" + filename
+ + ".png"));
+ } catch (final IOException e) {
+ LOG.info("Cannot take the screen shot", e);
+ }
+ }
+
public static void fastSpeed(final boolean fastSpeed) {
SeleniumUtils.fastSpeed = fastSpeed;
}
@@ -99,7 +115,7 @@
public static void sleep(final int milliseconds) {
try {
- Thread.sleep(fastSpeed ? milliseconds / 10 : milliseconds);
+ Thread.sleep(fastSpeed ? milliseconds / 2 : milliseconds);
} catch (final InterruptedException e) {
Assert.fail("Exception in sleep method", e);
}
Modified: trunk/src/test/java/cc/kune/selenium/chat/ChatPageObject.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/chat/ChatPageObject.java 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/test/java/cc/kune/selenium/chat/ChatPageObject.java 2011-11-24 00:49:46 UTC (rev 1625)
@@ -39,6 +39,8 @@
private WebElement chatIcon;
@FindBy(xpath = "//div[14]/div/div/div/div/div/table/tbody/tr/td[2]/div")
private WebElement closeChat;
+ @FindBy(id = "//div[3]/div/div[3]/div/div/div/div[2]/div/div/div/div/div/div")
+ public WebElement firstContact;
@FindBy(id = SeleniumConstants.GWTDEV + "OpenChatWidget-jabberId")
private WebElement jid;
@FindBy(id = SeleniumConstants.GWTDEV + "HablarOpenChat-openAction")
@@ -57,6 +59,11 @@
return findElement(new ByIdOrName(headerId));
}
+ public WebElement getItemMenu(final String groupId, final String jid) {
+ final String id = Idify.id("RosterItemWidget", groupId, Idify.uriId(jid), "roster-menu");
+ return findElement(new ByIdOrName("gwt-debug-" + id));
+ }
+
public WebElement getList(final String uri) {
final String pageId = Idify.uriId(uri);
final String id = "gwt-debug-ChatWidget-list-Chat-" + pageId;
@@ -69,6 +76,11 @@
return findElement(new ByIdOrName(headerId));
}
+ public WebElement getRosterItem(final String groupId, final String jid) {
+ final String id = Idify.id("RosterItemWidget", groupId, Idify.uriId(jid));
+ return findElement(new ByIdOrName("gwt-debug-" + id));
+ }
+
public WebElement getSend(final String uri) {
final String pageId = Idify.uriId(uri);
final String id = "gwt-debug-ChatWidget-send-Chat-" + pageId;
Modified: trunk/src/test/java/cc/kune/selenium/login/RegisterPageObject.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/login/RegisterPageObject.java 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/test/java/cc/kune/selenium/login/RegisterPageObject.java 2011-11-24 00:49:46 UTC (rev 1625)
@@ -27,6 +27,7 @@
import cc.kune.core.client.auth.RegisterForm;
import cc.kune.core.client.auth.RegisterPanel;
import cc.kune.selenium.SeleniumConstants;
+import cc.kune.selenium.SeleniumUtils;
public class RegisterPageObject extends AbstractLoginObject {
@@ -48,7 +49,7 @@
}
public void fillRegisterForm(final String nick, final String name, final String pass, final String em,
- final boolean withReturn) {
+ final boolean withReturn, final boolean doScreenshot) {
clearField(shortName);
hightlight(shortName);
shortName.sendKeys(nick);
@@ -62,6 +63,10 @@
hightlight(email);
email.sendKeys(em);
hightlight(registerButton);
+ if (doScreenshot) {
+ SeleniumUtils.doScreenshot(getWebDriver(), "register");
+ sleep(4000);
+ }
if (withReturn) {
email.sendKeys(Keys.RETURN);
} else {
Modified: trunk/src/test/java/cc/kune/selenium/login/RegisterSeleniumTests.java
===================================================================
--- trunk/src/test/java/cc/kune/selenium/login/RegisterSeleniumTests.java 2011-11-23 21:49:19 UTC (rev 1624)
+++ trunk/src/test/java/cc/kune/selenium/login/RegisterSeleniumTests.java 2011-11-24 00:49:46 UTC (rev 1625)
@@ -24,6 +24,7 @@
import cc.kune.core.client.state.SiteTokens;
import cc.kune.selenium.KuneSeleniumTest;
+import cc.kune.selenium.SeleniumConf;
import cc.kune.selenium.SeleniumConstants;
import cc.kune.selenium.SeleniumUtils;
@@ -42,51 +43,55 @@
final String prefix = getTempString();
showTitleSlide(t("User registration"), t("to get full access to this site tools/contents"));
login.createOne();
- register.fillRegisterForm(shortName + prefix, longName + prefix, passwd, prefix + email, false);
+ register.fillRegisterForm(shortName + prefix, longName + prefix, passwd, prefix + email, false, true);
+ doScreenshot("register");
sleep(1000);
login.assertIsConnectedAs(prefix);
entityHeader.waitForEntityTitle(longName + prefix);
register.getWelcomeMsg().click();
- // // home space
- // showTitleSlide(t("Home space (your welcome page)"),
- // t("Here you can see a summary of your activity in this site"));
- // spaces.homeBtn().click();
- // sleep(2000);
- // homeSpace.getSndStats().click();
- // sleep(2000);
- // homeSpace.getTrdStats().click();
- // sleep(2000);
- //
- // // user space
- // showTitleSlide(t("User space (your Inbox)"),
- // t("contents in which you participate"));
- // showTooltip(spaces.userBtn());
- // spaces.userBtn().click();
- // showMsg(t("You can see this like an advanced email system..."));
- // userSpace.getFirstWave().click();
- // sleep(2000);
- // userSpace.getNewWave().click();
- // showMsg(t("where you can compose personal messages..."));
- // showMsg(t("but also create contents to publish later"));
- // userSpace.rootBlipText().sendKeys(t("Congratulations for your report\n\n"));
- // sleep(1000);
- // userSpace.getCursive().click();
- // userSpace.rootBlipText().sendKeys(
- // t("Hi there, Just to say that I like") +
- // t("a lot your last report\n\n"));
- // sleep(1000);
- // userSpace.getCursive().click();
- // userSpace.rootBlipText().sendKeys(t("Best\n\nJane"));
- // sleep(3000);
- // userSpace.getRootEdit().click();
- // userSpace.getAddParcipant().click();
- // answerOnNextPrompt("admin");
- // sleep(5000);
+ // home space
+ showTitleSlide(t("Home space (your welcome page)"),
+ t("Here you can see a summary of your activity in this site"));
+ site.homeBtn().click();
+ sleep(2000);
+ homeSpace.getSndStats().click();
+ sleep(2000);
+ homeSpace.getTrdStats().click();
+ sleep(2000);
+ // user space
+ showTitleSlide(t("User space (your Inbox)"), t("contents in which you participate"));
+ showTooltip(site.userBtn());
+ site.userBtn().click();
+ showMsg(t("You can see this like an advanced email system..."));
+ userSpace.getFirstWave().click();
+ sleep(2000);
+ userSpace.getNewWave().click();
+ showMsg(t("where you can compose personal messages..."));
+ showMsg(t("but also create contents to publish later"));
+ userSpace.rootBlipText().sendKeys(t("Congratulations for your report\n\n"));
+ sleep(1000);
+ userSpace.getCursive().click();
+ userSpace.rootBlipText().sendKeys(
+ t("Hi there, Just to say that I like") + t("a lot your last report\n\n"));
+ sleep(1000);
+ userSpace.getCursive().click();
+ userSpace.rootBlipText().sendKeys(t("Best\n\nJane"));
+ sleep(3000);
+ userSpace.getRootEdit().click();
+ userSpace.getAddParcipant().click();
+ sleep(1000);
+ answerOnNextPrompt("admin");
+ sleep(5000);
+
// group space
showTitleSlide(t("Your personal public space"), t("here you can have your blog, etc"));
+ sleep(500);
site.groupBtn().click();
+ site.groupBtn().click();
+ showMsg(t("Let's start adding some buddie to our social network"));
+ sleep(1000);
groupSpace.addBuddieBtn().click();
groupSpace.addNewBuddieTextBox.click();
groupSpace.addNewBuddieTextBox.sendKeys("admin");
@@ -94,22 +99,24 @@
sleep(500);
groupSpace.firstFromSuggestionBox.click();
site.confirmationOk.click();
+ sleep(500);
groupSpace.searchEntitiesOk().click();
- groupSpace.firstAvatarOfGroup().click();
+ // groupSpace.firstAvatarOfGroup().click();
sleep(2000);
- // chat
showTitleSlide(t("Chat with your buddies"), t("compatible with gmail and similars"),
SiteTokens.WAVEINBOX);
// showTooltip(chat.icon());
chat.show();
- sleep(3000);
+ sleep(2000);
- final XmppURI jid = XmppURI.jid(SeleniumConstants.USER_EMAIL);
+ final XmppURI jid = XmppURI.jid(SeleniumConstants.USER_SHORNAME + "@"
+ + SeleniumConf.SITE.getDomain());
final String jids = jid.toString();
- showMsg(t("We need to add buddies (contacts) before chat with them"));
- chat.openChat(jid);
+ chat.getRosterItem("", jids).click();
+ // chat.openChat(jid);
+
// chat.getPage(jids).click();
chat.getTalkBox(jids).sendKeys(t("Helloo... ;)"));
chat.getSend(jids).click();
@@ -129,6 +136,9 @@
sleep(2000);
showMsg(t("Browser history forward"));
browserForward();
+ sleep(1000);
+ showMsg(t("And more options for your contacts"));
+ chat.getItemMenu("", jids).click();
chat.getTalkBox(jids).sendKeys(t("goodbye!"));
chat.getSend(jids).click();
sleep(1000);
1
0
Author: vjrj_
Date: 2011-11-23 22:49:19 +0100 (Wed, 23 Nov 2011)
New Revision: 1624
Modified:
wp-theme/kothers/donate-es.php
wp-theme/kothers/donate-fr.php
wp-theme/kothers/donate.php
Log:
Modified: wp-theme/kothers/donate-es.php
===================================================================
--- wp-theme/kothers/donate-es.php 2011-11-23 21:43:57 UTC (rev 1623)
+++ wp-theme/kothers/donate-es.php 2011-11-23 21:49:19 UTC (rev 1624)
@@ -23,6 +23,7 @@
text-decoration: none;
}
.cm-btn ul li a span {
+ font-size: 95%;
float: left;
margin: 0 10px 0 -10px;
padding: 1px 8px 5px 18px;
Modified: wp-theme/kothers/donate-fr.php
===================================================================
--- wp-theme/kothers/donate-fr.php 2011-11-23 21:43:57 UTC (rev 1623)
+++ wp-theme/kothers/donate-fr.php 2011-11-23 21:49:19 UTC (rev 1624)
@@ -23,6 +23,7 @@
text-decoration: none;
}
.cm-btn ul li a span {
+ font-size: 95%;
float: left;
margin: 0 10px 0 -10px;
padding: 1px 8px 5px 18px;
Modified: wp-theme/kothers/donate.php
===================================================================
--- wp-theme/kothers/donate.php 2011-11-23 21:43:57 UTC (rev 1623)
+++ wp-theme/kothers/donate.php 2011-11-23 21:49:19 UTC (rev 1624)
@@ -23,6 +23,7 @@
text-decoration: none;
}
.cm-btn ul li a span {
+ font-size: 95%;
float: left;
margin: 0 10px 0 -10px;
padding: 1px 8px 5px 18px;
1
0