[kune-commits] r1228 - in trunk: . img script src/main/java/cc/kune src/main/java/cc/kune/chat src/main/java/cc/kune/chat/client src/main/java/cc/kune/client src/main/java/cc/kune/common/client/actions/gwtui src/main/java/cc/kune/common/client/actions/gxtui src/main/java/cc/kune/common/client/actions/ui src/main/java/cc/kune/common/client/ui src/main/java/cc/kune/common/public src/main/java/cc/kune/core src/main/java/cc/kune/core/client src/main/java/cc/kune/core/client/auth src/main/java/cc/kune/core/client/logs src/main/java/cc/kune/core/client/notify/msgs src/main/java/cc/kune/core/client/resources src/main/java/cc/kune/core/client/sitebar src/main/java/cc/kune/core/client/sitebar/logo src/main/java/cc/kune/core/client/sitebar/spaces src/main/java/cc/kune/core/client/state src/main/java/cc/kune/core/client/ui/dialogs src/main/java/cc/kune/core/client/ws src/main/java/cc/kune/core/public src/main/java/cc/kune/core/shared/dto src/main/java/cc/kune/gspace src/main/java/cc/kune/gspace/client src/main/java/cc/kune/gspace/client/resources src/main/java/cc/kune/gspace/public src/main/java/cc/kune/msgs/client src/main/java/cc/kune/pspace src/main/java/cc/kune/pspace/client src/main/java/org/ourproject/kune/app/server src/main/java/org/ourproject/kune/platf/client/ui src/main/java/org/ourproject/kune/workspace/client/licensefoot src/main/java/org/ourproject/kune/workspace/client/licensewizard/pages src/main/java/org/ourproject/kune/workspace/client/newgroup src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions src/main/resources src/main/webapp src/main/webapp/WEB-INF src/test/java/cc/kune/core/client/state src/test/java/org/ourproject/kune/platf/client/ui/rte/saving
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Mon Jan 31 19:51:35 CET 2011
Author: vjrj_
Date: 2011-01-31 19:51:35 +0100 (Mon, 31 Jan 2011)
New Revision: 1228
Added:
trunk/img/kune-logo-without-text-80px.png
trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java
trunk/src/main/java/cc/kune/chat/public/
trunk/src/main/java/cc/kune/client/
trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
trunk/src/main/java/cc/kune/client/KuneGinjector.java
trunk/src/main/java/cc/kune/common/client/ui/KuneWindowUtils.java
trunk/src/main/java/cc/kune/core/client/auth/UserPassAutocompleteManager.java
trunk/src/main/java/cc/kune/core/client/auth/UserPassAutocompleteManagerImpl.java
trunk/src/main/java/cc/kune/core/client/logs/EventBusWithLogging.java
trunk/src/main/java/cc/kune/core/client/resources/browser-32.png
trunk/src/main/java/cc/kune/core/client/resources/cancel-32.png
trunk/src/main/java/cc/kune/core/client/resources/important-32.png
trunk/src/main/java/cc/kune/gspace/
trunk/src/main/java/cc/kune/gspace/GSpace.gwt.xml
trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css
trunk/src/main/java/cc/kune/pspace/
trunk/src/main/java/cc/kune/pspace/PSpace.gwt.xml
trunk/src/main/java/cc/kune/pspace/client/
trunk/src/main/java/cc/kune/pspace/client/PSpaceGinModule.java
trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java
trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.ui.xml
trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java
trunk/src/test/java/cc/kune/core/client/state/EventBusTester.java
Removed:
trunk/src/main/java/cc/kune/core/client/CoreGinjector.java
trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java
trunk/src/main/java/cc/kune/core/client/logs/EventsLogger.java
trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java
trunk/src/main/java/cc/kune/gspace/Wspace.gwt.xml
trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css
trunk/src/main/java/cc/kune/gspace/public/fontface/
trunk/src/main/java/cc/kune/wspace/
trunk/src/main/java/org/ourproject/kune/platf/client/ui/KuneWindowUtils.java
Modified:
trunk/.classpath
trunk/TODO
trunk/pom.xml
trunk/script/genProxy.sh
trunk/script/server.sh
trunk/src/main/java/cc/kune/Kune.gwt.xml
trunk/src/main/java/cc/kune/chat/Chat.gwt.xml
trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java
trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractChildGuiItem.java
trunk/src/main/java/cc/kune/common/client/ui/AbstractAtBorderPopupPanel.java
trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
trunk/src/main/java/cc/kune/common/public/kune-common.css
trunk/src/main/java/cc/kune/core/Core.gwt.xml
trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java
trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java
trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java
trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java
trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java
trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java
trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java
trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java
trunk/src/main/java/cc/kune/core/client/auth/SignInView.java
trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierViewImpl.java
trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifyEvent.java
trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsViewImpl.java
trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoViewImpl.java
trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java
trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.java
trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.ui.xml
trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java
trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java
trunk/src/main/java/cc/kune/core/client/ws/CoreViewImpl.java
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/cc/kune/core/public/ws.html
trunk/src/main/java/cc/kune/core/shared/dto/StateTokenUtils.java
trunk/src/main/java/cc/kune/gspace/client/WsArmor.java
trunk/src/main/java/cc/kune/gspace/client/WsArmorEntryPoint.java
trunk/src/main/java/cc/kune/gspace/client/WsArmorImpl.java
trunk/src/main/java/cc/kune/gspace/client/WsArmorImpl.ui.xml
trunk/src/main/java/cc/kune/gspace/client/resources/WsArmorResources.java
trunk/src/main/java/cc/kune/msgs/client/UserMessagesPanel.java
trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java
trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/pages/LicenseWizardFlags.java
trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java
trunk/src/main/resources/wave-server.properties
trunk/src/main/webapp/
trunk/src/main/webapp/WEB-INF/web.xml
trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java
trunk/src/test/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenterTest.java
Log:
NEW - # 19: Public part info message and URL
http://kune.ourproject.org/issues/ticket/19
NEW - # 17: emite chat update
http://kune.ourproject.org/issues/ticket/17
NEW - # 18: Event Logger (for dev purposes)
http://kune.ourproject.org/issues/ticket/18
NEW - # 14: Site bar update
http://kune.ourproject.org/issues/ticket/14
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/.classpath 2011-01-31 18:51:35 UTC (rev 1228)
@@ -11,6 +11,7 @@
<classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar" sourcepath="M2_REPO/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA-sources.jar"/>
<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/asm/asm/1.5.3/asm-1.5.3.jar"/>
<classpathentry kind="var" path="M2_REPO/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar"/>
<classpathentry kind="var" path="M2_REPO/avalon-framework/avalon-framework/4.1.3/avalon-framework-4.1.3.jar"/>
@@ -37,7 +38,10 @@
<classpathentry kind="var" path="M2_REPO/com/googlecode/gwt/inject/gin/r137/gin-r137.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/guava/guava-gwt/r07/guava-gwt-r07.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/code/guice/guice/2.1-SNAPSHOT-r1160/guice-2.1-SNAPSHOT-r1160.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/google/inject/guice/2.0/guice-2.0.jar"/>
+ <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/code/guice/guice-servlet/2.0.1/guice-servlet-2.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/jhickman/web/gwt/gwt-customuibinder/0.1/gwt-customuibinder-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/allen_sauer/gwt/log/gwt-log/gwt-log/3.0.1/gwt-log-3.0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-servlet/2.1.1/gwt-servlet-2.1.1.jar" sourcepath="M2_REPO/com/google/gwt/gwt-servlet/2.1.1/gwt-servlet-2.1.1-sources.jar"/>
@@ -48,8 +52,10 @@
<classpathentry kind="var" path="M2_REPO/com/gwtextux/gwtextux/0.4.0.924/gwtextux-0.4.0.924.jar"/>
<classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp/0.5-SNAPSHOT/gwtp-0.5-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/com/extjs/gxt/2.2.1/gxt-2.2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/jhickman/web/gwt/gxt-uibinder/0.6/gxt-uibinder-0.6.jar"/>
<classpathentry kind="var" path="M2_REPO/com/h2database/h2/1.0.20070617/h2-1.0.20070617.jar"/>
<classpathentry kind="var" path="M2_REPO/com/calclab/emite/hablar/r1694/hablar-r1694.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.1.ga/hibernate-3.2.1.ga.jar" sourcepath="M2_REPO/org/hibernate/hibernate/3.2.1.ga/hibernate-3.2.1.ga-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.3.0.ga/hibernate-commons-annotations-3.3.0.ga.jar" sourcepath="M2_REPO/org/hibernate/hibernate-commons-annotations/3.3.0.ga/hibernate-commons-annotations-3.3.0.ga-sources.jar"/>
@@ -68,6 +74,7 @@
<classpathentry kind="var" path="M2_REPO/net/sf/json-lib/json-lib/2.1/json-lib-2.1-jdk15.jar" sourcepath="M2_REPO/net/sf/json-lib/json-lib/2.1/json-lib-2.1-jdk15-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/net/sourceforge/findbugs/jsr-305/v0r47/jsr-305-v0r47.jar" sourcepath="M2_REPO/net/sourceforge/findbugs/jsr-305/v0r47/jsr-305-v0r47-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/jtidy/r8-20060801/jtidy-r8-20060801.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jukito/jukito/1.0/jukito-1.0.jar" sourcepath="M2_REPO/org/jukito/jukito/1.0/jukito-1.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/4.8.1/junit-4.8.1.jar" sourcepath="M2_REPO/junit/junit/4.8.1/junit-4.8.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/liquibase/liquibase-core/1.7.0/liquibase-core-1.7.0.jar"/>
<classpathentry kind="var" path="M2_REPO/org/liquibase/liquibase-plugin/1.7.0.0/liquibase-plugin-1.7.0.0.jar"/>
@@ -81,8 +88,9 @@
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-profile/2.0/maven-profile-2.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-project/2.0/maven-project-2.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0.jar" sourcepath="M2_REPO/org/apache/maven/maven-repository-metadata/2.0/maven-repository-metadata-2.0-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/mockito/mockito-all/1.6/mockito-all-1.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/mockito/mockito-core/1.8.5/mockito-core-1.8.5.jar" sourcepath="M2_REPO/org/mockito/mockito-core/1.8.5/mockito-core-1.8.5-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.13/mysql-connector-java-5.1.13.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/objenesis/objenesis/1.0/objenesis-1.0.jar" sourcepath="M2_REPO/org/objenesis/objenesis/1.0/objenesis-1.0-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar" sourcepath="M2_REPO/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/waveprotocol/proto-gwt/0.3.1/proto-gwt-0.3.1.jar"/>
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/TODO 2011-01-31 18:51:35 UTC (rev 1228)
@@ -11,11 +11,15 @@
Use org-mode in emacs to easy manage this file
* SHORT-TERM (URGENT)
+** TODO StateManager #signin while already signed in NPE
+** TODO Testing Presenters via juckito:
+https://code.google.com/p/gwt-platform/wiki/UnitTesting
+https://code.google.com/p/arcbees-hive/source/browse/test/com/arcbees/hive/client/home/blog/ui/BlogItemWidgetTest.java
** src/org/waveprotocol/box/server/gxp/ (pages) >> ./gen/org/waveprotocol/box/server/gxp/WaveClientPage.java
** Use Emulate Stack Java like src/org/waveprotocol/box/webclient/WebClientDev.gwt.xml
** roo error
[FelixDispatchQueue] Expected string-based content in @RooGwtMirroredFrom on cc.kune.client.managed.request.ContainerTranslationProxyObject of class [org.springframework.roo.classpath.details.annotations.ClassAttributeValue] must be an instance of class org.springframework.roo.classpath.details.annotations.StringAttributeValue
-** Gin sharing of instances between injectos
+** Gin sharing of instances between injectors
https://groups.google.com/group/google-gin/browse_thread/thread/203ab1725406bd44/209429fd95366182?lnk=gst&q=multiple+module#209429fd95366182
** Wave integration
[ ] org.waveprotocol.box.webclient.WebClientProd
@@ -57,8 +61,7 @@
add-apt-repository ppa:ubuntu-mozilla-daily/ppa
apt-get update
-** Compilation in target... resolve
-** tag, resolve last implementation complexity.
+** tags system, resolve last implementation complexity.
Summary: recover the:
[Tag] <-m--m-> [Content]
and use:
@@ -256,6 +259,7 @@
http://stuffthathappens.com/blog/2009/09/14/guice-with-gwt/
http://pavelgj.blogspot.com/2008/02/gwt-remoteserviceservlet-guice.html
** TODO junit + guice utils:
+https://code.google.com/p/jukito/
https://code.google.com/p/guiceberry/
https://code.google.com/p/atunit/
** TODO Study OSGI + guice:
Added: trunk/img/kune-logo-without-text-80px.png
===================================================================
(Binary files differ)
Property changes on: trunk/img/kune-logo-without-text-80px.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/pom.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -242,6 +242,16 @@
<artifactId>gwt-fx</artifactId>
<version>r464</version>
</dependency>
+ <dependency>
+ <groupId>com.jhickman.web.gwt</groupId>
+ <artifactId>gwt-customuibinder</artifactId>
+ <version>0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.jhickman.web.gwt</groupId>
+ <artifactId>gxt-uibinder</artifactId>
+ <version>0.6</version>
+ </dependency>
<!-- cc -->
<dependency>
<groupId>com.gwtext</groupId>
@@ -274,11 +284,8 @@
<artifactId>dozer</artifactId>
<version>4.0</version>
</dependency>
- <!-- <dependency>
- <groupId>com.calclab</groupId>
- <artifactId>suco</artifactId>
- <version>0.6.5</version>
- </dependency> -->
+ <!-- <dependency> <groupId>com.calclab</groupId> <artifactId>suco</artifactId>
+ <version>0.6.5</version> </dependency> -->
<dependency>
<groupId>jmagick</groupId>
<artifactId>jmagick</artifactId>
@@ -468,11 +475,17 @@
<scope>provided</scope>
</dependency>
<!-- testing dependencies -->
+ <!-- <dependency> -->
+ <!-- <groupId>org.mockito</groupId> -->
+ <!-- <artifactId>mockito-all</artifactId> -->
+ <!-- <scope>test</scope> -->
+ <!-- <version>1.6</version> -->
+ <!-- </dependency> -->
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
+ <groupId>org.jukito</groupId>
+ <artifactId>jukito</artifactId>
+ <version>1.0</version>
<scope>test</scope>
- <version>1.6</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Modified: trunk/script/genProxy.sh
===================================================================
--- trunk/script/genProxy.sh 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/script/genProxy.sh 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,3 +1,5 @@
+#echo buider.exclude\(\"$2\"\)\;
+#exit
cat << EOF
<servlet>
<servlet-name>Wiab$1</servlet-name>
@@ -3,8 +5,8 @@
<servlet-class>org.eclipse.jetty.servlets.ProxyServlet\$Transparent</servlet-class>
<init-param>
-<param-name>ProxyTo</param-name><param-value>http://127.0.0.1/9898</param-value>
+<param-name>ProxyTo</param-name><param-value>http://127.0.0.1:9898/</param-value>
</init-param>
<init-param>
-<param-name>Prefix</param-name><param-value></param-value>
+<param-name>Prefix</param-name><param-value>/</param-value>
</init-param>
</servlet>
Modified: trunk/script/server.sh
===================================================================
--- trunk/script/server.sh 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/script/server.sh 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,5 +1,5 @@
#!/bin/bash
-mvn jetty:run -Dorg.mortbay.util.FileResource.checkAliases=False
-
-
+mvn jetty:run -Dorg.mortbay.util.FileResource.checkAliases=False -Djava.security.auth.login.config=src/main/resources/jaas.config
+ # -Dorg.eclipse.jetty.util.log.INFO=true
+ # -Dorg.eclipse.jetty.util.log.DEBUG=true
Modified: trunk/src/main/java/cc/kune/Kune.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/Kune.gwt.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -4,12 +4,13 @@
<inherits name="com.google.gwt.user.User" />
<inherits name='com.google.gwt.logging.Logging' />
<inherits name="cc.kune.core.Core" />
+ <inherits name="cc.kune.wave.KuneWave" />
<inherits name="cc.kune.chat.Chat" />
- <inherits name="cc.kune.wave.KuneWave" />
+ <inherits name="cc.kune.pspace.PSpace" />
<inherits name="com.calclab.suco.Suco" />
<inherits name="org.adamtacy.GWTEffects"></inherits>
- <!-- <source path='client' excludes="**/*Test.java,**/*Tests.java,**/*MockProvider.java"
- /> -->
+ <source path='client'
+ excludes="**/*Test.java,**/*Tests.java,**/*MockProvider.java" />
<!-- <source path='shared'/> -->
<!-- <public path="public"/> -->
<!-- Logging Configuration -->
@@ -32,10 +33,16 @@
<!--http://code.google.com/p/google-web-toolkit/issues/detail?id=42 -->
<!-- <set-property name="user.agent" value="gecko1_8" /> -->
<set-property name="user.agent" value="safari,gecko1_8" />
+ <!-- gwt-platform ============================================= -->
+ <inherits name='com.gwtplatform.mvp.Mvp' />
+ <define-configuration-property name="gin.ginjector"
+ is-multi-valued="false" />
+ <set-configuration-property name="gin.ginjector"
+ value="cc.kune.client.KuneGinjector" />
<!-- Debugging =============================================== -->
<!-- for add ensureDebugIds (debugId in UIBinder), remove/comment in production
see UIObject.ensureDebugId()) -->
<inherits name="com.google.gwt.user.Debug" />
<!-- Entrypoint =============================================== -->
- <entry-point class="cc.kune.core.client.KuneEntryPoint" />
+ <entry-point class="cc.kune.client.KuneEntryPoint" />
</module>
Modified: trunk/src/main/java/cc/kune/chat/Chat.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/chat/Chat.gwt.xml 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/chat/Chat.gwt.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -9,4 +9,5 @@
<inherits name='com.calclab.hablar.icons.ie6gif.HablarIE6GifIcons' />
<inherits name='com.calclab.hablar.icons.alt.HablarAltIcons' />
<source path="client" />
+ <set-property name="user.agent" value="safari,gecko1_8" />
</module>
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -6,6 +6,7 @@
import cc.kune.common.client.actions.Action;
import cc.kune.common.client.actions.ActionEvent;
import cc.kune.common.client.actions.KeyStroke;
+import cc.kune.common.client.actions.ui.ParentWidget;
import cc.kune.common.client.actions.ui.descrip.IconLabelDescriptor;
import cc.kune.common.client.shortcuts.Keyboard;
import cc.kune.common.client.ui.PopupTopPanel;
@@ -57,7 +58,11 @@
}
+ protected static final String CHAT_CLIENT_ICON_ID = "k-chat-icon-id";
+
+ protected IconLabelDescriptor chatIcon;
private PopupTopPanel popup;
+
private final Session session;
@Inject
@@ -68,14 +73,14 @@
@Override
public void onAppStart(final AppStartEvent event) {
res.css().ensureInjected();
- final IconLabelDescriptor chatIcon = new IconLabelDescriptor(action);
+ chatIcon = new IconLabelDescriptor(action);
chatIcon.putValue(Action.SMALL_ICON, res.chat());
- chatIcon.putValue(Action.NAME, "Chat");
- chatIcon.setStyles("k-floatright, k-no-backimage, k-btn-sitebar");
+ chatIcon.setId(CHAT_CLIENT_ICON_ID);
+ chatIcon.setStyles("k-floatright, k-no-backimage, k-btn-sitebar, k-chat-icon");
action.putValue(Action.SHORT_DESCRIPTION, i18n.t("Show/hide the chat window"));
action.setShortcut(KeyStroke.getKeyStroke('C', Keyboard.MODIFIER_ALT));
chatIcon.setVisible(session.isLogged());
- siteActions.addAction(chatIcon);
+ siteActions.getLeftToolbar().addAction(chatIcon);
eventBus.addHandler(UserSignInEvent.getType(), new UserSignInHandler() {
@Override
public void onUserSignIn(final UserSignInEvent event) {
@@ -236,7 +241,7 @@
if (session.isLogged()) {
createDialogIfNeeded();
if (show) {
- popup.showCentered();
+ popup.showNear((Widget) chatIcon.getValue(ParentWidget.PARENT_UI));
} else {
popup.hide();
}
Added: trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java (rev 0)
+++ trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,16 @@
+package cc.kune.chat.client;
+
+import com.google.inject.Singleton;
+import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
+
+public class ChatGinModule extends AbstractPresenterModule {
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.google.gwt.inject.client.AbstractGinModule#configure()
+ */
+ @Override
+ protected void configure() {
+ bind(ChatClient.class).to(ChatClientDefault.class).in(Singleton.class);
+ }
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java (from rev 1227, trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java)
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneEntryPoint.java (rev 0)
+++ trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,62 @@
+package cc.kune.client;
+
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+
+import com.google.gwt.core.client.EntryPoint;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.GWT.UncaughtExceptionHandler;
+import com.google.gwt.core.client.Scheduler;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
+import com.gwtplatform.mvp.client.DelayedBindRegistry;
+
+/**
+ * The Class KuneEntryPoint.
+ */
+public class KuneEntryPoint implements EntryPoint {
+
+ public final KuneGinjector ginjector = GWT.create(KuneGinjector.class);
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.google.gwt.core.client.EntryPoint#onModuleLoad()
+ */
+ @Override
+ public void onModuleLoad() {
+ GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
+ @Override
+ public void onUncaughtException(final Throwable e) {
+ GWT.log("Error in 'onModuleLoad()' method", e);
+ e.printStackTrace();
+ }
+ });
+ Scheduler.get().scheduleDeferred(new ScheduledCommand() {
+ @Override
+ public void execute() {
+ onModuleLoadCont();
+ }
+ });
+ }
+
+ /**
+ * On module load cont.
+ */
+ public void onModuleLoadCont() {
+ DelayedBindRegistry.bind(ginjector);
+ AsyncCallbackSimple.init(ginjector.getErrorHandler());
+ NotifyUser.init(ginjector.getEventBus());
+ // ginjector.getPlaceManager().revealCurrentPlace();
+ ginjector.getCorePresenter().get().forceReveal();
+ ginjector.getStateManager();
+ ginjector.getSiteTokenListeners();
+ ginjector.getEventLogger();
+ ginjector.getI18n();
+ ginjector.getGxtGuiProvider();
+ ginjector.getUserNotifierPresenter();
+ ginjector.getSpinerPresenter();
+ ginjector.getSiteLogoPresenter();
+ ginjector.getSpacesTabPresenter();
+ ginjector.getChatClient();
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/client/KuneGinjector.java (from rev 1227, trunk/src/main/java/cc/kune/core/client/CoreGinjector.java)
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneGinjector.java (rev 0)
+++ trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,85 @@
+package cc.kune.client;
+
+import cc.kune.chat.client.ChatClient;
+import cc.kune.chat.client.ChatGinModule;
+import cc.kune.common.client.actions.gwtui.GwtGuiProvider;
+import cc.kune.common.client.actions.gxtui.GxtGuiProvider;
+import cc.kune.common.client.actions.ui.bind.GuiProvider;
+import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.core.client.CoreGinModule;
+import cc.kune.core.client.auth.RegisterPresenter;
+import cc.kune.core.client.auth.SignInPresenter;
+import cc.kune.core.client.cookies.CookiesManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.logs.EventBusWithLogging;
+import cc.kune.core.client.notify.msgs.UserNotifierPresenter;
+import cc.kune.core.client.notify.spiner.SpinerPresenter;
+import cc.kune.core.client.sitebar.SitebarActionsPresenter;
+import cc.kune.core.client.sitebar.logo.SiteLogoPresenter;
+import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter;
+import cc.kune.core.client.state.SiteTokenListeners;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.CorePresenter;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.pspace.client.PSpaceGinModule;
+import cc.kune.pspace.client.PSpacePresenter;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.inject.client.AsyncProvider;
+import com.google.gwt.inject.client.GinModules;
+import com.google.gwt.inject.client.Ginjector;
+import com.google.inject.Provider;
+import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler;
+
+ at GinModules({ CoreGinModule.class, ChatGinModule.class, PSpaceGinModule.class })
+public interface KuneGinjector extends Ginjector {
+
+ /*
+ * You have to add here all the GWTPresenters (as Provider or AsyncProvider)
+ * see the GWTPlatform doc
+ */
+
+ ChatClient getChatClient();
+
+ AsyncProvider<CookiesManager> getCookiesManager();
+
+ Provider<CorePresenter> getCorePresenter();
+
+ ErrorHandler getErrorHandler();
+
+ EventBus getEventBus();
+
+ EventBusWithLogging getEventLogger();
+
+ GlobalShortcutRegister getGlobalShortcutRegister();
+
+ GuiProvider getGuiProvider();
+
+ GwtGuiProvider getGwtGuiProvider();
+
+ GxtGuiProvider getGxtGuiProvider();
+
+ I18nTranslationService getI18n();
+
+ ProxyFailureHandler getProxyFailureHandler();
+
+ AsyncProvider<PSpacePresenter> getPSpacePresenter();
+
+ AsyncProvider<RegisterPresenter> getRegisterPresenter();
+
+ AsyncProvider<SignInPresenter> getSignInPresenter();
+
+ AsyncProvider<SitebarActionsPresenter> getSitebarActionsPresenter();
+
+ AsyncProvider<SiteLogoPresenter> getSiteLogoPresenter();
+
+ SiteTokenListeners getSiteTokenListeners();
+
+ AsyncProvider<SpaceSelectorPresenter> getSpacesTabPresenter();
+
+ AsyncProvider<SpinerPresenter> getSpinerPresenter();
+
+ StateManager getStateManager();
+
+ AsyncProvider<UserNotifierPresenter> getUserNotifierPresenter();
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/client/KuneGinjector.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -5,6 +5,7 @@
import cc.kune.common.client.actions.ActionEvent;
import cc.kune.common.client.actions.KeyStroke;
import cc.kune.common.client.actions.ui.AbstractGuiItem;
+import cc.kune.common.client.actions.ui.ParentWidget;
import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
import cc.kune.common.client.actions.ui.descrip.IconLabelDescriptor;
import cc.kune.common.client.ui.IconLabel;
@@ -32,6 +33,7 @@
public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
super.descriptor = descriptor;
iconLabel = new IconLabel("");
+ descriptor.putValue(ParentWidget.PARENT_UI, this);
final String id = descriptor.getId();
if (id != null) {
iconLabel.ensureDebugId(id);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -98,7 +98,7 @@
if (notStandAlone) {
button.setVisible(visible);
} else {
- button.setVisible(visible);
+ // button.setVisible(visible);
}
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuGui.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuGui.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -34,7 +34,7 @@
}
@Override
- protected void addStyle(String style) {
+ protected void addStyle(final String style) {
button.addStyleName(style);
}
@@ -56,8 +56,8 @@
super.descriptor = descriptor;
descriptor.putValue(ParentWidget.PARENT_UI, this);
// Standalone menus are menus without and associated button in a
- // toolbar
- // (sometimes, a menu showed in a grid, or other special widgets)
+ // toolbar (sometimes, a menu showed in a grid, or other special
+ // widgets)
notStandAlone = !((MenuDescriptor) descriptor).isStandalone();
if (notStandAlone) {
button = new SplitButton("");
@@ -93,7 +93,6 @@
if (button != null) {
button.setEnabled(enabled);
}
-
}
@Override
@@ -101,7 +100,6 @@
if (button != null) {
button.setIconStyle(style);
}
-
}
@Override
@@ -109,7 +107,6 @@
if (button != null) {
button.setText(text);
}
-
}
@Override
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtToolbarSeparatorGui.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -6,38 +6,30 @@
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
-import com.extjs.gxt.ui.client.widget.Component;
+import com.extjs.gxt.ui.client.widget.toolbar.FillToolItem;
+import com.extjs.gxt.ui.client.widget.toolbar.LabelToolItem;
+import com.extjs.gxt.ui.client.widget.toolbar.SeparatorToolItem;
public class GxtToolbarSeparatorGui extends AbstractChildGuiItem {
- Component separator;
-
@Override
- protected void addStyle(final String style) {
- if (separator != null) {
- separator.addStyleName(style);
- }
- }
-
- @Override
public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
- super.create(descriptor);
final GxtToolbarGui toolbar = (GxtToolbarGui) parent;
-
final Type type = ((ToolbarSeparatorDescriptor) descriptor).getSeparatorType();
switch (type) {
case fill:
- separator = toolbar.addFill();
+ child = new FillToolItem();
break;
case spacer:
- separator = toolbar.addSpacer();
+ child = new SeparatorToolItem();
break;
case separator:
- separator = toolbar.addSeparator();
+ child = new LabelToolItem();
break;
default:
break;
}
+ super.create(descriptor);
return toolbar;
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractChildGuiItem.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractChildGuiItem.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractChildGuiItem.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -19,6 +19,13 @@
}
@Override
+ protected void addStyle(final String style) {
+ if (child != null) {
+ child.addStyleName(style);
+ }
+ }
+
+ @Override
public AbstractGuiItem create(final AbstractGuiActionDescrip descriptor) {
final int position = descriptor.getPosition();
if (descriptor.isChild()) {
Modified: trunk/src/main/java/cc/kune/common/client/ui/AbstractAtBorderPopupPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/AbstractAtBorderPopupPanel.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/common/client/ui/AbstractAtBorderPopupPanel.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -12,17 +12,16 @@
protected UIObject showNearObject;
public AbstractAtBorderPopupPanel() {
- super();
- init();
+ super(false, false);
}
public AbstractAtBorderPopupPanel(final boolean autohide) {
- super(autohide);
- init();
+ this(autohide, false);
}
public AbstractAtBorderPopupPanel(final boolean autohide, final boolean modal) {
super(autohide, modal);
+ setGlassEnabled(modal);
init();
}
@@ -35,10 +34,12 @@
Window.addResizeHandler(new ResizeHandler() {
@Override
public void onResize(final ResizeEvent event) {
- if (showCentered) {
- setCenterPositionImpl();
- } else {
- showRelativeImpl();
+ if (isShowing()) {
+ if (showCentered) {
+ setCenterPositionImpl();
+ } else {
+ showRelativeImpl();
+ }
}
}
});
Modified: trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -43,6 +43,11 @@
hp.add(w);
}
+ @Override
+ public void addStyleName(final String style) {
+ label.addStyleName(style);
+ }
+
public void addTextStyleName(final String style) {
label.addStyleName(style);
}
Copied: trunk/src/main/java/cc/kune/common/client/ui/KuneWindowUtils.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/platf/client/ui/KuneWindowUtils.java)
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/KuneWindowUtils.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/ui/KuneWindowUtils.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.common.client.ui;
+
+import com.google.gwt.user.client.Window;
+
+public class KuneWindowUtils {
+ public static int getClientHeight() {
+ return Window.getClientHeight();
+ }
+
+ public static int getClientWidth() {
+ return Window.getClientWidth();
+ }
+
+ public static void open(String url) {
+ Window.open(url, "_blank", "");
+ }
+}
Modified: trunk/src/main/java/cc/kune/common/public/kune-common.css
===================================================================
--- trunk/src/main/java/cc/kune/common/public/kune-common.css 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/common/public/kune-common.css 2011-01-31 18:51:35 UTC (rev 1228)
@@ -33,6 +33,13 @@
opacity: 0.90;
}
+.k-opacity95 {
+ kfilter: alpha(opacity = 95);
+ -moz-opacity: 0.95;
+ -khtml-opacity: 0.95;
+ opacity: 0.95;
+}
+
.gwt-PopupPanelGlass {
background-color: #f7ebe3 !important;
kfilter: alpha(opacity = 68) !important;
Modified: trunk/src/main/java/cc/kune/core/Core.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/core/Core.gwt.xml 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/Core.gwt.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -12,17 +12,12 @@
<script src="js/jquery.qtip-1.0.0-rc3.min.js" />
<!-- Dependencies ============================================= -->
<inherits name="com.google.gwt.user.User" />
- <inherits name="cc.kune.wspace.Wspace" />
+ <inherits name="cc.kune.gspace.GSpace" />
<inherits name="cc.kune.msgs.KuneMsgs" />
<inherits name="cc.kune.common.KuneCommon" />
<inherits name="com.extjs.gxt.ui.GXT" />
+ <inherits name="com.jhickman.web.gwt.gxtuibinder.GxtUiBinder" />
<inherits name="com.calclab.suco.Suco" />
- <!-- gwt-platform ============================================= -->
- <inherits name='com.gwtplatform.mvp.Mvp' />
- <define-configuration-property name="gin.ginjector"
- is-multi-valued="false" />
- <set-configuration-property name="gin.ginjector"
- value="cc.kune.core.client.CoreGinjector" />
<!-- Styles =================================================== -->
<stylesheet src="ws.css" />
<stylesheet src="fontface/stylesheet.css" />
Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,7 +1,5 @@
package cc.kune.core.client;
-import cc.kune.chat.client.ChatClient;
-import cc.kune.chat.client.ChatClientDefault;
import cc.kune.common.client.actions.gwtui.GwtGuiProvider;
import cc.kune.common.client.actions.gxtui.GxtGuiProvider;
import cc.kune.common.client.actions.ui.bind.DefaultGuiProvider;
@@ -16,6 +14,8 @@
import cc.kune.core.client.auth.SignInPanel;
import cc.kune.core.client.auth.SignInPresenter;
import cc.kune.core.client.auth.SignInView;
+import cc.kune.core.client.auth.UserPassAutocompleteManager;
+import cc.kune.core.client.auth.UserPassAutocompleteManagerImpl;
import cc.kune.core.client.cookies.CookiesManager;
import cc.kune.core.client.cookies.CookiesManagerImpl;
import cc.kune.core.client.errors.ErrorHandler;
@@ -23,7 +23,7 @@
import cc.kune.core.client.init.AppStarter;
import cc.kune.core.client.init.AppStarterDefault;
import cc.kune.core.client.init.PrefetchUtilities;
-import cc.kune.core.client.logs.EventsLogger;
+import cc.kune.core.client.logs.EventBusWithLogging;
import cc.kune.core.client.notify.msgs.UserNotifierPresenter;
import cc.kune.core.client.notify.msgs.UserNotifierPresenter.UserNotifierProxy;
import cc.kune.core.client.notify.msgs.UserNotifierViewImpl;
@@ -52,13 +52,12 @@
import cc.kune.core.client.ws.CorePresenter;
import cc.kune.core.client.ws.CoreViewImpl;
import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.WsArmor;
+import cc.kune.gspace.client.WsArmorImpl;
import cc.kune.msgs.client.UserMessagesPanel;
import cc.kune.msgs.client.UserMessagesPresenter;
-import cc.kune.wspace.client.WsArmor;
-import cc.kune.wspace.client.WsArmorImpl;
import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.event.shared.SimpleEventBus;
import com.google.inject.Singleton;
import com.gwtplatform.mvp.client.DefaultProxyFailureHandler;
import com.gwtplatform.mvp.client.RootPresenter;
@@ -76,12 +75,10 @@
*/
@Override
protected void configure() {
- bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class);
- // bind(PlaceManager.class).to(CorePlaceManager.class).in(Singleton.class);
+ bind(EventBus.class).to(EventBusWithLogging.class).in(Singleton.class);
bind(TokenFormatter.class).to(ParameterTokenFormatter.class).in(Singleton.class);
bind(RootPresenter.class).asEagerSingleton();
bind(QTipsHelper.class).asEagerSingleton();
- bind(EventsLogger.class).asEagerSingleton();
bind(ProxyFailureHandler.class).to(DefaultProxyFailureHandler.class).in(Singleton.class);
bind(I18nUITranslationService.class).in(Singleton.class);
bind(I18nTranslationService.class).to(I18nUITranslationService.class).in(Singleton.class);
@@ -106,6 +103,7 @@
bindPresenter(SitebarActionsPresenter.class, SitebarActionsPresenter.SitebarActionsView.class,
SitebarActionsViewImpl.class, SitebarActionsPresenter.SitebarActionsProxy.class);
+ bind(UserPassAutocompleteManager.class).to(UserPassAutocompleteManagerImpl.class).in(Singleton.class);
bindPresenter(SignInPresenter.class, SignInView.class, SignInPanel.class, SignInPresenter.SignInProxy.class);
bindPresenter(RegisterPresenter.class, RegisterView.class, RegisterPanel.class,
RegisterPresenter.RegisterProxy.class);
@@ -133,7 +131,5 @@
bind(SitebarSignOutLink.class).in(Singleton.class);
bind(BeforeSignOut.class).in(Singleton.class);
bind(SiteTokenListeners.class).asEagerSingleton();
-
- bind(ChatClient.class).to(ChatClientDefault.class).in(Singleton.class);
}
}
Deleted: trunk/src/main/java/cc/kune/core/client/CoreGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinjector.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinjector.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,79 +0,0 @@
-package cc.kune.core.client;
-
-import cc.kune.chat.client.ChatClient;
-import cc.kune.common.client.actions.gwtui.GwtGuiProvider;
-import cc.kune.common.client.actions.gxtui.GxtGuiProvider;
-import cc.kune.common.client.actions.ui.bind.GuiProvider;
-import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
-import cc.kune.core.client.auth.RegisterPresenter;
-import cc.kune.core.client.auth.SignInPresenter;
-import cc.kune.core.client.cookies.CookiesManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.logs.EventsLogger;
-import cc.kune.core.client.notify.msgs.UserNotifierPresenter;
-import cc.kune.core.client.notify.spiner.SpinerPresenter;
-import cc.kune.core.client.sitebar.SitebarActionsPresenter;
-import cc.kune.core.client.sitebar.logo.SiteLogoPresenter;
-import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter;
-import cc.kune.core.client.state.SiteTokenListeners;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.client.ws.CorePresenter;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.inject.client.AsyncProvider;
-import com.google.gwt.inject.client.GinModules;
-import com.google.gwt.inject.client.Ginjector;
-import com.google.inject.Provider;
-import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler;
-
- at GinModules({ CoreGinModule.class })
-public interface CoreGinjector extends Ginjector {
-
- /*
- * You have to add here all the GWTPresenters (as Provider or AsyncProvider)
- * see the GWTPlatform doc
- */
-
- ChatClient getChatClient();
-
- AsyncProvider<CookiesManager> getCookiesManager();
-
- Provider<CorePresenter> getCorePresenter();
-
- ErrorHandler getErrorHandler();
-
- EventBus getEventBus();
-
- EventsLogger getEventLogger();
-
- GlobalShortcutRegister getGlobalShortcutRegister();
-
- GuiProvider getGuiProvider();
-
- GwtGuiProvider getGwtGuiProvider();
-
- GxtGuiProvider getGxtGuiProvider();
-
- I18nTranslationService getI18n();
-
- ProxyFailureHandler getProxyFailureHandler();
-
- AsyncProvider<RegisterPresenter> getRegisterPresenter();
-
- AsyncProvider<SignInPresenter> getSignInPresenter();
-
- AsyncProvider<SitebarActionsPresenter> getSitebarActionsPresenter();
-
- AsyncProvider<SiteLogoPresenter> getSiteLogoPresenter();
-
- SiteTokenListeners getSiteTokenListeners();
-
- AsyncProvider<SpaceSelectorPresenter> getSpacesTabPresenter();
-
- AsyncProvider<SpinerPresenter> getSpinerPresenter();
-
- StateManager getStateManager();
-
- AsyncProvider<UserNotifierPresenter> getUserNotifierPresenter();
-}
\ No newline at end of file
Deleted: trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,62 +0,0 @@
-package cc.kune.core.client;
-
-import cc.kune.common.client.noti.NotifyUser;
-import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
-
-import com.google.gwt.core.client.EntryPoint;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.core.client.GWT.UncaughtExceptionHandler;
-import com.google.gwt.core.client.Scheduler;
-import com.google.gwt.core.client.Scheduler.ScheduledCommand;
-import com.gwtplatform.mvp.client.DelayedBindRegistry;
-
-/**
- * The Class KuneEntryPoint.
- */
-public class KuneEntryPoint implements EntryPoint {
-
- public final CoreGinjector ginjector = GWT.create(CoreGinjector.class);
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.gwt.core.client.EntryPoint#onModuleLoad()
- */
- @Override
- public void onModuleLoad() {
- GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
- @Override
- public void onUncaughtException(final Throwable e) {
- GWT.log("Error in 'onModuleLoad()' method", e);
- e.printStackTrace();
- }
- });
- Scheduler.get().scheduleDeferred(new ScheduledCommand() {
- @Override
- public void execute() {
- onModuleLoadCont();
- }
- });
- }
-
- /**
- * On module load cont.
- */
- public void onModuleLoadCont() {
- DelayedBindRegistry.bind(ginjector);
- AsyncCallbackSimple.init(ginjector.getErrorHandler());
- NotifyUser.init(ginjector.getEventBus());
- // ginjector.getPlaceManager().revealCurrentPlace();
- ginjector.getCorePresenter().get().forceReveal();
- ginjector.getStateManager();
- ginjector.getSiteTokenListeners();
- ginjector.getEventLogger();
- ginjector.getI18n();
- ginjector.getGxtGuiProvider();
- ginjector.getUserNotifierPresenter();
- ginjector.getSpinerPresenter();
- ginjector.getSiteLogoPresenter();
- ginjector.getSpacesTabPresenter();
- ginjector.getChatClient();
- }
-}
Modified: trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -33,7 +33,7 @@
public static final String COUNTRY_FIELD = "k-urf-country-f";
public static final String EMAIL_FIELD = "k-urf-email-f";
public static final String LANG_FIELD = "k-urf-lang-f";
- public static final String LONGNAME_FIELD = "k-urf-long_name-f";
+ // public static final String LONGNAME_FIELD = "k-urf-long_name-f";
public static final String NICK_FIELD = "k-urf-nick-f";
public static final String NOPERSONALHOMEPAGE_ID = "k-urf-nphp-id";
public static final String PASSWORD_FIELD = "k-urf-password-f";
@@ -43,7 +43,7 @@
public static final String WANTHOMEPAGE_FIELD = "k-urf-wphp-f";
private final TextField<String> emailRegField;
- private final TextField<String> longNameRegField;
+ // private final TextField<String> longNameRegField;
private final TextField<String> passwdRegField;
private final TextField<String> shortNameRegField;
@@ -65,17 +65,17 @@
shortNameRegField.setValidationDelay(1000);
add(shortNameRegField);
- longNameRegField = new TextField<String>();
- longNameRegField.setTabIndex(2);
- longNameRegField.setFieldLabel(i18n.t("Full Name"));
- longNameRegField.setName(LONGNAME_FIELD);
- longNameRegField.setWidth(DEF_FIELD_WIDTH);
- longNameRegField.setAllowBlank(false);
- longNameRegField.setMinLength(3);
- longNameRegField.setMaxLength(50);
- // longNameRegField.setValidationEvent(false);
- longNameRegField.setId(LONGNAME_FIELD);
- add(longNameRegField);
+ // longNameRegField = new TextField<String>();
+ // longNameRegField.setTabIndex(2);
+ // longNameRegField.setFieldLabel(i18n.t("Full Name"));
+ // longNameRegField.setName(LONGNAME_FIELD);
+ // longNameRegField.setWidth(DEF_FIELD_WIDTH);
+ // longNameRegField.setAllowBlank(false);
+ // longNameRegField.setMinLength(3);
+ // longNameRegField.setMaxLength(50);
+ // // longNameRegField.setValidationEvent(false);
+ // longNameRegField.setId(LONGNAME_FIELD);
+ // add(longNameRegField);
passwdRegField = new TextField<String>();
passwdRegField.setTabIndex(3);
@@ -107,9 +107,9 @@
return emailRegField.getValue();
}
- public String getLongName() {
- return longNameRegField.getValue();
- }
+ // public String getLongName() {
+ // return longNameRegField.getValue();
+ // }
public String getRegisterPassword() {
return passwdRegField.getValue();
Modified: trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -47,7 +47,7 @@
public RegisterPanel(final I18nTranslationService i18n, final Session session, final NotifyLevelImages images) {
super(REGISTER_DIALOG, i18n, i18n.t(CoreMessages.REGISTER_TITLE), true, true, true, 400, 420, "",
i18n.t(CoreMessages.REGISTER_TITLE), REGISTER_BUTTON_ID, i18n.tWithNT("Cancel", "used in button"),
- CANCEL_BUTTON_ID, images, ERRMSG, 11);
+ CANCEL_BUTTON_ID, images, ERRMSG, 5);
final VerticalPanel panel = new VerticalPanel();
// panel.setBorder(false);
registerForm = new RegisterForm(i18n, session);
@@ -62,10 +62,10 @@
return registerForm.getEmail();
}
- @Override
- public String getLongName() {
- return registerForm.getLongName();
- }
+ // @Override
+ // public String getLongName() {
+ // return registerForm.getLongName();
+ // }
@Override
public String getRegisterPassword() {
Modified: trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -26,6 +26,7 @@
import cc.kune.core.client.errors.EmailAddressInUseException;
import cc.kune.core.client.errors.GroupNameInUseException;
import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.logs.Log;
import cc.kune.core.client.resources.CoreMessages;
import cc.kune.core.client.rpcservices.UserServiceAsync;
import cc.kune.core.client.state.Session;
@@ -64,8 +65,8 @@
public RegisterPresenter(final EventBus eventBus, final RegisterView view, final RegisterProxy proxy,
final Session session, final StateManager stateManager, final I18nUITranslationService i18n,
final Provider<UserServiceAsync> userServiceProvider, final Provider<SignIn> signInProvider,
- final CookiesManager cookiesManager) {
- super(eventBus, view, proxy, session, stateManager, i18n, cookiesManager);
+ final CookiesManager cookiesManager, final UserPassAutocompleteManager autocomplete) {
+ super(eventBus, view, proxy, session, stateManager, i18n, cookiesManager, autocomplete);
this.userServiceProvider = userServiceProvider;
this.signInProvider = signInProvider;
}
@@ -111,6 +112,7 @@
@Override
public void onClose(final CloseEvent<PopupPanel> event) {
+ Log.debug("Closing register presenter");
RegisterPresenter.this.onClose();
}
});
@@ -131,9 +133,11 @@
final boolean wantHomepage = true;
- final UserDTO user = new UserDTO(getView().getLongName(), getView().getShortName(),
- getView().getRegisterPassword(), getView().getEmail(), language, country, timezone, null, true,
- SubscriptionMode.manual, "blue");
+ final String shortName = getView().getShortName();
+ final String password = getView().getRegisterPassword();
+ final UserDTO user = new UserDTO("", shortName, password, getView().getEmail(), language, country,
+ timezone, null, true, SubscriptionMode.manual, "blue");
+ super.saveAutocompleteLoginData(shortName, password);
final AsyncCallback<UserInfoDTO> callback = new AsyncCallback<UserInfoDTO>() {
@Override
public void onFailure(final Throwable caught) {
Modified: trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -23,7 +23,8 @@
String getEmail();
- String getLongName();
+ //
+ // String getLongName();
String getRegisterPassword();
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -34,6 +34,7 @@
public abstract class SignInAbstractPresenter<V extends View, Proxy_ extends Proxy<?>> extends
Presenter<View, Proxy<?>> {
+ protected final UserPassAutocompleteManager autocomplete;
protected final CookiesManager cookiesManager;
protected final I18nUITranslationService i18n;
protected final Session session;
@@ -41,12 +42,13 @@
public SignInAbstractPresenter(final EventBus eventBus, final View view, final Proxy<?> proxy,
final Session session, final StateManager stateManager, final I18nUITranslationService i18n,
- final CookiesManager cookiesManager) {
+ final CookiesManager cookiesManager, final UserPassAutocompleteManager autocomplete) {
super(eventBus, view, proxy);
this.session = session;
this.stateManager = stateManager;
this.i18n = i18n;
this.cookiesManager = cookiesManager;
+ this.autocomplete = autocomplete;
}
@Override
@@ -85,4 +87,10 @@
stateManager.restorePreviousToken();
}
+ protected void saveAutocompleteLoginData(final String nickOrEmail, final String password) {
+ autocomplete.setNickOrEmail(nickOrEmail);
+ autocomplete.setPassword(password);
+ autocomplete.clickFormLogin();
+ }
+
}
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -58,7 +58,7 @@
loginPassField.setValidationDelay(1000);
loginPassField.setId(PASSWORD_FIELD);
loginPassField.setTabIndex(101);
- loginPassField.addListener(Events.Change, new Listener<FieldEvent>() {
+ loginPassField.addListener(Events.OnKeyPress, new Listener<FieldEvent>() {
@Override
public void handleEvent(final FieldEvent fe) {
if (fe.getEvent().getKeyCode() == 13) {
@@ -74,6 +74,10 @@
loginNickOrEmailField.focus();
}
+ public void focusOnPassword() {
+ loginPassField.focus();
+ }
+
public String getLoginPassword() {
return loginPassField.getValue();
}
@@ -85,4 +89,12 @@
public Field<String> getNickOrEmailField() {
return loginNickOrEmailField;
}
+
+ public void setLoginPassword(final String password) {
+ loginPassField.setValue(password);
+ }
+
+ public void setNickOrEmail(final String nickOrEmail) {
+ loginNickOrEmailField.setValue(nickOrEmail);
+ }
}
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -53,7 +53,6 @@
// }
final VerticalPanel panel = new VerticalPanel();
- // panel.setBorder(false);
signInForm = new SignInForm(i18n);
signInForm.setWidth(370);
panel.add(signInForm.getFormPanel());
@@ -84,6 +83,11 @@
}
@Override
+ public void focusOnPassword() {
+ signInForm.focusOnPassword();
+ }
+
+ @Override
public HasClickHandlers getAccountRegister() {
return registerLabel;
}
@@ -113,6 +117,16 @@
}
@Override
+ public void setLoginPassword(final String password) {
+ signInForm.setLoginPassword(password);
+ }
+
+ @Override
+ public void setNickOrEmail(final String nickOrEmail) {
+ signInForm.setNickOrEmail(nickOrEmail);
+ }
+
+ @Override
public void show() {
super.show();
KuneUiUtils.focusOnField(getNickname());
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -20,6 +20,9 @@
package cc.kune.core.client.auth;
import cc.kune.common.client.noti.NotifyLevel;
+import cc.kune.common.client.utils.TextUtils;
+import cc.kune.common.client.utils.TimerWrapper;
+import cc.kune.common.client.utils.TimerWrapper.Executer;
import cc.kune.core.client.cookies.CookiesManager;
import cc.kune.core.client.errors.UserAuthException;
import cc.kune.core.client.i18n.I18nUITranslationService;
@@ -52,20 +55,22 @@
@ProxyCodeSplit
public interface SignInProxy extends Proxy<SignInPresenter> {
}
-
private final EventBus eventBus;
private final Provider<Register> registerProvider;
+ private final TimerWrapper timer;
private final UserServiceAsync userService;
@Inject
public SignInPresenter(final EventBus eventBus, final SignInView view, final SignInProxy proxy,
final Session session, final StateManager stateManager, final I18nUITranslationService i18n,
final UserServiceAsync userService, final Provider<Register> registerProvider,
- final CookiesManager cookiesManager) {
- super(eventBus, view, proxy, session, stateManager, i18n, cookiesManager);
+ final CookiesManager cookiesManager, final UserPassAutocompleteManager autocomplete,
+ final TimerWrapper timeWrapper) {
+ super(eventBus, view, proxy, session, stateManager, i18n, cookiesManager, autocomplete);
this.eventBus = eventBus;
this.userService = userService;
this.registerProvider = registerProvider;
+ this.timer = timeWrapper;
}
@Override
@@ -79,6 +84,19 @@
// getView().center();
eventBus.fireEvent(new ProgressHideEvent());
getView().focusOnNickname();
+ timer.configure(new Executer() {
+ @Override
+ public void execute() {
+ final String savedLogin = autocomplete.getNickOrEmail();
+ final String savedPasswd = autocomplete.getPassword();
+ if (TextUtils.notEmpty(savedLogin)) {
+ getView().setNickOrEmail(savedLogin);
+ getView().setLoginPassword(savedPasswd);
+ getView().focusOnPassword();
+ }
+ }
+ });
+ timer.schedule(500);
}
}
@@ -114,6 +132,7 @@
@Override
public void onClose(final CloseEvent<PopupPanel> event) {
+ Log.debug("Closing register presenter");
SignInPresenter.this.onClose();
}
});
@@ -137,7 +156,7 @@
final UserDTO user = new UserDTO();
user.setShortName(nickOrEmail);
user.setPassword(passwd);
-
+ saveAutocompleteLoginData(nickOrEmail, passwd);
final AsyncCallback<UserInfoDTO> callback = new AsyncCallback<UserInfoDTO>() {
@Override
public void onFailure(final Throwable caught) {
@@ -168,4 +187,5 @@
protected void revealInParent() {
RevealRootContentEvent.fire(this, this);
}
+
}
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInView.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInView.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInView.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -25,6 +25,8 @@
void focusOnNickname();
+ void focusOnPassword();
+
HasClickHandlers getAccountRegister();
String getLoginPassword();
@@ -33,6 +35,10 @@
boolean isSignInFormValid();
+ void setLoginPassword(String password);
+
+ void setNickOrEmail(String nickOrEmail);
+
void validate();
}
Added: trunk/src/main/java/cc/kune/core/client/auth/UserPassAutocompleteManager.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/UserPassAutocompleteManager.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/auth/UserPassAutocompleteManager.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,15 @@
+package cc.kune.core.client.auth;
+
+public interface UserPassAutocompleteManager {
+
+ void clickFormLogin();
+
+ String getNickOrEmail();
+
+ String getPassword();
+
+ void setNickOrEmail(String username);
+
+ void setPassword(String password);
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/auth/UserPassAutocompleteManager.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/core/client/auth/UserPassAutocompleteManagerImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/UserPassAutocompleteManagerImpl.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/auth/UserPassAutocompleteManagerImpl.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,43 @@
+package cc.kune.core.client.auth;
+
+import com.google.gwt.user.client.DOM;
+
+/**
+ * Implementation <a href=
+ * "http://stackoverflow.com/questions/1245174/is-it-possible-to-implement-cross-browser-username-password-autocomplete-in-gxt"
+ * >based in this</a>
+ */
+public class UserPassAutocompleteManagerImpl implements UserPassAutocompleteManager {
+
+ private static final String VALUE = "value";
+
+ public static native String getElementValue(String domId) /*-{
+ return $doc.getElementById(domId).value;
+ }-*/;
+
+ @Override
+ public native void clickFormLogin() /*-{
+ $doc.getElementById("login").click();
+ }-*/;
+
+ @Override
+ public String getNickOrEmail() {
+ return getElementValue("username");
+ }
+
+ @Override
+ public String getPassword() {
+ return getElementValue("password");
+ }
+
+ @Override
+ public void setNickOrEmail(final String username) {
+ DOM.getElementById("username").setAttribute(VALUE, username);
+ }
+
+ @Override
+ public void setPassword(final String password) {
+ DOM.getElementById("password").setAttribute(VALUE, password);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/auth/UserPassAutocompleteManagerImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/core/client/logs/EventBusWithLogging.java (from rev 1225, trunk/src/main/java/cc/kune/core/client/logs/EventsLogger.java)
===================================================================
--- trunk/src/main/java/cc/kune/core/client/logs/EventBusWithLogging.java (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/logs/EventBusWithLogging.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,12 @@
+package cc.kune.core.client.logs;
+
+import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.event.shared.SimpleEventBus;
+
+public class EventBusWithLogging extends SimpleEventBus {
+ @Override
+ public void fireEvent(final GwtEvent<?> event) {
+ Log.debug("Kune " + event.toDebugString());
+ super.fireEvent(event);
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/core/client/logs/EventBusWithLogging.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/src/main/java/cc/kune/core/client/logs/EventsLogger.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/logs/EventsLogger.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/logs/EventsLogger.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,44 +0,0 @@
-package cc.kune.core.client.logs;
-
-import cc.kune.core.client.i18n.I18nReadyEvent;
-import cc.kune.core.client.init.AppStartEvent;
-import cc.kune.core.client.state.UserSignInEvent;
-import cc.kune.core.client.state.UserSignOutEvent;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.shared.EventBus;
-import com.google.inject.Inject;
-
-public class EventsLogger {
-
- @Inject
- public EventsLogger(final EventBus eventBus) {
- eventBus.addHandler(AppStartEvent.getType(), new AppStartEvent.AppStartHandler() {
- @Override
- public void onAppStart(final AppStartEvent event) {
- GWT.log("App Started");
- }
- });
- eventBus.addHandler(I18nReadyEvent.getType(), new I18nReadyEvent.I18nReadyHandler() {
-
- @Override
- public void onI18nReady(final I18nReadyEvent event) {
- GWT.log("I18n Ready");
- }
- });
- eventBus.addHandler(UserSignOutEvent.getType(), new UserSignOutEvent.UserSignOutHandler() {
-
- @Override
- public void onUserSignOut(final UserSignOutEvent event) {
- GWT.log("User signed out");
- }
- });
- eventBus.addHandler(UserSignInEvent.getType(), new UserSignInEvent.UserSignInHandler() {
-
- @Override
- public void onUserSignIn(final UserSignInEvent event) {
- GWT.log("User signed in");
- }
- });
- }
-}
Modified: trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierViewImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierViewImpl.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifierViewImpl.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -7,6 +7,7 @@
import cc.kune.msgs.client.UserMessagesPresenter;
import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.gwtplatform.mvp.client.PopupViewImpl;
@@ -16,7 +17,7 @@
private final PopupBottomPanel popup;
@Inject
- public UserNotifierViewImpl(EventBus eventBus, UserMessagesPresenter msgs, UserMessagesPanel panel) {
+ public UserNotifierViewImpl(final EventBus eventBus, final UserMessagesPresenter msgs, final UserMessagesPanel panel) {
super(eventBus);
this.msgs = msgs;
msgs.init(panel);
@@ -32,7 +33,7 @@
}
@Override
- public void notify(UserNotifyEvent event) {
+ public void notify(final UserNotifyEvent event) {
msgs.add(event.getLevel(), event.getTitle(), event.getMessage(), event.getCloseable(), new CloseCallback() {
@Override
public void onClose() {
@@ -40,6 +41,7 @@
}
});
popup.setCenterPosition();
+ DOM.setStyleAttribute(popup.getElement(), "zIndex", "100000");
}
}
Modified: trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifyEvent.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifyEvent.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/notify/msgs/UserNotifyEvent.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -6,7 +6,6 @@
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.event.shared.HasHandlers;
-import com.gwtplatform.mvp.client.HasEventBus;
public class UserNotifyEvent extends GwtEvent<UserNotifyEvent.UserNotifyHandler> {
@@ -20,20 +19,22 @@
private static final Type<UserNotifyHandler> TYPE = new Type<UserNotifyHandler>();
- public static void fire(HasEventBus source, NotifyLevel level, java.lang.String message) {
+ public static void fire(final HasHandlers source, final NotifyLevel level, final java.lang.String message) {
source.fireEvent(new UserNotifyEvent(level, "", message));
}
- public static void fire(HasEventBus source, NotifyLevel level, java.lang.String message, Boolean closeable) {
+ public static void fire(final HasHandlers source, final NotifyLevel level, final java.lang.String message,
+ final Boolean closeable) {
source.fireEvent(new UserNotifyEvent(level, "", message, closeable));
}
- public static void fire(HasEventBus source, NotifyLevel level, java.lang.String title, java.lang.String message) {
+ public static void fire(final HasHandlers source, final NotifyLevel level, final java.lang.String title,
+ final java.lang.String message) {
source.fireEvent(new UserNotifyEvent(level, title, message));
}
- public static void fire(HasEventBus source, NotifyLevel level, java.lang.String title, java.lang.String message,
- Boolean closeable) {
+ public static void fire(final HasHandlers source, final NotifyLevel level, final java.lang.String title,
+ final java.lang.String message, final Boolean closeable) {
source.fireEvent(new UserNotifyEvent(level, title, message, closeable));
}
@@ -46,31 +47,32 @@
private final java.lang.String message;
private final java.lang.String title;
- public UserNotifyEvent(NotifyLevel level, java.lang.String message) {
+ public UserNotifyEvent(final NotifyLevel level, final java.lang.String message) {
this(level, "", message, false);
}
- public UserNotifyEvent(NotifyLevel level, java.lang.String message, Boolean closeable) {
+ public UserNotifyEvent(final NotifyLevel level, final java.lang.String message, final Boolean closeable) {
this(level, "", message, closeable);
}
- public UserNotifyEvent(NotifyLevel level, java.lang.String title, java.lang.String message) {
+ public UserNotifyEvent(final NotifyLevel level, final java.lang.String title, final java.lang.String message) {
this(level, title, message, false);
}
- public UserNotifyEvent(NotifyLevel level, java.lang.String title, java.lang.String message, Boolean closeable) {
+ public UserNotifyEvent(final NotifyLevel level, final java.lang.String title, final java.lang.String message,
+ final Boolean closeable) {
this.level = level;
this.title = title;
this.message = message;
this.closeable = closeable;
}
- public UserNotifyEvent(String message) {
+ public UserNotifyEvent(final String message) {
this(NotifyLevel.info, message);
}
@Override
- protected void dispatch(UserNotifyHandler handler) {
+ protected void dispatch(final UserNotifyHandler handler) {
handler.onUserNotify(this);
}
Modified: trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -54,6 +54,9 @@
@Source("arrow-up-green.png")
ImageResource arrowUpGreen();
+ @Source("browser-32.png")
+ ImageResource browser32();
+
@Source("bullet_add.png")
ImageResource bulletAdd();
@@ -234,6 +237,9 @@
@Source("cancel.png")
ImageResource cancel();
+ @Source("cancel-32.png")
+ ImageResource cancel32();
+
@Source("clear.png")
ImageResource clear();
@@ -279,6 +285,9 @@
@Source("important.png")
ImageResource important();
+ @Source("important-32.png")
+ ImageResource important32();
+
@Source("info.png")
ImageResource info();
Added: trunk/src/main/java/cc/kune/core/client/resources/browser-32.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/browser-32.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/resources/cancel-32.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/cancel-32.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/client/resources/important-32.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/important-32.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -4,15 +4,17 @@
import cc.kune.common.client.actions.Action;
import cc.kune.common.client.actions.ActionEvent;
import cc.kune.common.client.actions.ui.IsActionExtensible;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
-import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.actions.ui.descrip.MenuSeparatorDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
+import cc.kune.common.client.ui.KuneWindowUtils;
import cc.kune.core.client.init.AppStartEvent;
import cc.kune.core.client.notify.msgs.UserNotifyEvent;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.resources.icons.IconResources;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.gwt.event.shared.EventBus;
@@ -26,20 +28,26 @@
import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;
public class SitebarActionsPresenter extends
- Presenter<SitebarActionsPresenter.SitebarActionsView, SitebarActionsPresenter.SitebarActionsProxy> implements
- IsActionExtensible {
+ Presenter<SitebarActionsPresenter.SitebarActionsView, SitebarActionsPresenter.SitebarActionsProxy> {
@ProxyCodeSplit
public interface SitebarActionsProxy extends Proxy<SitebarActionsPresenter> {
}
- public interface SitebarActionsView extends View, IsActionExtensible {
+ public interface SitebarActionsView extends View {
+
+ IsActionExtensible getLeftBar();
+
+ IsActionExtensible getRightBar();
}
+ public static final MenuDescriptor OPTIONS_MENU = new MenuDescriptor();
public static final ToolbarDescriptor TOOLBAR = new ToolbarDescriptor();
private final I18nTranslationService i18n;
+ private final IconResources icons;
private final Provider<SitebarNewGroupLink> newGroupLink;
- private MenuDescriptor optionsMenu;
+
+ private final CoreResources res;
private final Provider<SitebarSignInLink> signInLink;
private final Provider<SitebarSignOutLink> signOutLink;
@@ -47,36 +55,30 @@
public SitebarActionsPresenter(final EventBus eventBus, final SitebarActionsView view,
final SitebarActionsProxy proxy, final I18nTranslationService i18n,
final Provider<SitebarNewGroupLink> newGroupLink, final Provider<SitebarSignOutLink> signOutLink,
- final Provider<SitebarSignInLink> signInLink) {
+ final Provider<SitebarSignInLink> signInLink, final CoreResources res, final IconResources icons) {
super(eventBus, view, proxy);
this.i18n = i18n;
this.newGroupLink = newGroupLink;
this.signOutLink = signOutLink;
this.signInLink = signInLink;
+ this.res = res;
+ this.icons = icons;
}
- @Override
- public void addAction(final AbstractGuiActionDescrip action) {
- getView().addAction(action);
+ public IsActionExtensible getLeftToolbar() {
+ return getView().getLeftBar();
}
- @Override
- public void addActions(final AbstractGuiActionDescrip... actions) {
- getView().addActions(actions);
-
+ public MenuDescriptor getOptionsMenu() {
+ return OPTIONS_MENU;
}
- @Override
- public void addActions(final GuiActionDescCollection actions) {
- getView().addActions(actions);
+ public IsActionExtensible getRightToolbar() {
+ return getView().getRightBar();
}
- public MenuDescriptor getOptionsMenu() {
- return optionsMenu;
- }
-
public void init() {
- optionsMenu = new MenuDescriptor(i18n.t("Options"));
+ OPTIONS_MENU.putValue(Action.NAME, i18n.t("Options"));
final AbstractExtendedAction action = new AbstractExtendedAction() {
@Override
public void actionPerformed(final ActionEvent event) {
@@ -84,22 +86,54 @@
}
};
action.putValue(Action.NAME, "Test");
- final MenuItemDescriptor mItem = new MenuItemDescriptor(optionsMenu, action);
- optionsMenu.setStyles("k-no-backimage, k-btn-sitebar");
+ final MenuItemDescriptor testMenuItem = new MenuItemDescriptor(OPTIONS_MENU, action);
+ OPTIONS_MENU.setStyles("k-no-backimage, k-btn-sitebar");
final ToolbarSeparatorDescriptor separator = new ToolbarSeparatorDescriptor(Type.separator,
SitebarActionsPresenter.TOOLBAR);
+ final ToolbarSeparatorDescriptor separator2 = new ToolbarSeparatorDescriptor(Type.separator,
+ SitebarActionsPresenter.TOOLBAR);
final ToolbarSeparatorDescriptor spacer = new ToolbarSeparatorDescriptor(Type.spacer,
SitebarActionsPresenter.TOOLBAR);
- addAction(TOOLBAR);
- addAction(signInLink.get());
- addAction(signOutLink.get());
- addAction(spacer);
- addAction(separator);
- addAction(newGroupLink.get());
- addAction(spacer);
- addAction(separator);
- addAction(optionsMenu);
- addAction(mItem);
+ final IsActionExtensible right = getView().getRightBar();
+
+ final MenuSeparatorDescriptor sep = new MenuSeparatorDescriptor(OPTIONS_MENU);
+ final AbstractExtendedAction bugsAction = new AbstractExtendedAction() {
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ KuneWindowUtils.open("http://kune.ourproject.org/issues/");
+ }
+ };
+ bugsAction.putValue(Action.NAME, i18n.t("Report Kune issues/problems"));
+ bugsAction.putValue(Action.SMALL_ICON, icons.bug());
+ final MenuItemDescriptor bugs = new MenuItemDescriptor(OPTIONS_MENU, bugsAction);
+
+ // final KeyStroke shortcut = Shortcut.getShortcut(true, true, false,
+ // false, Character.valueOf('K'));
+ final AbstractExtendedAction aboutAction = new AbstractExtendedAction() {
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ // view.showAboutDialog();
+ }
+ };
+
+ aboutAction.putValue(Action.NAME, i18n.t("About kune"));
+ aboutAction.putValue(Action.SMALL_ICON, res.kuneIcon16());
+ // aboutAction.setShortcut(shortcut);
+ // shortcutReg.put(shortcut, aboutAction);
+ right.addAction(TOOLBAR);
+ // addAction(separator);
+ right.addAction(OPTIONS_MENU);
+ right.addAction(signInLink.get());
+ right.addAction(signOutLink.get());
+ // addAction(spacer);
+ // addAction(separator2);
+ right.addAction(newGroupLink.get());
+ // addAction(spacer);
+ right.addAction(testMenuItem);
+ right.addAction(sep);
+ right.addAction(bugs);
+ right.addAction(new MenuItemDescriptor(OPTIONS_MENU, aboutAction));
+
}
@ProxyEvent
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsViewImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsViewImpl.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsViewImpl.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,10 +1,9 @@
package cc.kune.core.client.sitebar;
import cc.kune.common.client.actions.ui.ActionSimplePanel;
-import cc.kune.common.client.actions.ui.descrip.AbstractGuiActionDescrip;
-import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
+import cc.kune.common.client.actions.ui.IsActionExtensible;
import cc.kune.core.client.sitebar.SitebarActionsPresenter.SitebarActionsView;
-import cc.kune.wspace.client.WsArmor;
+import cc.kune.gspace.client.WsArmor;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
@@ -12,40 +11,35 @@
public class SitebarActionsViewImpl extends ViewImpl implements SitebarActionsView {
- private final ActionSimplePanel panel;
+ private final ActionSimplePanel toolbarLeft;
+ private final ActionSimplePanel toolbarRight;
@Inject
- public SitebarActionsViewImpl(final WsArmor armor, final ActionSimplePanel panel) {
- this.panel = panel;
- panel.addStyleName("k-sitebar");
- panel.addStyleName("k-floatright");
- armor.getSitebar().add(panel);
- // armor.getDocContainer().add(panel);
- // panel.setWidth("100%");
+ public SitebarActionsViewImpl(final WsArmor armor, final ActionSimplePanel toolbarRight,
+ final ActionSimplePanel toolbarLeft) {
+ this.toolbarRight = toolbarRight;
+ this.toolbarLeft = toolbarLeft;
+ toolbarRight.addStyleName("k-sitebar");
+ toolbarRight.addStyleName("k-floatright");
+ toolbarLeft.addStyleName("k-sitebar");
+ toolbarLeft.addStyleName("k-floatleft");
+ armor.getSitebar().add(toolbarLeft);
+ armor.getSitebar().add(toolbarRight);
}
@Override
- public void addAction(final AbstractGuiActionDescrip action) {
- panel.addAction(action);
+ public Widget asWidget() {
+ return toolbarRight;
}
@Override
- public void addActions(final AbstractGuiActionDescrip... actions) {
- for (final AbstractGuiActionDescrip action : actions) {
- this.addAction(action);
- }
+ public IsActionExtensible getLeftBar() {
+ return toolbarLeft;
}
@Override
- public void addActions(final GuiActionDescCollection actions) {
- for (final AbstractGuiActionDescrip action : actions) {
- this.addAction(action);
- }
+ public IsActionExtensible getRightBar() {
+ return toolbarRight;
}
- @Override
- public Widget asWidget() {
- return panel;
- }
-
}
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoViewImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoViewImpl.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoViewImpl.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,7 +1,7 @@
package cc.kune.core.client.sitebar.logo;
import cc.kune.core.client.sitebar.logo.SiteLogoPresenter.SiteLogoView;
-import cc.kune.wspace.client.WsArmor;
+import cc.kune.gspace.client.WsArmor;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -5,7 +5,7 @@
import cc.kune.core.client.init.AppStartEvent;
import cc.kune.core.client.state.Session;
import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.wspace.client.WsArmor;
+import cc.kune.gspace.client.WsArmor;
import com.google.gwt.event.shared.EventBus;
import com.google.inject.Inject;
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -2,7 +2,7 @@
import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter.SpaceSelectorView;
import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.wspace.client.WsArmor;
+import cc.kune.gspace.client.WsArmor;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.ui.xml 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.ui.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -2,27 +2,27 @@
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui">
<ui:with field='img'
- type='cc.kune.wspace.client.resources.WsArmorResources' />
+ type='cc.kune.gspace.client.resources.WsArmorResources' />
<g:HorizontalPanel ui:field="panel" addStyleNames="k-space-sel k-10corners k-floatleft k-pointer" >
<g:ToggleButton ui:field="homeButton" styleName="k-space-sel-btn">
<g:upFace image='{img.homeSpaceDisabled}' />
<g:downFace image='{img.homeSpaceEnabled}' />
- <g:upHoveringFace image='{img.homeSpaceEnabled}' />
+<!-- <g:upHoveringFace image='{img.homeSpaceEnabled}' />-->
</g:ToggleButton>
<g:ToggleButton ui:field="userButton" styleName="k-space-sel-btn">
<g:upFace image='{img.userSpaceDisabled}' />
<g:downFace image='{img.userSpaceEnabled}' />
- <g:upHoveringFace image='{img.userSpaceEnabled}' />
+<!-- <g:upHoveringFace image='{img.userSpaceEnabled}' />-->
</g:ToggleButton>
<g:ToggleButton ui:field="groupButton" styleName="k-space-sel-btn">
<g:upFace image='{img.groupSpaceDisabled}' />
<g:downFace image='{img.groupSpaceEnabled}' />
- <g:upHoveringFace image='{img.groupSpaceEnabled}' />
+<!-- <g:upHoveringFace image='{img.groupSpaceEnabled}' />-->
</g:ToggleButton>
<g:ToggleButton ui:field="publicButton" styleName="k-space-sel-btn">
<g:upFace image='{img.publicSpaceDisabled}' />
<g:downFace image='{img.publicSpaceEnabled}' />
- <g:upHoveringFace image='{img.publicSpaceEnabled}' />
+<!-- <g:upHoveringFace image='{img.publicSpaceEnabled}' />-->
</g:ToggleButton>
</g:HorizontalPanel>
</ui:UiBinder>
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,5 +1,6 @@
/*
*
+
* Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
* This file is part of kune.
*
@@ -120,6 +121,7 @@
@Override
public void gotoToken(final String token) {
+ Log.debug("StateManager: history goto-string-token newItem (" + token + ")");
gotoToken(new StateToken(token));
}
Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -86,10 +86,18 @@
firstBtn.ensureDebugId(id);
}
+ public void setFirstBtnTabIndex(final int index) {
+ firstBtn.setTabIndex(index);
+ }
+
public void setSecondBtnId(final String id) {
secondBtn.ensureDebugId(id);
}
+ public void setSecondBtnTabIndex(final int index) {
+ secondBtn.setTabIndex(index);
+ }
+
public void setTitleIcon(final String icon) {
if (TextUtils.notEmpty(icon)) {
title.setIcon(icon);
Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -26,6 +26,8 @@
super.getSecondBtnText().setText(cancelButtonTitle);
super.setFirstBtnId(firstButtonId);
super.setSecondBtnId(cancelButtonId);
+ super.setFirstBtnTabIndex(tabIndexStart);
+ super.setSecondBtnTabIndex(tabIndexStart + 1);
}
public HasCloseHandlers<PopupPanel> getClose() {
Deleted: trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,20 +0,0 @@
-package cc.kune.core.client.ws;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.inject.Inject;
-import com.gwtplatform.mvp.client.proxy.PlaceManagerImpl;
-import com.gwtplatform.mvp.client.proxy.TokenFormatter;
-
- at Deprecated
-public class CorePlaceManager extends PlaceManagerImpl {
-
- @Inject
- public CorePlaceManager(final EventBus eventBus, final TokenFormatter tokenFormatter) {
- super(eventBus, tokenFormatter);
- }
-
- @Override
- public void revealDefaultPlace() {
- // revealPlace(new PlaceRequest(CorePresenter.HOME_TOKEN));
- }
-}
Modified: trunk/src/main/java/cc/kune/core/client/ws/CoreViewImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ws/CoreViewImpl.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/client/ws/CoreViewImpl.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -2,8 +2,8 @@
import cc.kune.core.client.resources.CoreResources;
import cc.kune.core.client.state.StateManagerDefault;
-import cc.kune.wspace.client.WsArmorImpl;
-import cc.kune.wspace.client.resources.WsArmorResources;
+import cc.kune.gspace.client.WsArmorImpl;
+import cc.kune.gspace.client.resources.WsArmorResources;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.History;
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-01-31 18:51:35 UTC (rev 1228)
@@ -368,260 +368,297 @@
}
.x-btn button {
- font: 18px/27px 'Ubuntu', arial;
+ font: 18px/27px 'Ubuntu', arial;
}
-.k-btn-sitebar button {
- font: 13px 'Ubuntu', arial;
- color:#B3B3B3;
- cursor:pointer;
- text-decoration:underline;
- white-space:nowrap;
- margin-top: -5px;
+.k-btn-sitebar button {
+ font: 13px 'Ubuntu', arial;
+ color: #B3B3B3;
+ cursor: pointer;
+ text-decoration: underline;
+ white-space: nowrap;
+ margin-top: -5px;
}
-.k-sitebar {
- /* margin-top: -30px; */
+.k-sitebar { /* margin-top: -30px; */
+
}
.k-link {
- text-decoration: underline;
- color: green;
- cursor: pointer;
+ text-decoration: underline;
+ color: green;
+ cursor: pointer;
}
-
/* Margins */
-
.kune-Margin-40-trbl {
- margin: 40px;
+ margin: 40px;
}
.kune-Margin-40-lr {
- margin-left: 40px;
- margin-right: 40px;
+ margin-left: 40px;
+ margin-right: 40px;
}
.kune-Margin-40-tl {
- margin-top: 40px;
- margin-left: 40px;
+ margin-top: 40px;
+ margin-left: 40px;
}
.kune-Margin-40-tb {
- margin-top: 40px;
- margin-bottom: 40px;
+ margin-top: 40px;
+ margin-bottom: 40px;
}
.kune-Margin-40-t {
- margin-top: 40px;
+ margin-top: 40px;
}
.kune-Margin-40-r {
- margin-right: 40px;
+ margin-right: 40px;
}
.kune-Margin-40-l {
- margin-left: 40px;
+ margin-left: 40px;
}
.kune-Margin-20-trbl {
- margin: 20px;
+ margin: 20px;
}
.kune-Margin-20-lr {
- margin-left: 20px;
- margin-right: 20px;
+ margin-left: 20px;
+ margin-right: 20px;
}
.kune-Margin-20-tl {
- margin-top: 20px;
- margin-left: 20px;
+ margin-top: 20px;
+ margin-left: 20px;
}
.kune-Margin-20-tb {
- margin-top: 20px;
- margin-bottom: 20px;
+ margin-top: 20px;
+ margin-bottom: 20px;
}
.kune-Margin-20-t {
- margin-top: 20px;
+ margin-top: 20px;
}
.kune-Margin-20-r {
- margin-right: 20px;
+ margin-right: 20px;
}
.kune-Margin-20-l {
- margin-left: 20px;
+ margin-left: 20px;
}
.kune-Margin-Large-trbl {
- margin: 10px;
+ margin: 10px;
}
.kune-Margin-Large-lr {
- margin-left: 10px;
- margin-right: 10px;
+ margin-left: 10px;
+ margin-right: 10px;
}
.kune-Margin-Large-tl {
- margin-top: 10px;
- margin-left: 10px;
+ margin-top: 10px;
+ margin-left: 10px;
}
.kune-Margin-Large-tb {
- margin-top: 10px;
- margin-bottom: 10px;
+ margin-top: 10px;
+ margin-bottom: 10px;
}
.kune-Margin-Large-t {
- margin-top: 10px;
+ margin-top: 10px;
}
.kune-Margin-Large-r {
- margin-right: 10px;
+ margin-right: 10px;
}
.kune-Margin-Large-l {
- margin-left: 10px;
+ margin-left: 10px;
}
.kune-Margin-7-trbl {
- margin: 7px;
+ margin: 7px;
}
.kune-Margin-7-lr {
- margin-left: 7px;
- margin-right: 7px;
+ margin-left: 7px;
+ margin-right: 7px;
}
.kune-Margin-7-tl {
- margin-top: 7px;
- margin-left: 7px;
+ margin-top: 7px;
+ margin-left: 7px;
}
.kune-Margin-7-tb {
- margin-top: 7px;
- margin-bottom: 7px;
+ margin-top: 7px;
+ margin-bottom: 7px;
}
.kune-Margin-7-t {
- margin-top: 7px;
+ margin-top: 7px;
}
.kune-Margin-7-r {
- margin-right: 7px;
+ margin-right: 7px;
}
.kune-Margin-7-b {
- margin-bottom: 7px;
+ margin-bottom: 7px;
}
.kune-Margin-7-l {
- margin-left: 7px;
+ margin-left: 7px;
}
.kune-Margin-Medium-trbl {
- margin: 5px;
+ margin: 5px;
}
.kune-Margin-Medium-lr {
- margin-left: 5px;
- margin-right: 5px;
+ margin-left: 5px;
+ margin-right: 5px;
}
.kune-Margin-Medium-tl {
- margin-top: 5px;
- margin-left: 5px;
+ margin-top: 5px;
+ margin-left: 5px;
}
.kune-Margin-Medium-tb {
- margin-top: 5px;
- margin-bottom: 5px;
+ margin-top: 5px;
+ margin-bottom: 5px;
}
.kune-Margin-Medium-t {
- margin-top: 5px;
+ margin-top: 5px;
}
.kune-Margin-Medium-r {
- margin-right: 5px;
+ margin-right: 5px;
}
.kune-Margin-Medium-b {
- margin-bottom: 5px;
+ margin-bottom: 5px;
}
.kune-Margin-Medium-l {
- margin-left: 5px;
+ margin-left: 5px;
}
.kune-Margin-Small-trbl {
- margin: 3px;
+ margin: 3px;
}
.kune-Margin-Small-lr {
- margin-left: 3px;
- margin-right: 3px;
+ margin-left: 3px;
+ margin-right: 3px;
}
.kune-Margin-Small-tl {
- margin-top: 3px;
- margin-left: 3px;
+ margin-top: 3px;
+ margin-left: 3px;
}
.kune-Margin-Small-tb {
- margin-top: 3px;
- margin-bottom: 3px;
+ margin-top: 3px;
+ margin-bottom: 3px;
}
.kune-Margin-Small-t {
- margin-top: 3px;
+ margin-top: 3px;
}
.kune-Margin-Small-l {
- margin-left: 3px;
+ margin-left: 3px;
}
.kune-Margin-Small-r {
- margin-right: 3px;
+ margin-right: 3px;
}
.kune-Margin-Small-b {
- margin-bottom: 3px;
+ margin-bottom: 3px;
}
.kune-Margin-Mini-trbl {
- margin: 1px;
+ margin: 1px;
}
.kune-Margin-Mini-lr {
- margin-left: 1px;
- margin-right: 1px;
+ margin-left: 1px;
+ margin-right: 1px;
}
.kune-Margin-Mini-tl {
- margin-top: 1px;
- margin-left: 1px;
+ margin-top: 1px;
+ margin-left: 1px;
}
.kune-Margin-Mini-tb {
- margin-top: 1px;
- margin-bottom: 1px;
+ margin-top: 1px;
+ margin-bottom: 1px;
}
.kune-Margin-Mini-t {
- margin-top: 1px;
+ margin-top: 1px;
}
.kune-Margin-Mini-r {
- margin-right: 1px;
+ margin-right: 1px;
}
.kune-Margin-Mini-b {
- margin-bottom: 1px;
+ margin-bottom: 1px;
}
.kune-Margin-Mini-l {
- margin-left: 1px;
+ margin-left: 1px;
}
+
+.k-publicspace-msg {
+ background-color: #E0E0E0;
+}
+
+.k-publicspace-mask { /* background-color: #fff !important;
+ kfilter: alpha(opacity = 68) !important;
+ -moz-opacity: 0.68 !important;
+ -khtml-opacity: 0.68 !important;
+ opacity: 0.68 !important;*/
+
+}
+
+.k-publicspace-panel {
+ margin: 5px;
+ display: table-row;
+}
+
+.k-publicspace-icon {
+ margin: 3px 3px 3px 0;
+ float:left;
+}
+
+.k-publicspace-title {
+ font-weight: bold;
+ display: block;
+ margin-bottom: 5px;
+ font-size: 16px;
+ display: table-caption;
+}
+
+.k-publicspace-description {
+ font-size: 14px;
+ display: table-cell;
+}
+
+.k-publicspace-actions {
+ display: inline;
+}
Modified: trunk/src/main/java/cc/kune/core/public/ws.html
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.html 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/public/ws.html 2011-01-31 18:51:35 UTC (rev 1228)
@@ -41,6 +41,12 @@
</style>
</head>
<body>
+<!-- Autocomplete user/pass -->
+<form method="post" action="javascript:void(0)" style="display: none">
+ <input type="text" id="username" name="username" value=""/>
+ <input type="password" id="password" name="password" value=""/>
+ <input type="submit" value="Login" id="login"/>
+</form>
<!-- RECOMMENDED if your web app will not function without JavaScript enabled -->
<noscript>
<div
Modified: trunk/src/main/java/cc/kune/core/shared/dto/StateTokenUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/dto/StateTokenUtils.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/core/shared/dto/StateTokenUtils.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -3,11 +3,14 @@
import cc.kune.core.client.state.Session;
import cc.kune.core.shared.domain.utils.StateToken;
+import com.google.inject.Inject;
+
public class StateTokenUtils {
+ private static final String SEPARATOR = ".";
private final Session session;
- private static final String SEPARATOR = ".";
+ @Inject
public StateTokenUtils(final Session session) {
this.session = session;
}
Copied: trunk/src/main/java/cc/kune/gspace (from rev 1223, trunk/src/main/java/cc/kune/wspace)
Added: trunk/src/main/java/cc/kune/gspace/GSpace.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/GSpace.gwt.xml (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/GSpace.gwt.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,12 @@
+<!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/src/gwt-module.dtd">
+<module>
+ <inherits name="com.google.gwt.user.User" />
+ <!-- <entry-point class="cc.kune.core.ws.armor.client.WsArmorEntryPoint"
+ /> -->
+ <public path="public" />
+ <source path="client" />
+ <!-- NOTE: this only compiles for chromium/safari ============= -->
+ <!--http://code.google.com/p/google-web-toolkit/issues/detail?id=42 -->
+ <!-- <set-property name="user.agent" value="gecko1_8" /> -->
+ <set-property name="user.agent" value="safari" />
+</module>
\ No newline at end of file
Deleted: trunk/src/main/java/cc/kune/gspace/Wspace.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/wspace/Wspace.gwt.xml 2011-01-24 23:22:16 UTC (rev 1223)
+++ trunk/src/main/java/cc/kune/gspace/Wspace.gwt.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,12 +0,0 @@
-<!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/src/gwt-module.dtd">
-<module>
- <inherits name="com.google.gwt.user.User" />
- <!-- <entry-point class="cc.kune.core.ws.armor.client.WsArmorEntryPoint"
- /> -->
- <public path="public" />
- <source path="client" />
- <!-- NOTE: this only compiles for chromium/safari ============= -->
- <!--http://code.google.com/p/google-web-toolkit/issues/detail?id=42 -->
- <!-- <set-property name="user.agent" value="gecko1_8" /> -->
- <set-property name="user.agent" value="safari" />
-</module>
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/gspace/client/WsArmor.java
===================================================================
--- trunk/src/main/java/cc/kune/wspace/client/WsArmor.java 2011-01-24 23:22:16 UTC (rev 1223)
+++ trunk/src/main/java/cc/kune/gspace/client/WsArmor.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,4 +1,4 @@
-package cc.kune.wspace.client;
+package cc.kune.gspace.client;
import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
Modified: trunk/src/main/java/cc/kune/gspace/client/WsArmorEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/wspace/client/WsArmorEntryPoint.java 2011-01-24 23:22:16 UTC (rev 1223)
+++ trunk/src/main/java/cc/kune/gspace/client/WsArmorEntryPoint.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,6 +1,6 @@
-package cc.kune.wspace.client;
+package cc.kune.gspace.client;
-import cc.kune.wspace.client.resources.WsArmorResources;
+import cc.kune.gspace.client.resources.WsArmorResources;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
@@ -15,7 +15,7 @@
resources.style().ensureInjected();
final RootLayoutPanel rootPanel = RootLayoutPanel.get();
- final WsArmorImpl armor = new WsArmorImpl();
+ final WsArmorImpl armor = new WsArmorImpl(null);
final InlineLabel icons = new InlineLabel("Icons");
final InlineLabel login = new InlineLabel("Login");
final InlineLabel logo = new InlineLabel("Logo");
Modified: trunk/src/main/java/cc/kune/gspace/client/WsArmorImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/wspace/client/WsArmorImpl.java 2011-01-24 23:22:16 UTC (rev 1223)
+++ trunk/src/main/java/cc/kune/gspace/client/WsArmorImpl.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,12 +1,13 @@
-package cc.kune.wspace.client;
+package cc.kune.gspace.client;
+import cc.kune.pspace.client.PSpacePresenter;
+
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
@@ -49,7 +50,7 @@
@UiField
DockLayoutPanel mainpanel;
@UiField
- Frame publicSpace;
+ SimplePanel publicSpace;
@UiField
FlowPanel sitebar;
@UiField
@@ -64,12 +65,12 @@
SimplePanel userSpace;
@Inject
- public WsArmorImpl() {
+ public WsArmorImpl(final PSpacePresenter pspace) {
initWidget(uiBinder.createAndBindUi(this));
groupSpace.setWidgetMinSize(splitEast, 150);
tabs.setStyleName("k-spaces");
homeSpace.add(RootPanel.get("k-home-ini"));
- publicSpace.setUrl("http://www.google.com");
+ publicSpace.add(pspace.getWidget());
userSpace.add(new Label("User space"));
// userSpace.add(new WebClient());
}
Modified: trunk/src/main/java/cc/kune/gspace/client/WsArmorImpl.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/wspace/client/WsArmorImpl.ui.xml 2011-01-24 23:22:16 UTC (rev 1223)
+++ trunk/src/main/java/cc/kune/gspace/client/WsArmorImpl.ui.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,8 +1,8 @@
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
-<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:kp="urn:import:cc.kune.pspace.client"
xmlns:k="urn:import:cc.kune.wspace.client" xmlns:g="urn:import:com.google.gwt.user.client.ui">
<ui:with field='res'
- type='cc.kune.wspace.client.resources.WsArmorResources' />
+ type='cc.kune.gspace.client.resources.WsArmorResources' />
<ui:style>
.frame {
border: 0px;
@@ -105,8 +105,8 @@
</g:tab>
<g:tab>
<g:header size='0' />
- <g:Frame styleName="{style.frame}" width="100%"
- height="100%" ui:field="publicSpace"></g:Frame>
+ <g:SimplePanel ui:field="publicSpace" width="100%"
+ height="100%"></g:SimplePanel>
</g:tab>
</g:TabLayoutPanel>
</g:center>
Modified: trunk/src/main/java/cc/kune/gspace/client/resources/WsArmorResources.java
===================================================================
--- trunk/src/main/java/cc/kune/wspace/client/resources/WsArmorResources.java 2011-01-24 23:22:16 UTC (rev 1223)
+++ trunk/src/main/java/cc/kune/gspace/client/resources/WsArmorResources.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,4 +1,4 @@
-package cc.kune.wspace.client.resources;
+package cc.kune.gspace.client.resources;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.CssResource;
@@ -48,22 +48,22 @@
@Source("def-theme-tools-arrow-left.png")
ImageResource defThemeToolsArrowLeft();
- @Source("wsArmor.css")
- Style style();
+ ImageResource groupSpaceDisabled();
- ImageResource publicSpaceEnabled();
+ ImageResource groupSpaceEnabled();
- ImageResource publicSpaceDisabled();
+ ImageResource homeSpaceDisabled();
- ImageResource userSpaceEnabled();
+ ImageResource homeSpaceEnabled();
- ImageResource userSpaceDisabled();
+ ImageResource publicSpaceDisabled();
- ImageResource homeSpaceEnabled();
+ ImageResource publicSpaceEnabled();
- ImageResource homeSpaceDisabled();
+ @Source("wsArmor.css")
+ Style style();
- ImageResource groupSpaceEnabled();
+ ImageResource userSpaceDisabled();
- ImageResource groupSpaceDisabled();
+ ImageResource userSpaceEnabled();
}
\ No newline at end of file
Deleted: trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css
===================================================================
--- trunk/src/main/java/cc/kune/wspace/client/resources/wsArmor.css 2011-01-24 23:22:16 UTC (rev 1223)
+++ trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,168 +0,0 @@
- at CHARSET "UTF-8";
-
- at external .*;
-.floatLeft {
- float: left;
-}
-
-.mainPanel {
- border: 7px solid white;
-}
-
-.floatRight {
- float: right;
-}
-
-.siteBar {
- overflow: hidden;
-}
-
-.entityHeader {
- -webkit-border-top-left-radius: 10px;
- -moz-border-radius-topleft: 10px;
- border-top-left-radius: 10px;
- background-color: #f4e3d7;
- overflow: hidden;
-}
-
-.entityFooter {
- -webkit-border-bottom-left-radius: 10px;
- -moz-border-radius-bottomleft: 10px;
- border-top-bottom-radius: 10px;
- background-color: #f7ebe3;
- padding: 7px 10px 0px 17px;
- overflow: hidden;
-}
-
-.entityFooter span {
- color: #784421;
- font-size: 16px;
- font-weight: bold;
-}
-
-.entityHeader span {
- font-size: 56px;
- margin-left: 15px;
- color: #550000;
- font-weight: bold;
- font: 'UbuntuBold', Arial;
-}
-
-.docHeader {
- background-color: #c87137;
- overflow: hidden;
-}
-
-.docHeaderArrow {
- position: relative;
- z-index: 10;
- top: -25px;
- left: 10px;
-}
-
-.docHeader span {
- color: #FFF;
- font-size: 28px;
- font-weight: bold;
- margin-left: 15px;
- font: 'UbuntuBold', Arial;
-}
-
-.docSubheader {
- background-color: #f7ebe3;
- padding: 15px 0 0 15px;
- overflow: hidden;
-}
-
-.docSubheaderLeft {
- position: relative;
- top: 0;
- left: -30px;
-}
-
-.docSubheader span {
- color: #784421;
- font-size: 20px;
- font-weight: bold;
-}
-
-.docEditorMargin {
- background-color: #f7ebe3;
-}
-
-.docEditor {
- background-color: #FFF;
- border-left: 1px solid #959595;
- border-right: 1px solid #959595;
- border-top: 1px solid #959595;
- -webkit-border-top-left-radius: 7px;
- -moz-border-radius-topleft: 7px;
- border-top-left-radius: 7px;
- -webkit-border-top-right-radius: 7px;
- -moz-border-radius-topright: 7px;
- border-top-right-radius: 7px;
- padding: 5px;
-}
-
-.docFooter {
- border-left: 1px solid #959595;
- border-right: 1px solid #959595;
- border-bottom: 1px solid #959595;
- background-color: #e3dbdb;
- -webkit-border-bottom-left-radius: 7px;
- -moz-border-radius-bottomleft: 7px;
- border-bottom-left-radius: 7px;
- -webkit-border-bottom-right-radius: 7px;
- -moz-border-radius-bottomright: 7px;
- border-bottom-right-radius: 7px;
- padding: 7px 7px 0 7px;
- overflow: hidden;
-}
-
-.docFooter span {
- color: #784421;
- font-size: 16px;
- font-weight: bold;
-}
-
-.entityTools {
- -webkit-border-top-right-radius: 10px;
- -moz-border-radius-topright: 10px;
- border-top-right-radius: 10px;
- -webkit-border-bottom-right-radius: 10px;
- -moz-border-radius-bottomright: 10px;
- border-bottom-right-radius: 10px;
- background-color: #DEAA87;
-}
-
-.entityToolsNorth {
- margin: 10px;
-}
-
-.entityToolsNorth span {
- color: #a05a2c;
- font-size: 20px;
- font-weight: bold;
-}
-
-.entityToolsCenter {
- margin: 10px;
-}
-
-.entityToolsCenter span {
- color: #FFF;
- font-size: 22px;
- font-weight: bold;
-}
-
-.entityToolsSouth {
- border-top: 2px solid #FFF;
- padding: 10px;
-}
-
-.entityToolsSouth span {
- color: #a05a2c;
- font-size: 20px;
- font-weight: bold;
-}
-
Copied: trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css (from rev 1224, trunk/src/main/java/cc/kune/wspace/client/resources/wsArmor.css)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,171 @@
+ at CHARSET "UTF-8";
+
+ at external .*;
+.floatLeft {
+ float: left;
+}
+
+.mainPanel {
+ border-top: 2px solid white;
+ border-bottom: 7px solid white;
+ border-right: 7px solid white;
+ border-left: 7px solid white;
+}
+
+.floatRight {
+ float: right;
+}
+
+.siteBar {
+ overflow: hidden;
+}
+
+.entityHeader {
+ -webkit-border-top-left-radius: 10px;
+ -moz-border-radius-topleft: 10px;
+ border-top-left-radius: 10px;
+ background-color: #f4e3d7;
+ overflow: hidden;
+}
+
+.entityFooter {
+ -webkit-border-bottom-left-radius: 10px;
+ -moz-border-radius-bottomleft: 10px;
+ border-top-bottom-radius: 10px;
+ background-color: #f7ebe3;
+ padding: 7px 10px 0px 17px;
+ overflow: hidden;
+}
+
+.entityFooter span {
+ color: #784421;
+ font-size: 16px;
+ font-weight: bold;
+}
+
+.entityHeader span {
+ font-size: 56px;
+ margin-left: 15px;
+ color: #550000;
+ font-weight: bold;
+ font: 'UbuntuBold', Arial;
+}
+
+.docHeader {
+ background-color: #c87137;
+ overflow: hidden;
+}
+
+.docHeaderArrow {
+ position: relative;
+ z-index: 10;
+ top: -25px;
+ left: 10px;
+}
+
+.docHeader span {
+ color: #FFF;
+ font-size: 28px;
+ font-weight: bold;
+ margin-left: 15px;
+ font: 'UbuntuBold', Arial;
+}
+
+.docSubheader {
+ background-color: #f7ebe3;
+ padding: 15px 0 0 15px;
+ overflow: hidden;
+}
+
+.docSubheaderLeft {
+ position: relative;
+ top: 0;
+ left: -30px;
+}
+
+.docSubheader span {
+ color: #784421;
+ font-size: 20px;
+ font-weight: bold;
+}
+
+.docEditorMargin {
+ background-color: #f7ebe3;
+}
+
+.docEditor {
+ background-color: #FFF;
+ border-left: 1px solid #959595;
+ border-right: 1px solid #959595;
+ border-top: 1px solid #959595;
+ -webkit-border-top-left-radius: 7px;
+ -moz-border-radius-topleft: 7px;
+ border-top-left-radius: 7px;
+ -webkit-border-top-right-radius: 7px;
+ -moz-border-radius-topright: 7px;
+ border-top-right-radius: 7px;
+ padding: 5px;
+}
+
+.docFooter {
+ border-left: 1px solid #959595;
+ border-right: 1px solid #959595;
+ border-bottom: 1px solid #959595;
+ background-color: #e3dbdb;
+ -webkit-border-bottom-left-radius: 7px;
+ -moz-border-radius-bottomleft: 7px;
+ border-bottom-left-radius: 7px;
+ -webkit-border-bottom-right-radius: 7px;
+ -moz-border-radius-bottomright: 7px;
+ border-bottom-right-radius: 7px;
+ padding: 7px 7px 0 7px;
+ overflow: hidden;
+}
+
+.docFooter span {
+ color: #784421;
+ font-size: 16px;
+ font-weight: bold;
+}
+
+.entityTools {
+ -webkit-border-top-right-radius: 10px;
+ -moz-border-radius-topright: 10px;
+ border-top-right-radius: 10px;
+ -webkit-border-bottom-right-radius: 10px;
+ -moz-border-radius-bottomright: 10px;
+ border-bottom-right-radius: 10px;
+ background-color: #DEAA87;
+}
+
+.entityToolsNorth {
+ margin: 10px;
+}
+
+.entityToolsNorth span {
+ color: #a05a2c;
+ font-size: 20px;
+ font-weight: bold;
+}
+
+.entityToolsCenter {
+ margin: 10px;
+}
+
+.entityToolsCenter span {
+ color: #FFF;
+ font-size: 22px;
+ font-weight: bold;
+}
+
+.entityToolsSouth {
+ border-top: 2px solid #FFF;
+ padding: 10px;
+}
+
+.entityToolsSouth span {
+ color: #a05a2c;
+ font-size: 20px;
+ font-weight: bold;
+}
+
Modified: trunk/src/main/java/cc/kune/msgs/client/UserMessagesPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/msgs/client/UserMessagesPanel.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/cc/kune/msgs/client/UserMessagesPanel.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -14,22 +14,23 @@
public class UserMessagesPanel extends Composite implements UserMessagesView {
+ interface MessagesPanelUiBinder extends UiBinder<Widget, UserMessagesPanel> {
+ }
private static MessagesPanelUiBinder uiBinder = GWT.create(MessagesPanelUiBinder.class);
+
@UiField
VerticalPanel vp;
- interface MessagesPanelUiBinder extends UiBinder<Widget, UserMessagesPanel> {
- }
-
public UserMessagesPanel() {
initWidget(uiBinder.createAndBindUi(this));
}
@Override
- public void add(NotifyLevel level, String title, String message, boolean closeable, CloseCallback closeCallback) {
- UserMessage msg = new UserMessage(level, title, message, closeable, closeCallback);
+ public void add(final NotifyLevel level, final String title, final String message, final boolean closeable,
+ final CloseCallback closeCallback) {
+ final UserMessage msg = new UserMessage(level, title, message, closeable, closeCallback);
vp.add(msg);
- SlideUp anim = new SlideUp(msg.getElement());
+ final SlideUp anim = new SlideUp(msg.getElement());
anim.setDuration(.5);
anim.play();
}
Added: trunk/src/main/java/cc/kune/pspace/PSpace.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/pspace/PSpace.gwt.xml (rev 0)
+++ trunk/src/main/java/cc/kune/pspace/PSpace.gwt.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.1.1//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.1.1/distro-source/core/src/gwt-module.dtd">
+<module>
+ <inherits name="com.google.gwt.user.User" />
+ <source path="client"/>
+</module>
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/pspace/PSpace.gwt.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/pspace/client/PSpaceGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpaceGinModule.java (rev 0)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpaceGinModule.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,19 @@
+package cc.kune.pspace.client;
+
+
+import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
+
+public class PSpaceGinModule extends AbstractPresenterModule {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.google.gwt.inject.client.AbstractGinModule#configure()
+ */
+ @Override
+ protected void configure() {
+ bindPresenter(PSpacePresenter.class, PSpacePresenter.PSpaceView.class, PSpacePanel.class,
+ PSpacePresenter.PSpaceProxy.class);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/pspace/client/PSpaceGinModule.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,85 @@
+package cc.kune.pspace.client;
+
+import cc.kune.common.client.actions.ui.ActionFlowPanel;
+import cc.kune.common.client.actions.ui.IsActionExtensible;
+import cc.kune.common.client.actions.ui.bind.GuiProvider;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.pspace.client.PSpacePresenter.PSpaceView;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.uibinder.client.UiBinder;
+import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Frame;
+import com.google.gwt.user.client.ui.HasText;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.InlineLabel;
+import com.google.gwt.user.client.ui.LayoutPanel;
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.ViewImpl;
+
+public class PSpacePanel extends ViewImpl implements PSpaceView {
+
+ public interface PSpacePanelUiBinder extends UiBinder<Widget, PSpacePanel> {
+ }
+ private static PSpacePanelUiBinder uiBinder = GWT.create(PSpacePanelUiBinder.class);
+
+ private final ActionFlowPanel actionPanel;
+ @UiField
+ SimplePanel actionPanelContainer;
+ @UiField
+ InlineLabel description;
+ @UiField
+ Frame frame;
+ @UiField
+ Image icon;
+ @UiField
+ LayoutPanel mainPanel;
+ @UiField
+ FlowPanel messagePanel;
+ @UiField
+ InlineLabel title;
+ private final Widget widget;
+
+ @Inject
+ public PSpacePanel(final GuiProvider guiProvider, final CoreResources res) {
+ widget = uiBinder.createAndBindUi(this);
+ actionPanel = new ActionFlowPanel(guiProvider);
+ actionPanelContainer.add(actionPanel);
+ final Element layer = mainPanel.getWidgetContainerElement(messagePanel);
+ layer.addClassName("k-publicspace-msg");
+ layer.addClassName("k-opacity80");
+ layer.addClassName("k-box-5shadow");
+ layer.addClassName("k-5corners");
+ icon.setResource(res.browser32());
+ }
+
+ @Override
+ public Widget asWidget() {
+ return widget;
+ }
+
+ @Override
+ public IsActionExtensible getActionPanel() {
+ return actionPanel;
+ }
+
+ @Override
+ public HasText getDescription() {
+ return description;
+ }
+
+ @Override
+ public HasText getTitle() {
+ return title;
+ }
+
+ @Override
+ public void setContentGotoPublicUrl(final String publicUrl) {
+ frame.setUrl(publicUrl);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.ui.xml (rev 0)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.ui.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,27 @@
+<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
+<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
+ xmlns:g="urn:import:com.google.gwt.user.client.ui">
+ <ui:style>
+ .frame {
+ border: 0px;
+ margin: 0px;
+ }
+ </ui:style>
+ <g:LayoutPanel width="100%" height="100%" ui:field="mainPanel">
+ <g:layer left="0px" width="100.0pct" top="0px" height="100.0pct">
+ <g:Frame styleName="{style.frame}" ui:field="frame"
+ width="100%" height="100%" />
+ </g:layer>
+ <g:layer left="0px" width="100.0pct" top="0px" height="100.0pct">
+ <g:HTMLPanel ui:field="mask" styleName="k-publicspace-mask" width="100%" height="100%" />
+ </g:layer>
+ <g:layer left="50px" width="250px" height="100px" bottom="50px">
+ <g:FlowPanel width="250px" height="100px" ui:field="messagePanel" addStyleNames="k-publicspace-panel" >
+ <g:SimplePanel addStyleNames="k-publicspace-icon"><g:Image ui:field="icon" /></g:SimplePanel>
+ <g:InlineLabel ui:field="title" addStyleNames="k-publicspace-title" />
+ <g:InlineLabel ui:field="description" addStyleNames="k-publicspace-description" />
+ <g:SimplePanel ui:field="actionPanelContainer" addStyleNames="k-publicspace-actions" />
+ </g:FlowPanel>
+ </g:layer>
+ </g:LayoutPanel>
+</ui:UiBinder>
\ No newline at end of file
Property changes on: trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.ui.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java (rev 0)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,110 @@
+package cc.kune.pspace.client;
+
+import cc.kune.common.client.actions.ui.IsActionExtensible;
+import cc.kune.core.client.state.StateChangedEvent;
+import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler;
+import cc.kune.core.shared.domain.ContentStatus;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.GroupListDTO;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.core.shared.dto.StateContainerDTO;
+import cc.kune.core.shared.dto.StateContentDTO;
+import cc.kune.core.shared.dto.StateTokenUtils;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.client.ui.HasText;
+import com.google.inject.Inject;
+import com.gwtplatform.mvp.client.Presenter;
+import com.gwtplatform.mvp.client.View;
+import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit;
+import com.gwtplatform.mvp.client.proxy.Proxy;
+import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent;
+
+public class PSpacePresenter extends Presenter<PSpacePresenter.PSpaceView, PSpacePresenter.PSpaceProxy> {
+
+ @ProxyCodeSplit
+ public interface PSpaceProxy extends Proxy<PSpacePresenter> {
+ }
+ public interface PSpaceView extends View {
+
+ IsActionExtensible getActionPanel();
+
+ HasText getDescription();
+
+ HasText getTitle();
+
+ void setContentGotoPublicUrl(String publicUrl);
+ }
+
+ private final I18nTranslationService i18n;
+ private final StateTokenUtils stateTokenUtils;
+
+ @Inject
+ public PSpacePresenter(final EventBus eventBus, final PSpaceView view, final PSpaceProxy proxy,
+ final I18nTranslationService i18n, final StateTokenUtils stateTokenUtils) {
+ super(eventBus, view, proxy);
+ this.i18n = i18n;
+ this.stateTokenUtils = stateTokenUtils;
+ eventBus.addHandler(StateChangedEvent.getType(), new StateChangedHandler() {
+ @Override
+ public void onStateChanged(final StateChangedEvent event) {
+ setState(event.getState());
+ }
+ });
+ }
+
+ @Override
+ protected void onReveal() {
+ super.onReveal();
+ }
+
+ @Override
+ protected void revealInParent() {
+ RevealRootContentEvent.fire(this, this);
+ }
+
+ private void setContentNotPublic() {
+ getView().getTitle().setText(i18n.t("Not Published yet"));
+ getView().getDescription().setText(
+ i18n.t("This is only a preview of how this page will looks like to the general public if you want to publish it"));
+ }
+
+ private void setContentNotPublicable() {
+ getView().getTitle().setText(i18n.t("Not Publicable"));
+ getView().getDescription().setText(i18n.t("This page is not publicable"));
+ getView().setContentGotoPublicUrl("about:blank");
+ }
+
+ private void setContentPublic() {
+ getView().getTitle().setText(i18n.t("Preview"));
+ getView().getDescription().setText(
+ i18n.t("This is only a preview of how this page looks like to the general public."));
+ }
+
+ public void setState(final StateAbstractDTO state) {
+ if (state instanceof StateContainerDTO) {
+ final StateToken token = state.getStateToken();
+ if (((StateContainerDTO) state).getAccessLists().getViewers().getMode().equals(GroupListDTO.EVERYONE)) {
+ final String publicUrl = stateTokenUtils.getPublicUrl(token);
+ // getView().setContentGotoPublicUrl(publicUrl);
+ getView().setContentGotoPublicUrl("http://www.google.com");
+ if (state instanceof StateContentDTO) {
+ final StateContentDTO content = (StateContentDTO) state;
+ if (content.getStatus().equals(ContentStatus.publishedOnline)) {
+ setContentPublic();
+ } else {
+ setContentNotPublic();
+ }
+ } else {
+ setContentPublic();
+ }
+ } else {
+ setContentNotPublic();
+ }
+ } else {
+ setContentNotPublicable();
+ }
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/pspace/client/PSpacePresenter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/org/ourproject/kune/app/server/KuneRackModule.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -91,7 +91,6 @@
installGuiceModules(builder);
builder.add(KuneContainerListener.class);
- // builder.add(WaveContainerListener.class);
builder.exclude("/http-bind.*");
builder.exclude("/public/.*");
@@ -99,13 +98,35 @@
builder.exclude("/stylesheets/.*");
builder.exclude("/javascripts/.*");
builder.exclude("/templates/.*");
- builder.exclude("/wiab.*");
- builder.exclude("/socket.*");
+ /* Wave with context '/wiab/' */
+ // builder.exclude("/wiab.*");
+ // builder.exclude("/socket.*");
+
+ /* Wave with context '/' */
+ builder.exclude("/");
+ builder.exclude("/attachment/.*");
+ builder.exclude("/auth/signin");
+ builder.exclude("/auth/signout");
+ builder.exclude("/auth/register");
+ builder.exclude("/fetch/.*");
+ builder.exclude("/robot/dataapi");
+ builder.exclude("/robot/dataapi/oauth/.*");
+ builder.exclude("/robot/dataapi/rpc");
+ builder.exclude("/robot/register/.*");
+ builder.exclude("/robot/rpc");
+ builder.exclude("/gadgets");
+ builder.exclude("/gadgets/.*");
+ builder.exclude("/socket.io/*");
+ builder.exclude("/socket");
+ builder.exclude("/static/.*");
+ builder.exclude("/webclient/.*");
+
builder.at(".*").install(new LogFilter());
builder.at(".*").install(new GuiceFilter());
- builder.at("^/$").install(new RedirectFilter("/ws/"));
+ // NOTE: Commented this while testing Wave
+ // builder.at("^/$").install(new RedirectFilter("/ws/"));
builder.at("^/ws").install(new RedirectFilter("/ws/"));
builder.at("^/ws/$").install(new ListenerFilter(KuneApplicationListener.class),
@@ -132,9 +153,6 @@
builder.use(new GalleryServerModule());
builder.use(new RESTServicesModule());
builder.use(configModule);
- // builder.use(WavePropertiesParser.parseFlags(FlagSettings.class));
- // builder.use(new WaveInterceptorModule());
- // builder.use(new ServerModule());
}
}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/KuneWindowUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/KuneWindowUtils.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/KuneWindowUtils.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,36 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.ui;
-
-import com.google.gwt.user.client.Window;
-
-public class KuneWindowUtils {
- public static int getClientHeight() {
- return Window.getClientHeight();
- }
-
- public static int getClientWidth() {
- return Window.getClientWidth();
- }
-
- public static void open(String url) {
- Window.open(url, "_blank", "");
- }
-}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensefoot/EntityLicensePanel.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -19,10 +19,10 @@
*/
package org.ourproject.kune.workspace.client.licensefoot;
-import org.ourproject.kune.platf.client.ui.KuneWindowUtils;
import org.ourproject.kune.platf.client.ui.SimpleToolbar;
import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import cc.kune.common.client.ui.KuneWindowUtils;
import cc.kune.core.shared.dto.LicenseDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/pages/LicenseWizardFlags.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/pages/LicenseWizardFlags.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/licensewizard/pages/LicenseWizardFlags.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -21,8 +21,8 @@
import org.ourproject.kune.platf.client.services.Images;
import org.ourproject.kune.platf.client.ui.IconLabel;
-import org.ourproject.kune.platf.client.ui.KuneWindowUtils;
+import cc.kune.common.client.ui.KuneWindowUtils;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.gwt.event.dom.client.ClickEvent;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -20,13 +20,13 @@
package org.ourproject.kune.workspace.client.newgroup;
import org.ourproject.kune.platf.client.ui.KuneUiUtils;
-import org.ourproject.kune.platf.client.ui.KuneWindowUtils;
import org.ourproject.kune.platf.client.ui.dialogs.DefaultFormUtils;
import org.ourproject.kune.platf.client.ui.dialogs.ExtendedDialog;
import org.ourproject.kune.workspace.client.licensewizard.LicenseWizard;
import cc.kune.common.client.noti.NotifyLevel;
import cc.kune.common.client.noti.NotifyLevelImages;
+import cc.kune.common.client.ui.KuneWindowUtils;
import cc.kune.core.client.resources.CoreMessages;
import cc.kune.core.client.ui.dialogs.MessageToolbar;
import cc.kune.core.shared.dto.LicenseDTO;
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteoptions/SiteOptionsPresenter.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -28,8 +28,8 @@
import org.ourproject.kune.platf.client.actions.ui.MenuDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuItemDescriptor;
import org.ourproject.kune.platf.client.actions.ui.MenuSeparatorDescriptor;
-import org.ourproject.kune.platf.client.ui.KuneWindowUtils;
+import cc.kune.common.client.ui.KuneWindowUtils;
import cc.kune.core.client.resources.icons.IconResources;
import cc.kune.core.shared.i18n.I18nTranslationService;
Modified: trunk/src/main/resources/wave-server.properties
===================================================================
--- trunk/src/main/resources/wave-server.properties 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/resources/wave-server.properties 2011-01-31 18:51:35 UTC (rev 1228)
@@ -8,7 +8,7 @@
# Each address is a comma separated host:port pair.
http_frontend_public_address = localhost:9898
http_frontend_addresses = ${http_frontend_public_address}
-http_baseurl = /wiab/
+http_baseurl = /
resource_base = ./target/kune-0.0.7/
### Server-specific variables
Property changes on: trunk/src/main/webapp
___________________________________________________________________
Name: svn:ignore
+ webclient
static
Modified: trunk/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/src/main/webapp/WEB-INF/web.xml 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/main/webapp/WEB-INF/web.xml 2011-01-31 18:51:35 UTC (rev 1228)
@@ -14,6 +14,7 @@
<welcome-file-list>
<welcome-file>ws.html</welcome-file>
</welcome-file-list>
+ <!-- JRuby servlets ======================================================================================= -->
<!-- Note: this gives problems depending on the version of jetty or tomcat -->
<!-- <context-param> -->
<!-- <param-name>jruby.standalone</param-name> -->
@@ -52,6 +53,7 @@
<!-- <listener> -->
<!-- <listener-class>org.jruby.rack.rails.RailsServletContextListener</listener-class> -->
<!-- </listener> -->
+ <!-- Kune normal guice configuration ======================================================================== -->
<filter>
<filter-name>rack</filter-name>
<filter-class>org.ourproject.kune.rack.RackServletFilter</filter-class>
@@ -66,26 +68,7 @@
<filter-name>rack</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
- <!-- <servlet> -->
- <!-- <servlet-name>Proxy</servlet-name> -->
- <!-- <servlet-class>de.spieleck.servlets.ProxyServlet</servlet-class> -->
- <!-- <init-param> -->
- <!-- <param-name>remotePath</param-name> -->
- <!-- <param-value>/http-bind/</param-value> -->
- <!-- </init-param> -->
- <!-- <init-param> -->
- <!-- <param-name>remoteServer</param-name> -->
- <!-- <param-value>localhost</param-value> -->
- <!-- </init-param> -->
- <!-- <init-param> -->
- <!-- <param-name>remotePort</param-name> -->
- <!-- <param-value>5280</param-value> -->
- <!-- </init-param> -->
- <!-- </servlet> -->
- <!-- <servlet-mapping> -->
- <!-- <servlet-name>Proxy</servlet-name> -->
- <!-- <url-pattern>/http-bind/</url-pattern> -->
- <!-- </servlet-mapping> -->
+ <!-- Emite xmpp proxy ======================================================================================= -->
<servlet>
<servlet-name>HttpBind</servlet-name>
<servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
@@ -102,7 +85,212 @@
<servlet-name>HttpBind</servlet-name>
<url-pattern>/http-bind</url-pattern>
</servlet-mapping>
+ <!-- Wave proxies with context / ====================================================================== -->
<servlet>
+ <servlet-name>WiabAttachs</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabAttachs</servlet-name>
+ <url-pattern>/attachment/*</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabSignIn</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabSignIn</servlet-name>
+ <url-pattern>/auth/signin</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabSignOut</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabSignOut</servlet-name>
+ <url-pattern>/auth/signout</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabRegister</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabRegister</servlet-name>
+ <url-pattern>/auth/register</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabFetch</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabFetch</servlet-name>
+ <url-pattern>/fetch/*</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabRobotDataApi</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabRobotDataApi</servlet-name>
+ <url-pattern>/robot/dataapi</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabRobotDataApiOauth</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabRobotDataApiOauth</servlet-name>
+ <url-pattern>/robot/dataapi/oauth/*</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabRobotDataApiRpc</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabRobotDataApiRpc</servlet-name>
+ <url-pattern>/robot/dataapi/rpc</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabRobotRegister</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabRobotRegister</servlet-name>
+ <url-pattern>/robot/register/*</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabRobotRpc</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabRobotRpc</servlet-name>
+ <url-pattern>/robot/rpc</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabGadgets</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabGadgets</servlet-name>
+ <url-pattern>/gadgets</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabGadgetsAst</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabGadgetsAst</servlet-name>
+ <url-pattern>/gadgets/*</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
<servlet-name>WiabSocketIO</servlet-name>
<servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
<init-param>
@@ -118,8 +306,9 @@
<servlet-name>WiabSocketIO</servlet-name>
<url-pattern>/socket.io/*</url-pattern>
</servlet-mapping>
+ <!-- ==================== -->
<servlet>
- <servlet-name>WiabServlets</servlet-name>
+ <servlet-name>WiabSocket</servlet-name>
<servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
<init-param>
<param-name>ProxyTo</param-name>
@@ -131,56 +320,75 @@
</init-param>
</servlet>
<servlet-mapping>
- <servlet-name>WiabServlets</servlet-name>
- <url-pattern>/wiab/*</url-pattern>
+ <servlet-name>WiabSocket</servlet-name>
+ <url-pattern>/socket</url-pattern>
</servlet-mapping>
-
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabStatic</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabStatic</servlet-name>
+ <url-pattern>/static/*</url-pattern>
+ </servlet-mapping>
+ <!-- ==================== -->
+ <servlet>
+ <servlet-name>WiabWebClient</servlet-name>
+ <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class>
+ <init-param>
+ <param-name>ProxyTo</param-name>
+ <param-value>http://127.0.0.1:9898/</param-value>
+ </init-param>
+ <init-param>
+ <param-name>Prefix</param-name>
+ <param-value>/</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>WiabWebClient</servlet-name>
+ <url-pattern>/webclient/*</url-pattern>
+ </servlet-mapping>
+ <!-- Wave proxies with context /wiab/ ====================================================================== -->
<!-- <servlet> -->
- <!-- <servlet-name>WIABProxy</servlet-name> -->
- <!-- <servlet-class>de.spieleck.servlets.ProxyServlet</servlet-class> -->
+ <!-- <servlet-name>WiabSocketIO</servlet-name> -->
+ <!-- <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class> -->
<!-- <init-param> -->
- <!-- <param-name>remotePath</param-name> -->
- <!-- <param-value>/wiab/</param-value> -->
+ <!-- <param-name>ProxyTo</param-name> -->
+ <!-- <param-value>http://127.0.0.1:9898/</param-value> -->
<!-- </init-param> -->
<!-- <init-param> -->
- <!-- <param-name>remoteServer</param-name> -->
- <!-- <param-value>localhost</param-value> -->
+ <!-- <param-name>Prefix</param-name> -->
+ <!-- <param-value>/</param-value> -->
<!-- </init-param> -->
- <!-- <init-param> -->
- <!-- <param-name>remotePort</param-name> -->
- <!-- <param-value>9898</param-value> -->
- <!-- </init-param> -->
<!-- </servlet> -->
<!-- <servlet-mapping> -->
- <!-- <servlet-name>WIABProxy</servlet-name> -->
- <!-- <url-pattern>/wiab/*</url-pattern> -->
+ <!-- <servlet-name>WiabSocketIO</servlet-name> -->
+ <!-- <url-pattern>/socket.io/*</url-pattern> -->
<!-- </servlet-mapping> -->
<!-- <servlet> -->
- <!-- <servlet-name>WIABSocket</servlet-name> -->
- <!-- <servlet-class>de.spieleck.servlets.ProxyServlet</servlet-class> -->
+ <!-- <servlet-name>WiabServlets</servlet-name> -->
+ <!-- <servlet-class>org.eclipse.jetty.servlets.ProxyServlet$Transparent</servlet-class> -->
<!-- <init-param> -->
- <!-- <param-name>remotePath</param-name> -->
- <!-- <param-value>/wiab/socket.io/</param-value> -->
+ <!-- <param-name>ProxyTo</param-name> -->
+ <!-- <param-value>http://127.0.0.1:9898/</param-value> -->
<!-- </init-param> -->
<!-- <init-param> -->
- <!-- <param-name>remoteServer</param-name> -->
- <!-- <param-value>localhost</param-value> -->
+ <!-- <param-name>Prefix</param-name> -->
+ <!-- <param-value>/</param-value> -->
<!-- </init-param> -->
- <!-- <init-param> -->
- <!-- <param-name>remotePort</param-name> -->
- <!-- <param-value>9898</param-value> -->
- <!-- </init-param> -->
<!-- </servlet> -->
<!-- <servlet-mapping> -->
- <!-- <servlet-name>WIABsocket</servlet-name> -->
- <!-- <url-pattern>/socket.io/*</url-pattern> -->
+ <!-- <servlet-name>WiabServlets</servlet-name> -->
+ <!-- <url-pattern>/wiab/*</url-pattern> -->
<!-- </servlet-mapping> -->
- <servlet>
- <servlet-name>remoteLoggerServiceImpl</servlet-name>
- <servlet-class>com.allen_sauer.gwt.log.server.RemoteLoggerServiceImpl</servlet-class>
- </servlet>
- <servlet-mapping>
- <servlet-name>remoteLoggerServiceImpl</servlet-name>
- <url-pattern>/ws/gwt-log</url-pattern>
- </servlet-mapping>
+
</web-app>
Added: trunk/src/test/java/cc/kune/core/client/state/EventBusTester.java
===================================================================
--- trunk/src/test/java/cc/kune/core/client/state/EventBusTester.java (rev 0)
+++ trunk/src/test/java/cc/kune/core/client/state/EventBusTester.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -0,0 +1,40 @@
+package cc.kune.core.client.state;
+
+import java.util.ArrayList;
+
+import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.event.shared.SimpleEventBus;
+
+public class EventBusTester extends SimpleEventBus {
+ private final ArrayList<GwtEvent<?>> all;
+ private GwtEvent<?> lastEvent;
+
+ public EventBusTester() {
+ all = new ArrayList<GwtEvent<?>>();
+ }
+
+ @Override
+ public void fireEvent(final GwtEvent<?> event) {
+ all.add(event);
+ this.lastEvent = event;
+ super.fireEvent(event);
+ }
+
+ public GwtEvent<?> getLastEvent() {
+ return lastEvent;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T extends GwtEvent<?>> Class<T> getLastEventClass() {
+ return (Class<T>) lastEvent.getClass();
+ }
+
+ public boolean receivedEventOfClass(final Class<? extends GwtEvent<?>> eventClass) {
+ for (final GwtEvent<?> event : all) {
+ if (eventClass.equals(event.getClass())) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
Property changes on: trunk/src/test/java/cc/kune/core/client/state/EventBusTester.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java
===================================================================
--- trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -1,18 +1,16 @@
package cc.kune.core.client.state;
-import static org.junit.Assert.assertTrue;
-
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import cc.kune.common.client.actions.BeforeActionListener;
+import cc.kune.core.client.state.GroupChangedEvent.GroupChangedHandler;
+import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler;
+import cc.kune.core.client.state.ToolChangedEvent.ToolChangedHandler;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.StateAbstractDTO;
-import com.calclab.suco.testing.events.MockedListener;
-import com.calclab.suco.testing.events.MockedListener2;
-import com.google.gwt.event.shared.EventBus;
import com.google.gwt.user.client.rpc.AsyncCallback;
public class StateManagerTest {
@@ -21,41 +19,41 @@
private BeforeActionListener beforeChangeListener1;
private BeforeActionListener beforeChangeListener2;
private ContentProvider contentProvider;
- private MockedListener2<String, String> groupChangeListener;
+ private EventBusTester eventBus;
+ private GroupChangedHandler groupChangeHandler;
private HistoryWrapper history;
private Session session;
private StateAbstractDTO state;
- private MockedListener<StateAbstractDTO> stateChangeListener;
+ private StateChangedHandler stateChangeHandler;
private StateManagerDefault stateManager;
- private MockedListener2<String, String> toolChangeListener;
+ private ToolChangedHandler toolChangeHandler;
@Before
public void before() {
contentProvider = Mockito.mock(ContentProvider.class);
session = Mockito.mock(Session.class);
history = Mockito.mock(HistoryWrapper.class);
- final EventBus eventBus = Mockito.mock(EventBus.class);
+ eventBus = new EventBusTester();
stateManager = new StateManagerDefault(contentProvider, session, history, eventBus);
Mockito.when(session.getUserHash()).thenReturn(HASH);
state = Mockito.mock(StateAbstractDTO.class);
- stateChangeListener = new MockedListener<StateAbstractDTO>();
- groupChangeListener = new MockedListener2<String, String>();
- toolChangeListener = new MockedListener2<String, String>();
+ stateChangeHandler = Mockito.mock(StateChangedHandler.class);
+ groupChangeHandler = Mockito.mock(GroupChangedHandler.class);
+ toolChangeHandler = Mockito.mock(ToolChangedHandler.class);
beforeChangeListener1 = Mockito.mock(BeforeActionListener.class);
beforeChangeListener2 = Mockito.mock(BeforeActionListener.class);
- stateManager.onStateChanged(stateChangeListener);
- stateManager.onGroupChanged(groupChangeListener);
- stateManager.onToolChanged(toolChangeListener);
+ eventBus.addHandler(StateChangedEvent.getType(), stateChangeHandler);
+ eventBus.addHandler(GroupChangedEvent.getType(), groupChangeHandler);
+ eventBus.addHandler(ToolChangedEvent.getType(), toolChangeHandler);
// new NotifyUser(null, null);
}
@Test
public void changeGroupWithNoTool() {
changeState("group1", "group2");
- assertTrue(groupChangeListener.isCalledWithEquals("", "group1", "group1", "group2"));
- assertTrue(toolChangeListener.isCalledWithEquals("", ""));
- assertTrue(groupChangeListener.isCalled(2));
- assertTrue(stateChangeListener.isCalled(2));
+ Mockito.verify(stateChangeHandler, Mockito.times(2)).onStateChanged((StateChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(2)).onGroupChanged((GroupChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(2)).onGroupChanged((GroupChangedEvent) Mockito.anyObject());
}
private void changeState(final String... tokens) {
@@ -68,43 +66,61 @@
@Test
public void changeStateWithDifferentAndGroupsToolsMustFireListener() {
changeState("group2.tool1", "group1.tool2");
- assertTrue(stateChangeListener.isCalled(2));
- assertTrue(groupChangeListener.isCalledWithEquals("", "group2", "group2", "group1"));
- assertTrue(toolChangeListener.isCalledWithEquals("", "tool1", "tool1", "tool2"));
+ Mockito.verify(stateChangeHandler, Mockito.times(2)).onStateChanged((StateChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(2)).onGroupChanged((GroupChangedEvent) Mockito.anyObject());
+ Mockito.verify(toolChangeHandler, Mockito.times(2)).onToolChanged((ToolChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(1)).onGroupChanged(new GroupChangedEvent("", "group2"));
+ Mockito.verify(groupChangeHandler, Mockito.times(1)).onGroupChanged(new GroupChangedEvent("group2", "group1"));
+ Mockito.verify(toolChangeHandler, Mockito.times(1)).onToolChanged(new ToolChangedEvent("", "tool1"));
+ Mockito.verify(toolChangeHandler, Mockito.times(1)).onToolChanged(new ToolChangedEvent("tool1", "tool2"));
}
@Test
public void changeStateWithDifferentGroupsMustFireListener() {
changeState("group1.tool1", "group2.tool1");
- assertTrue(stateChangeListener.isCalled(2));
- assertTrue(groupChangeListener.isCalledWithEquals("", "group1", "group1", "group2"));
- assertTrue(toolChangeListener.isCalledWithEquals("", "tool1"));
+ // assertTrue(stateChangeListener.isCalled(2));
+ // assertTrue(groupChangeListener.isCalledWithEquals("", "group1",
+ // "group1", "group2"));
+ // assertTrue(toolChangeListener.isCalledWithEquals("", "tool1"));
+ Mockito.verify(stateChangeHandler, Mockito.times(2)).onStateChanged((StateChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(2)).onGroupChanged((GroupChangedEvent) Mockito.anyObject());
+ Mockito.verify(toolChangeHandler, Mockito.times(1)).onToolChanged((ToolChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(1)).onGroupChanged(new GroupChangedEvent("", "group1"));
+ Mockito.verify(groupChangeHandler, Mockito.times(1)).onGroupChanged(new GroupChangedEvent("group1", "group2"));
+ Mockito.verify(toolChangeHandler, Mockito.times(1)).onToolChanged(new ToolChangedEvent("", "tool1"));
+
}
@Test
public void changeStateWithDifferentToolsMustFireListener() {
changeState("group1.tool1", "group1.tool2");
- assertTrue(stateChangeListener.isCalled(2));
- assertTrue(toolChangeListener.isCalledWithEquals("", "tool1", "tool1", "tool2"));
- assertTrue(groupChangeListener.isCalledWithEquals("", "group1"));
+ Mockito.verify(stateChangeHandler, Mockito.times(2)).onStateChanged((StateChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(1)).onGroupChanged((GroupChangedEvent) Mockito.anyObject());
+ Mockito.verify(toolChangeHandler, Mockito.times(2)).onToolChanged((ToolChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(1)).onGroupChanged(new GroupChangedEvent("", "group1"));
+ Mockito.verify(toolChangeHandler, Mockito.times(1)).onToolChanged(new ToolChangedEvent("", "tool1"));
+ Mockito.verify(toolChangeHandler, Mockito.times(1)).onToolChanged(new ToolChangedEvent("tool1", "tool2"));
}
@Test
public void changeToNoTool() {
changeState("group1.tool1", "group1");
- assertTrue(groupChangeListener.isCalledWithEquals("", "group1"));
- assertTrue(toolChangeListener.isCalledWithEquals("", "tool1", "tool1", ""));
- assertTrue(groupChangeListener.isCalledOnce());
- assertTrue(stateChangeListener.isCalled(2));
+ Mockito.verify(stateChangeHandler, Mockito.times(2)).onStateChanged((StateChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(1)).onGroupChanged((GroupChangedEvent) Mockito.anyObject());
+ Mockito.verify(toolChangeHandler, Mockito.times(2)).onToolChanged((ToolChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(1)).onGroupChanged(new GroupChangedEvent("", "group1"));
+ Mockito.verify(toolChangeHandler, Mockito.times(1)).onToolChanged(new ToolChangedEvent("", "tool1"));
+ Mockito.verify(toolChangeHandler, Mockito.times(1)).onToolChanged(new ToolChangedEvent("tool1", ""));
}
@Test
public void changeToSameToken() {
changeState("group1.tool1", "group1.tool1");
- assertTrue(groupChangeListener.isCalledWithEquals("", "group1"));
- assertTrue(toolChangeListener.isCalledWithEquals("", "tool1"));
- assertTrue(groupChangeListener.isCalledOnce());
- assertTrue(stateChangeListener.isCalled(2));
+ Mockito.verify(stateChangeHandler, Mockito.times(2)).onStateChanged((StateChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(1)).onGroupChanged((GroupChangedEvent) Mockito.anyObject());
+ Mockito.verify(toolChangeHandler, Mockito.times(1)).onToolChanged((ToolChangedEvent) Mockito.anyObject());
+ Mockito.verify(groupChangeHandler, Mockito.times(1)).onGroupChanged(new GroupChangedEvent("", "group1"));
+ Mockito.verify(toolChangeHandler, Mockito.times(1)).onToolChanged(new ToolChangedEvent("", "tool1"));
}
private String confBeforeStateChangeListeners(final boolean value, final boolean value2) {
Modified: trunk/src/test/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenterTest.java
===================================================================
--- trunk/src/test/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenterTest.java 2011-01-29 03:38:12 UTC (rev 1227)
+++ trunk/src/test/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenterTest.java 2011-01-31 18:51:35 UTC (rev 1228)
@@ -6,7 +6,7 @@
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
-import org.mockito.internal.verification.api.VerificationMode;
+import org.mockito.verification.VerificationMode;
import org.ourproject.kune.platf.client.i18n.Resources;
import org.ourproject.kune.platf.client.ui.rte.img.RTEImgResources;
More information about the kune-commits
mailing list