[kune-commits] r1324 - in trunk: . script src/main/java/cc/kune/client src/main/java/cc/kune/common/client src/main/java/cc/kune/common/client/ui src/main/java/cc/kune/common/client/ui/dialogs src/main/java/cc/kune/common/client/ui/dialogs/tabbed src/main/java/cc/kune/common/client/utils 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/groups/newgroup src/main/java/cc/kune/core/client/notify/confirm src/main/java/cc/kune/core/client/sitebar src/main/java/cc/kune/core/client/state src/main/java/cc/kune/core/client/ui src/main/java/cc/kune/core/public src/main/java/cc/kune/docs/server src/main/java/cc/kune/gspace/client src/main/java/cc/kune/gspace/client/options src/main/java/cc/kune/gspace/client/options/license src/main/java/cc/kune/gspace/client/options/logo src/main/java/cc/kune/gspace/client/options/pscape src/main/java/cc/kune/gspace/client/options/tools src/main/java/cc/kune/gspace/client/resources src/main/java/cc/kune/gspace/client/style src/main/java/org/ourproject/kune/blogs/client src/main/java/org/ourproject/kune/gallery/client src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar src/main/java/org/ourproject/kune/wiki/client src/main/java/org/ourproject/kune/workspace/client src/main/java/org/ourproject/kune/workspace/client/options src/main/java/org/ourproject/kune/workspace/client/themes src/test/java/org/ourproject/kune
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Thu Apr 28 02:56:31 CEST 2011
Author: vjrj_
Date: 2011-04-28 02:56:31 +0200 (Thu, 28 Apr 2011)
New Revision: 1324
Added:
trunk/src/main/java/cc/kune/client/ExtendedGinModule.java
trunk/src/main/java/cc/kune/common/client/ProvidersCollection.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/
trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/
trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialog.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java
trunk/src/main/java/cc/kune/gspace/client/options/
trunk/src/main/java/cc/kune/gspace/client/options/EntityOptions.java
trunk/src/main/java/cc/kune/gspace/client/options/EntityOptionsTabView.java
trunk/src/main/java/cc/kune/gspace/client/options/EntityOptionsView.java
trunk/src/main/java/cc/kune/gspace/client/options/GroupOptions.java
trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsCollection.java
trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsView.java
trunk/src/main/java/cc/kune/gspace/client/options/UserOptions.java
trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsCollection.java
trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsView.java
trunk/src/main/java/cc/kune/gspace/client/options/license/
trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicensePanel.java
trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicenseView.java
trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicensePanel.java
trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicenseView.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/
trunk/src/main/java/cc/kune/gspace/client/options/logo/CurrentLogoChangedEvent.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoView.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoView.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/
trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfView.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfView.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/
trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConf.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfView.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfView.java
trunk/src/main/java/cc/kune/gspace/client/style/
trunk/src/main/java/cc/kune/gspace/client/style/ClearBackImageEvent.java
trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManager.java
trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManagerImpl.java
trunk/src/main/java/cc/kune/gspace/client/style/SetBackImageEvent.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialog.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogView.java
Removed:
trunk/infinitest.filters
trunk/src/main/java/cc/kune/core/client/ui/dialogs/
trunk/src/main/java/cc/kune/core/ws/
trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolConf.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialog.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptions.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptionsView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptions.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptions.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPresenter.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsView.java
trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/
trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/
trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/
trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/
trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManager.java
trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManagerImpl.java
trunk/src/test/java/org/ourproject/kune/blogs/
trunk/src/test/java/org/ourproject/kune/docs/
Modified:
trunk/.classpath
trunk/.project
trunk/script/mvn-eclipse.sh
trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialogView.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/MessagePanel.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/MessagePanelView.java
trunk/src/main/java/cc/kune/common/client/ui/dialogs/MessageToolbar.java
trunk/src/main/java/cc/kune/common/client/utils/TextUtils.java
trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java
trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.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/groups/newgroup/NewGroupPanel.java
trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPanel.java
trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java
trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
trunk/src/main/java/cc/kune/core/client/ui/DefaultFormUtils.java
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java
trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java
trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java
trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicense.java
trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java
trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicenseView.java
trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicense.java
trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicensePresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicense.java
trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicensePresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogo.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoView.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogo.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoPresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogo.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoPresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConf.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfPresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfView.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConf.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfPresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConf.java
trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfPresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConf.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfPanel.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfPresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfView.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfPresenter.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConf.java
trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfPresenter.java
trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css
trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java
trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialog.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogView.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialog.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogView.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialog.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogView.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialog.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialogPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialogPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialog.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogPanel.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogPresenter.java
trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogView.java
trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
trunk/src/main/java/org/ourproject/kune/workspace/client/OldAbstractFoldableContentActions.java
trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java
Log:
User and groups options
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/.classpath 2011-04-28 00:56:31 UTC (rev 1324)
@@ -118,5 +118,5 @@
<classpathentry kind="var" path="M2_REPO/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2.jar" sourcepath="M2_REPO/com/thoughtworks/xstream/xstream/1.2.2/xstream-1.2.2-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/xwiki/platform/xwiki-web-gwt-dom/2.3-rc-1/xwiki-web-gwt-dom-2.3-rc-1.jar" sourcepath="M2_REPO/org/xwiki/platform/xwiki-web-gwt-dom/2.3-rc-1/xwiki-web-gwt-dom-2.3-rc-1-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
+ <classpathentry kind="src" path=".apt_generated" including="**/*.java"/> <classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
</classpath>
\ No newline at end of file
Modified: trunk/.project
===================================================================
--- trunk/.project 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/.project 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,60 +1,42 @@
-<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>kune</name>
- <comment>kune free/open/libre collaboration platform. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.instantiations.assist.eclipse.coverage.instrumentationBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- <nature>org.eclipse.ajdt.ui.ajnature</nature>
- <nature>com.google.gwt.eclipse.core.gwtNature</nature>
- <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
- <nature>com.instantiations.assist.eclipse.coverage.codeCoverageNature</nature>
- <nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
- </natures>
-</projectDescription>
+ <name>kune</name>
+ <comment>kune free/open/libre collaboration platform. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
+ </buildCommand>
+ <buildCommand>
+ <name>com.google.gwt.eclipse.core.gwtProjectValidator</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>edu.umd.cs.findbugs.plugin.eclipse.findbugsBuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>com.instantiations.assist.eclipse.coverage.instrumentationBuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.ajdt.ui.ajnature</nature>
+ <nature>com.google.gwt.eclipse.core.gwtNature</nature>
+ <nature>edu.umd.cs.findbugs.plugin.eclipse.findbugsNature</nature>
+ <nature>com.instantiations.assist.eclipse.coverage.codeCoverageNature</nature>
+ <nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Deleted: trunk/infinitest.filters
===================================================================
--- trunk/infinitest.filters 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/infinitest.filters 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1 +0,0 @@
-.*Selenium.*
Modified: trunk/script/mvn-eclipse.sh
===================================================================
--- trunk/script/mvn-eclipse.sh 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/script/mvn-eclipse.sh 2011-04-28 00:56:31 UTC (rev 1324)
@@ -2,7 +2,7 @@
RESULT=$?
perl -p -i -e 's/<\/classpath>//g' .classpath
#perl -p -i -e 's/\/home\/vjrj\/nfsdev\///g' .classpath
-#echo -en " <classpathentry kind=\"src\" path=\"target/generated-sources/apt\" including=\"**/*.java\"/>" >> .classpath
+echo -en " <classpathentry kind=\"src\" path=\".apt_generated\" including=\"**/*.java\"/>" >> .classpath
echo -en " <classpathentry kind=\"con\" path=\"com.google.gwt.eclipse.core.GWT_CONTAINER\"/>\n</classpath>" >> .classpath
which kdialog > /dev/null 2>&1
if [[ $? == 0 ]]
Added: trunk/src/main/java/cc/kune/client/ExtendedGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/client/ExtendedGinModule.java (rev 0)
+++ trunk/src/main/java/cc/kune/client/ExtendedGinModule.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,20 @@
+package cc.kune.client;
+
+import com.google.inject.Singleton;
+import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
+
+public abstract class ExtendedGinModule extends AbstractPresenterModule {
+
+ protected void eagle(final Class<?> type) {
+ bind(type).asEagerSingleton();
+ }
+
+ protected void s(final Class<?> type) {
+ bind(type).in(Singleton.class);
+ }
+
+ protected <V, W> void s(final Class<V> type, final Class<? extends V> typeImpl) {
+ bind(type).to(typeImpl).in(Singleton.class);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/client/ExtendedGinModule.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/common/client/ProvidersCollection.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ProvidersCollection.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/ProvidersCollection.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,37 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package cc.kune.common.client;
+
+import java.util.ArrayList;
+
+import com.google.inject.Provider;
+
+ at SuppressWarnings("serial")
+public class ProvidersCollection extends ArrayList<Provider<?>> {
+
+ public ProvidersCollection() {
+ }
+
+ public void createAll() {
+ for (final Provider<?> p : this) {
+ p.get();
+ }
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/common/client/ProvidersCollection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -60,6 +60,11 @@
this("");
}
+ public IconLabel(final ImageResource imgRes, final String text) {
+ this(text);
+ iconLeft.setResource(imgRes);
+ }
+
public IconLabel(final String text) {
initWidget(uiBinder.createAndBindUi(this));
label.setText(text);
Copied: trunk/src/main/java/cc/kune/common/client/ui/dialogs (from rev 1320, trunk/src/main/java/cc/kune/core/client/ui/dialogs)
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,13 +17,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package cc.kune.core.client.ui.dialogs;
+package cc.kune.common.client.ui.dialogs;
import cc.kune.common.client.ui.IconLabel;
import cc.kune.common.client.utils.TextUtils;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Button;
@@ -140,9 +141,13 @@
secondBtn.setVisible(visible);
}
+ public void setTitleIcon(final ImageResource img) {
+ title.setLeftIconResource(img);
+ }
+
public void setTitleIcon(final String icon) {
if (TextUtils.notEmpty(icon)) {
- title.setRightIcon(icon);
+ title.setLeftIcon(icon);
}
}
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialogView.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialogView.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicDialogView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package cc.kune.core.client.ui.dialogs;
+package cc.kune.common.client.ui.dialogs;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.HasDirectionalText;
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/BasicTopDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package cc.kune.core.client.ui.dialogs;
+package cc.kune.common.client.ui.dialogs;
import cc.kune.common.client.ui.PopupTopPanel;
import cc.kune.common.client.utils.TextUtils;
@@ -28,39 +28,123 @@
public class BasicTopDialog extends BasicDialog {
- private final PopupTopPanel popup;
+ public static class Builder {
+ private final boolean autohide;
+ private boolean autoscroll = false;
+ private final String dialogId;
+ private String firstButtonId;
+ private String firstButtonTitle;
+ private String height = "70%";
+ private String icon;
+ private final boolean modal;
+ private String sndButtonId;
+ private String sndButtonTitle;
+ private int tabIndexStart = 0;
+ private String title;
+ private String width = "400px";
- public BasicTopDialog(final String dialogId, final String title, final boolean autohide, final boolean modal,
- final boolean autoscroll, final int width, final int height, final String icon,
- final String firstButtonTitle, final String firstButtonId, final int tabIndexStart) {
- this(dialogId, title, autohide, modal, autoscroll, width, height, icon, firstButtonTitle, firstButtonId, "",
- "", tabIndexStart);
- super.setSecondBtnVisible(false);
+ public Builder(final String dialogId, final boolean autohide, final boolean modal) {
+ // Required params
+ this.autohide = autohide;
+ this.modal = modal;
+ this.dialogId = dialogId;
+ }
+
+ public Builder autoscroll(final boolean autoscroll) {
+ // Not used for now
+ this.autoscroll = autoscroll;
+ return this;
+ }
+
+ public BasicTopDialog build() {
+ return new BasicTopDialog(this);
+ }
+
+ public Builder firstButtonId(final String firstButtonId) {
+ this.firstButtonId = firstButtonId;
+ return this;
+ }
+
+ public Builder firstButtonTitle(final String firstButtonTitle) {
+ this.firstButtonTitle = firstButtonTitle;
+ return this;
+ }
+
+ public Builder height(final int height) {
+ this.height = String.valueOf(height);
+ return this;
+ }
+
+ public Builder height(final String height) {
+ this.height = height;
+ return this;
+ }
+
+ public Builder icon(final String icon) {
+ this.icon = icon;
+ return this;
+ }
+
+ public Builder sndButtonId(final String sndButtonId) {
+ this.sndButtonId = sndButtonId;
+ return this;
+ }
+
+ public Builder sndButtonTitle(final String sndButtonTitle) {
+ this.sndButtonTitle = sndButtonTitle;
+ return this;
+ }
+
+ public Builder tabIndexStart(final int tabIndexStart) {
+ this.tabIndexStart = tabIndexStart;
+ return this;
+ }
+
+ public Builder title(final String title) {
+ this.title = title;
+ return this;
+ }
+
+ public Builder width(final int width) {
+ this.width = String.valueOf(width);
+ return this;
+ }
+
+ public Builder width(final String width) {
+ this.width = width;
+ return this;
+ }
}
- public BasicTopDialog(final String dialogId, final String title, final boolean autohide, final boolean modal,
- final boolean autoscroll, final int width, final int height, final String icon,
- final String firstButtonTitle, final String firstButtonId, final String cancelButtonTitle,
- final String cancelButtonId, final int tabIndexStart) {
- popup = new PopupTopPanel(autohide, modal);
+ private final PopupTopPanel popup;
+
+ private BasicTopDialog(final Builder builder) {
+ popup = new PopupTopPanel(builder.autohide, builder.modal);
popup.add(this);
- popup.ensureDebugId(dialogId);
- super.getTitleText().setText(title);
- // super.setAutoscroll(autoscroll);
- // super.setSize(String.valueOf(width), String.valueOf(height));
- // GWT.log("Not setting size of dialog to: " + String.valueOf(width) +
- // "/" + String.valueOf(height));
- super.setTitleIcon(icon);
- super.getFirstBtnText().setText(firstButtonTitle);
- if (TextUtils.notEmpty(cancelButtonTitle)) {
- super.getSecondBtnText().setText(cancelButtonTitle);
+ popup.ensureDebugId(builder.dialogId);
+ super.getTitleText().setText(builder.title);
+ if (TextUtils.notEmpty(builder.icon)) {
+ super.setTitleIcon(builder.icon);
}
- super.setFirstBtnId(firstButtonId);
- if (TextUtils.notEmpty(cancelButtonId)) {
- super.setSecondBtnId(cancelButtonId);
+ if (TextUtils.empty(builder.firstButtonTitle)) {
+ super.setFirstBtnVisible(false);
+ } else {
+ super.getFirstBtnText().setText(builder.firstButtonTitle);
+ if (TextUtils.notEmpty(builder.firstButtonId)) {
+ super.setFirstBtnId(builder.firstButtonId);
+ }
+ super.setFirstBtnTabIndex(builder.tabIndexStart);
}
- super.setFirstBtnTabIndex(tabIndexStart);
- super.setSecondBtnTabIndex(tabIndexStart + 1);
+ if (TextUtils.empty(builder.sndButtonTitle)) {
+ super.setSecondBtnVisible(false);
+ } else {
+ super.getSecondBtnText().setText(builder.sndButtonTitle);
+ if (TextUtils.notEmpty(builder.sndButtonId)) {
+ super.setSecondBtnId(builder.sndButtonId);
+ }
+ super.setSecondBtnTabIndex(builder.tabIndexStart + 1);
+ }
+ super.setSize(builder.width, builder.height);
}
public HasCloseHandlers<PopupPanel> getClose() {
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/MessagePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessagePanel.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/MessagePanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package cc.kune.core.client.ui.dialogs;
+package cc.kune.common.client.ui.dialogs;
import cc.kune.common.client.notify.NotifyLevel;
import cc.kune.common.client.notify.NotifyLevelImages;
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/MessagePanelView.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessagePanelView.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/MessagePanelView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package cc.kune.core.client.ui.dialogs;
+package cc.kune.common.client.ui.dialogs;
import cc.kune.common.client.notify.NotifyLevel;
Modified: trunk/src/main/java/cc/kune/common/client/ui/dialogs/MessageToolbar.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessageToolbar.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/MessageToolbar.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package cc.kune.core.client.ui.dialogs;
+package cc.kune.common.client.ui.dialogs;
import cc.kune.common.client.notify.NotifyLevel;
import cc.kune.common.client.notify.NotifyLevelImages;
Added: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialog.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.common.client.ui.dialogs.tabbed;
+
+import cc.kune.common.client.notify.NotifyLevel;
+
+import com.google.gwt.user.client.ui.IsWidget;
+
+public interface AbstractTabbedDialog {
+
+ void activateTab(int index);
+
+ void addTab(IsWidget tab, IsWidget tabTitle);
+
+ public void hideMessages();
+
+ void insertTab(IsWidget tab, IsWidget tabTitle, int position);
+
+ public void setErrorMessage(String message, NotifyLevel level);
+
+ void show();
+
+}
Property changes on: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,179 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.common.client.ui.dialogs.tabbed;
+
+import cc.kune.common.client.notify.NotifyLevel;
+import cc.kune.common.client.notify.NotifyLevelImages;
+import cc.kune.common.client.ui.dialogs.BasicTopDialog;
+import cc.kune.common.client.ui.dialogs.MessageToolbar;
+
+import com.google.gwt.event.logical.shared.HasCloseHandlers;
+import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.user.client.ui.DecoratedTabPanel;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Widget;
+
+public abstract class AbstractTabbedDialogPanel implements AbstractTabbedDialogView {
+ private BasicTopDialog dialog;
+ private final String dialogId;
+ private final String errorLabelId;
+ private final String firstBtnId;
+ private final String firstBtnTitle;
+ private final int height;
+ private String iconCls;
+ private final NotifyLevelImages images;
+ private MessageToolbar messageErrorBar;
+ private final int minHeight;
+ private final int minWidth;
+ private final boolean modal;
+ private final String sndBtnId;
+ private final String sndBtnTitle;
+ private DecoratedTabPanel tabPanel;
+ private String title;
+ private final int width;
+
+ public AbstractTabbedDialogPanel(final String dialogId, final String title, final int width, final int height,
+ final int minWidth, final int minHeight, final boolean modal, final NotifyLevelImages images,
+ final String errorLabelId, final String firstBtnTitle, final String firstBtnId, final String sndBtnTitle,
+ final String sndBtnId) {
+ this.dialogId = dialogId;
+ this.title = title;
+ this.width = width;
+ this.height = height;
+ this.modal = modal;
+ this.images = images;
+ this.errorLabelId = errorLabelId;
+ // Not used:
+ this.minWidth = minWidth;
+ this.minHeight = minHeight;
+ this.firstBtnTitle = firstBtnTitle;
+ this.firstBtnId = firstBtnId;
+ this.sndBtnTitle = sndBtnTitle;
+ this.sndBtnId = sndBtnId;
+ }
+
+ @Override
+ public void activateTab(final int index) {
+ createDialogIfNecessary();
+ tabPanel.selectTab(index);
+ }
+
+ @Override
+ public void addTab(final IsWidget view, final IsWidget tabWidget) {
+ createDialogIfNecessary();
+ tabPanel.add(view, tabWidget);
+ }
+
+ @Override
+ public void createAndShow() {
+ show();
+ setFirstTabActive();
+ }
+
+ private void createDialog() {
+ dialog = new BasicTopDialog.Builder(dialogId, true, modal).autoscroll(true).width(width).height(height).icon(
+ iconCls).firstButtonId(firstBtnId).firstButtonTitle(firstBtnTitle).sndButtonId(dialogId).sndButtonTitle(
+ sndBtnTitle).build();
+ messageErrorBar = new MessageToolbar(images, errorLabelId);
+ tabPanel = new DecoratedTabPanel();
+ dialog.getInnerPanel().add(tabPanel);
+ }
+
+ private void createDialogIfNecessary() {
+ if (dialog == null) {
+ createDialog();
+ }
+ }
+
+ @Override
+ public void destroy() {
+ if (dialog != null) {
+ dialog.removeFromParent();
+ dialog = null;
+ }
+ }
+
+ public HasCloseHandlers<?> getClose() {
+ return dialog.getClose();
+ }
+
+ public Widget getWidget() {
+ return dialog;
+ }
+
+ @Override
+ public void hide() {
+ if (dialog != null) {
+ if (dialog.isVisible()) {
+ dialog.hide();
+ }
+ }
+ }
+
+ @Override
+ public void hideMessages() {
+ if (dialog != null) {
+ messageErrorBar.hideErrorMessage();
+ }
+ }
+
+ @Override
+ public void insertTab(final IsWidget tab, final IsWidget tabTitle, final int index) {
+ createDialogIfNecessary();
+ tabPanel.insert(tab, tabTitle, index);
+ }
+
+ public boolean isVisible() {
+ createDialogIfNecessary();
+ return dialog.isVisible();
+ }
+
+ @Override
+ public void setErrorMessage(final String message, final NotifyLevel level) {
+ messageErrorBar.setErrorMessage(message, level);
+ }
+
+ public void setFirstTabActive() {
+ tabPanel.selectTab(0);
+ }
+
+ public void setIcon(final ImageResource icon) {
+ dialog.setTitleIcon(icon);
+ }
+
+ public void setIconCls(final String iconCls) {
+ this.iconCls = iconCls;
+ if (dialog != null) {
+ dialog.setTitleIcon(iconCls);
+ }
+ }
+
+ public void setTitle(final String title) {
+ this.title = title;
+ if (dialog != null) {
+ dialog.setTitle(title);
+ }
+ }
+
+ public void show() {
+ createDialogIfNecessary();
+ dialog.showCentered();
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,73 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.common.client.ui.dialogs.tabbed;
+
+import cc.kune.common.client.notify.NotifyLevel;
+
+import com.google.gwt.user.client.ui.IsWidget;
+
+public abstract class AbstractTabbedDialogPresenter implements AbstractTabbedDialog {
+
+ private AbstractTabbedDialogView view;
+
+ @Override
+ public void activateTab(final int index) {
+ view.activateTab(index);
+ }
+
+ @Override
+ public void addTab(final IsWidget tab, final IsWidget tabTitle) {
+ view.addTab(tab, tabTitle);
+ }
+
+ public IsWidget getView() {
+ return view;
+ }
+
+ public void hide() {
+ view.hide();
+ }
+
+ @Override
+ public void hideMessages() {
+ view.hideMessages();
+ }
+
+ public void init(final AbstractTabbedDialogView view) {
+ this.view = view;
+ }
+
+ @Override
+ public void insertTab(final IsWidget tab, final IsWidget tabTitle, final int index) {
+ view.insertTab(tab, tabTitle, index);
+ }
+
+ @Override
+ public void setErrorMessage(final String message, final NotifyLevel level) {
+ view.setErrorMessage(message, level);
+ }
+
+ @Override
+ public void show() {
+ hideMessages();
+ view.createAndShow();
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,44 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.common.client.ui.dialogs.tabbed;
+
+import cc.kune.common.client.notify.NotifyLevel;
+
+import com.google.gwt.user.client.ui.IsWidget;
+
+public interface AbstractTabbedDialogView extends IsWidget {
+
+ void activateTab(int index);
+
+ void addTab(IsWidget tab, IsWidget tabTitle);
+
+ void createAndShow();
+
+ void destroy();
+
+ void hide();
+
+ void hideMessages();
+
+ void insertTab(IsWidget tab, IsWidget tabTitle, int position);
+
+ void setErrorMessage(final String message, final NotifyLevel level);
+
+}
Property changes on: trunk/src/main/java/cc/kune/common/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/common/client/utils/TextUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/utils/TextUtils.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/common/client/utils/TextUtils.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -38,11 +38,23 @@
// Original regexp from http://snippets.dzone.com/posts/show/452
public static final String URL_REGEXP = "((ftp|http|https|mailto):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?)";
+ public static String br() {
+ return "<br/>";
+ }
+
+ public static String brbr() {
+ return "<br/><br/>";
+ }
+
public static String ellipsis(final String text, final int length) {
return text == null ? "" : length <= 0 ? text : text.length() > length ? text.substring(0, length - 3) + "..."
: text;
}
+ public static boolean empty(final String string) {
+ return !notEmpty(string);
+ }
+
/**
* This method escape only some dangerous html chars
*
Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,6 +19,7 @@
*/
package cc.kune.core.client;
+import cc.kune.client.ExtendedGinModule;
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;
@@ -107,12 +108,11 @@
import com.google.inject.Singleton;
import com.gwtplatform.mvp.client.DefaultProxyFailureHandler;
import com.gwtplatform.mvp.client.RootPresenter;
-import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
import com.gwtplatform.mvp.client.proxy.ParameterTokenFormatter;
import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler;
import com.gwtplatform.mvp.client.proxy.TokenFormatter;
-public class CoreGinModule extends AbstractPresenterModule {
+public class CoreGinModule extends ExtendedGinModule {
/*
* (non-Javadoc)
@@ -209,15 +209,4 @@
s(SitebarSignOutLink.class);
}
- private void eagle(final Class<?> type) {
- bind(type).asEagerSingleton();
- }
-
- private void s(final Class<?> type) {
- bind(type).in(Singleton.class);
- }
-
- private <V, W> void s(final Class<V> type, final Class<? extends V> typeImpl) {
- bind(type).to(typeImpl).in(Singleton.class);
- }
}
Modified: trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -21,10 +21,10 @@
import cc.kune.common.client.notify.NotifyLevelImages;
import cc.kune.common.client.ui.MaskWidgetView;
+import cc.kune.common.client.ui.dialogs.MessageToolbar;
import cc.kune.core.client.resources.CoreMessages;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.ui.KuneUiUtils;
-import cc.kune.core.client.ui.dialogs.MessageToolbar;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.gwt.core.client.Scheduler;
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -22,8 +22,9 @@
import cc.kune.common.client.notify.NotifyLevel;
import cc.kune.common.client.notify.NotifyLevelImages;
import cc.kune.common.client.ui.MaskWidgetView;
-import cc.kune.core.client.ui.dialogs.BasicTopDialog;
-import cc.kune.core.client.ui.dialogs.MessageToolbar;
+import cc.kune.common.client.ui.dialogs.BasicTopDialog;
+import cc.kune.common.client.ui.dialogs.BasicTopDialog.Builder;
+import cc.kune.common.client.ui.dialogs.MessageToolbar;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.gwt.event.dom.client.HasClickHandlers;
@@ -47,8 +48,14 @@
final int heigth, final String icon, final String firstButtonTitle, final String firstButtonId,
final String cancelButtonTitle, final String cancelButtonId, final NotifyLevelImages images,
final String errorLabelId, final int tabIndexStart) {
- dialog = new BasicTopDialog(dialogId, title, autohide, modal, autoscroll, width, heigth, icon,
- firstButtonTitle, firstButtonId, cancelButtonTitle, cancelButtonId, tabIndexStart);
+
+ final Builder builder = new BasicTopDialog.Builder(dialogId, autohide, modal).autoscroll(autoscroll);
+ builder.width(width).height(heigth);
+ builder.icon(icon);
+ builder.firstButtonTitle(firstButtonTitle).firstButtonId(firstButtonId);
+ builder.sndButtonTitle(cancelButtonTitle).sndButtonId(cancelButtonId);
+ builder.tabIndexStart(tabIndexStart);
+ dialog = builder.build();
this.i18n = i18n;
this.images = images;
this.errorLabelId = errorLabelId;
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -21,10 +21,10 @@
import cc.kune.common.client.notify.NotifyLevelImages;
import cc.kune.common.client.ui.MaskWidgetView;
+import cc.kune.common.client.ui.dialogs.MessageToolbar;
import cc.kune.common.client.utils.OnAcceptCallback;
import cc.kune.core.client.resources.CoreMessages;
import cc.kune.core.client.ui.KuneUiUtils;
-import cc.kune.core.client.ui.dialogs.MessageToolbar;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.extjs.gxt.ui.client.widget.VerticalPanel;
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -139,9 +139,9 @@
}
});
getView().getSecondBtn().addClickHandler(new ClickHandler() {
-
@Override
public void onClick(final ClickEvent event) {
+ Log.debug("On cancel signin presenter");
onCancel();
}
});
@@ -149,7 +149,7 @@
@Override
public void onClose(final CloseEvent<PopupPanel> event) {
- Log.debug("Closing register presenter");
+ Log.debug("Closing signin presenter");
SignInPresenter.this.onClose();
}
});
Modified: trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -22,10 +22,11 @@
import cc.kune.common.client.notify.NotifyLevel;
import cc.kune.common.client.notify.NotifyLevelImages;
import cc.kune.common.client.ui.MaskWidgetView;
+import cc.kune.common.client.ui.dialogs.BasicTopDialog;
+import cc.kune.common.client.ui.dialogs.BasicTopDialog.Builder;
+import cc.kune.common.client.ui.dialogs.MessageToolbar;
import cc.kune.core.client.resources.CoreMessages;
import cc.kune.core.client.ui.DefaultFormUtils;
-import cc.kune.core.client.ui.dialogs.BasicTopDialog;
-import cc.kune.core.client.ui.dialogs.MessageToolbar;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
@@ -79,8 +80,13 @@
@Inject
public NewGroupPanel(final I18nTranslationService i18n, final NotifyLevelImages img, final MaskWidgetView mask) {
- dialog = new BasicTopDialog(NEWGROUP_WIZARD, CoreMessages.REGISTER_A_NEW_GROUP_TITLE, false, true, true, 450,
- 360, "k-newgroup-icon", i18n.t("Register"), REGISTER_BUTTON, i18n.t("Cancel"), CANCEL_BUTTON, 9);
+ final Builder builder = new BasicTopDialog.Builder(NEWGROUP_WIZARD, false, true).autoscroll(true).height(
+ "360px");
+ builder.icon("k-newgroup-icon");
+ builder.firstButtonTitle(i18n.t("Register")).firstButtonId(REGISTER_BUTTON);
+ builder.sndButtonTitle(i18n.t("Cancel")).sndButtonId(CANCEL_BUTTON);
+ builder.tabIndexStart(9);
+ dialog = builder.build();
this.i18n = i18n;
this.mask = mask;
// Field.setMsgTarget("side");
Modified: trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/client/notify/confirm/UserConfirmPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -20,9 +20,9 @@
package cc.kune.core.client.notify.confirm;
import cc.kune.common.client.notify.ConfirmAskEvent;
+import cc.kune.common.client.ui.dialogs.BasicTopDialog;
import cc.kune.common.client.utils.TextUtils;
import cc.kune.core.client.notify.confirm.UserConfirmPresenter.UserConfirmView;
-import cc.kune.core.client.ui.dialogs.BasicTopDialog;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.gwt.event.dom.client.ClickEvent;
@@ -44,7 +44,8 @@
@Inject
public UserConfirmPanel(final I18nTranslationService i18n) {
- dialog = new BasicTopDialog(DIALOG_ID, "", false, true, false, 100, 100, "", "", OK_ID, "", CANCEL_ID, 1);
+ dialog = new BasicTopDialog.Builder(DIALOG_ID, false, true).autoscroll(false).width(100).height(100).firstButtonId(
+ OK_ID).sndButtonId(CANCEL_ID).tabIndexStart(1).build();
askLabel = new Label();
askLabel.addStyleName("k-userconfirm-label");
dialog.getInnerPanel().add(askLabel);
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/AboutKuneDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,6 +1,6 @@
package cc.kune.core.client.sitebar;
-import cc.kune.core.client.ui.dialogs.BasicTopDialog;
+import cc.kune.common.client.ui.dialogs.BasicTopDialog;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.gwt.core.client.GWT;
@@ -30,8 +30,8 @@
@Inject
public AboutKuneDialog(final I18nTranslationService i18n) {
- dialog = new BasicTopDialog(ABOUT_KUNE_ID, i18n.t("About Kune"), true, true, false, 400, 400, "", i18n.t("Ok"),
- ABOUT_KUNE_BTN_ID, 1);
+ dialog = new BasicTopDialog.Builder(ABOUT_KUNE_ID, true, true).title(i18n.t("About Kune")).autoscroll(false).firstButtonTitle(
+ i18n.t("Ok")).firstButtonId(ABOUT_KUNE_BTN_ID).tabIndexStart(1).build();
dialog.getInnerPanel().add(BINDER.createAndBindUi(this));
dialog.getFirstBtn().addClickHandler(new ClickHandler() {
@Override
Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -365,7 +365,9 @@
@Override
public void restorePreviousToken() {
- gotoStateToken(previousToken);
+ if (previousToken != null) {
+ gotoStateToken(previousToken);
+ }
}
@Override
Modified: trunk/src/main/java/cc/kune/core/client/ui/DefaultFormUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/DefaultFormUtils.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/client/ui/DefaultFormUtils.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -25,26 +25,17 @@
import com.extjs.gxt.ui.client.widget.form.Radio;
public class DefaultFormUtils {
-
public static Radio createRadio(final FieldSet fieldSet, final String radioLabel, final String radioFieldName,
final String radioTip, final String id) {
final Radio radio = new Radio();
radio.setName(radioFieldName);
- // radio.setAutoCreate(true);
radio.setHideLabel(true);
radio.setId(id);
fieldSet.add(radio);
if (radioTip != null) {
Tooltip.to(radio, radioTip);
- // radio.setTitle(radioTip);
radio.setBoxLabel(radioLabel);
- // radio.setBoxLabel(KuneUiUtils.genQuickTipLabel(radioLabel, null,
- // radioTip));
- // ToolTip tooltip = new ToolTip();
- // tooltip.setHtml(radioTip);
- // tooltip.setWidth(250);
- // tooltip.applyTo(radio);
} else {
radio.setBoxLabel(radioLabel);
}
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1113,4 +1113,12 @@
.k-empty-msg {
font-size: 16px;
font-style: italic;
-}
\ No newline at end of file
+}
+
+button.k-ent-header-btn {
+ margin: 10px !important;
+}
+
+.k-ent-header-btn * {
+ font-size: 13px !important;
+}
Modified: trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/docs/server/DocumentServerTool.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -122,8 +122,11 @@
config.setRoot(rootFolder);
group.setToolConfig(NAME, config);
configurationManager.persist(config);
- final String title = (String) otherVars[0];
- final String body = (String) otherVars[1];
+
+ final boolean hasVars = otherVars.length >= 2;
+ final String title = hasVars ? (String) otherVars[0] : i18n.t("Document sample");
+ final String body = hasVars ? (String) otherVars[1] : i18n.t("This is only a sample of document");
+
final Content content = contentManager.createContent(title, body, user, rootFolder, DocsConstants.TYPE_DOCUMENT);
content.addAuthor(user);
content.setLanguage(user.getLanguage());
Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceGinModule.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,6 +19,51 @@
*/
package cc.kune.gspace.client;
+import cc.kune.client.ExtendedGinModule;
+import cc.kune.gspace.client.options.GroupOptions;
+import cc.kune.gspace.client.options.GroupOptionsCollection;
+import cc.kune.gspace.client.options.GroupOptionsPanel;
+import cc.kune.gspace.client.options.GroupOptionsPresenter;
+import cc.kune.gspace.client.options.GroupOptionsView;
+import cc.kune.gspace.client.options.UserOptions;
+import cc.kune.gspace.client.options.UserOptionsCollection;
+import cc.kune.gspace.client.options.UserOptionsPanel;
+import cc.kune.gspace.client.options.UserOptionsPresenter;
+import cc.kune.gspace.client.options.UserOptionsView;
+import cc.kune.gspace.client.options.license.GroupOptionsDefLicense;
+import cc.kune.gspace.client.options.license.GroupOptionsDefLicensePanel;
+import cc.kune.gspace.client.options.license.GroupOptionsDefLicensePresenter;
+import cc.kune.gspace.client.options.license.GroupOptionsDefLicenseView;
+import cc.kune.gspace.client.options.license.UserOptionsDefLicense;
+import cc.kune.gspace.client.options.license.UserOptionsDefLicensePanel;
+import cc.kune.gspace.client.options.license.UserOptionsDefLicensePresenter;
+import cc.kune.gspace.client.options.license.UserOptionsDefLicenseView;
+import cc.kune.gspace.client.options.logo.GroupOptionsLogo;
+import cc.kune.gspace.client.options.logo.GroupOptionsLogoPanel;
+import cc.kune.gspace.client.options.logo.GroupOptionsLogoPresenter;
+import cc.kune.gspace.client.options.logo.GroupOptionsLogoView;
+import cc.kune.gspace.client.options.logo.UserOptionsLogo;
+import cc.kune.gspace.client.options.logo.UserOptionsLogoPanel;
+import cc.kune.gspace.client.options.logo.UserOptionsLogoPresenter;
+import cc.kune.gspace.client.options.logo.UserOptionsLogoView;
+import cc.kune.gspace.client.options.pscape.GroupOptionsPublicSpaceConf;
+import cc.kune.gspace.client.options.pscape.GroupOptionsPublicSpaceConfPanel;
+import cc.kune.gspace.client.options.pscape.GroupOptionsPublicSpaceConfPresenter;
+import cc.kune.gspace.client.options.pscape.GroupOptionsPublicSpaceConfView;
+import cc.kune.gspace.client.options.pscape.UserOptionsPublicSpaceConf;
+import cc.kune.gspace.client.options.pscape.UserOptionsPublicSpaceConfPanel;
+import cc.kune.gspace.client.options.pscape.UserOptionsPublicSpaceConfPresenter;
+import cc.kune.gspace.client.options.pscape.UserOptionsPublicSpaceConfView;
+import cc.kune.gspace.client.options.tools.GroupOptionsToolsConf;
+import cc.kune.gspace.client.options.tools.GroupOptionsToolsConfPanel;
+import cc.kune.gspace.client.options.tools.GroupOptionsToolsConfPresenter;
+import cc.kune.gspace.client.options.tools.GroupOptionsToolsConfView;
+import cc.kune.gspace.client.options.tools.UserOptionsToolsConf;
+import cc.kune.gspace.client.options.tools.UserOptionsToolsConfPanel;
+import cc.kune.gspace.client.options.tools.UserOptionsToolsConfPresenter;
+import cc.kune.gspace.client.options.tools.UserOptionsToolsConfView;
+import cc.kune.gspace.client.style.GSpaceBackManager;
+import cc.kune.gspace.client.style.GSpaceBackManagerImpl;
import cc.kune.gspace.client.tags.TagsSummaryPanel;
import cc.kune.gspace.client.tags.TagsSummaryPresenter;
import cc.kune.gspace.client.tool.selector.ToolSelector;
@@ -32,9 +77,8 @@
import cc.kune.gspace.client.viewers.FolderViewerPresenter;
import com.google.inject.Singleton;
-import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
-public class GSpaceGinModule extends AbstractPresenterModule {
+public class GSpaceGinModule extends ExtendedGinModule {
/*
* (non-Javadoc)
@@ -57,6 +101,33 @@
DocViewerPresenter.DocViewerProxy.class);
bindPresenter(FolderViewerPresenter.class, FolderViewerPresenter.FolderViewerView.class,
FolderViewerAsTablePanel.class, FolderViewerPresenter.FolderViewerProxy.class);
+
+ s(GroupOptions.class, GroupOptionsPresenter.class);
+ s(GroupOptionsView.class, GroupOptionsPanel.class);
+ s(UserOptions.class, UserOptionsPresenter.class);
+ s(UserOptionsView.class, UserOptionsPanel.class);
+
+ s(UserOptionsCollection.class);
+ s(GroupOptionsCollection.class);
+
+ s(GroupOptionsDefLicense.class, GroupOptionsDefLicensePresenter.class);
+ s(GroupOptionsDefLicenseView.class, GroupOptionsDefLicensePanel.class);
+ s(GroupOptionsPublicSpaceConf.class, GroupOptionsPublicSpaceConfPresenter.class);
+ s(GroupOptionsPublicSpaceConfView.class, GroupOptionsPublicSpaceConfPanel.class);
+ s(GroupOptionsLogo.class, GroupOptionsLogoPresenter.class);
+ s(GroupOptionsLogoView.class, GroupOptionsLogoPanel.class);
+ s(GroupOptionsToolsConf.class, GroupOptionsToolsConfPresenter.class);
+ s(GroupOptionsToolsConfView.class, GroupOptionsToolsConfPanel.class);
+
+ s(UserOptionsDefLicense.class, UserOptionsDefLicensePresenter.class);
+ s(UserOptionsDefLicenseView.class, UserOptionsDefLicensePanel.class);
+ s(UserOptionsPublicSpaceConf.class, UserOptionsPublicSpaceConfPresenter.class);
+ s(UserOptionsPublicSpaceConfView.class, UserOptionsPublicSpaceConfPanel.class);
+ s(UserOptionsLogo.class, UserOptionsLogoPresenter.class);
+ s(UserOptionsLogoView.class, UserOptionsLogoPanel.class);
+ s(UserOptionsToolsConf.class, UserOptionsToolsConfPresenter.class);
+ s(UserOptionsToolsConfView.class, UserOptionsToolsConfPanel.class);
+
+ s(GSpaceBackManager.class, GSpaceBackManagerImpl.class);
}
-
}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceParts.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -3,6 +3,18 @@
import cc.kune.core.client.init.AppStartEvent;
import cc.kune.core.client.init.AppStartEvent.AppStartHandler;
import cc.kune.core.client.state.Session;
+import cc.kune.gspace.client.options.GroupOptions;
+import cc.kune.gspace.client.options.GroupOptionsCollection;
+import cc.kune.gspace.client.options.UserOptions;
+import cc.kune.gspace.client.options.UserOptionsCollection;
+import cc.kune.gspace.client.options.license.GroupOptionsDefLicense;
+import cc.kune.gspace.client.options.license.UserOptionsDefLicense;
+import cc.kune.gspace.client.options.logo.GroupOptionsLogo;
+import cc.kune.gspace.client.options.logo.UserOptionsLogo;
+import cc.kune.gspace.client.options.pscape.GroupOptionsPublicSpaceConf;
+import cc.kune.gspace.client.options.pscape.UserOptionsPublicSpaceConf;
+import cc.kune.gspace.client.options.tools.GroupOptionsToolsConf;
+import cc.kune.gspace.client.options.tools.UserOptionsToolsConf;
import cc.kune.gspace.client.tags.TagsSummaryPresenter;
import cc.kune.gspace.client.tool.selector.ToolSelector;
import cc.kune.gspace.client.ui.footer.license.EntityLicensePresenter;
@@ -17,7 +29,24 @@
@Inject
public GSpaceParts(final Session session, final Provider<EntityLicensePresenter> licenseFooter,
final Provider<TagsSummaryPresenter> tagsPresenter, final Provider<ToolSelector> toolSelector,
- final Provider<DocViewerPresenter> docsViewer, final Provider<FolderViewerPresenter> folderViewer) {
+ final Provider<DocViewerPresenter> docsViewer, final Provider<FolderViewerPresenter> folderViewer,
+ final Provider<GroupOptions> go, final Provider<UserOptions> uo,
+ final Provider<GroupOptionsCollection> goc, final Provider<UserOptionsCollection> uoc,
+ final Provider<GroupOptionsDefLicense> gdl, final Provider<GroupOptionsPublicSpaceConf> gps,
+ final Provider<GroupOptionsLogo> gl, final Provider<GroupOptionsToolsConf> gtc,
+ final Provider<UserOptionsDefLicense> udl, final Provider<UserOptionsPublicSpaceConf> ups,
+ final Provider<UserOptionsLogo> ul, final Provider<UserOptionsToolsConf> utc) {
+ // , final Provider<GroupOptionsPanel> gop,
+ // , final Provider<UserOptionsPanel> uop,
+ // final Provider<GroupOptionsPublicSpaceConfPanel> gpsp,
+ // final Provider<GroupOptionsDefLicensePanel> gdlp,
+ // final Provider<GroupOptionsLogoPanel> glp,
+ // final Provider<GroupOptionsToolsConfPanel> gtcp,
+ // final Provider<UserOptionsLogoPanel> ulp,
+ // final Provider<UserOptionsDefLicensePanel> udlp,
+ // final Provider<UserOptionsPublicSpaceConfPanel> upsp,
+ // final Provider<UserOptionsToolsConfPanel> utcp
+
session.onAppStart(true, new AppStartHandler() {
@Override
public void onAppStart(final AppStartEvent event) {
@@ -26,6 +55,20 @@
toolSelector.get();
docsViewer.get();
folderViewer.get();
+
+ // Add User & Groups Options
+ goc.get().add(gtc);
+ goc.get().add(gl);
+ goc.get().add(gps);
+ goc.get().add(gdl);
+ uoc.get().add(utc);
+ uoc.get().add(ul);
+ uoc.get().add(ups);
+ uoc.get().add(udl);
+
+ // Init
+ go.get();
+ uo.get();
}
});
}
Copied: trunk/src/main/java/cc/kune/gspace/client/options/EntityOptions.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptions.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/EntityOptions.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/EntityOptions.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options;
+
+import cc.kune.common.client.notify.NotifyLevel;
+import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialog;
+
+import com.google.gwt.user.client.ui.IsWidget;
+
+public interface EntityOptions extends AbstractTabbedDialog {
+
+ public IsWidget getView();
+
+ @Override
+ public void hideMessages();
+
+ @Override
+ public void setErrorMessage(String message, NotifyLevel level);
+
+ @Override
+ public void show();
+
+}
Added: trunk/src/main/java/cc/kune/gspace/client/options/EntityOptionsTabView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/EntityOptionsTabView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/EntityOptionsTabView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,8 @@
+package cc.kune.gspace.client.options;
+
+import com.google.gwt.user.client.ui.IsWidget;
+
+public interface EntityOptionsTabView extends IsWidget {
+
+ IsWidget getTabTitle();
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/EntityOptionsTabView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/gspace/client/options/EntityOptionsView.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptionsView.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/EntityOptionsView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/EntityOptionsView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options;
+
+import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogView;
+
+public interface EntityOptionsView extends AbstractTabbedDialogView {
+
+ int HEIGHT = 270;
+
+}
Copied: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptions.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptions.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/GroupOptions.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/GroupOptions.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,23 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options;
+
+public interface GroupOptions extends EntityOptions {
+}
Added: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsCollection.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsCollection.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsCollection.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,7 @@
+package cc.kune.gspace.client.options;
+
+import cc.kune.common.client.ProvidersCollection;
+
+ at SuppressWarnings("serial")
+public class GroupOptionsCollection extends ProvidersCollection {
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsCollection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,69 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.notify.NotifyLevelImages;
+import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+import cc.kune.core.client.resources.CoreMessages;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+
+public class GroupOptionsPanel extends AbstractTabbedDialogPanel implements GroupOptionsView {
+
+ public static final String GROUP_OP_PANEL_ID = "k-gop-diagpan";
+ public static final String GROUP_OPTIONS_ERROR_ID = "k-gop-err-mess";
+ private final EntityHeader entityHeader;
+ private final GroupOptionsCollection entityPreferencesGroup;
+
+ @Inject
+ public GroupOptionsPanel(final EntityHeader entityHeader, final I18nTranslationService i18n,
+ final NotifyLevelImages images, final GroupOptionsCollection entityOptionsGroup) {
+ super(GROUP_OP_PANEL_ID, "", 400, HEIGHT + 80, 400, HEIGHT + 80, false, images, GROUP_OPTIONS_ERROR_ID,
+ i18n.t("Close"), null, null, null);
+ this.entityHeader = entityHeader;
+ this.entityPreferencesGroup = entityOptionsGroup;
+ super.setIconCls("k-options-icon");
+ super.setTitle(i18n.t(CoreMessages.GROUP_OPTIONS_DIALOG_TITLE));
+ }
+
+ @Override
+ public void addAction(final GuiActionDescrip descriptor) {
+ entityHeader.addAction(descriptor);
+ }
+
+ @Override
+ public Widget asWidget() {
+ return super.getWidget();
+ }
+
+ @Override
+ public void createAndShow() {
+ createAndShowItImpl();
+ }
+
+ private void createAndShowItImpl() {
+ entityPreferencesGroup.createAll();
+ super.createAndShow();
+ }
+}
Copied: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPresenter.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,84 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.state.StateChangedEvent;
+import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class GroupOptionsPresenter extends AbstractTabbedDialogPresenter implements GroupOptions {
+ public static final String GROUP_OPTIONS_ICON = "k-eop-icon";
+ private final I18nTranslationService i18n;
+ private final IconResources img;
+ private ButtonDescriptor prefsItem;
+ private GroupOptionsView view;
+
+ @Inject
+ public GroupOptionsPresenter(final StateManager stateManager, final I18nTranslationService i18n,
+ final IconResources img, final GroupOptionsView view) {
+ this.i18n = i18n;
+ this.img = img;
+ stateManager.onStateChanged(true, new StateChangedHandler() {
+ @Override
+ public void onStateChanged(final StateChangedEvent event) {
+ final StateAbstractDTO state = event.getState();
+ if (!state.getGroup().isPersonal() && state.getGroupRights().isAdministrable()) {
+ prefsItem.setVisible(true);
+ } else {
+ view.hide();
+ prefsItem.setVisible(false);
+ }
+ }
+ });
+ init(view);
+ }
+
+ private void createActions() {
+ final AbstractExtendedAction groupPrefsAction = new AbstractExtendedAction() {
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ show();
+ }
+ };
+ groupPrefsAction.putValue(Action.NAME, i18n.t("Group options"));
+ groupPrefsAction.putValue(Action.SMALL_ICON, img.prefs());
+ prefsItem = new ButtonDescriptor(groupPrefsAction);
+ prefsItem.withStyles("k-ent-header-btn");
+ prefsItem.setId(GROUP_OPTIONS_ICON);
+ prefsItem.setVisible(false);
+ view.addAction(prefsItem);
+ }
+
+ private void init(final GroupOptionsView view) {
+ super.init(view);
+ this.view = view;
+ createActions();
+ }
+}
Copied: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsView.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsView.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,28 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options;
+
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+
+public interface GroupOptionsView extends EntityOptionsView {
+
+ void addAction(GuiActionDescrip descriptor);
+
+}
Copied: trunk/src/main/java/cc/kune/gspace/client/options/UserOptions.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptions.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/UserOptions.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/UserOptions.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,23 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options;
+
+public interface UserOptions extends EntityOptions {
+}
Added: trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsCollection.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsCollection.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsCollection.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,7 @@
+package cc.kune.gspace.client.options;
+
+import cc.kune.common.client.ProvidersCollection;
+
+ at SuppressWarnings("serial")
+public class UserOptionsCollection extends ProvidersCollection {
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsCollection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPanel.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,62 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options;
+
+import cc.kune.common.client.notify.NotifyLevelImages;
+import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+import cc.kune.core.client.resources.CoreMessages;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.gwt.user.client.ui.Widget;
+import com.google.inject.Inject;
+
+public class UserOptionsPanel extends AbstractTabbedDialogPanel implements UserOptionsView {
+
+ public static final String USER_OP_PANEL_ID = "k-uop-diagpan";
+ public static final String USER_OPTIONS_ERROR_ID = "k-uop-err-mess";
+
+ private final UserOptionsCollection userPreferencesGroup;
+
+ @Inject
+ public UserOptionsPanel(final EntityHeader entityHeader, final I18nTranslationService i18n,
+ final NotifyLevelImages images, final UserOptionsCollection userOptionsGroup) {
+ super(USER_OP_PANEL_ID, "", 400, HEIGHT + 80, 400, HEIGHT + 80, false, images, USER_OPTIONS_ERROR_ID,
+ i18n.t("Close"), null, null, null);
+ this.userPreferencesGroup = userOptionsGroup;
+ super.setIconCls("k-options-icon");
+ super.setTitle(i18n.t(CoreMessages.USER_OPTIONS_DIALOG_TITLE));
+ }
+
+ @Override
+ public Widget asWidget() {
+ return super.getWidget();
+ }
+
+ @Override
+ public void createAndShow() {
+ createAndShowItImpl();
+ }
+
+ private void createAndShowItImpl() {
+ userPreferencesGroup.createAll();
+ super.createAndShow();
+ }
+}
Copied: trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPresenter.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPresenter.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPresenter.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,87 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options;
+
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.sitebar.SiteUserOptions;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.UserSignInEvent;
+import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class UserOptionsPresenter extends AbstractTabbedDialogPresenter implements UserOptions {
+
+ private final I18nTranslationService i18n;
+ private final IconResources img;
+ private final Session session;
+ private final StateManager stateManager;
+ private final SiteUserOptions userOptions;
+ private UserOptionsView view;
+
+ @Inject
+ public UserOptionsPresenter(final Session session, final StateManager stateManager,
+ final I18nTranslationService i18n, final IconResources img, final SiteUserOptions userOptions,
+ final UserOptionsView view) {
+ this.session = session;
+ this.stateManager = stateManager;
+ this.i18n = i18n;
+ this.img = img;
+ this.userOptions = userOptions;
+ session.onUserSignIn(false, new UserSignInHandler() {
+ @Override
+ public void onUserSignIn(final UserSignInEvent event) {
+ view.hide();
+ }
+ });
+ init(view);
+ }
+
+ private void createActions() {
+ final AbstractExtendedAction userPrefsAction = new AbstractExtendedAction() {
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ if (!session.isInCurrentUserSpace()) {
+ stateManager.gotoStateToken(session.getCurrentUser().getStateToken());
+ }
+ show();
+ }
+ };
+ userPrefsAction.putValue(Action.NAME, i18n.t("Your preferences"));
+ userPrefsAction.putValue(Action.SMALL_ICON, img.prefs());
+ final MenuItemDescriptor prefsItem = new MenuItemDescriptor(userPrefsAction);
+ prefsItem.setPosition(1);
+ userOptions.addAction(prefsItem);
+ }
+
+ private void init(final UserOptionsView view) {
+ super.init(view);
+ this.view = view;
+ createActions();
+ }
+}
Copied: trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsView.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsView.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/UserOptionsView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,24 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options;
+
+public interface UserOptionsView extends EntityOptionsView {
+
+}
Copied: trunk/src/main/java/cc/kune/gspace/client/options/license (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/license)
Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicense.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/EntityOptionsDefLicense.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicense.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.license;
+package cc.kune.gspace.client.options.license;
public interface EntityOptionsDefLicense {
Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/EntityOptionsDefLicensePanel.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,73 +17,71 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.license;
+package cc.kune.gspace.client.options.license;
-import org.ourproject.kune.platf.client.ui.KuneUiUtils;
-import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm;
-import org.ourproject.kune.platf.client.ui.dialogs.DefaultFormUtils;
-import org.ourproject.kune.workspace.client.options.EntityOptionsView;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
+import cc.kune.common.client.tooltip.Tooltip;
+import cc.kune.common.client.ui.IconLabel;
+import cc.kune.common.client.ui.KuneWindowUtils;
+import cc.kune.core.client.resources.CoreResources;
import cc.kune.core.shared.dto.LicenseDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.EntityOptionsView;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Image;
-import com.gwtext.client.core.EventObject;
-import com.gwtext.client.core.Position;
-import com.gwtext.client.widgets.Button;
-import com.gwtext.client.widgets.PaddedPanel;
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-import com.gwtext.client.widgets.form.Label;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.VerticalPanel;
-public class EntityOptionsDefLicensePanel extends DefaultForm implements EntityOptionsDefLicenseView {
+public class EntityOptionsDefLicensePanel extends Composite implements EntityOptionsDefLicenseView {
+ private final Button change;
private final Image licenseImage;
+ private final IconLabel tabTitle;
- public EntityOptionsDefLicensePanel(final EntityOptionsDefLicensePresenter presenter, final WorkspaceSkeleton ws,
- final I18nTranslationService i18n) {
- super(i18n.t("License"));
- super.setIconCls("k-copyleft-icon");
- super.setHeight(EntityOptionsView.HEIGHT);
- super.setFrame(true);
- super.getFormPanel().setButtonAlign(Position.LEFT);
+ public EntityOptionsDefLicensePanel(final I18nTranslationService i18n, final CoreResources res) {
+ tabTitle = new IconLabel(res.copyleft(), i18n.t("License"));
+ // super.setIconCls("k-copyleft-icon");
+ // super.setFrame(true);
+ // super.getFormPanel().setButtonAlign(Position.LEFT);
+ final VerticalPanel vp = new VerticalPanel();
final Label intro = new Label();
- intro.setHtml(i18n.t("This is the default license for all the contents of this group (you can also select another different license per content):")
- + DefaultFormUtils.brbr());
+ intro.setText(i18n.t("This is the default license for all the contents of this group (you can also select another different license per content):"));
+ vp.add(intro);
licenseImage = new Image();
- final Panel imagePanel = new Panel();
- imagePanel.setBorder(false);
- imagePanel.add(licenseImage);
- licenseImage.addClickHandler(new ClickHandler() {
- public void onClick(final ClickEvent event) {
- presenter.onLicenseClick();
- }
- });
+ vp.add(licenseImage);
licenseImage.addStyleName("kune-pointer");
+ change = new Button(i18n.t("Change"));
+ initWidget(vp);
+ super.setHeight(String.valueOf(EntityOptionsView.HEIGHT));
+ }
- final Button change = new Button(i18n.t("Change"));
- change.addListener(new ButtonListenerAdapter() {
- @Override
- public void onClick(final Button button, final EventObject event) {
- presenter.onChange();
- }
- });
+ @Override
+ public HasClickHandlers getChange() {
+ return change;
+ }
- add(intro);
- add(new PaddedPanel(imagePanel, 0, 0, 0, 5));
- addButton(change);
+ @Override
+ public HasClickHandlers getLicenseImage() {
+ return licenseImage;
}
- public void openWindow(final String url) {
+ @Override
+ public IsWidget getTabTitle() {
+ return tabTitle;
+ }
+ @Override
+ public void openWindow(final String url) {
+ KuneWindowUtils.open(url);
}
+ @Override
public void setLicense(final LicenseDTO defaultLicense) {
licenseImage.setUrl(defaultLicense.getImageUrl());
- KuneUiUtils.setQuickTip(licenseImage, defaultLicense.getLongName());
+ Tooltip.to(licenseImage, defaultLicense.getLongName());
}
}
Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/EntityOptionsDefLicensePresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,77 +17,88 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.license;
+package cc.kune.gspace.client.options.license;
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseChangeAction;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseWizard;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
import cc.kune.core.client.state.Session;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.LicenseDTO;
+import cc.kune.gspace.client.options.EntityOptions;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener0;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.ui.IsWidget;
public abstract class EntityOptionsDefLicensePresenter {
- private EntityOptionsDefLicenseView view;
private final EntityOptions entityOptions;
+ // private final Provider<LicenseChangeAction> licChangeAction;
+ // private final Provider<LicenseWizard> licenseWizard;
protected final Session session;
- private final Provider<LicenseWizard> licenseWizard;
- private final Provider<LicenseChangeAction> licChangeAction;
+ private EntityOptionsDefLicenseView view;
- public EntityOptionsDefLicensePresenter(final EntityOptions entityOptions, final Session session,
- final Provider<LicenseWizard> licenseWizard, final Provider<LicenseChangeAction> licChangeAction) {
+ public EntityOptionsDefLicensePresenter(final EntityOptions entityOptions, final Session session) {
+ // final Provider<LicenseWizard> licenseWizard, final
+ // Provider<LicenseChangeAction> licChangeAction) {
this.entityOptions = entityOptions;
this.session = session;
- this.licenseWizard = licenseWizard;
- this.licChangeAction = licChangeAction;
-
+ // this.licenseWizard = licenseWizard;
+ // this.licChangeAction = licChangeAction;
}
- public View getView() {
+ protected abstract boolean applicable();
+
+ protected abstract LicenseDTO getCurrentDefLicense();
+
+ protected abstract StateToken getOperationToken();
+
+ public IsWidget getView() {
return view;
}
- public void init(final EntityOptionsDefLicenseView view) {
+ protected void init(final EntityOptionsDefLicenseView view) {
this.view = view;
- entityOptions.addTab(view);
+ entityOptions.addTab(view, view.getTabTitle());
setState();
- }
-
- public void onChange() {
- licenseWizard.get().start(new Listener<LicenseDTO>() {
- public void onEvent(final LicenseDTO license) {
- licChangeAction.get().changeLicense(getOperationToken(), license, new Listener0() {
- public void onEvent() {
- setLicense(license);
- }
- });
+ view.getChange().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ onLicenseClick();
}
});
+ view.getLicenseImage().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ // onChange();
+ }
+ });
}
+ // public void onChange() {
+ // licenseWizard.get().start(new Listener<LicenseDTO>() {
+ // @Override
+ // public void onEvent(final LicenseDTO license) {
+ // licChangeAction.get().changeLicense(getOperationToken(), license, new
+ // Listener0() {
+ // @Override
+ // public void onEvent() {
+ // setLicense(license);
+ // }
+ // });
+ // }
+ // });
+ // }
+
public void onLicenseClick() {
view.openWindow(getCurrentDefLicense().getUrl());
}
- protected abstract boolean applicable();
+ private void setLicense(final LicenseDTO license) {
+ view.setLicense(license);
+ }
- protected abstract LicenseDTO getCurrentDefLicense();
-
- protected abstract StateToken getOperationToken();
-
protected void setState() {
if (applicable()) {
setLicense(getCurrentDefLicense());
}
}
-
- private void setLicense(final LicenseDTO license) {
- view.setLicense(license);
- }
}
Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicenseView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/EntityOptionsDefLicenseView.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicenseView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,14 +17,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.license;
+package cc.kune.gspace.client.options.license;
-import org.ourproject.kune.platf.client.View;
-
import cc.kune.core.shared.dto.LicenseDTO;
+import cc.kune.gspace.client.options.EntityOptionsTabView;
-public interface EntityOptionsDefLicenseView extends View {
+import com.google.gwt.event.dom.client.HasClickHandlers;
+public interface EntityOptionsDefLicenseView extends EntityOptionsTabView {
+
+ HasClickHandlers getChange();
+
+ HasClickHandlers getLicenseImage();
+
void openWindow(String url);
void setLicense(LicenseDTO defaultLicense);
Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicense.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/GroupOptionsDefLicense.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicense.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.license;
+package cc.kune.gspace.client.options.license;
public interface GroupOptionsDefLicense extends EntityOptionsDefLicense {
Added: trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicensePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicensePanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicensePanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,15 @@
+package cc.kune.gspace.client.options.license;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class GroupOptionsDefLicensePanel extends EntityOptionsDefLicensePanel implements GroupOptionsDefLicenseView {
+
+ @Inject
+ public GroupOptionsDefLicensePanel(final I18nTranslationService i18n, final CoreResources res) {
+ super(i18n, res);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicensePanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicensePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/GroupOptionsDefLicensePresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicensePresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,28 +17,30 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.license;
+package cc.kune.gspace.client.options.license;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseChangeAction;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseWizard;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.UserSignInEvent;
+import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.LicenseDTO;
+import cc.kune.gspace.client.options.GroupOptions;
-import com.calclab.suco.client.events.Listener2;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.inject.Inject;
public class GroupOptionsDefLicensePresenter extends EntityOptionsDefLicensePresenter implements GroupOptionsDefLicense {
- public GroupOptionsDefLicensePresenter(final EntityOptions entityOptions, final StateManager stateManager,
- final Session session, final Provider<LicenseWizard> licenseWizard,
- final Provider<LicenseChangeAction> licChangeAction) {
- super(entityOptions, session, licenseWizard, licChangeAction);
- stateManager.onGroupChanged(new Listener2<String, String>() {
- public void onEvent(final String group1, final String group2) {
+ @Inject
+ public GroupOptionsDefLicensePresenter(final GroupOptions entityOptions, final StateManager stateManager,
+ final Session session, final GroupOptionsDefLicenseView view) {
+ // , final Provider<LicenseWizard> licenseWizard,
+ // final Provider<LicenseChangeAction> licChangeAction) {
+ super(entityOptions, session);// , licenseWizard, licChangeAction);
+ init(view);
+ session.onUserSignIn(true, new UserSignInHandler() {
+ @Override
+ public void onUserSignIn(final UserSignInEvent event) {
setState();
}
});
Added: trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicenseView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicenseView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicenseView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,5 @@
+package cc.kune.gspace.client.options.license;
+
+public interface GroupOptionsDefLicenseView extends EntityOptionsDefLicenseView {
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/license/GroupOptionsDefLicenseView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicense.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/UserOptionsDefLicense.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicense.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.license;
+package cc.kune.gspace.client.options.license;
public interface UserOptionsDefLicense extends EntityOptionsDefLicense {
Added: trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicensePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicensePanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicensePanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,15 @@
+package cc.kune.gspace.client.options.license;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class UserOptionsDefLicensePanel extends EntityOptionsDefLicensePanel implements UserOptionsDefLicenseView {
+
+ @Inject
+ public UserOptionsDefLicensePanel(final I18nTranslationService i18n, final CoreResources res) {
+ super(i18n, res);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicensePanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicensePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/license/UserOptionsDefLicensePresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicensePresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,27 +17,30 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.license;
+package cc.kune.gspace.client.options.license;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseChangeAction;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseWizard;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.UserSignInEvent;
+import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.LicenseDTO;
-import cc.kune.core.shared.dto.UserInfoDTO;
+import cc.kune.gspace.client.options.UserOptions;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.inject.Inject;
public class UserOptionsDefLicensePresenter extends EntityOptionsDefLicensePresenter implements UserOptionsDefLicense {
- public UserOptionsDefLicensePresenter(final EntityOptions entityOptions, final Session session,
- final Provider<LicenseWizard> licenseWizard, final Provider<LicenseChangeAction> licChangeAction) {
- super(entityOptions, session, licenseWizard, licChangeAction);
- session.onUserSignIn(new Listener<UserInfoDTO>() {
- public void onEvent(final UserInfoDTO parameter) {
+ @Inject
+ public UserOptionsDefLicensePresenter(final UserOptions entityOptions, final Session session,
+ final UserOptionsDefLicenseView view)
+ // final Provider<LicenseWizard> licenseWizard, final
+ // Provider<LicenseChangeAction> licChangeAction) {
+ {
+ super(entityOptions, session); // , licenseWizard, licChangeAction);
+ init(view);
+ session.onUserSignIn(true, new UserSignInHandler() {
+ @Override
+ public void onUserSignIn(final UserSignInEvent event) {
setState();
}
});
Added: trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicenseView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicenseView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicenseView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,5 @@
+package cc.kune.gspace.client.options.license;
+
+public interface UserOptionsDefLicenseView extends EntityOptionsDefLicenseView {
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/license/UserOptionsDefLicenseView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/gspace/client/options/logo (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo)
Added: trunk/src/main/java/cc/kune/gspace/client/options/logo/CurrentLogoChangedEvent.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/logo/CurrentLogoChangedEvent.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/CurrentLogoChangedEvent.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,55 @@
+package cc.kune.gspace.client.options.logo;
+
+import com.google.gwt.event.shared.EventHandler;
+import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.event.shared.HandlerRegistration;
+import com.google.gwt.event.shared.HasHandlers;
+
+public class CurrentLogoChangedEvent extends GwtEvent<CurrentLogoChangedEvent.CurrentLogoChangedHandler> {
+
+ public interface CurrentLogoChangedHandler extends EventHandler {
+ public void onCurrentLogoChanged(CurrentLogoChangedEvent event);
+ }
+
+ public interface HasCurrentLogoChangedHandlers extends HasHandlers {
+ HandlerRegistration addCurrentLogoChangedHandler(CurrentLogoChangedHandler handler);
+ }
+
+ private static final Type<CurrentLogoChangedHandler> TYPE = new Type<CurrentLogoChangedHandler>();
+
+ public static void fire(final HasHandlers source) {
+ source.fireEvent(new CurrentLogoChangedEvent());
+ }
+
+ public static Type<CurrentLogoChangedHandler> getType() {
+ return TYPE;
+ }
+
+ public CurrentLogoChangedEvent() {
+ }
+
+ @Override
+ protected void dispatch(final CurrentLogoChangedHandler handler) {
+ handler.onCurrentLogoChanged(this);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ return super.equals(obj);
+ }
+
+ @Override
+ public Type<CurrentLogoChangedHandler> getAssociatedType() {
+ return TYPE;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return "CurrentLogoChangedEvent[" + "]";
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/logo/CurrentLogoChangedEvent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogo.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogo.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogo.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
\*/
-package org.ourproject.kune.workspace.client.options.logo;
+package cc.kune.gspace.client.options.logo;
public interface EntityOptionsLogo {
}
Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPanel.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,151 +17,200 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
\*/
-package org.ourproject.kune.workspace.client.options.logo;
+package cc.kune.gspace.client.options.logo;
-import org.ourproject.kune.platf.client.ui.dialogs.DefaultFormUtils;
-import org.ourproject.kune.platf.client.ui.noti.OldNotifyUser;
-import org.ourproject.kune.workspace.client.options.EntityOptionsView;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
+import cc.kune.common.client.log.Log;
+import cc.kune.common.client.ui.IconLabel;
+import cc.kune.common.client.utils.OnAcceptCallback;
+import cc.kune.common.client.utils.TextUtils;
import cc.kune.core.client.resources.CoreMessages;
+import cc.kune.core.client.resources.nav.NavResources;
import cc.kune.core.client.services.FileConstants;
import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.EntityOptionsView;
-import com.gwtext.client.core.Connection;
-import com.gwtext.client.core.EventCallback;
-import com.gwtext.client.core.EventObject;
-import com.gwtext.client.core.Position;
-import com.gwtext.client.widgets.Button;
-import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-import com.gwtext.client.widgets.form.Field;
-import com.gwtext.client.widgets.form.Form;
-import com.gwtext.client.widgets.form.FormPanel;
-import com.gwtext.client.widgets.form.Hidden;
-import com.gwtext.client.widgets.form.Label;
-import com.gwtext.client.widgets.form.TextField;
-import com.gwtext.client.widgets.form.event.FieldListenerAdapter;
-import com.gwtext.client.widgets.form.event.FormListener;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FileUpload;
+import com.google.gwt.user.client.ui.FormPanel;
+import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent;
+import com.google.gwt.user.client.ui.FormPanel.SubmitEvent;
+import com.google.gwt.user.client.ui.Hidden;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.VerticalPanel;
-public abstract class EntityOptionsLogoPanel extends FormPanel implements EntityOptionsLogoView {
+public class EntityOptionsLogoPanel extends Composite implements EntityOptionsLogoView {
- public static final String ICON_UPLD_SERVLET = "/ws/servlets/EntityLogoUploadManager";
- private final Hidden userhashField;
- private final Hidden tokenField;
- private final TextField file;
+ public static final String ICON_UPLD_SERVLET = "servlets/EntityLogoUploadManager";
private final Label dialogInfoLabel;
+ private final FileUpload fileUpload = new FileUpload();
+ private final FormPanel form = new FormPanel();
private final I18nTranslationService i18n;
+ private OnAcceptCallback onAccept;
+ private final IconLabel tabTitle;
+ private final Hidden tokenField;
+ private final Hidden userhashField;
- public EntityOptionsLogoPanel(final EntityOptionsLogoPresenter presenter, final WorkspaceSkeleton wskel,
- final I18nTranslationService i18n, final String panelId, final String buttonId, final String inputId) {
+ // private final TextField file;
+
+ public EntityOptionsLogoPanel(final EventBus eventBus, final I18nTranslationService i18n, final String panelId,
+ final String buttonId, final String inputId, final NavResources res) {
super();
this.i18n = i18n;
- super.setHeight(EntityOptionsView.HEIGHT);
- super.setButtonAlign(Position.LEFT);
- super.setFrame(true);
- super.setAutoScroll(false);
- super.setBorder(false);
- super.setFileUpload(true);
- super.setWidth(400);
- super.setIconCls("k-picture-icon");
- super.setMethod(Connection.POST);
- super.setUrl(ICON_UPLD_SERVLET);
- super.setWaitMsgTarget(true);
- super.setHideLabels(true);
- super.setPaddings(10);
- super.addFormListener(new FormListener() {
- public boolean doBeforeAction(final Form form) {
- return true;
- }
+ tabTitle = new IconLabel(res.picture(), "");
+ // super.setButtonAlign(HorizontalAlignment.LEFT);
+ // super.setFrame(true);
+ // super.setAutoScroll(false);
+ // super.setBorder(false);
+ // super.setFileUpload(true);
+ // super.setWidth(400);
+ // super.setIconCls("k-picture-icon");
+ // super.setMethod(Method.POST);
+ // super.setUrl(ICON_UPLD_SERVLET);
+ // super.setWaitMsgTarget(true);
+ // super.setHideLabels(true);
+ // super.setPadding(10);
+ // super.addFormListener(new FormListener() {
+ // @Override
+ // public boolean doBeforeAction(final Form form) {
+ // return true;
+ // }
+ //
+ // @Override
+ // public void onActionComplete(final Form form, final int httpStatus,
+ // final String responseText) {
+ // presenter.onSubmitComplete(httpStatus, responseText);
+ // }
+ //
+ // @Override
+ // public void onActionFailed(final Form form, final int httpStatus,
+ // final String responseText) {
+ // presenter.onSubmitFailed(httpStatus, responseText);
+ // }
+ // });
+ // super.add(dialogInfoLabel);
+ // file = new TextField("File", inputId);
+ // final EventCallback keyListener = new EventCallback() {
+ // @Override
+ // public void execute(final EventObject e) {
+ // // setEnableFileField();
+ // }
+ // };
+ // file.addKeyPressListener(keyListener);
+ // file.setId(inputId);
+ // file.setInputType("file");
+ // super.add(file);
+ // final FieldListenerAdapter changeListener = new
+ // FieldListenerAdapter() {
+ // @Override
+ // public void onChange(final Field field, final Object newVal, final
+ // Object oldVal) {
+ // NotifyUser.info("change");
+ // // setEnableFileField();
+ // }
+ // };
+ // // Don't works:
+ // file.addListener(changeListener);
+ // setId(panelId);
+ //
+ // sendButton.setId(buttonId);
+ // super.addButton(sendButton);
- public void onActionComplete(final Form form, final int httpStatus, final String responseText) {
- presenter.onSubmitComplete(httpStatus, responseText);
- }
+ dialogInfoLabel = new Label();
- public void onActionFailed(final Form form, final int httpStatus, final String responseText) {
- presenter.onSubmitFailed(httpStatus, responseText);
- }
- });
- dialogInfoLabel = new Label();
- super.add(dialogInfoLabel);
- file = new TextField("File", inputId);
- final EventCallback keyListener = new EventCallback() {
- public void execute(final EventObject e) {
- // setEnableFileField();
- }
- };
- file.addKeyPressListener(keyListener);
- file.setId(inputId);
- file.setInputType("file");
+ form.setEncoding(FormPanel.ENCODING_MULTIPART);
+ form.setMethod(FormPanel.METHOD_POST);
+ form.setAction(GWT.getModuleBaseURL() + ICON_UPLD_SERVLET);
+
userhashField = new Hidden(FileConstants.HASH, FileConstants.HASH);
tokenField = new Hidden(FileConstants.TOKEN, FileConstants.TOKEN);
- super.add(userhashField);
- super.add(tokenField);
- super.add(file);
- final FieldListenerAdapter changeListener = new FieldListenerAdapter() {
+
+ final VerticalPanel holder = new VerticalPanel();
+
+ fileUpload.setName("upload");
+ holder.add(dialogInfoLabel);
+ holder.add(fileUpload);
+ holder.add(userhashField);
+ holder.add(tokenField);
+ holder.add(new Button(i18n.t("Send"), new ClickHandler() {
@Override
- public void onChange(final Field field, final Object newVal, final Object oldVal) {
- OldNotifyUser.info("change");
- // setEnableFileField();
+ public void onClick(final ClickEvent event) {
+ Log.info("You selected: " + fileUpload.getFilename(), null);
+ form.submit();
}
- };
- // Don't works:
- file.addListener(changeListener);
- setId(panelId);
+ }));
- final Button sendButton = new Button(i18n.t("Send"), new ButtonListenerAdapter() {
+ form.addSubmitHandler(new FormPanel.SubmitHandler() {
@Override
- public void onClick(final Button button, final EventObject e) {
- final String filename = file.getValueAsString();
- if (filename != null && filename.length() > 0) {
- getForm().submit();
+ public void onSubmit(final SubmitEvent event) {
+ // final String filename = file.getValueAsString();
+ // if (filename != null && filename.length() > 0) {
+ // getForm().submit();
+ // }
+
+ if (!"".equalsIgnoreCase(fileUpload.getFilename())) {
+ GWT.log("UPLOADING FILE????", null);
+ // NOW WHAT????
+ } else {
+ event.cancel(); // cancel the event
}
+
}
});
- sendButton.setId(buttonId);
- super.addButton(sendButton);
+
+ form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {
+ @Override
+ public void onSubmitComplete(final SubmitCompleteEvent event) {
+ CurrentLogoChangedEvent.fire(eventBus);
+ }
+ });
+ form.add(holder);
+ initWidget(form);
+ setHeight(String.valueOf(EntityOptionsView.HEIGHT));
}
- // BrowseButton browseButton = new BrowseButton("SelectIcon");
- // browseButton.addListener(new BrowseButtonListenerAdapter() {
- // @Override
- // public void onInputFileChange(BrowseButton browseButton, String filename)
- // {
- // //
- // }
- // });
+ @Override
+ public OnAcceptCallback getOnSubmit() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+ @Override
+ public IsWidget getTabTitle() {
+ return tabTitle;
+ }
+
public void reset() {
- super.getForm().reset();
+ form.reset();
}
+ @Override
public void setNormalGroupsLabels() {
- dialogInfoLabel.setHtml(i18n.t("Select an image in your computer as the logo for this group. "
+ dialogInfoLabel.setText(i18n.t("Select an image in your computer as the logo for this group. "
+ "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT)
- + DefaultFormUtils.brbr());
- super.setTitle(CoreMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE);
- doLayoutIfNeeded();
+ + TextUtils.brbr());
+ tabTitle.setText(CoreMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE);
}
+ @Override
public void setPersonalGroupsLabels() {
- dialogInfoLabel.setHtml(i18n.t("Select an image in your computer as your avatar. "
+ dialogInfoLabel.setText(i18n.t("Select an image in your computer as your avatar. "
+ "For best results use a [%d]x[%d] pixel image. We will automatically resize bigger images.",
FileConstants.LOGO_DEF_HEIGHT, FileConstants.LOGO_DEF_HEIGHT)
+ "<br/><br/>");
- super.setTitle(CoreMessages.ENT_LOGO_SELECTOR_PERSON_TITLE);
- doLayoutIfNeeded();
+ tabTitle.setText(CoreMessages.ENT_LOGO_SELECTOR_PERSON_TITLE);
}
+ @Override
public void setUploadParams(final String userHash, final String token) {
userhashField.setValue(userHash);
tokenField.setValue(token);
}
- private void doLayoutIfNeeded() {
- if (super.isRendered()) {
- doLayout(false);
- }
- }
-
}
Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,54 +17,59 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
\*/
-package org.ourproject.kune.workspace.client.options.logo;
+package cc.kune.gspace.client.options.logo;
-import org.ourproject.kune.chat.client.ChatEngine;
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.ui.noti.OldNotifyUser;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
+import cc.kune.chat.client.ChatClient;
+import cc.kune.common.client.notify.NotifyUser;
import cc.kune.core.client.rpcservices.UserServiceAsync;
import cc.kune.core.client.state.Session;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.gspace.client.options.EntityOptions;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.inject.Provider;
public abstract class EntityOptionsLogoPresenter implements GroupOptionsLogo, UserOptionsLogo {
-
- protected EntityOptionsLogoView view;
- protected final Session session;
+ protected final Provider<ChatClient> chatEngine;
private final EntityHeader entityLogo;
private final EntityOptions entityOptions;
+ protected final Session session;
protected final Provider<UserServiceAsync> userService;
- protected final Provider<ChatEngine> chatEngine;
+ protected EntityOptionsLogoView view;
- public EntityOptionsLogoPresenter(final Session session, final EntityHeader entityLogo,
+ public EntityOptionsLogoPresenter(final EventBus eventBus, final Session session, final EntityHeader entityLogo,
final EntityOptions entityOptions, final Provider<UserServiceAsync> userService,
- final Provider<ChatEngine> chatEngine) {
+ final Provider<ChatClient> chatEngine) {
this.session = session;
this.entityLogo = entityLogo;
this.entityOptions = entityOptions;
this.userService = userService;
this.chatEngine = chatEngine;
+ eventBus.addHandler(CurrentLogoChangedEvent.getType(), new CurrentLogoChangedEvent.CurrentLogoChangedHandler() {
+ @Override
+ public void onCurrentLogoChanged(final CurrentLogoChangedEvent event) {
+ onSubmitComplete();
+ }
+ });
}
- public View getView() {
+ public IsWidget getView() {
return view;
}
- public void init(final EntityOptionsLogoView view) {
+ protected void init(final EntityOptionsLogoView view) {
this.view = view;
- entityOptions.addTab(view);
+ entityOptions.addTab(view, view.getTabTitle());
setState();
}
- public void onSubmitComplete(final int httpStatus, final String photoBinary) {
+ public void onSubmitComplete() {
entityLogo.reloadGroupLogoImage();
}
public void onSubmitFailed(final int httpStatus, final String responseText) {
- OldNotifyUser.error("Error setting the logo: " + responseText);
+ NotifyUser.error("Error setting the logo: " + responseText);
}
protected abstract void setState();
Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoView.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/EntityOptionsLogoView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,12 +17,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
\*/
-package org.ourproject.kune.workspace.client.options.logo;
+package cc.kune.gspace.client.options.logo;
-import org.ourproject.kune.platf.client.View;
+import cc.kune.common.client.utils.OnAcceptCallback;
+import cc.kune.gspace.client.options.EntityOptionsTabView;
-public interface EntityOptionsLogoView extends View {
+public interface EntityOptionsLogoView extends EntityOptionsTabView {
+ OnAcceptCallback getOnSubmit();
+
void setNormalGroupsLabels();
void setPersonalGroupsLabels();
Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogo.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogo.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogo.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.logo;
+package cc.kune.gspace.client.options.logo;
public interface GroupOptionsLogo extends EntityOptionsLogo {
Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPanel.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,20 +17,22 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.logo;
+package cc.kune.gspace.client.options.logo;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
+import cc.kune.core.client.resources.nav.NavResources;
import cc.kune.core.client.services.FileConstants;
import cc.kune.core.shared.i18n.I18nTranslationService;
-public class GroupOptionsLogoPanel extends EntityOptionsLogoPanel {
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+
+public class GroupOptionsLogoPanel extends EntityOptionsLogoPanel implements GroupOptionsLogoView {
+ public static final String BUTTON_ID = "k-golp-sendb";
public static final String PANEL_ID = "k-golp-pan";
- public static final String BUTTON_ID = "k-golp-sendb";
- public GroupOptionsLogoPanel(final EntityOptionsLogoPresenter presenter, final WorkspaceSkeleton wskel,
- final I18nTranslationService i18n) {
- super(presenter, wskel, i18n, PANEL_ID, BUTTON_ID, FileConstants.GROUP_LOGO_FIELD);
+ @Inject
+ public GroupOptionsLogoPanel(final EventBus eventBus, final I18nTranslationService i18n, final NavResources res) {
+ super(eventBus, i18n, PANEL_ID, BUTTON_ID, FileConstants.GROUP_LOGO_FIELD, res);
}
}
Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,34 +17,39 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.logo;
+package cc.kune.gspace.client.options.logo;
-import org.ourproject.kune.chat.client.ChatEngine;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
+import cc.kune.chat.client.ChatClient;
import cc.kune.core.client.rpcservices.UserServiceAsync;
+import cc.kune.core.client.state.GroupChangedEvent;
+import cc.kune.core.client.state.GroupChangedEvent.GroupChangedHandler;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.gspace.client.options.GroupOptions;
-import com.calclab.suco.client.events.Listener2;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
public class GroupOptionsLogoPresenter extends EntityOptionsLogoPresenter {
- public GroupOptionsLogoPresenter(final Session session, final EntityHeader entityLogo,
- final EntityOptions entityOptions, final StateManager stateManager,
- final Provider<UserServiceAsync> userService, final Provider<ChatEngine> chatEngine) {
- super(session, entityLogo, entityOptions, userService, chatEngine);
- stateManager.onGroupChanged(new Listener2<String, String>() {
- public void onEvent(final String group1, final String group2) {
+ @Inject
+ public GroupOptionsLogoPresenter(final EventBus eventBus, final Session session, final EntityHeader entityLogo,
+ final GroupOptions entityOptions, final StateManager stateManager,
+ final Provider<UserServiceAsync> userService, final Provider<ChatClient> chatEngine,
+ final GroupOptionsLogoView view) {
+ super(eventBus, session, entityLogo, entityOptions, userService, chatEngine);
+ init(view);
+ stateManager.onGroupChanged(true, new GroupChangedHandler() {
+ @Override
+ public void onGroupChanged(final GroupChangedEvent event) {
setState();
}
});
}
- @Override
- public void init(final EntityOptionsLogoView view) {
+ private void init(final GroupOptionsLogoView view) {
super.init(view);
view.setNormalGroupsLabels();
}
Added: trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,5 @@
+package cc.kune.gspace.client.options.logo;
+
+public interface GroupOptionsLogoView extends EntityOptionsLogoView {
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/logo/GroupOptionsLogoView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogo.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogo.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogo.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.logo;
+package cc.kune.gspace.client.options.logo;
public interface UserOptionsLogo extends EntityOptionsLogo {
Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPanel.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,20 +17,22 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.logo;
+package cc.kune.gspace.client.options.logo;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
+import cc.kune.core.client.resources.nav.NavResources;
import cc.kune.core.client.services.FileConstants;
import cc.kune.core.shared.i18n.I18nTranslationService;
-public class UserOptionsLogoPanel extends EntityOptionsLogoPanel {
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+
+public class UserOptionsLogoPanel extends EntityOptionsLogoPanel implements UserOptionsLogoView {
+ public static final String BUTTON_ID = "k-uolp-sendb";
public static final String PANEL_ID = "k-uolp-pan";
- public static final String BUTTON_ID = "k-uolp-sendb";
- public UserOptionsLogoPanel(final EntityOptionsLogoPresenter presenter, final WorkspaceSkeleton wskel,
- final I18nTranslationService i18n) {
- super(presenter, wskel, i18n, PANEL_ID, BUTTON_ID, FileConstants.USER_LOGO_FIELD);
+ @Inject
+ public UserOptionsLogoPanel(final EventBus eventBus, final I18nTranslationService i18n, final NavResources res) {
+ super(eventBus, i18n, PANEL_ID, BUTTON_ID, FileConstants.USER_LOGO_FIELD, res);
}
}
Modified: trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,48 +17,53 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.logo;
+package cc.kune.gspace.client.options.logo;
-import org.ourproject.kune.chat.client.ChatEngine;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
+import cc.kune.chat.client.ChatClient;
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.client.rpcservices.UserServiceAsync;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.UserSignInEvent;
+import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
+import cc.kune.core.client.ws.entheader.EntityHeader;
import cc.kune.core.shared.dto.GroupDTO;
-import cc.kune.core.shared.dto.UserInfoDTO;
+import cc.kune.gspace.client.options.UserOptions;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
public class UserOptionsLogoPresenter extends EntityOptionsLogoPresenter {
- public UserOptionsLogoPresenter(final Session session, final EntityHeader entityLogo,
- final EntityOptions entityOptions, final StateManager stateManager,
- final Provider<UserServiceAsync> userService, final Provider<ChatEngine> chatEngine) {
- super(session, entityLogo, entityOptions, userService, chatEngine);
- session.onUserSignIn(new Listener<UserInfoDTO>() {
- public void onEvent(final UserInfoDTO parameter) {
+ @Inject
+ public UserOptionsLogoPresenter(final EventBus eventBus, final Session session, final EntityHeader entityLogo,
+ final UserOptions entityOptions, final StateManager stateManager,
+ final Provider<UserServiceAsync> userService, final Provider<ChatClient> chatEngine,
+ final UserOptionsLogoView view) {
+ super(eventBus, session, entityLogo, entityOptions, userService, chatEngine);
+ init(view);
+ session.onUserSignIn(true, new UserSignInHandler() {
+ @Override
+ public void onUserSignIn(final UserSignInEvent event) {
setState();
}
});
}
- @Override
- public void init(final EntityOptionsLogoView view) {
+ private void init(final UserOptionsLogoView view) {
super.init(view);
view.setPersonalGroupsLabels();
}
@Override
- public void onSubmitComplete(final int httpStatus, final String photoBinary) {
- super.onSubmitComplete(httpStatus, photoBinary);
+ public void onSubmitComplete() {
+ super.onSubmitComplete();
final GroupDTO group = session.getCurrentState().getGroup();
if (session.getCurrentUser().getShortName().equals(group.getShortName())) {
userService.get().getUserAvatarBaser64(session.getUserHash(), group.getStateToken(),
new AsyncCallbackSimple<String>() {
+ @Override
public void onSuccess(final String photoBinary) {
chatEngine.get().setAvatar(photoBinary);
}
Added: trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,5 @@
+package cc.kune.gspace.client.options.logo;
+
+public interface UserOptionsLogoView extends EntityOptionsLogoView {
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/logo/UserOptionsLogoView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/gspace/client/options/pscape (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape)
Modified: trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConf.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConf.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConf.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.pscape;
+package cc.kune.gspace.client.options.pscape;
public interface EntityOptionsPublicSpaceConf {
Modified: trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,58 +17,56 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.pscape;
+package cc.kune.gspace.client.options.pscape;
-import org.ourproject.kune.platf.client.ui.noti.OldNotifyUser;
-import org.ourproject.kune.workspace.client.options.EntityOptionsView;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsThemeSelector;
-
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.common.client.tooltip.Tooltip;
import cc.kune.common.client.ui.BasicThumb;
+import cc.kune.common.client.ui.IconLabel;
import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.client.resources.CoreResources;
import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.services.ImageSize;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.EntityOptionsView;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.HasClickHandlers;
+import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-import com.gwtext.client.core.EventObject;
-import com.gwtext.client.widgets.Button;
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-public class EntityOptionsPublicSpaceConfPanel extends Panel implements EntityOptionsPublicSpaceConfView {
+public class EntityOptionsPublicSpaceConfPanel extends VerticalPanel implements EntityOptionsPublicSpaceConfView {
private final Image backImage;
+ private final Button clearBtn;
+ private final Label currentBackLabel;
private final FileDownloadUtils downUtils;
- private final Label currentBackLabel;
private final Label noBackLabel;
- private final Button clearBtn;
+ private final IconLabel tabTitle;
- public EntityOptionsPublicSpaceConfPanel(final EntityOptionsPublicSpaceConfPresenter presenter,
- final WorkspaceSkeleton ws, final I18nTranslationService i18n, final WsThemeSelector wsSelector,
- final FileDownloadUtils downUtils) {
+ public EntityOptionsPublicSpaceConfPanel(final I18nTranslationService i18n, final FileDownloadUtils downUtils,
+ final CoreResources res) {
this.downUtils = downUtils;
- super.setTitle(i18n.t("Style"));
- super.setIconCls("k-colors-icon");
- super.setAutoScroll(true);
- super.setBorder(false);
- super.setHeight(EntityOptionsView.HEIGHT);
- super.setFrame(true);
- super.setPaddings(10);
+ tabTitle = new IconLabel(res.themeChoose(), i18n.t("Style"));
+ // super.setIconCls("k-colors-icon");
+ // super.setAutoScroll(true);
+ // super.setBorder(false);
+ super.setHeight(String.valueOf(EntityOptionsView.HEIGHT));
+ // super.setFrame(true);
+ // super.setPaddings(10);
final HorizontalPanel wsHP = new HorizontalPanel();
final Label wsThemeInfo = new Label(i18n.t("Change this workspace theme:"));
- final Widget toolbarWsChange = (Widget) wsSelector.getView();
- toolbarWsChange.addStyleName("kune-Margin-Medium-l");
+ // final Widget toolbarWsChange = (Widget) wsSelector.getView();
+ // toolbarWsChange.addStyleName("kune-Margin-Medium-l");
wsHP.add(wsThemeInfo);
- wsHP.add(toolbarWsChange);
+ // wsHP.add(toolbarWsChange);
add(wsHP);
final VerticalPanel backPanel = new VerticalPanel();
currentBackLabel = new Label(i18n.t("Current background image: "));
@@ -77,13 +75,7 @@
backImage.addStyleName("kune-Margin-Medium-trbl");
noBackLabel.addStyleName("kune-Margin-Medium-tb");
clearBtn = new Button(i18n.t("Clear"));
- clearBtn.setTooltip(i18n.t("Remove current background image"));
- clearBtn.addListener(new ButtonListenerAdapter() {
- @Override
- public void onClick(final Button button, final EventObject event) {
- presenter.clearBackImage();
- }
- });
+ Tooltip.to(clearBtn, i18n.t("Remove current background image"));
backPanel.add(noBackLabel);
backPanel.add(currentBackLabel);
backPanel.add(backImage);
@@ -93,10 +85,12 @@
wsInfo.addStyleName("kune-Margin-Medium-tb");
add(wsInfo);
- final Panel stylesPanel = new Panel();
+ final VerticalPanel stylesPanel = new VerticalPanel();
final ClickHandler clickHandler = new ClickHandler() {
+
+ @Override
public void onClick(final ClickEvent event) {
- OldNotifyUser.info(TextUtils.IN_DEVELOPMENT_P);
+ NotifyUser.info(TextUtils.IN_DEVELOPMENT_P);
}
};
for (int i = 1; i <= 6; i++) {
@@ -108,10 +102,22 @@
setBackImageVisibleImpl(false);
}
+ @Override
public void clearBackImage() {
setBackImageVisibleImpl(false);
}
+ @Override
+ public HasClickHandlers getClearBtn() {
+ return clearBtn;
+ }
+
+ @Override
+ public IsWidget getTabTitle() {
+ return tabTitle;
+ }
+
+ @Override
public void setBackImage(final StateToken token) {
backImage.setUrl(downUtils.getImageResizedUrl(token, ImageSize.thumb));
setBackImageVisibleImpl(true);
Modified: trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfPresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,36 +17,41 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.pscape;
+package cc.kune.gspace.client.options.pscape;
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-
import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateChangedEvent;
+import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler;
import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.ContentSimpleDTO;
import cc.kune.core.shared.dto.GroupDTO;
import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.gspace.client.options.EntityOptions;
+import cc.kune.gspace.client.style.ClearBackImageEvent;
+import cc.kune.gspace.client.style.GSpaceBackManager;
+import cc.kune.gspace.client.style.SetBackImageEvent;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener0;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.inject.Provider;
public abstract class EntityOptionsPublicSpaceConfPresenter implements EntityOptionsPublicSpaceConf {
- private EntityOptionsPublicSpaceConfView view;
+ private final GSpaceBackManager backManager;
private final EntityOptions entityOptions;
+ private final EventBus eventBus;
private final Provider<GroupServiceAsync> groupService;
private final Session session;
- private final WsBackManager backManager;
private final StateManager stateManager;
+ private EntityOptionsPublicSpaceConfView view;
- protected EntityOptionsPublicSpaceConfPresenter(final Session session, final StateManager stateManager,
- final EntityOptions entityOptions, final Provider<GroupServiceAsync> groupService,
- final WsBackManager backManager) {
+ protected EntityOptionsPublicSpaceConfPresenter(final EventBus eventBus, final Session session,
+ final StateManager stateManager, final EntityOptions entityOptions,
+ final Provider<GroupServiceAsync> groupService, final GSpaceBackManager backManager) {
+ this.eventBus = eventBus;
this.session = session;
this.stateManager = stateManager;
this.entityOptions = entityOptions;
@@ -57,6 +62,7 @@
public void clearBackImage() {
groupService.get().clearGroupBackImage(session.getUserHash(), session.getCurrentStateToken(),
new AsyncCallbackSimple<GroupDTO>() {
+ @Override
public void onSuccess(final GroupDTO result) {
view.clearBackImage();
backManager.clearBackImage();
@@ -64,27 +70,37 @@
});
}
- public View getView() {
+ public IsWidget getView() {
return view;
}
public void init(final EntityOptionsPublicSpaceConfView view) {
this.view = view;
- entityOptions.addTab(view);
- setBackImage(session.getContainerState().getGroup().getGroupBackImage());
- stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
- public void onEvent(final StateAbstractDTO state) {
+ entityOptions.addTab(view, view.getTabTitle());
+ setBackImage(session.getCurrentState().getGroup().getGroupBackImage());
+ view.getClearBtn().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ clearBackImage();
+ }
+ });
+ stateManager.onStateChanged(true, new StateChangedHandler() {
+ @Override
+ public void onStateChanged(final StateChangedEvent event) {
+ final StateAbstractDTO state = event.getState();
final ContentSimpleDTO backImage = state.getGroup().getGroupBackImage();
setBackImage(backImage);
}
});
- backManager.addSetBackImage(new Listener<StateToken>() {
- public void onEvent(final StateToken token) {
- view.setBackImage(token);
+ eventBus.addHandler(SetBackImageEvent.getType(), new SetBackImageEvent.SetBackImageHandler() {
+ @Override
+ public void onSetBackImage(final SetBackImageEvent event) {
+ view.setBackImage(event.getToken());
}
});
- backManager.addBackClear(new Listener0() {
- public void onEvent() {
+ eventBus.addHandler(ClearBackImageEvent.getType(), new ClearBackImageEvent.ClearBackImageHandler() {
+ @Override
+ public void onClearBackImage(final ClearBackImageEvent event) {
view.clearBackImage();
}
});
Modified: trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/EntityOptionsPublicSpaceConfView.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/EntityOptionsPublicSpaceConfView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,16 +17,19 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.pscape;
+package cc.kune.gspace.client.options.pscape;
-import org.ourproject.kune.platf.client.View;
-
import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.gspace.client.options.EntityOptionsTabView;
-public interface EntityOptionsPublicSpaceConfView extends View {
+import com.google.gwt.event.dom.client.HasClickHandlers;
+public interface EntityOptionsPublicSpaceConfView extends EntityOptionsTabView {
+
public void clearBackImage();
+ HasClickHandlers getClearBtn();
+
public void setBackImage(final StateToken token);
}
Modified: trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConf.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/GroupOptionsPublicSpaceConf.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConf.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.pscape;
+package cc.kune.gspace.client.options.pscape;
public interface GroupOptionsPublicSpaceConf extends EntityOptionsPublicSpaceConf {
Added: trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,18 @@
+package cc.kune.gspace.client.options.pscape;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class GroupOptionsPublicSpaceConfPanel extends EntityOptionsPublicSpaceConfPanel implements
+ GroupOptionsPublicSpaceConfView {
+
+ @Inject
+ public GroupOptionsPublicSpaceConfPanel(final I18nTranslationService i18n, final FileDownloadUtils downUtils,
+ final CoreResources res) {
+ super(i18n, downUtils, res);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfPanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/GroupOptionsPublicSpaceConfPresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,40 +17,43 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.pscape;
+package cc.kune.gspace.client.options.pscape;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.themes.WsThemeSelector;
-
import cc.kune.core.client.rpcservices.GroupServiceAsync;
import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateChangedEvent;
+import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler;
import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.gspace.client.options.GroupOptions;
+import cc.kune.gspace.client.style.GSpaceBackManager;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
public class GroupOptionsPublicSpaceConfPresenter extends EntityOptionsPublicSpaceConfPresenter implements
GroupOptionsPublicSpaceConf {
- public GroupOptionsPublicSpaceConfPresenter(final Session session, final StateManager stateManager,
- final EntityOptions entityOptions, final WsThemeManager themeManager, final WsThemeSelector themeSelector,
- final Provider<GroupServiceAsync> groupService, final WsBackManager backManager) {
- super(session, stateManager, entityOptions, groupService, backManager);
- themeSelector.addThemeSelected(new Listener<WsTheme>() {
- public void onEvent(final WsTheme theme) {
- themeManager.changeTheme(session.getCurrentStateToken(), theme);
+ @Inject
+ public GroupOptionsPublicSpaceConfPresenter(final EventBus eventBus, final Session session,
+ final StateManager stateManager, final GroupOptions entityOptions,
+ final Provider<GroupServiceAsync> groupService, final GSpaceBackManager backManager,
+ final GroupOptionsPublicSpaceConfView view) {
+ super(eventBus, session, stateManager, entityOptions, groupService, backManager);
+ // themeSelector.addThemeSelected(new Listener<WsTheme>() {
+ // public void onEvent(final WsTheme theme) {
+ // themeManager.changeTheme(session.getCurrentStateToken(), theme);
+ // }
+ // });
+ init(view);
+ stateManager.onStateChanged(true, new StateChangedHandler() {
+
+ @Override
+ public void onStateChanged(final StateChangedEvent event) {
+ // final String theme = state.getGroup().getWorkspaceTheme();
+ // themeSelector.select(theme);
}
});
- stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
- public void onEvent(final StateAbstractDTO state) {
- final String theme = state.getGroup().getWorkspaceTheme();
- themeSelector.select(theme);
- }
- });
}
}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,5 @@
+package cc.kune.gspace.client.options.pscape;
+
+public interface GroupOptionsPublicSpaceConfView extends EntityOptionsPublicSpaceConfView {
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/pscape/GroupOptionsPublicSpaceConfView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConf.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/UserOptionsPublicSpaceConf.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConf.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.pscape;
+package cc.kune.gspace.client.options.pscape;
public interface UserOptionsPublicSpaceConf extends EntityOptionsPublicSpaceConf {
Added: trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,18 @@
+package cc.kune.gspace.client.options.pscape;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class UserOptionsPublicSpaceConfPanel extends EntityOptionsPublicSpaceConfPanel implements
+ UserOptionsPublicSpaceConfView {
+
+ @Inject
+ public UserOptionsPublicSpaceConfPanel(final I18nTranslationService i18n, final FileDownloadUtils downUtils,
+ final CoreResources res) {
+ super(i18n, downUtils, res);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfPanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/pscape/UserOptionsPublicSpaceConfPresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,50 +17,54 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.pscape;
+package cc.kune.gspace.client.options.pscape;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.themes.WsThemeSelector;
-
import cc.kune.core.client.rpcservices.GroupServiceAsync;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.UserSignInEvent;
+import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
import cc.kune.core.shared.dto.UserInfoDTO;
+import cc.kune.gspace.client.options.UserOptions;
+import cc.kune.gspace.client.style.GSpaceBackManager;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
public class UserOptionsPublicSpaceConfPresenter extends EntityOptionsPublicSpaceConfPresenter implements
UserOptionsPublicSpaceConf {
- private final WsThemeSelector themeSelector;
+ // private final WsThemeSelector themeSelector;
- public UserOptionsPublicSpaceConfPresenter(final Session session, final StateManager stateManager,
- final EntityOptions entityOptions, final WsThemeManager themeManager, final WsThemeSelector themeSelector,
- final Provider<GroupServiceAsync> groupService, final WsBackManager backManager) {
- super(session, stateManager, entityOptions, groupService, backManager);
- this.themeSelector = themeSelector;
- themeSelector.addThemeSelected(new Listener<WsTheme>() {
- public void onEvent(final WsTheme theme) {
- themeManager.changeTheme(session.getCurrentUser().getStateToken(), theme);
- }
- });
+ @Inject
+ public UserOptionsPublicSpaceConfPresenter(final EventBus eventBus, final Session session,
+ final StateManager stateManager, final UserOptions entityOptions,
+ final Provider<GroupServiceAsync> groupService, final GSpaceBackManager backManager,
+ final UserOptionsPublicSpaceConfView view) {
+ super(eventBus, session, stateManager, entityOptions, groupService, backManager);
+ // this.themeSelector = themeSelector;
+ // themeSelector.addThemeSelected(new Listener<WsTheme>() {
+ // public void onEvent(final WsTheme theme) {
+ // themeManager.changeTheme(session.getCurrentUser().getStateToken(),
+ // theme);
+ // }
+ // });
final UserInfoDTO userInfo = session.getCurrentUserInfo();
if (userInfo != null) {
setSelector(userInfo);
}
- session.onUserSignIn(new Listener<UserInfoDTO>() {
- public void onEvent(final UserInfoDTO parameter) {
- setSelector(userInfo);
+ init(view);
+ session.onUserSignIn(true, new UserSignInHandler() {
+ @Override
+ public void onUserSignIn(final UserSignInEvent event) {
+ // setSelector(userInfo);
}
});
}
private void setSelector(final UserInfoDTO userInfo) {
- themeSelector.select(userInfo.getUserGroup().getWorkspaceTheme());
+ // themeSelector.select(userInfo.getUserGroup().getWorkspaceTheme());
}
}
Added: trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,5 @@
+package cc.kune.gspace.client.options.pscape;
+
+public interface UserOptionsPublicSpaceConfView extends EntityOptionsPublicSpaceConfView {
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/pscape/UserOptionsPublicSpaceConfView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/gspace/client/options/tools (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools)
Modified: trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConf.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConf.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConf.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.tools;
+package cc.kune.gspace.client.options.tools;
public interface EntityOptionsToolsConf {
Modified: trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPanel.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,49 +17,54 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.tools;
+package cc.kune.gspace.client.options.tools;
import java.util.HashMap;
-import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm;
-import org.ourproject.kune.workspace.client.options.EntityOptionsView;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-
+import cc.kune.common.client.log.Log;
+import cc.kune.common.client.tooltip.Tooltip;
+import cc.kune.common.client.ui.IconLabel;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.ui.DefaultForm;
import cc.kune.core.shared.dto.ToolSimpleDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.EntityOptionsView;
-import com.allen_sauer.gwt.log.client.Log;
-import com.gwtext.client.widgets.ToolTip;
-import com.gwtext.client.widgets.form.Checkbox;
-import com.gwtext.client.widgets.form.Hidden;
-import com.gwtext.client.widgets.form.Label;
-import com.gwtext.client.widgets.form.event.CheckboxListenerAdapter;
+import com.extjs.gxt.ui.client.event.BaseEvent;
+import com.extjs.gxt.ui.client.event.Events;
+import com.extjs.gxt.ui.client.event.Listener;
+import com.extjs.gxt.ui.client.widget.Label;
+import com.extjs.gxt.ui.client.widget.form.CheckBox;
+import com.extjs.gxt.ui.client.widget.form.HiddenField;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.gwt.user.client.ui.Widget;
public class EntityOptionsToolsConfPanel extends DefaultForm implements EntityOptionsToolsConfView {
-
- private final EntityOptionsToolsConfPresenter presenter;
- private final HashMap<String, Checkbox> fields;
+ private final HashMap<String, CheckBox> fields;
private final I18nTranslationService i18n;
+ private final IconLabel tabTitle;
- public EntityOptionsToolsConfPanel(final EntityOptionsToolsConfPresenter presenter, final WorkspaceSkeleton ws,
- final I18nTranslationService i18n) {
- super(i18n.t("Tools"));
+ public EntityOptionsToolsConfPanel(final I18nTranslationService i18n, final CoreResources res) {
+ tabTitle = new IconLabel(res.kunePreferences(), i18n.t("Tools"));
this.i18n = i18n;
super.setHeight(EntityOptionsView.HEIGHT);
super.setFrame(true);
- super.add(new Hidden());
+ super.add(new HiddenField());
super.getFormPanel().setLabelWidth(20);
- this.presenter = presenter;
- fields = new HashMap<String, Checkbox>();
+ fields = new HashMap<String, CheckBox>();
}
- public void add(final ToolSimpleDTO tool) {
- final Checkbox checkbox = new Checkbox(tool.getRootName());
- checkbox.setChecked(false);
- checkbox.addListener(new CheckboxListenerAdapter() {
+ @Override
+ public void add(final ToolSimpleDTO tool, final ClickHandler handler) {
+ final CheckBox checkbox = new CheckBox();
+ checkbox.setFieldLabel(tool.getRootName());
+ checkbox.setValue(false);
+ checkbox.addListener(Events.Change, new Listener<BaseEvent>() {
@Override
- public void onCheck(final Checkbox field, final boolean checked) {
- presenter.onCheck(tool, checked);
+ public void handleEvent(final BaseEvent be) {
+ handler.onClick(null);
+ // presenter.onCheck(tool, checked);
}
});
super.add(checkbox);
@@ -67,21 +72,55 @@
doLayoutIfNeeded();
}
+ @Override
+ public Widget asWidget() {
+ return super.getFormPanel();
+ }
+
+ @Override
public void clear() {
- super.getFormPanel().removeAll(true);
+ super.getFormPanel().removeAll();
fields.clear();
final Label label = new Label();
- label.setHtml(i18n.t("Here you can select the tools used:") + "<br/><br/>");
+ label.setText(i18n.t("Here you can select the tools used:"));// +
+ // "<br/><br/>");
super.add(label);
}
+ private void doLayoutIfNeeded() {
+ if (super.getFormPanel().isRendered()) {
+ super.getFormPanel().layout();
+ }
+ }
+
+ @Override
+ public IsWidget getTabTitle() {
+ return tabTitle;
+ }
+
+ private CheckBox getTool(final String tool) {
+ final CheckBox field = fields.get(tool);
+ if (field == null) {
+ Log.error("Field " + tool + " not found in EOTCP");
+ }
+ return field;
+ }
+
+ @Override
+ public boolean isChecked(final String tool) {
+ final CheckBox field = getTool(tool);
+ return field.getValue();
+ }
+
+ @Override
public void setChecked(final String tool, final boolean checked) {
- final Checkbox field = getTool(tool);
+ final CheckBox field = getTool(tool);
field.setValue(checked);
}
+ @Override
public void setEnabled(final String tool, final boolean enabled) {
- final Checkbox field = getTool(tool);
+ final CheckBox field = getTool(tool);
if (enabled) {
field.enable();
} else {
@@ -89,27 +128,9 @@
}
}
+ @Override
public void setTooltip(final String tool, final String tip) {
- final Checkbox field = getTool(tool);
- final ToolTip tooltip = new ToolTip();
- tooltip.setHtml(tip);
- tooltip.setWidth(250);
- tooltip.applyTo(field);
- field.setTitle(tip);
- doLayoutIfNeeded();
+ final CheckBox field = getTool(tool);
+ Tooltip.to(field, tip);
}
-
- private void doLayoutIfNeeded() {
- if (super.getFormPanel().isRendered()) {
- super.getFormPanel().doLayout();
- }
- }
-
- private Checkbox getTool(final String tool) {
- final Checkbox field = fields.get(tool);
- if (field == null) {
- Log.error("Field " + tool + " not found in EOTCP");
- }
- return field;
- }
}
Modified: trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,14 +17,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.tools;
+package cc.kune.gspace.client.options.tools;
import java.util.Collection;
import java.util.List;
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
import cc.kune.common.client.notify.NotifyLevel;
import cc.kune.core.client.rpcservices.GroupServiceAsync;
import cc.kune.core.client.state.Session;
@@ -32,9 +29,13 @@
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.ToolSimpleDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.EntityOptions;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.ui.IsWidget;
+import com.google.inject.Provider;
public abstract class EntityOptionsToolsConfPresenter {
@@ -67,7 +68,7 @@
protected abstract StateToken getOperationToken();
- public View getView() {
+ public IsWidget getView() {
return view;
}
@@ -76,10 +77,10 @@
public void init(final EntityOptionsToolsConfView view) {
this.view = view;
setState();
- entityOptions.addTab(view);
+ entityOptions.addTab(view, view.getTabTitle());
}
- public void onCheck(final ToolSimpleDTO tool, final boolean checked) {
+ private void onCheck(final ToolSimpleDTO tool, final boolean checked) {
final List<String> enabledTools = getEnabledTools();
final String toolName = tool.getName();
if (checked) {
@@ -103,7 +104,12 @@
reset();
final Collection<ToolSimpleDTO> toolCollection = getAllTools();
for (final ToolSimpleDTO tool : toolCollection) {
- view.add(tool);
+ view.add(tool, new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ onCheck(tool, view.isChecked(tool.getName()));
+ }
+ });
view.setEnabled(tool.getName(), true);
}
for (final String tool : getEnabledTools()) {
Modified: trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfView.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/EntityOptionsToolsConfView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,18 +17,21 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.tools;
+package cc.kune.gspace.client.options.tools;
-import org.ourproject.kune.platf.client.View;
-
import cc.kune.core.shared.dto.ToolSimpleDTO;
+import cc.kune.gspace.client.options.EntityOptionsTabView;
-public interface EntityOptionsToolsConfView extends View {
+import com.google.gwt.event.dom.client.ClickHandler;
- void add(ToolSimpleDTO tool);
+public interface EntityOptionsToolsConfView extends EntityOptionsTabView {
+ void add(ToolSimpleDTO tool, ClickHandler clickHandler);
+
void clear();
+ boolean isChecked(String tool);
+
void setChecked(String tool, boolean checked);
void setEnabled(String tool, boolean enabled);
Deleted: trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolConf.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/GroupOptionsToolConf.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolConf.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,24 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options.tools;
-
-public interface GroupOptionsToolConf extends EntityOptionsToolsConf {
-
-}
Copied: trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConf.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/GroupOptionsToolConf.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConf.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConf.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,24 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.options.tools;
+
+public interface GroupOptionsToolsConf extends EntityOptionsToolsConf {
+
+}
Added: trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,15 @@
+package cc.kune.gspace.client.options.tools;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class GroupOptionsToolsConfPanel extends EntityOptionsToolsConfPanel implements GroupOptionsToolsConfView {
+
+ @Inject
+ public GroupOptionsToolsConfPanel(final I18nTranslationService i18n, final CoreResources res) {
+ super(i18n, res);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfPanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/GroupOptionsToolsConfPresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,32 +17,36 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.tools;
+package cc.kune.gspace.client.options.tools;
import java.util.Collection;
import java.util.List;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.state.GroupChangedEvent;
+import cc.kune.core.client.state.GroupChangedEvent.GroupChangedHandler;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.ContentSimpleDTO;
import cc.kune.core.shared.dto.ToolSimpleDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.GroupOptions;
-import com.calclab.suco.client.events.Listener2;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
-public class GroupOptionsToolsConfPresenter extends EntityOptionsToolsConfPresenter implements GroupOptionsToolConf {
+public class GroupOptionsToolsConfPresenter extends EntityOptionsToolsConfPresenter implements GroupOptionsToolsConf {
+ @Inject
public GroupOptionsToolsConfPresenter(final StateManager stateManager, final Session session,
- final I18nTranslationService i18n, final EntityOptions entityOptions,
- final Provider<GroupServiceAsync> groupService) {
+ final I18nTranslationService i18n, final GroupOptions entityOptions,
+ final Provider<GroupServiceAsync> groupService, final GroupOptionsToolsConfView view) {
super(session, stateManager, i18n, entityOptions, groupService);
- stateManager.onGroupChanged(new Listener2<String, String>() {
- public void onEvent(final String group1, final String group2) {
+ init(view);
+ stateManager.onGroupChanged(true, new GroupChangedHandler() {
+ @Override
+ public void onGroupChanged(final GroupChangedEvent event) {
setState();
}
});
Added: trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,5 @@
+package cc.kune.gspace.client.options.tools;
+
+public interface GroupOptionsToolsConfView extends EntityOptionsToolsConfView {
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/tools/GroupOptionsToolsConfView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConf.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/UserOptionsToolsConf.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConf.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,7 +17,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.tools;
+package cc.kune.gspace.client.options.tools;
public interface UserOptionsToolsConf extends EntityOptionsToolsConf {
Added: trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfPanel.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,15 @@
+package cc.kune.gspace.client.options.tools;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+
+public class UserOptionsToolsConfPanel extends EntityOptionsToolsConfPanel implements UserOptionsToolsConfView {
+
+ @Inject
+ public UserOptionsToolsConfPanel(final I18nTranslationService i18n, final CoreResources res) {
+ super(i18n, res);
+ }
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfPanel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/UserOptionsToolsConfPresenter.java 2011-04-26 11:38:16 UTC (rev 1320)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -17,32 +17,35 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-package org.ourproject.kune.workspace.client.options.tools;
+package cc.kune.gspace.client.options.tools;
import java.util.Collection;
import java.util.List;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
import cc.kune.core.client.rpcservices.GroupServiceAsync;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.UserSignInEvent;
+import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
import cc.kune.core.shared.domain.utils.StateToken;
import cc.kune.core.shared.dto.ToolSimpleDTO;
-import cc.kune.core.shared.dto.UserInfoDTO;
import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.options.UserOptions;
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
public class UserOptionsToolsConfPresenter extends EntityOptionsToolsConfPresenter implements UserOptionsToolsConf {
+ @Inject
public UserOptionsToolsConfPresenter(final Session session, final StateManager stateManager,
- final I18nTranslationService i18n, final EntityOptions entityOptions,
- final Provider<GroupServiceAsync> groupService) {
+ final I18nTranslationService i18n, final UserOptions entityOptions,
+ final Provider<GroupServiceAsync> groupService, final GroupOptionsToolsConfView view) {
super(session, stateManager, i18n, entityOptions, groupService);
- session.onUserSignIn(new Listener<UserInfoDTO>() {
- public void onEvent(final UserInfoDTO parameter) {
+ init(view);
+ session.onUserSignIn(true, new UserSignInHandler() {
+ @Override
+ public void onUserSignIn(final UserSignInEvent event) {
setState();
}
});
Added: trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfView.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfView.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,5 @@
+package cc.kune.gspace.client.options.tools;
+
+public interface UserOptionsToolsConfView extends EntityOptionsToolsConfView {
+
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/options/tools/UserOptionsToolsConfView.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css 2011-04-28 00:56:31 UTC (rev 1324)
@@ -45,7 +45,7 @@
.entityHeader span {
font-size: 56px;
- margin-left: 15px;
+ /* margin-left: 15px; */
color: #550000;
font-weight: bold;
font: 'UbuntuBold', Arial;
Added: trunk/src/main/java/cc/kune/gspace/client/style/ClearBackImageEvent.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/style/ClearBackImageEvent.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/style/ClearBackImageEvent.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,58 @@
+package cc.kune.gspace.client.style;
+
+import com.google.gwt.event.shared.EventHandler;
+import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.event.shared.HandlerRegistration;
+
+import com.google.gwt.event.shared.HasHandlers;
+
+public class ClearBackImageEvent extends GwtEvent<ClearBackImageEvent.ClearBackImageHandler> {
+
+ public interface HasClearBackImageHandlers extends HasHandlers {
+ HandlerRegistration addClearBackImageHandler(ClearBackImageHandler handler);
+ }
+
+ public interface ClearBackImageHandler extends EventHandler {
+ public void onClearBackImage(ClearBackImageEvent event);
+ }
+
+ private static final Type<ClearBackImageHandler> TYPE = new Type<ClearBackImageHandler>();
+
+ public static void fire(HasHandlers source) {
+ source.fireEvent(new ClearBackImageEvent());
+ }
+
+ public static Type<ClearBackImageHandler> getType() {
+ return TYPE;
+ }
+
+
+ public ClearBackImageEvent() {
+ }
+
+ @Override
+ public Type<ClearBackImageHandler> getAssociatedType() {
+ return TYPE;
+ }
+
+ @Override
+ protected void dispatch(ClearBackImageHandler handler) {
+ handler.onClearBackImage(this);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return super.equals(obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return "ClearBackImageEvent["
+ + "]";
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/style/ClearBackImageEvent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied: trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManager.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManager.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManager.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManager.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,30 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.style;
+
+import cc.kune.core.shared.domain.utils.StateToken;
+
+public interface GSpaceBackManager {
+
+ void clearBackImage();
+
+ void setBackImage(StateToken token);
+
+}
Copied: trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManagerImpl.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManagerImpl.java)
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManagerImpl.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManagerImpl.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,64 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.gspace.client.style;
+
+import org.cobogw.gwt.user.client.CSS;
+
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.shared.domain.utils.StateToken;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.inject.Inject;
+
+public class GSpaceBackManagerImpl implements GSpaceBackManager {
+
+ private static final StateToken NO_TOKEN = new StateToken("none.none.0.0");
+ private final FileDownloadUtils downloadUtils;
+ private final EventBus eventBus;
+ private StateToken lastToken;
+
+ @Inject
+ public GSpaceBackManagerImpl(final EventBus eventBus, final FileDownloadUtils downloadUtils) {
+ this.eventBus = eventBus;
+ this.downloadUtils = downloadUtils;
+ lastToken = NO_TOKEN;
+ }
+
+ @Override
+ public void clearBackImage() {
+ if (!lastToken.equals(NO_TOKEN)) {
+ DOM.setStyleAttribute(RootPanel.getBodyElement(), CSS.A.BACKGROUND, "transparent");
+ lastToken = NO_TOKEN;
+ }
+ ClearBackImageEvent.fire(eventBus);
+ }
+
+ @Override
+ public void setBackImage(final StateToken token) {
+ if (!token.equals(lastToken)) {
+ final String bodyProp = "#FFFFFF url('" + downloadUtils.getImageUrl(token) + "') fixed no-repeat top left";
+ DOM.setStyleAttribute(RootPanel.getBodyElement(), CSS.A.BACKGROUND, bodyProp);
+ lastToken = token;
+ }
+ SetBackImageEvent.fire(eventBus, token);
+ }
+}
Added: trunk/src/main/java/cc/kune/gspace/client/style/SetBackImageEvent.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/style/SetBackImageEvent.java (rev 0)
+++ trunk/src/main/java/cc/kune/gspace/client/style/SetBackImageEvent.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,83 @@
+package cc.kune.gspace.client.style;
+
+import com.google.gwt.event.shared.EventHandler;
+import com.google.gwt.event.shared.GwtEvent;
+import com.google.gwt.event.shared.HandlerRegistration;
+
+import com.google.gwt.event.shared.HasHandlers;
+
+public class SetBackImageEvent extends GwtEvent<SetBackImageEvent.SetBackImageHandler> {
+
+ public interface HasSetBackImageHandlers extends HasHandlers {
+ HandlerRegistration addSetBackImageHandler(SetBackImageHandler handler);
+ }
+
+ public interface SetBackImageHandler extends EventHandler {
+ public void onSetBackImage(SetBackImageEvent event);
+ }
+
+ private static final Type<SetBackImageHandler> TYPE = new Type<SetBackImageHandler>();
+
+ public static void fire(HasHandlers source, cc.kune.core.shared.domain.utils.StateToken token) {
+ source.fireEvent(new SetBackImageEvent(token));
+ }
+
+ public static Type<SetBackImageHandler> getType() {
+ return TYPE;
+ }
+
+ cc.kune.core.shared.domain.utils.StateToken token;
+
+ public SetBackImageEvent(cc.kune.core.shared.domain.utils.StateToken token) {
+ this.token = token;
+ }
+
+ protected SetBackImageEvent() {
+ // Possibly for serialization.
+ }
+
+ @Override
+ public Type<SetBackImageHandler> getAssociatedType() {
+ return TYPE;
+ }
+
+ public cc.kune.core.shared.domain.utils.StateToken getToken() {
+ return token;
+ }
+
+ @Override
+ protected void dispatch(SetBackImageHandler handler) {
+ handler.onSetBackImage(this);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ SetBackImageEvent other = (SetBackImageEvent) obj;
+ if (token == null) {
+ if (other.token != null)
+ return false;
+ } else if (!token.equals(other.token))
+ return false;
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 23;
+ hashCode = (hashCode * 37) + (token == null ? 1 : token.hashCode());
+ return hashCode;
+ }
+
+ @Override
+ public String toString() {
+ return "SetBackImageEvent["
+ + token
+ + "]";
+ }
+}
Property changes on: trunk/src/main/java/cc/kune/gspace/client/style/SetBackImageEvent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -31,7 +31,6 @@
import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
import org.ourproject.kune.workspace.client.editor.ContentEditor;
import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
import org.ourproject.kune.workspace.client.upload.FileUploader;
import cc.kune.common.client.utils.SchedulerManager;
@@ -43,6 +42,7 @@
import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.gspace.client.style.GSpaceBackManager;
import com.calclab.suco.client.ioc.Provider;
@@ -55,7 +55,7 @@
final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
final BlogViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
- final WsBackManager wsBackManager) {
+ final GSpaceBackManager wsBackManager) {
super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
Modified: trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -30,7 +30,6 @@
import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
import org.ourproject.kune.workspace.client.editor.ContentEditor;
import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
import org.ourproject.kune.workspace.client.upload.FileUploader;
import cc.kune.common.client.utils.SchedulerManager;
@@ -42,6 +41,7 @@
import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.gspace.client.style.GSpaceBackManager;
import com.calclab.suco.client.ioc.Provider;
@@ -54,7 +54,7 @@
final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
final GalleryViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
- final WsBackManager wsBackManager) {
+ final GSpaceBackManager wsBackManager) {
super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialog.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialog.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,38 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.ui.dialogs.tabbed;
-
-import org.ourproject.kune.platf.client.View;
-
-import cc.kune.common.client.notify.NotifyLevel;
-
-public interface AbstractTabbedDialog {
-
- void activateTab(int index);
-
- void addTab(View view);
-
- public void hideMessages();
-
- public void setErrorMessage(String message, NotifyLevel level);
-
- void show();
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,236 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.ui.dialogs.tabbed;
-
-import java.util.ArrayList;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog;
-import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm;
-
-import cc.kune.common.client.notify.NotifyLevel;
-import cc.kune.common.client.notify.NotifyLevelImages;
-import cc.kune.core.client.ui.dialogs.MessageToolbar;
-
-import com.allen_sauer.gwt.log.client.Log;
-import com.calclab.suco.client.events.Listener0;
-import com.gwtext.client.widgets.Button;
-import com.gwtext.client.widgets.Component;
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.TabPanel;
-import com.gwtext.client.widgets.event.WindowListenerAdapter;
-
-public abstract class AbstractTabbedDialogPanel implements AbstractTabbedDialogView {
- private final ArrayList<Button> buttons;
- private BasicDialog dialog;
- private final String dialogId;
- private final String errorLabelId;
- private final int height;
- private String iconCls;
- private final NotifyLevelImages images;
- private MessageToolbar messageErrorBar;
- private final int minHeight;
- private final int minWidth;
- private final boolean modal;
- private Listener0 onHideListener;
- private TabPanel tabPanel;
- private String title;
- private final int width;
-
- public AbstractTabbedDialogPanel(final String dialogId, final String title, final int width, final int height,
- final int minWidth, final int minHeight, final boolean modal, final NotifyLevelImages images,
- final String errorLabelId) {
- this.dialogId = dialogId;
- this.title = title;
- this.width = width;
- this.height = height;
- this.minWidth = minWidth;
- this.minHeight = minHeight;
- this.modal = modal;
- this.images = images;
- this.errorLabelId = errorLabelId;
- buttons = new ArrayList<Button>();
- }
-
- @Override
- public void activateTab(final int index) {
- createDialogIfNecessary();
- tabPanel.activate(index);
- }
-
- /**
- * User before show/render
- *
- * @param button
- */
- public void addButton(final Button button) {
- buttons.add(button);
- }
-
- private void addHideListener() {
- dialog.addListener(new WindowListenerAdapter() {
- @Override
- public void onClose(final Panel panel) {
- onHideListener.onEvent();
- }
-
- @Override
- public void onHide(final Component component) {
- onHideListener.onEvent();
- }
- });
- }
-
- public void addHideListener(final Listener0 onHideListener) {
- this.onHideListener = onHideListener;
- if (dialog != null) {
- addHideListener();
- }
- }
-
- @Override
- public void addTab(final View view) {
- addTabPanel(castPanel(view));
- doLayoutIfNeeded();
- }
-
- private void addTabPanel(final Panel newTab) {
- createDialogIfNecessary();
- tabPanel.add(newTab);
- }
-
- private Panel castPanel(final View view) {
- Panel panel;
- if (view instanceof Panel) {
- panel = (Panel) view;
- } else if (view instanceof DefaultForm) {
- panel = ((DefaultForm) view).getFormPanel();
- } else {
- panel = null;
- Log.error("Programatic error: Unexpected element added to GroupOptions");
- }
- return panel;
- }
-
- @Override
- public void createAndShow() {
- show();
- setFirstTabActive();
- }
-
- private void createDialog() {
- dialog = new BasicDialog(dialogId, title, modal, true, width, height, minWidth, minHeight);
- dialog.setCollapsible(false);
- messageErrorBar = new MessageToolbar(images, errorLabelId);
- // FIXME in gxt: dialog.setBottomToolbar(messageErrorBar.getToolbar());
- tabPanel = new TabPanel();
- tabPanel.setBorder(false);
- dialog.add(tabPanel);
- if (iconCls != null) {
- dialog.setIconCls(iconCls);
- }
- if (onHideListener != null) {
- addHideListener();
- }
- for (final Button button : buttons) {
- dialog.addButton(button);
- }
- }
-
- private void createDialogIfNecessary() {
- if (dialog == null) {
- createDialog();
- }
- }
-
- @Override
- public void destroy() {
- if (dialog != null) {
- dialog.destroy();
- dialog = null;
- }
- }
-
- public void doLayoutIfNeeded() {
- if (dialog.isRendered()) {
- dialog.doLayout(false);
- }
- }
-
- @Override
- public void hide() {
- if (dialog != null) {
- if (dialog.isVisible()) {
- dialog.hide();
- }
- }
- }
-
- @Override
- public void hideMessages() {
- if (dialog != null) {
- messageErrorBar.hideErrorMessage();
- }
- }
-
- @Override
- public void insertTab(final int index, final View view) {
- insertTabPanel(index, castPanel(view));
- doLayoutIfNeeded();
- }
-
- private void insertTabPanel(final int index, final Panel newTab) {
- createDialogIfNecessary();
- tabPanel.insert(index, newTab);
- }
-
- public boolean isVisible() {
- createDialogIfNecessary();
- return dialog.isVisible();
- }
-
- @Override
- public void setErrorMessage(final String message, final NotifyLevel level) {
- messageErrorBar.setErrorMessage(message, level);
- }
-
- public void setFirstTabActive() {
- tabPanel.setActiveTab(0);
- }
-
- public void setIconCls(final String iconCls) {
- this.iconCls = iconCls;
- if (dialog != null) {
- dialog.setIconCls(iconCls);
- }
- }
-
- public void setTitle(final String title) {
- this.title = title;
- if (dialog != null) {
- dialog.setTitle(title);
- }
- }
-
- public void show() {
- createDialogIfNecessary();
- dialog.show();
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,71 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.ui.dialogs.tabbed;
-
-import org.ourproject.kune.platf.client.View;
-
-import cc.kune.common.client.notify.NotifyLevel;
-
-public abstract class AbstractTabbedDialogPresenter implements AbstractTabbedDialog {
-
- private AbstractTabbedDialogView view;
-
- @Override
- public void activateTab(final int index) {
- view.activateTab(index);
- }
-
- @Override
- public void addTab(final View tab) {
- view.addTab(tab);
- }
-
- public View getView() {
- return view;
- }
-
- public void hide() {
- view.hide();
- }
-
- @Override
- public void hideMessages() {
- view.hideMessages();
- }
-
- public void init(final AbstractTabbedDialogView view) {
- this.view = view;
- }
-
- public void insertTab(final int index, final View tab) {
- view.insertTab(index, tab);
- }
-
- public void setErrorMessage(final String message, final NotifyLevel level) {
- view.setErrorMessage(message, level);
- }
-
- @Override
- public void show() {
- hideMessages();
- view.createAndShow();
- }
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,44 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.platf.client.ui.dialogs.tabbed;
-
-import org.ourproject.kune.platf.client.View;
-
-import cc.kune.common.client.notify.NotifyLevel;
-
-public interface AbstractTabbedDialogView extends View {
-
- void activateTab(int index);
-
- void addTab(View tab);
-
- void createAndShow();
-
- void destroy();
-
- void hide();
-
- void hideMessages();
-
- void insertTab(int index, View tab);
-
- void setErrorMessage(final String message, final NotifyLevel level);
-
-}
Copied: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialog.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialog.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialog.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.platf.client.ui.dialogs.tabbed;
+
+import org.ourproject.kune.platf.client.View;
+
+import cc.kune.common.client.notify.NotifyLevel;
+
+public interface OldAbstractTabbedDialog {
+
+ void activateTab(int index);
+
+ void addTab(View view);
+
+ public void hideMessages();
+
+ public void setErrorMessage(String message, NotifyLevel level);
+
+ void show();
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogPanel.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogPanel.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,236 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.platf.client.ui.dialogs.tabbed;
+
+import java.util.ArrayList;
+
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog;
+import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm;
+
+import cc.kune.common.client.notify.NotifyLevel;
+import cc.kune.common.client.notify.NotifyLevelImages;
+import cc.kune.common.client.ui.dialogs.MessageToolbar;
+
+import com.allen_sauer.gwt.log.client.Log;
+import com.calclab.suco.client.events.Listener0;
+import com.gwtext.client.widgets.Button;
+import com.gwtext.client.widgets.Component;
+import com.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.TabPanel;
+import com.gwtext.client.widgets.event.WindowListenerAdapter;
+
+public abstract class OldAbstractTabbedDialogPanel implements OldAbstractTabbedDialogView {
+ private final ArrayList<Button> buttons;
+ private BasicDialog dialog;
+ private final String dialogId;
+ private final String errorLabelId;
+ private final int height;
+ private String iconCls;
+ private final NotifyLevelImages images;
+ private MessageToolbar messageErrorBar;
+ private final int minHeight;
+ private final int minWidth;
+ private final boolean modal;
+ private Listener0 onHideListener;
+ private TabPanel tabPanel;
+ private String title;
+ private final int width;
+
+ public OldAbstractTabbedDialogPanel(final String dialogId, final String title, final int width, final int height,
+ final int minWidth, final int minHeight, final boolean modal, final NotifyLevelImages images,
+ final String errorLabelId) {
+ this.dialogId = dialogId;
+ this.title = title;
+ this.width = width;
+ this.height = height;
+ this.minWidth = minWidth;
+ this.minHeight = minHeight;
+ this.modal = modal;
+ this.images = images;
+ this.errorLabelId = errorLabelId;
+ buttons = new ArrayList<Button>();
+ }
+
+ @Override
+ public void activateTab(final int index) {
+ createDialogIfNecessary();
+ tabPanel.activate(index);
+ }
+
+ /**
+ * User before show/render
+ *
+ * @param button
+ */
+ public void addButton(final Button button) {
+ buttons.add(button);
+ }
+
+ private void addHideListener() {
+ dialog.addListener(new WindowListenerAdapter() {
+ @Override
+ public void onClose(final Panel panel) {
+ onHideListener.onEvent();
+ }
+
+ @Override
+ public void onHide(final Component component) {
+ onHideListener.onEvent();
+ }
+ });
+ }
+
+ public void addHideListener(final Listener0 onHideListener) {
+ this.onHideListener = onHideListener;
+ if (dialog != null) {
+ addHideListener();
+ }
+ }
+
+ @Override
+ public void addTab(final View view) {
+ addTabPanel(castPanel(view));
+ doLayoutIfNeeded();
+ }
+
+ private void addTabPanel(final Panel newTab) {
+ createDialogIfNecessary();
+ tabPanel.add(newTab);
+ }
+
+ private Panel castPanel(final View view) {
+ Panel panel;
+ if (view instanceof Panel) {
+ panel = (Panel) view;
+ } else if (view instanceof DefaultForm) {
+ panel = ((DefaultForm) view).getFormPanel();
+ } else {
+ panel = null;
+ Log.error("Programatic error: Unexpected element added to GroupOptions");
+ }
+ return panel;
+ }
+
+ @Override
+ public void createAndShow() {
+ show();
+ setFirstTabActive();
+ }
+
+ private void createDialog() {
+ dialog = new BasicDialog(dialogId, title, modal, true, width, height, minWidth, minHeight);
+ dialog.setCollapsible(false);
+ messageErrorBar = new MessageToolbar(images, errorLabelId);
+ // FIXME in gxt: dialog.setBottomToolbar(messageErrorBar.getToolbar());
+ tabPanel = new TabPanel();
+ tabPanel.setBorder(false);
+ dialog.add(tabPanel);
+ if (iconCls != null) {
+ dialog.setIconCls(iconCls);
+ }
+ if (onHideListener != null) {
+ addHideListener();
+ }
+ for (final Button button : buttons) {
+ dialog.addButton(button);
+ }
+ }
+
+ private void createDialogIfNecessary() {
+ if (dialog == null) {
+ createDialog();
+ }
+ }
+
+ @Override
+ public void destroy() {
+ if (dialog != null) {
+ dialog.destroy();
+ dialog = null;
+ }
+ }
+
+ public void doLayoutIfNeeded() {
+ if (dialog.isRendered()) {
+ dialog.doLayout(false);
+ }
+ }
+
+ @Override
+ public void hide() {
+ if (dialog != null) {
+ if (dialog.isVisible()) {
+ dialog.hide();
+ }
+ }
+ }
+
+ @Override
+ public void hideMessages() {
+ if (dialog != null) {
+ messageErrorBar.hideErrorMessage();
+ }
+ }
+
+ @Override
+ public void insertTab(final int index, final View view) {
+ insertTabPanel(index, castPanel(view));
+ doLayoutIfNeeded();
+ }
+
+ private void insertTabPanel(final int index, final Panel newTab) {
+ createDialogIfNecessary();
+ tabPanel.insert(index, newTab);
+ }
+
+ public boolean isVisible() {
+ createDialogIfNecessary();
+ return dialog.isVisible();
+ }
+
+ @Override
+ public void setErrorMessage(final String message, final NotifyLevel level) {
+ messageErrorBar.setErrorMessage(message, level);
+ }
+
+ public void setFirstTabActive() {
+ tabPanel.setActiveTab(0);
+ }
+
+ public void setIconCls(final String iconCls) {
+ this.iconCls = iconCls;
+ if (dialog != null) {
+ dialog.setIconCls(iconCls);
+ }
+ }
+
+ public void setTitle(final String title) {
+ this.title = title;
+ if (dialog != null) {
+ dialog.setTitle(title);
+ }
+ }
+
+ public void show() {
+ createDialogIfNecessary();
+ dialog.show();
+ }
+}
Copied: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogPresenter.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogPresenter.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,71 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.platf.client.ui.dialogs.tabbed;
+
+import org.ourproject.kune.platf.client.View;
+
+import cc.kune.common.client.notify.NotifyLevel;
+
+public abstract class OldAbstractTabbedDialogPresenter implements OldAbstractTabbedDialog {
+
+ private OldAbstractTabbedDialogView view;
+
+ @Override
+ public void activateTab(final int index) {
+ view.activateTab(index);
+ }
+
+ @Override
+ public void addTab(final View tab) {
+ view.addTab(tab);
+ }
+
+ public View getView() {
+ return view;
+ }
+
+ public void hide() {
+ view.hide();
+ }
+
+ @Override
+ public void hideMessages() {
+ view.hideMessages();
+ }
+
+ public void init(final OldAbstractTabbedDialogView view) {
+ this.view = view;
+ }
+
+ public void insertTab(final int index, final View tab) {
+ view.insertTab(index, tab);
+ }
+
+ public void setErrorMessage(final String message, final NotifyLevel level) {
+ view.setErrorMessage(message, level);
+ }
+
+ @Override
+ public void show() {
+ hideMessages();
+ view.createAndShow();
+ }
+
+}
Copied: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogView.java (from rev 1320, trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java)
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogView.java (rev 0)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/OldAbstractTabbedDialogView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -0,0 +1,44 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.platf.client.ui.dialogs.tabbed;
+
+import org.ourproject.kune.platf.client.View;
+
+import cc.kune.common.client.notify.NotifyLevel;
+
+public interface OldAbstractTabbedDialogView extends View {
+
+ void activateTab(int index);
+
+ void addTab(View tab);
+
+ void createAndShow();
+
+ void destroy();
+
+ void hide();
+
+ void hideMessages();
+
+ void insertTab(int index, View tab);
+
+ void setErrorMessage(final String message, final NotifyLevel level);
+
+}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialog.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialog.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,12 +19,12 @@
*/
package org.ourproject.kune.platf.client.ui.rte.edithtml;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialog;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialog;
import com.calclab.suco.client.events.Listener;
import com.calclab.suco.client.events.Listener0;
-public interface EditHtmlDialog extends AbstractTabbedDialog {
+public interface EditHtmlDialog extends OldAbstractTabbedDialog {
String getHtml();
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.platf.client.ui.rte.edithtml;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogPanel;
import org.ourproject.kune.platf.client.ui.rte.img.RTEImgResources;
import cc.kune.common.client.notify.NotifyLevel;
@@ -31,7 +31,7 @@
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-public class EditHtmlDialogPanel extends AbstractTabbedDialogPanel implements EditHtmlDialogView {
+public class EditHtmlDialogPanel extends OldAbstractTabbedDialogPanel implements EditHtmlDialogView {
public static final String EDIG_HTML_DIALOG_ERROR_ID = "ehtml-dialgo-error";
public static final String EDIT_HTML_DIALOG = "ehtml-dialog";
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogPresenter.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,12 +19,12 @@
*/
package org.ourproject.kune.platf.client.ui.rte.edithtml;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogPresenter;
import com.calclab.suco.client.events.Listener;
import com.calclab.suco.client.events.Listener0;
-public class EditHtmlDialogPresenter extends AbstractTabbedDialogPresenter implements EditHtmlDialog {
+public class EditHtmlDialogPresenter extends OldAbstractTabbedDialogPresenter implements EditHtmlDialog {
private Listener<String> updateListener;
private Listener0 cancelListener;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogView.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -20,9 +20,9 @@
package org.ourproject.kune.platf.client.ui.rte.edithtml;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogView;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogView;
-public interface EditHtmlDialogView extends AbstractTabbedDialogView, View {
+public interface EditHtmlDialogView extends OldAbstractTabbedDialogView, View {
int HEIGHT = 225;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialog.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialog.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,12 +19,12 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertimg;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialog;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialog;
import com.calclab.suco.client.events.Listener;
import com.calclab.suco.client.events.Listener0;
-public interface InsertImageDialog extends AbstractTabbedDialog {
+public interface InsertImageDialog extends OldAbstractTabbedDialog {
void fireOnInsertImage(ImageInfo imageInfo);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertimg;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogPanel;
import cc.kune.common.client.notify.NotifyLevelImages;
import cc.kune.core.shared.i18n.I18nTranslationService;
@@ -29,7 +29,7 @@
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-public class InsertImageDialogPanel extends AbstractTabbedDialogPanel implements InsertImageDialogView {
+public class InsertImageDialogPanel extends OldAbstractTabbedDialogPanel implements InsertImageDialogView {
private static final String INSERT_IMG_DIALOG = "k-iip-dial";
private static final String INSERT_IMG_DIALOG_ERROR_ID = "k-iip-err";
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogPresenter.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,14 +19,14 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertimg;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogPresenter;
import cc.kune.core.client.ui.utils.ContentPosition;
import com.calclab.suco.client.events.Listener;
import com.calclab.suco.client.events.Listener0;
-public class InsertImageDialogPresenter extends AbstractTabbedDialogPresenter implements InsertImageDialog {
+public class InsertImageDialogPresenter extends OldAbstractTabbedDialogPresenter implements InsertImageDialog {
private Listener<ImageInfo> onCreateListener;
private ImageInfo imageInfo;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogView.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,9 +19,9 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertimg;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogView;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogView;
-public interface InsertImageDialogView extends AbstractTabbedDialogView {
+public interface InsertImageDialogView extends OldAbstractTabbedDialogView {
int HEIGHT = 350;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialog.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialog.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,12 +19,12 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertlink;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialog;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialog;
import com.calclab.suco.client.events.Listener;
import com.calclab.suco.client.events.Listener0;
-public interface InsertLinkDialog extends AbstractTabbedDialog {
+public interface InsertLinkDialog extends OldAbstractTabbedDialog {
void fireOnInsertLink(LinkInfo linkInfo);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertlink;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogPanel;
import cc.kune.common.client.notify.NotifyLevelImages;
import cc.kune.core.shared.i18n.I18nTranslationService;
@@ -29,7 +29,7 @@
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-public class InsertLinkDialogPanel extends AbstractTabbedDialogPanel implements InsertLinkDialogView {
+public class InsertLinkDialogPanel extends OldAbstractTabbedDialogPanel implements InsertLinkDialogView {
public static final String TEXT_EDT_INSERT_DIALOG = "k-ted-iep-dialog";
public static final String TEXT_EDT_INSERT_DIALOG_ERROR_ID = "k-ted-iep-dialog-err";
private final InsertLinkGroup textEditorInsertElementGroup;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogPresenter.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,12 +19,12 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertlink;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogPresenter;
import com.calclab.suco.client.events.Listener;
import com.calclab.suco.client.events.Listener0;
-public class InsertLinkDialogPresenter extends AbstractTabbedDialogPresenter implements InsertLinkDialog {
+public class InsertLinkDialogPresenter extends OldAbstractTabbedDialogPresenter implements InsertLinkDialog {
private Listener<LinkInfo> onCreateListener;
private LinkInfo linkInfo;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogView.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -20,9 +20,9 @@
package org.ourproject.kune.platf.client.ui.rte.insertlink;
import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogView;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogView;
-public interface InsertLinkDialogView extends AbstractTabbedDialogView, View {
+public interface InsertLinkDialogView extends OldAbstractTabbedDialogView, View {
int HEIGHT = 350;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialog.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialog.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,12 +19,12 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertmedia;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialog;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialog;
import com.calclab.suco.client.events.Listener;
import com.calclab.suco.client.events.Listener0;
-public interface InsertMediaDialog extends AbstractTabbedDialog {
+public interface InsertMediaDialog extends OldAbstractTabbedDialog {
void fireOnInsertMedia(String html);
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialogPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialogPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialogPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertmedia;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogPanel;
import cc.kune.common.client.notify.NotifyLevelImages;
import cc.kune.core.shared.i18n.I18nTranslationService;
@@ -29,7 +29,7 @@
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-public class InsertMediaDialogPanel extends AbstractTabbedDialogPanel implements InsertMediaDialogView {
+public class InsertMediaDialogPanel extends OldAbstractTabbedDialogPanel implements InsertMediaDialogView {
private static final String INSERT_MEDIA_DIALOG = "k-imdp-dialog";
private static final String INSERT_MEDIA_DIALOG_ERROR_ID = "k-imdp-dialog-err";
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialogPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialogPresenter.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialogPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,12 +19,12 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertmedia;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogPresenter;
import com.calclab.suco.client.events.Listener;
import com.calclab.suco.client.events.Listener0;
-public class InsertMediaDialogPresenter extends AbstractTabbedDialogPresenter implements InsertMediaDialog {
+public class InsertMediaDialogPresenter extends OldAbstractTabbedDialogPresenter implements InsertMediaDialog {
private Listener0 onInsertPressed;
Listener<String> onCreateListener;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialog.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialog.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialog.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,11 +19,11 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertspecialchar;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialog;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialog;
import com.calclab.suco.client.events.Listener;
-public interface InsertSpecialCharDialog extends AbstractTabbedDialog {
+public interface InsertSpecialCharDialog extends OldAbstractTabbedDialog {
String DEF_LABEL = "Click on a character below to insert it into the document.";
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,7 +19,7 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertspecialchar;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogPanel;
import org.ourproject.kune.platf.client.ui.rte.img.RTEImgResources;
import cc.kune.common.client.notify.NotifyLevelImages;
@@ -29,7 +29,7 @@
import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-public class InsertSpecialCharDialogPanel extends AbstractTabbedDialogPanel implements InsertSpecialCharDialogView {
+public class InsertSpecialCharDialogPanel extends OldAbstractTabbedDialogPanel implements InsertSpecialCharDialogView {
private static final String INSERT_SPECIAL_CHAR_DIALOG = "iscdp-dial";
private static final String INSERT_SPECIAL_CHAR_DIALOG_ERROR_ID = "iscdp-err";
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogPresenter.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,11 +19,11 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertspecialchar;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogPresenter;
import com.calclab.suco.client.events.Listener;
-public class InsertSpecialCharDialogPresenter extends AbstractTabbedDialogPresenter implements InsertSpecialCharDialog {
+public class InsertSpecialCharDialogPresenter extends OldAbstractTabbedDialogPresenter implements InsertSpecialCharDialog {
private Listener<String> onInsertSpecialChar;
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogView.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -19,9 +19,9 @@
*/
package org.ourproject.kune.platf.client.ui.rte.insertspecialchar;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogView;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.OldAbstractTabbedDialogView;
-public interface InsertSpecialCharDialogView extends AbstractTabbedDialogView {
+public interface InsertSpecialCharDialogView extends OldAbstractTabbedDialogView {
int HEIGHT = 315;
Modified: trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -31,7 +31,6 @@
import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
import org.ourproject.kune.workspace.client.editor.ContentEditor;
import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
import org.ourproject.kune.workspace.client.upload.FileUploader;
import cc.kune.common.client.utils.SchedulerManager;
@@ -43,6 +42,7 @@
import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.gspace.client.style.GSpaceBackManager;
import com.calclab.suco.client.ioc.Provider;
@@ -55,7 +55,7 @@
final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
final WikiViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
- final WsBackManager wsBackManager) {
+ final GSpaceBackManager wsBackManager) {
super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/OldAbstractFoldableContentActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/OldAbstractFoldableContentActions.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/OldAbstractFoldableContentActions.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -37,7 +37,6 @@
import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
import org.ourproject.kune.workspace.client.editor.ContentEditor;
import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
import org.ourproject.kune.workspace.client.upload.FileUploader;
import cc.kune.common.client.utils.SchedulerManager;
@@ -61,6 +60,7 @@
import cc.kune.core.shared.dto.StateAbstractDTO;
import cc.kune.core.shared.dto.StateContainerDTO;
import cc.kune.core.shared.dto.StateContentDTO;
+import cc.kune.gspace.client.style.GSpaceBackManager;
import com.calclab.suco.client.events.Listener;
import com.calclab.suco.client.events.Listener0;
@@ -99,7 +99,7 @@
protected final StateManager stateManager;
protected final Provider<ContentEditor> textEditorProvider;
- private final WsBackManager wsBackManager;
+ private final GSpaceBackManager wsBackManager;
public OldAbstractFoldableContentActions(final Session session, final StateManager stateManager,
final I18nUITranslationService i18n, final ErrorHandler errorHandler,
@@ -109,7 +109,7 @@
final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
final Provider<FileDownloadUtils> fileDownloadProvider, final Provider<ContentEditor> textEditorProvider,
final Provider<ContextPropEditor> contextPropEditorProvider, final FoldableContent foldableContent,
- final EntityHeader entityLogo, final WsBackManager wsBackManager) {
+ final EntityHeader entityLogo, final GSpaceBackManager wsBackManager) {
this.session = session;
this.stateManager = stateManager;
this.i18n = i18n;
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptions.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptions.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,43 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialog;
-
-import cc.kune.common.client.notify.NotifyLevel;
-
-public interface EntityOptions extends AbstractTabbedDialog {
-
- @Override
- public void addTab(View tab);
-
- public View getView();
-
- @Override
- public void hideMessages();
-
- @Override
- public void setErrorMessage(String message, NotifyLevel level);
-
- @Override
- public void show();
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptionsView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptionsView.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptionsView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,28 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogView;
-
-public interface EntityOptionsView extends AbstractTabbedDialogView {
-
- int HEIGHT = 270;
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptions.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptions.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,23 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-public interface GroupOptions extends EntityOptions {
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,63 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
-import org.ourproject.kune.platf.client.app.GroupOptionsCollection;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-
-import cc.kune.common.client.notify.NotifyLevelImages;
-import cc.kune.core.client.resources.CoreMessages;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-public class GroupOptionsPanel extends AbstractTabbedDialogPanel implements GroupOptionsView {
-
- public static final String GROUP_OP_PANEL_ID = "k-gop-diagpan";
- public static final String GROUP_OPTIONS_ERROR_ID = "k-gop-err-mess";
- private final EntityHeader entityHeader;
-
- private final GroupOptionsCollection entityPreferencesGroup;
-
- public GroupOptionsPanel(final EntityOptions presenter, final EntityHeader entityHeader,
- final I18nTranslationService i18n, final NotifyLevelImages images,
- final GroupOptionsCollection entityOptionsGroup) {
- super(GROUP_OP_PANEL_ID, "", 400, HEIGHT + 80, 400, HEIGHT + 80, false, images, GROUP_OPTIONS_ERROR_ID);
- this.entityHeader = entityHeader;
- this.entityPreferencesGroup = entityOptionsGroup;
- super.setIconCls("k-options-icon");
- super.setTitle(i18n.t(CoreMessages.GROUP_OPTIONS_DIALOG_TITLE));
- }
-
- @Override
- public void addAction(final OldGuiActionDescrip descriptor) {
- entityHeader.addAction(descriptor);
- }
-
- @Override
- public void createAndShow() {
- createAndShowItImpl();
- }
-
- private void createAndShowItImpl() {
- entityPreferencesGroup.createAll();
- super.createAndShow();
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPresenter.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,78 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
-import org.ourproject.kune.platf.client.actions.Action;
-import org.ourproject.kune.platf.client.actions.ActionEvent;
-import org.ourproject.kune.platf.client.actions.ui.ButtonDescriptor;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
-
-import cc.kune.core.client.resources.icons.IconConstants;
-import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.dto.StateAbstractDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.events.Listener;
-
-public class GroupOptionsPresenter extends AbstractTabbedDialogPresenter implements GroupOptions {
- public static final String GROUP_OPTIONS_ICON = "k-eop-icon";
- private GroupOptionsView view;
- private final I18nTranslationService i18n;
- private final IconResources img;
- private ButtonDescriptor prefsItem;
-
- public GroupOptionsPresenter(final StateManager stateManager, final I18nTranslationService i18n,
- final IconResources img) {
- this.i18n = i18n;
- this.img = img;
- stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
- public void onEvent(final StateAbstractDTO state) {
- if (!state.getGroup().isPersonal() && state.getGroupRights().isAdministrable()) {
- prefsItem.setVisible(true);
- } else {
- view.hide();
- prefsItem.setVisible(false);
- }
- }
- });
- }
-
- public void init(final GroupOptionsView view) {
- super.init(view);
- this.view = view;
- createActions();
- }
-
- private void createActions() {
- final AbstractExtendedAction groupPrefsAction = new AbstractExtendedAction() {
- public void actionPerformed(final ActionEvent event) {
- show();
- }
- };
- groupPrefsAction.putValue(Action.NAME, i18n.t("Group options"));
- groupPrefsAction.putValue(Action.SMALL_ICON, IconConstants.toPath(img.prefs()));
- prefsItem = new ButtonDescriptor(groupPrefsAction);
- prefsItem.setId(GROUP_OPTIONS_ICON);
- prefsItem.setVisible(false);
- view.addAction(prefsItem);
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsView.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,28 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
-
-public interface GroupOptionsView extends EntityOptionsView {
-
- void addAction(OldGuiActionDescrip descriptor);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptions.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptions.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,23 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-public interface UserOptions extends EntityOptions {
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,55 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-import org.ourproject.kune.platf.client.app.UserOptionsCollection;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-
-import cc.kune.common.client.notify.NotifyLevelImages;
-import cc.kune.core.client.resources.CoreMessages;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-public class UserOptionsPanel extends AbstractTabbedDialogPanel implements UserOptionsView {
-
- public static final String USER_OP_PANEL_ID = "k-uop-diagpan";
- public static final String USER_OPTIONS_ERROR_ID = "k-uop-err-mess";
-
- private final UserOptionsCollection userPreferencesGroup;
-
- public UserOptionsPanel(final EntityOptions presenter, final EntityHeader entityHeader,
- final I18nTranslationService i18n, final NotifyLevelImages images,
- final UserOptionsCollection userOptionsGroup) {
- super(USER_OP_PANEL_ID, "", 400, HEIGHT + 80, 400, HEIGHT + 80, false, images, USER_OPTIONS_ERROR_ID);
- this.userPreferencesGroup = userOptionsGroup;
- super.setIconCls("k-options-icon");
- super.setTitle(i18n.t(CoreMessages.USER_OPTIONS_DIALOG_TITLE));
- }
-
- @Override
- public void createAndShow() {
- createAndShowItImpl();
- }
-
- private void createAndShowItImpl() {
- userPreferencesGroup.createAll();
- super.createAndShow();
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPresenter.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPresenter.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,85 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
-import org.ourproject.kune.platf.client.actions.Action;
-import org.ourproject.kune.platf.client.actions.ActionEvent;
-import org.ourproject.kune.platf.client.actions.ui.OldMenuItemDescriptor;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPresenter;
-
-import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.events.Listener0;
-
-public class UserOptionsPresenter extends AbstractTabbedDialogPresenter implements UserOptions {
-
- private final I18nTranslationService i18n;
- private final IconResources img;
- private final Session session;
- private final StateManager stateManager;
- // private final SiteUserOptions userOptions;
- private UserOptionsView view;
-
- public UserOptionsPresenter(final Session session, final StateManager stateManager,
- final I18nTranslationService i18n, final IconResources img) {// ,
- // final
- // SiteUserOptions
- // userOptions)
- // {
- this.session = session;
- this.stateManager = stateManager;
- this.i18n = i18n;
- this.img = img;
- // this.userOptions = userOptions;
- session.onUserSignOut(new Listener0() {
- @Override
- public void onEvent() {
- view.hide();
- }
- });
- }
-
- private void createActions() {
- final AbstractExtendedAction userPrefsAction = new AbstractExtendedAction() {
- @Override
- public void actionPerformed(final ActionEvent event) {
- if (!session.isInCurrentUserSpace()) {
- stateManager.gotoStateToken(session.getCurrentUser().getStateToken());
- }
- show();
- }
- };
- userPrefsAction.putValue(Action.NAME, i18n.t("Your preferences"));
- userPrefsAction.putValue(Action.SMALL_ICON, img.prefs());
- final OldMenuItemDescriptor prefsItem = new OldMenuItemDescriptor(userPrefsAction);
- prefsItem.setPosition(1);
- // userOptions.addAction(prefsItem);
- }
-
- public void init(final UserOptionsView view) {
- super.init(view);
- this.view = view;
- createActions();
- }
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsView.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsView.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,24 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-public interface UserOptionsView extends EntityOptionsView {
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManager.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManager.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,38 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.themes;
-
-
-import cc.kune.core.shared.domain.utils.StateToken;
-
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener0;
-
-public interface WsBackManager {
-
- void addBackClear(Listener0 listener);
-
- void addSetBackImage(Listener<StateToken> listener);
-
- void clearBackImage();
-
- void setBackImage(StateToken token);
-
-}
Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManagerImpl.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManagerImpl.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsBackManagerImpl.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -1,76 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.themes;
-
-import org.cobogw.gwt.user.client.CSS;
-
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.shared.domain.utils.StateToken;
-
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener0;
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.ui.RootPanel;
-
-public class WsBackManagerImpl implements WsBackManager {
-
- private static final StateToken NO_TOKEN = new StateToken("none.none.0.0");
- private final FileDownloadUtils downloadUtils;
- private StateToken lastToken;
-
- // private final Event0 onBackClear;
- // private final Event<StateToken> onSetBackImage;
-
- public WsBackManagerImpl(final FileDownloadUtils downloadUtils) {
- this.downloadUtils = downloadUtils;
- lastToken = NO_TOKEN;
- // this.onBackClear = new Event0("onBackClear");
- // this.onSetBackImage = new Event<StateToken>("onSetBackImage");
- }
-
- @Override
- public void addBackClear(final Listener0 listener) {
- // onBackClear.add(listener);
- }
-
- @Override
- public void addSetBackImage(final Listener<StateToken> listener) {
- // onSetBackImage.add(listener);
- }
-
- @Override
- public void clearBackImage() {
- // onBackClear.fire();
- if (!lastToken.equals(NO_TOKEN)) {
- DOM.setStyleAttribute(RootPanel.getBodyElement(), CSS.A.BACKGROUND, "transparent");
- lastToken = NO_TOKEN;
- }
- }
-
- @Override
- public void setBackImage(final StateToken token) {
- // onSetBackImage.fire(token);
- if (!token.equals(lastToken)) {
- final String bodyProp = "#FFFFFF url('" + downloadUtils.getImageUrl(token) + "') fixed no-repeat top left";
- DOM.setStyleAttribute(RootPanel.getBodyElement(), CSS.A.BACKGROUND, bodyProp);
- lastToken = token;
- }
- }
-}
Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java 2011-04-27 20:48:48 UTC (rev 1323)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/themes/WsThemeManager.java 2011-04-28 00:56:31 UTC (rev 1324)
@@ -29,6 +29,7 @@
import cc.kune.core.shared.dto.ContentSimpleDTO;
import cc.kune.core.shared.dto.InitDataDTO;
import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.gspace.client.style.GSpaceBackManager;
import com.calclab.suco.client.events.Listener2;
import com.calclab.suco.client.ioc.Provider;
@@ -40,10 +41,10 @@
private final Provider<GroupServiceAsync> groupServiceProvider;
private WsTheme previousTheme;
private final Session session;
- private final WsBackManager wsBackManager;
+ private final GSpaceBackManager wsBackManager;
public WsThemeManager(final Session session, final Provider<GroupServiceAsync> groupServiceProvider,
- final StateManager stateManager, final WsBackManager wsBackManager) {
+ final StateManager stateManager, final GSpaceBackManager wsBackManager) {
this.session = session;
this.groupServiceProvider = groupServiceProvider;
this.wsBackManager = wsBackManager;
More information about the kune-commits
mailing list