r1225 - in trunk: . src/main/java/cc/kune/common/client/actions src/main/java/cc/kune/common/client/actions/gxtui src/main/java/cc/kune/common/client/actions/ui src/main/java/cc/kune/common/client/noti src/main/java/cc/kune/common/client/ui src/main/java/cc/kune/common/client/utils src/main/java/cc/kune/core/client src/main/java/cc/kune/core/client/auth src/main/java/cc/kune/core/client/cookies src/main/java/cc/kune/core/client/errors src/main/java/cc/kune/core/client/i18n src/main/java/cc/ku
Author: vjrj_ Date: 2011-01-28 01:16:03 +0100 (Fri, 28 Jan 2011) New Revision: 1225 Added: trunk/src/main/java/cc/kune/common/client/actions/BeforeActionCollection.java trunk/src/main/java/cc/kune/common/client/actions/BeforeActionListener.java trunk/src/main/java/cc/kune/common/client/noti/NotifyLevelImages.java trunk/src/main/java/cc/kune/common/client/noti/NotifyUser.java trunk/src/main/java/cc/kune/core/client/auth/ trunk/src/main/java/cc/kune/core/client/auth/Register.java trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java trunk/src/main/java/cc/kune/core/client/auth/SignIn.java trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractView.java trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java trunk/src/main/java/cc/kune/core/client/auth/SignInView.java trunk/src/main/java/cc/kune/core/client/logs/ trunk/src/main/java/cc/kune/core/client/logs/EventsLogger.java trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java trunk/src/main/java/cc/kune/core/client/resources/accept.png trunk/src/main/java/cc/kune/core/client/resources/add-green.png trunk/src/main/java/cc/kune/core/client/resources/add.png trunk/src/main/java/cc/kune/core/client/resources/alert.png trunk/src/main/java/cc/kune/core/client/resources/anybody.png trunk/src/main/java/cc/kune/core/client/resources/arrow-down-black.gif trunk/src/main/java/cc/kune/core/client/resources/arrow-down-green.png trunk/src/main/java/cc/kune/core/client/resources/arrow-down-white.gif trunk/src/main/java/cc/kune/core/client/resources/arrow-left-green.png trunk/src/main/java/cc/kune/core/client/resources/arrow-right-black.gif trunk/src/main/java/cc/kune/core/client/resources/arrow-right-green.png trunk/src/main/java/cc/kune/core/client/resources/arrow-right-white.gif trunk/src/main/java/cc/kune/core/client/resources/arrow-up-green.png trunk/src/main/java/cc/kune/core/client/resources/arrow_in.png trunk/src/main/java/cc/kune/core/client/resources/arrow_out.png trunk/src/main/java/cc/kune/core/client/resources/arrowdown.gif trunk/src/main/java/cc/kune/core/client/resources/bullet_add.png trunk/src/main/java/cc/kune/core/client/resources/bullet_black.png trunk/src/main/java/cc/kune/core/client/resources/bullet_blue.png trunk/src/main/java/cc/kune/core/client/resources/bullet_delete.png trunk/src/main/java/cc/kune/core/client/resources/bullet_green.png trunk/src/main/java/cc/kune/core/client/resources/bullet_pink.png trunk/src/main/java/cc/kune/core/client/resources/bullet_purple.png trunk/src/main/java/cc/kune/core/client/resources/bullet_red.png trunk/src/main/java/cc/kune/core/client/resources/bullet_star.png trunk/src/main/java/cc/kune/core/client/resources/bullet_toggle_minus.png trunk/src/main/java/cc/kune/core/client/resources/bullet_toggle_plus.png trunk/src/main/java/cc/kune/core/client/resources/bullet_yellow.png trunk/src/main/java/cc/kune/core/client/resources/button-arrow-down.png trunk/src/main/java/cc/kune/core/client/resources/button-help-blue.png trunk/src/main/java/cc/kune/core/client/resources/button-help-dark.png trunk/src/main/java/cc/kune/core/client/resources/button-help-light.png trunk/src/main/java/cc/kune/core/client/resources/button15cblue.png trunk/src/main/java/cc/kune/core/client/resources/button15cdark.png trunk/src/main/java/cc/kune/core/client/resources/button15clight.png trunk/src/main/java/cc/kune/core/client/resources/button15cxlight.png trunk/src/main/java/cc/kune/core/client/resources/button15lblue.png trunk/src/main/java/cc/kune/core/client/resources/button15ldark.png trunk/src/main/java/cc/kune/core/client/resources/button15llight.png trunk/src/main/java/cc/kune/core/client/resources/button15lxlight.png trunk/src/main/java/cc/kune/core/client/resources/button15rblue.png trunk/src/main/java/cc/kune/core/client/resources/button15rdark.png trunk/src/main/java/cc/kune/core/client/resources/button15rlight.png trunk/src/main/java/cc/kune/core/client/resources/button15rxlight.png trunk/src/main/java/cc/kune/core/client/resources/button17cblue.png trunk/src/main/java/cc/kune/core/client/resources/button17cdark.png trunk/src/main/java/cc/kune/core/client/resources/button17clight.png trunk/src/main/java/cc/kune/core/client/resources/button17cxlight.png trunk/src/main/java/cc/kune/core/client/resources/button17lblue.png trunk/src/main/java/cc/kune/core/client/resources/button17ldark.png trunk/src/main/java/cc/kune/core/client/resources/button17llight.png trunk/src/main/java/cc/kune/core/client/resources/button17lxlight.png trunk/src/main/java/cc/kune/core/client/resources/button17rblue.png trunk/src/main/java/cc/kune/core/client/resources/button17rdark.png trunk/src/main/java/cc/kune/core/client/resources/button17rlight.png trunk/src/main/java/cc/kune/core/client/resources/button17rxlight.png trunk/src/main/java/cc/kune/core/client/resources/button20cblue.png trunk/src/main/java/cc/kune/core/client/resources/button20cdark.png trunk/src/main/java/cc/kune/core/client/resources/button20clight.png trunk/src/main/java/cc/kune/core/client/resources/button20cxlight.png trunk/src/main/java/cc/kune/core/client/resources/button20lblue.png trunk/src/main/java/cc/kune/core/client/resources/button20ldark.png trunk/src/main/java/cc/kune/core/client/resources/button20llight.png trunk/src/main/java/cc/kune/core/client/resources/button20lxlight.png trunk/src/main/java/cc/kune/core/client/resources/button20rblue.png trunk/src/main/java/cc/kune/core/client/resources/button20rdark.png trunk/src/main/java/cc/kune/core/client/resources/button20rlight.png trunk/src/main/java/cc/kune/core/client/resources/button20rxlight.png trunk/src/main/java/cc/kune/core/client/resources/by80x15.png trunk/src/main/java/cc/kune/core/client/resources/bync80x15.png trunk/src/main/java/cc/kune/core/client/resources/byncnd80x15.png trunk/src/main/java/cc/kune/core/client/resources/byncsa80x15.png trunk/src/main/java/cc/kune/core/client/resources/bynd80x15.png trunk/src/main/java/cc/kune/core/client/resources/bysa80x15.png trunk/src/main/java/cc/kune/core/client/resources/cancel.png trunk/src/main/java/cc/kune/core/client/resources/clear.png trunk/src/main/java/cc/kune/core/client/resources/copyleft.png trunk/src/main/java/cc/kune/core/client/resources/cross-dark.png trunk/src/main/java/cc/kune/core/client/resources/cross.png trunk/src/main/java/cc/kune/core/client/resources/del.png trunk/src/main/java/cc/kune/core/client/resources/emblem-important.png trunk/src/main/java/cc/kune/core/client/resources/emblem-system.png trunk/src/main/java/cc/kune/core/client/resources/error.png trunk/src/main/java/cc/kune/core/client/resources/everybody.png trunk/src/main/java/cc/kune/core/client/resources/fullscreen.png trunk/src/main/java/cc/kune/core/client/resources/gnu-fdl.gif trunk/src/main/java/cc/kune/core/client/resources/group-def-icon.png trunk/src/main/java/cc/kune/core/client/resources/group-home.png trunk/src/main/java/cc/kune/core/client/resources/important.png trunk/src/main/java/cc/kune/core/client/resources/info-light.png trunk/src/main/java/cc/kune/core/client/resources/info.png trunk/src/main/java/cc/kune/core/client/resources/kune-close.png trunk/src/main/java/cc/kune/core/client/resources/kune-external-window.png trunk/src/main/java/cc/kune/core/client/resources/kune-help-translation-icon.png trunk/src/main/java/cc/kune/core/client/resources/kune-icon16.png trunk/src/main/java/cc/kune/core/client/resources/kune-logo-16px.png trunk/src/main/java/cc/kune/core/client/resources/kune-preferences.png trunk/src/main/java/cc/kune/core/client/resources/kune-search-ico-push.png trunk/src/main/java/cc/kune/core/client/resources/kune-search-ico.png trunk/src/main/java/cc/kune/core/client/resources/language.png trunk/src/main/java/cc/kune/core/client/resources/no-copyleft.png trunk/src/main/java/cc/kune/core/client/resources/nobody.png trunk/src/main/java/cc/kune/core/client/resources/nt.png trunk/src/main/java/cc/kune/core/client/resources/opentriangle.gif trunk/src/main/java/cc/kune/core/client/resources/person-def.png trunk/src/main/java/cc/kune/core/client/resources/person2-60.png trunk/src/main/java/cc/kune/core/client/resources/remove.png trunk/src/main/java/cc/kune/core/client/resources/rss-icon.png trunk/src/main/java/cc/kune/core/client/resources/search-ico.png trunk/src/main/java/cc/kune/core/client/resources/spin-kune-thund-green.gif trunk/src/main/java/cc/kune/core/client/resources/splitter-vert-bar.gif trunk/src/main/java/cc/kune/core/client/resources/star-10.png trunk/src/main/java/cc/kune/core/client/resources/star-20.png trunk/src/main/java/cc/kune/core/client/resources/star-30.png trunk/src/main/java/cc/kune/core/client/resources/star-40.png trunk/src/main/java/cc/kune/core/client/resources/star-50.png trunk/src/main/java/cc/kune/core/client/resources/star-60.png trunk/src/main/java/cc/kune/core/client/resources/star-70.png trunk/src/main/java/cc/kune/core/client/resources/star-80.png trunk/src/main/java/cc/kune/core/client/resources/star-90.png trunk/src/main/java/cc/kune/core/client/resources/star-grey.png trunk/src/main/java/cc/kune/core/client/resources/star-small-yellow.png trunk/src/main/java/cc/kune/core/client/resources/star-vsmall-yellow.png trunk/src/main/java/cc/kune/core/client/resources/star-yellow.png trunk/src/main/java/cc/kune/core/client/resources/step1.png trunk/src/main/java/cc/kune/core/client/resources/step2.png trunk/src/main/java/cc/kune/core/client/resources/step3.png trunk/src/main/java/cc/kune/core/client/resources/step4.png trunk/src/main/java/cc/kune/core/client/resources/step5.png trunk/src/main/java/cc/kune/core/client/resources/theme-choose.png trunk/src/main/java/cc/kune/core/client/resources/triangle.gif trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java trunk/src/main/java/cc/kune/core/client/ui/DefaultForm.java trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessageToolbar.java trunk/src/main/java/org/ourproject/kune/app/client/OldKuneEntryPoint.java Removed: trunk/src/main/java/cc/kune/core/client/actions/ trunk/src/main/java/cc/kune/core/client/logs/BeforeActionCollection.java trunk/src/main/java/cc/kune/core/client/logs/BeforeActionListener.java trunk/src/main/java/cc/kune/core/client/sitebar/sign/ trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java trunk/src/main/java/org/ourproject/kune/platf/client/PlatfMessages.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/MessageToolbar.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/Register.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterView.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractView.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInForm.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java Modified: trunk/TODO trunk/TROUBLESHOOT trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java trunk/src/main/java/cc/kune/common/client/ui/PopupPanelBottomCentered.java trunk/src/main/java/cc/kune/common/client/ui/PopupPanelTopCentered.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/CoreGinjector.java trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java trunk/src/main/java/cc/kune/core/client/cookies/CookiesManager.java trunk/src/main/java/cc/kune/core/client/cookies/CookiesManagerImpl.java trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignInLink.java trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoPresenter.java trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoViewImpl.java trunk/src/main/java/cc/kune/core/client/state/SiteCommonTokens.java trunk/src/main/java/cc/kune/core/client/state/StateManager.java trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.ui.xml trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialogView.java trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java trunk/src/main/java/cc/kune/core/client/ws/CorePresenter.java trunk/src/main/java/cc/kune/core/public/ws.css trunk/src/main/java/cc/kune/core/public/ws.html trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml trunk/src/main/java/org/ourproject/kune/platf/client/services/Images.java trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/InfoDialog.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/platf/client/ui/rte/edithtml/EditHtmlDialogPanel.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/insertlink/InsertLinkDialogPanel.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/ext/InsertMediaExtPresenter.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/saving/RTESavingEditor.java trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceMessages.java trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupView.java trunk/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptions.java trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLink.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java Log: NEW - # 14: Site bar update http://kune.ourproject.org/issues/ticket/14 Modified: trunk/TODO =================================================================== --- trunk/TODO 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/TODO 2011-01-28 00:16:03 UTC (rev 1225) @@ -15,10 +15,8 @@ ** Use Emulate Stack Java like src/org/waveprotocol/box/webclient/WebClientDev.gwt.xml ** roo error [FelixDispatchQueue] Expected string-based content in @RooGwtMirroredFrom on cc.kune.client.managed.request.ContainerTranslationProxyObject of class [org.springframework.roo.classpath.details.annotations.ClassAttributeValue] must be an instance of class org.springframework.roo.classpath.details.annotations.StringAttributeValue -** spaces navigation -*** index.html via jruby and loads the app in background... -**** the sitebar (login/logout), the site logo, etc -**** +** Gin sharing of instances between injectos +https://groups.google.com/group/google-gin/browse_thread/thread/203ab1725406... ** Wave integration [ ] org.waveprotocol.box.webclient.WebClientProd [ ] src/org/waveprotocol/box/server/ServerMain.java Modified: trunk/TROUBLESHOOT =================================================================== --- trunk/TROUBLESHOOT 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/TROUBLESHOOT 2011-01-28 00:16:03 UTC (rev 1225) @@ -5,6 +5,8 @@ Server: debug with jetty in eclipse: http://docs.codehaus.org/display/JETTY/Debugging+with+the+Maven+Jetty+Plugin... +Also for different logging levels you can play with -Dorg.eclipse.jetty.util.log.DEBUG=true (or similars) + == Client debug == Client code: you can debug with gwt hosted mode in eclipse (see DEV-GUIDE for hosted mode instructions). @@ -75,5 +77,8 @@ Error: Problem with Eclipse plugin and UiBinder "Field xxx has no corresponding field in template file yyy.ui.xml" https://code.google.com/p/google-web-toolkit/issues/detail?id=4353 -== Outbound variable M2_REPO == -Set M2_REPO to eclipse in Preferences > Java > Build Path > Classpath Variable (normally to /home/youruser/.m2/repository/) \ No newline at end of file +=== Outbound variable M2_REPO === + +Set M2_REPO to eclipse in Preferences > Java > Build Path > Classpath Variable (normally to /home/youruser/.m2/repository/) + +=== \ No newline at end of file Copied: trunk/src/main/java/cc/kune/common/client/actions/BeforeActionCollection.java (from rev 1223, trunk/src/main/java/cc/kune/core/client/actions/BeforeActionCollection.java) =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/BeforeActionCollection.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/actions/BeforeActionCollection.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,45 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.common.client.actions; + +import java.util.ArrayList; + +/** + * The Class BeforeActionCollection. + */ +public class BeforeActionCollection extends ArrayList<BeforeActionListener> { + + private static final long serialVersionUID = -1508664709628420137L; + + /** + * Check before action listeners. + * + * @return true, if all listener returns true + */ + public boolean checkBeforeAction() { + for (BeforeActionListener listener : this) { + if (!listener.beforeAction()) { + return false; + } + } + return true; + } + +} Property changes on: trunk/src/main/java/cc/kune/common/client/actions/BeforeActionCollection.java ___________________________________________________________________ Name: svn:mergeinfo + Copied: trunk/src/main/java/cc/kune/common/client/actions/BeforeActionListener.java (from rev 1223, trunk/src/main/java/cc/kune/core/client/actions/BeforeActionListener.java) =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/BeforeActionListener.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/actions/BeforeActionListener.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,31 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.common.client.actions; + +public interface BeforeActionListener { + + /** + * Return false to cancel the action + * + * @return + */ + boolean beforeAction(); + +} Property changes on: trunk/src/main/java/cc/kune/common/client/actions/BeforeActionListener.java ___________________________________________________________________ Name: svn:mergeinfo + Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -28,7 +28,7 @@ } @Override - protected void addStyle(String style) { + protected void addStyle(final String style) { button.addStyleName(style); } @@ -101,8 +101,10 @@ @Override public void setVisible(final boolean visible) { if (button.isRendered()) { - super.setVisible(visible); + // ?? } + button.setVisible(visible); + } @Override Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,6 +1,7 @@ package cc.kune.common.client.actions.gxtui; import cc.kune.common.client.actions.gwtui.GwtIconLabelGui; +import cc.kune.common.client.actions.gwtui.GwtToolbarSeparatorGui; import cc.kune.common.client.actions.ui.bind.GuiProvider; import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor; import cc.kune.common.client.actions.ui.descrip.IconLabelDescriptor; @@ -24,7 +25,7 @@ final Provider<GxtMenuGui> gxtMenuGui, final Provider<GxtMenuItemGui> gxtMenuItemGui, final Provider<GxtMenuSeparatorGui> gxtMenuSeparatorGui, final Provider<GxtPushButtonGui> gxtPushButtonGui, final Provider<GxtButtonGui> gxtButtonGui, final Provider<GwtIconLabelGui> gwtIconLabelGui, - final Provider<GxtToolbarGui> gxtToolbarGui, final Provider<GxtToolbarSeparatorGui> gxtToolbarSeparatorGui) { + final Provider<GxtToolbarGui> gxtToolbarGui, final Provider<GwtToolbarSeparatorGui> gxtToolbarSeparatorGui) { guiProvider.register(SubMenuDescriptor.class, gxtSubMenuGui); guiProvider.register(MenuDescriptor.class, gxtMenuGui); Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -23,7 +23,7 @@ this.descriptor = descriptor; } - protected void addStyle(String style) { + protected void addStyle(final String style) { super.addStyleName(style); } @@ -93,10 +93,10 @@ protected abstract void setIconStyle(String style); - private void setStyles(String styles) { + private void setStyles(final String styles) { if (styles != null) { clearStyles(); - for (String style : TextUtils.splitTags(styles)) { + for (final String style : TextUtils.splitTags(styles)) { addStyle(style); } } Added: trunk/src/main/java/cc/kune/common/client/noti/NotifyLevelImages.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/noti/NotifyLevelImages.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/noti/NotifyLevelImages.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,30 @@ +package cc.kune.common.client.noti; + +import cc.kune.core.client.resources.CoreResources; + +import com.google.gwt.resources.client.ImageResource; +import com.google.inject.Inject; + +public class NotifyLevelImages { + + private final CoreResources images; + + @Inject + public NotifyLevelImages(final CoreResources images) { + this.images = images; + } + + public ImageResource getImage(final NotifyLevel level) { + switch (level) { + case info: + return images.info(); + case important: + return images.important(); + case veryImportant: + return images.alert(); + case error: + default: + return images.error(); + } + } +} Property changes on: trunk/src/main/java/cc/kune/common/client/noti/NotifyLevelImages.java ___________________________________________________________________ Name: svn:mime-type + text/plain Added: trunk/src/main/java/cc/kune/common/client/noti/NotifyUser.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/noti/NotifyUser.java (rev 0) +++ trunk/src/main/java/cc/kune/common/client/noti/NotifyUser.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,67 @@ +package cc.kune.common.client.noti; + +import cc.kune.common.client.utils.SimpleCallback; +import cc.kune.core.client.notify.msgs.UserNotifyEvent; +import cc.kune.core.client.notify.spiner.ProgressHideEvent; +import cc.kune.core.client.notify.spiner.ProgressShowEvent; + +import com.google.gwt.event.shared.EventBus; + +public class NotifyUser { + private static EventBus eventBus; + private static SimpleCallback onOk; + + public static void hideProgress() { + eventBus.fireEvent(new ProgressHideEvent()); + } + + public static void important(final String message) { + eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.important, message)); + } + + public static void info(final String message) { + eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.info, message)); + } + + public static void init(final EventBus eventBus) { + NotifyUser.eventBus = eventBus; + onOk = new SimpleCallback() { + + @Override + public void onCancel() { + // Do nothing + } + + @Override + public void onSuccess() { + // Do nothing + } + }; + + } + + public static void showAlertMessage(final String title, final String message) { + eventBus.fireEvent(new AlertEvent(title, message, onOk)); + } + + public static void showAlertMessage(final String title, final String message, final SimpleCallback callback) { + eventBus.fireEvent(new AlertEvent(title, message, callback)); + } + + public static void showProgress(final String text) { + eventBus.fireEvent(new ProgressShowEvent(text)); + } + + public static void showProgressLoading() { + eventBus.fireEvent(new ProgressShowEvent()); + } + + public static void showProgressProcessing() { + eventBus.fireEvent(new ProgressShowEvent()); + } + + public static void veryImportant(final String message) { + eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.veryImportant, message)); + } + +} Property changes on: trunk/src/main/java/cc/kune/common/client/noti/NotifyUser.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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -4,16 +4,18 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.HasClickHandlers; +import com.google.gwt.i18n.client.HasDirection.Direction; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.FocusPanel; import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.HasDirectionalText; import com.google.gwt.user.client.ui.HasWidgets; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Widget; -public class IconLabel extends Composite implements HasWidgets { +public class IconLabel extends Composite implements HasWidgets, HasDirectionalText { interface IconTitleUiBinder extends UiBinder<Widget, IconLabel> { } @@ -21,12 +23,16 @@ private static IconTitleUiBinder uiBinder = GWT.create(IconTitleUiBinder.class); @UiField + HorizontalPanel hp; + @UiField HTML label; @UiField - HorizontalPanel hp; - @UiField FocusPanel self; + public IconLabel() { + this(""); + } + public IconLabel(final String text) { initWidget(uiBinder.createAndBindUi(this)); label.setText(text); @@ -51,6 +57,16 @@ } @Override + public String getText() { + return label.getText(); + } + + @Override + public Direction getTextDirection() { + return label.getTextDirection(); + } + + @Override public Iterator<Widget> iterator() { return hp.iterator(); } @@ -69,7 +85,13 @@ label.setHTML(html); } + @Override public void setText(final String text) { label.setText(text); } + + @Override + public void setText(final String text, final Direction dir) { + label.setText(text, dir); + } } Modified: trunk/src/main/java/cc/kune/common/client/ui/PopupPanelBottomCentered.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/ui/PopupPanelBottomCentered.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/common/client/ui/PopupPanelBottomCentered.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -13,12 +13,12 @@ init(); } - public PopupPanelBottomCentered(boolean autohide) { + public PopupPanelBottomCentered(final boolean autohide) { super(autohide); init(); } - public PopupPanelBottomCentered(boolean autohide, boolean modal) { + public PopupPanelBottomCentered(final boolean autohide, final boolean modal) { super(autohide, modal); init(); } @@ -30,7 +30,7 @@ addStyleName("k-top-10corners"); Window.addResizeHandler(new ResizeHandler() { @Override - public void onResize(ResizeEvent event) { + public void onResize(final ResizeEvent event) { setCenterPositionImpl(); } }); @@ -41,15 +41,19 @@ } private void setCenterPositionImpl() { - Widget widget = getWidget(); - int x = (Window.getClientWidth() - (widget != null ? getWidget().getOffsetWidth() : 0)) / 2; - int y = Window.getClientHeight() - (widget != null ? getWidget().getOffsetHeight() : 0); - setPopupPosition(x, y); + setPopupPositionAndShow(new PopupPanel.PositionCallback() { + @Override + public void setPosition(final int offsetWidth, final int offsetHeight) { + final Widget widget = getWidget(); + final int x = (Window.getClientWidth() - (widget != null ? getWidget().getOffsetWidth() : 0)) / 2; + final int y = Window.getClientHeight() - (widget != null ? getWidget().getOffsetHeight() : 0); + PopupPanelBottomCentered.this.setPopupPosition(x, y); + } + }); + } - @Override - public void show() { - super.show(); - setCenterPosition(); + public void showCentered() { + setCenterPositionImpl(); } } Modified: trunk/src/main/java/cc/kune/common/client/ui/PopupPanelTopCentered.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/ui/PopupPanelTopCentered.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/common/client/ui/PopupPanelTopCentered.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -4,7 +4,6 @@ import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.Window; import com.google.gwt.user.client.ui.PopupPanel; -import com.google.gwt.user.client.ui.Widget; public class PopupPanelTopCentered extends PopupPanel { public PopupPanelTopCentered() { @@ -12,12 +11,12 @@ init(); } - public PopupPanelTopCentered(boolean autohide) { + public PopupPanelTopCentered(final boolean autohide) { super(autohide); init(); } - public PopupPanelTopCentered(boolean autohide, boolean modal) { + public PopupPanelTopCentered(final boolean autohide, final boolean modal) { super(autohide, modal); init(); } @@ -29,7 +28,7 @@ addStyleName("k-bottom-10corners"); Window.addResizeHandler(new ResizeHandler() { @Override - public void onResize(ResizeEvent event) { + public void onResize(final ResizeEvent event) { setCenterPositionImpl(); } }); @@ -40,15 +39,17 @@ } private void setCenterPositionImpl() { - Widget widget = getWidget(); - int x = (Window.getClientWidth() - (widget != null ? getWidget().getOffsetWidth() : 0)) / 2; - int y = 0; - setPopupPosition(x, y); + setPopupPositionAndShow(new PopupPanel.PositionCallback() { + @Override + public void setPosition(final int offsetWidth, final int offsetHeight) { + final int x = (Window.getClientWidth() - (getWidget() != null ? getWidget().getOffsetWidth() : 0)) / 2; + final int y = 0; + PopupPanelTopCentered.this.setPopupPosition(x, y); + } + }); } - @Override - public void show() { - super.show(); - setCenterPosition(); + public void showCentered() { + setCenterPositionImpl(); } } Modified: trunk/src/main/java/cc/kune/common/client/utils/TextUtils.java =================================================================== --- trunk/src/main/java/cc/kune/common/client/utils/TextUtils.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/common/client/utils/TextUtils.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -61,6 +61,10 @@ return "<a href=\"" + href + "\" target=\"_blank\">" + text + "</a>"; } + public static boolean notEmpty(final String string) { + return string != null & string.length() > 0; + } + public static String removeLastSlash(final String text) { return text.replaceFirst("/$", ""); } Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,10 +1,19 @@ package cc.kune.core.client; +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; import cc.kune.common.client.actions.ui.bind.GuiProvider; import cc.kune.common.client.shortcuts.DefaultGlobalShortcutRegister; import cc.kune.common.client.shortcuts.GlobalShortcutRegister; +import cc.kune.core.client.auth.Register; +import cc.kune.core.client.auth.RegisterPanel; +import cc.kune.core.client.auth.RegisterPresenter; +import cc.kune.core.client.auth.RegisterView; +import cc.kune.core.client.auth.SignIn; +import cc.kune.core.client.auth.SignInPanel; +import cc.kune.core.client.auth.SignInPresenter; +import cc.kune.core.client.auth.SignInView; import cc.kune.core.client.cookies.CookiesManager; import cc.kune.core.client.cookies.CookiesManagerImpl; import cc.kune.core.client.errors.ErrorHandler; @@ -12,6 +21,7 @@ import cc.kune.core.client.init.AppStarter; import cc.kune.core.client.init.AppStarterDefault; import cc.kune.core.client.init.PrefetchUtilities; +import cc.kune.core.client.logs.EventsLogger; import cc.kune.core.client.notify.msgs.UserNotifierPresenter; import cc.kune.core.client.notify.msgs.UserNotifierPresenter.UserNotifierProxy; import cc.kune.core.client.notify.msgs.UserNotifierViewImpl; @@ -33,10 +43,10 @@ import cc.kune.core.client.state.HistoryWrapperDefault; import cc.kune.core.client.state.Session; import cc.kune.core.client.state.SessionDefault; +import cc.kune.core.client.state.SiteTokenListeners; import cc.kune.core.client.state.StateManager; import cc.kune.core.client.state.StateManagerDefault; import cc.kune.core.client.ui.QTipsHelper; -import cc.kune.core.client.ws.CorePlaceManager; import cc.kune.core.client.ws.CorePresenter; import cc.kune.core.client.ws.CoreViewImpl; import cc.kune.core.shared.i18n.I18nTranslationService; @@ -52,7 +62,6 @@ 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.PlaceManager; import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler; import com.gwtplatform.mvp.client.proxy.TokenFormatter; @@ -66,14 +75,18 @@ @Override protected void configure() { bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class); - bind(PlaceManager.class).to(CorePlaceManager.class).in(Singleton.class); + // bind(PlaceManager.class).to(CorePlaceManager.class).in(Singleton.class); bind(TokenFormatter.class).to(ParameterTokenFormatter.class).in(Singleton.class); bind(RootPresenter.class).asEagerSingleton(); bind(QTipsHelper.class).asEagerSingleton(); + bind(EventsLogger.class).asEagerSingleton(); bind(ProxyFailureHandler.class).to(DefaultProxyFailureHandler.class).in(Singleton.class); + bind(I18nUITranslationService.class).in(Singleton.class); + bind(I18nTranslationService.class).to(I18nUITranslationService.class).in(Singleton.class); bind(GuiProvider.class).to(DefaultGuiProvider.class).in(Singleton.class); bind(GxtGuiProvider.class).in(Singleton.class); + bind(GwtGuiProvider.class).in(Singleton.class); bind(GlobalShortcutRegister.class).to(DefaultGlobalShortcutRegister.class).in(Singleton.class); // Presenters @@ -91,6 +104,12 @@ bindPresenter(SitebarActionsPresenter.class, SitebarActionsPresenter.SitebarActionsView.class, SitebarActionsViewImpl.class, SitebarActionsPresenter.SitebarActionsProxy.class); + bindPresenter(SignInPresenter.class, SignInView.class, SignInPanel.class, SignInPresenter.SignInProxy.class); + bindPresenter(RegisterPresenter.class, RegisterView.class, RegisterPanel.class, + RegisterPresenter.RegisterProxy.class); + bind(SignIn.class).to(SignInPresenter.class).in(Singleton.class); + bind(Register.class).to(RegisterPresenter.class).in(Singleton.class); + bind(UserMessagesPresenter.class).in(Singleton.class); bind(UserMessagesPanel.class).in(Singleton.class); @@ -98,7 +117,7 @@ bind(WsArmor.class).to(WsArmorImpl.class).in(Singleton.class); bind(CookiesManager.class).to(CookiesManagerImpl.class).in(Singleton.class); bind(Session.class).to(SessionDefault.class).in(Singleton.class); - bind(I18nTranslationService.class).to(I18nUITranslationService.class).in(Singleton.class); + bind(ErrorHandler.class).in(Singleton.class); bind(StateManagerDefault.class).in(Singleton.class); bind(StateManager.class).to(StateManagerDefault.class).in(Singleton.class); @@ -111,5 +130,6 @@ bind(SitebarSignInLink.class).in(Singleton.class); bind(SitebarSignOutLink.class).in(Singleton.class); bind(BeforeSignOut.class).in(Singleton.class); + bind(SiteTokenListeners.class).asEagerSingleton(); } } Modified: trunk/src/main/java/cc/kune/core/client/CoreGinjector.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/CoreGinjector.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/CoreGinjector.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,15 +1,20 @@ package cc.kune.core.client; +import cc.kune.common.client.actions.gwtui.GwtGuiProvider; import cc.kune.common.client.actions.gxtui.GxtGuiProvider; import cc.kune.common.client.actions.ui.bind.GuiProvider; import cc.kune.common.client.shortcuts.GlobalShortcutRegister; +import cc.kune.core.client.auth.RegisterPresenter; +import cc.kune.core.client.auth.SignInPresenter; import cc.kune.core.client.cookies.CookiesManager; import cc.kune.core.client.errors.ErrorHandler; +import cc.kune.core.client.logs.EventsLogger; import cc.kune.core.client.notify.msgs.UserNotifierPresenter; import cc.kune.core.client.notify.spiner.SpinerPresenter; import cc.kune.core.client.sitebar.SitebarActionsPresenter; import cc.kune.core.client.sitebar.logo.SiteLogoPresenter; import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter; +import cc.kune.core.client.state.SiteTokenListeners; import cc.kune.core.client.state.StateManager; import cc.kune.core.client.ws.CorePresenter; import cc.kune.core.shared.i18n.I18nTranslationService; @@ -18,7 +23,7 @@ import com.google.gwt.inject.client.AsyncProvider; import com.google.gwt.inject.client.GinModules; import com.google.gwt.inject.client.Ginjector; -import com.gwtplatform.mvp.client.proxy.PlaceManager; +import com.google.inject.Provider; import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler; @GinModules({ CoreGinModule.class }) @@ -31,28 +36,38 @@ AsyncProvider<CookiesManager> getCookiesManager(); - AsyncProvider<CorePresenter> getCorePresenter(); + Provider<CorePresenter> getCorePresenter(); ErrorHandler getErrorHandler(); EventBus getEventBus(); + EventsLogger getEventLogger(); + GlobalShortcutRegister getGlobalShortcutRegister(); GuiProvider getGuiProvider(); + GwtGuiProvider getGwtGuiProvider(); + GxtGuiProvider getGxtGuiProvider(); I18nTranslationService getI18n(); - PlaceManager getPlaceManager(); + // PlaceManager getPlaceManager(); ProxyFailureHandler getProxyFailureHandler(); + AsyncProvider<RegisterPresenter> getRegisterPresenter(); + + AsyncProvider<SignInPresenter> getSignInPresenter(); + AsyncProvider<SitebarActionsPresenter> getSitebarActionsPresenter(); AsyncProvider<SiteLogoPresenter> getSiteLogoPresenter(); + SiteTokenListeners getSiteTokenListeners(); + AsyncProvider<SpaceSelectorPresenter> getSpacesTabPresenter(); AsyncProvider<SpinerPresenter> getSpinerPresenter(); Modified: trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/KuneEntryPoint.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,7 +1,9 @@ package cc.kune.core.client; +import cc.kune.common.client.noti.NotifyUser; import cc.kune.core.client.rpcservices.AsyncCallbackSimple; +import com.allen_sauer.gwt.log.client.Log; import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT.UncaughtExceptionHandler; @@ -29,7 +31,7 @@ e.printStackTrace(); } }); - + Log.setCurrentLogLevel(Log.LOG_LEVEL_DEBUG); Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { @@ -44,12 +46,16 @@ public void onModuleLoadCont() { DelayedBindRegistry.bind(ginjector); AsyncCallbackSimple.init(ginjector.getErrorHandler()); - ginjector.getPlaceManager().revealCurrentPlace(); + NotifyUser.init(ginjector.getEventBus()); + // ginjector.getPlaceManager().revealCurrentPlace(); + ginjector.getCorePresenter().get().forceReveal(); + ginjector.getStateManager(); + ginjector.getSiteTokenListeners(); + ginjector.getEventLogger(); ginjector.getI18n(); ginjector.getGxtGuiProvider(); ginjector.getUserNotifierPresenter(); ginjector.getSpinerPresenter(); - ginjector.getStateManager(); ginjector.getSiteLogoPresenter(); ginjector.getSpacesTabPresenter(); } Copied: trunk/src/main/java/cc/kune/core/client/auth/Register.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/Register.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/Register.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/Register.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,29 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + + +public interface Register { + + void doRegister(); + + void hide(); + +} Copied: trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/RegisterForm.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,125 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + \*/ +package cc.kune.core.client.auth; + +import cc.kune.common.client.utils.TextUtils; +import cc.kune.core.client.resources.CoreMessages; +import cc.kune.core.client.state.Session; +import cc.kune.core.client.ui.DefaultForm; +import cc.kune.core.shared.i18n.I18nTranslationService; + +import com.extjs.gxt.ui.client.widget.form.Field; +import com.extjs.gxt.ui.client.widget.form.TextField; + +public class RegisterForm extends DefaultForm { + + public static final String COUNTRY_FIELD = "k-urf-country-f"; + public static final String EMAIL_FIELD = "k-urf-email-f"; + public static final String LANG_FIELD = "k-urf-lang-f"; + public static final String LONGNAME_FIELD = "k-urf-long_name-f"; + public static final String NICK_FIELD = "k-urf-nick-f"; + public static final String NOPERSONALHOMEPAGE_ID = "k-urf-nphp-id"; + public static final String PASSWORD_FIELD = "k-urf-password-f"; + public static final String PASSWORD_FIELD_DUP = "k-urf-passwordDup-f"; + public static final String TIMEZONE_FIELD = "k-urf-timezone-f"; + public static final String WANNAPERSONALHOMEPAGE_ID = "k-urf-wphp-id"; + public static final String WANTHOMEPAGE_FIELD = "k-urf-wphp-f"; + + private final TextField<String> emailRegField; + private final TextField<String> longNameRegField; + private final TextField<String> passwdRegField; + private final TextField<String> shortNameRegField; + + public RegisterForm(final I18nTranslationService i18n, final Session session) { + super.addStyleName("kune-Margin-Large-l"); + + shortNameRegField = new TextField<String>(); + shortNameRegField.setTabIndex(1); + shortNameRegField.setFieldLabel(i18n.t("Nickname")); + shortNameRegField.setName(NICK_FIELD); + shortNameRegField.setWidth(DEF_SMALL_FIELD_WIDTH); + shortNameRegField.setAllowBlank(false); + shortNameRegField.setMinLength(3); + shortNameRegField.setMaxLength(15); + shortNameRegField.setRegex("^[a-z0-9_\\-]+$"); + shortNameRegField.getMessages().setMinLengthText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); + shortNameRegField.getMessages().setMaxLengthText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); + shortNameRegField.getMessages().setRegexText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); + shortNameRegField.setValidationDelay(1000); + add(shortNameRegField); + + longNameRegField = new TextField<String>(); + longNameRegField.setTabIndex(2); + longNameRegField.setFieldLabel(i18n.t("Full Name")); + longNameRegField.setName(LONGNAME_FIELD); + longNameRegField.setWidth(DEF_FIELD_WIDTH); + longNameRegField.setAllowBlank(false); + longNameRegField.setMinLength(3); + longNameRegField.setMaxLength(50); + // longNameRegField.setValidationEvent(false); + longNameRegField.setId(LONGNAME_FIELD); + add(longNameRegField); + + passwdRegField = new TextField<String>(); + passwdRegField.setTabIndex(3); + passwdRegField.setFieldLabel(i18n.t("Password")); + passwdRegField.setName(PASSWORD_FIELD); + passwdRegField.setPassword(true); + passwdRegField.setAllowBlank(false); + passwdRegField.setMaxLength(40); + passwdRegField.setWidth(DEF_MEDIUM_FIELD_WIDTH); + passwdRegField.setValidationDelay(1000); + passwdRegField.setId(PASSWORD_FIELD); + add(passwdRegField); + + // http://www.sencha.com/forum/showthread.php?49702-GXT-Form-Validation + emailRegField = new TextField<String>(); + emailRegField.setTabIndex(5); + emailRegField.setFieldLabel(i18n.t("Email")); + emailRegField.setName(EMAIL_FIELD); + emailRegField.setRegex(TextUtils.EMAIL_REGEXP); + emailRegField.getMessages().setRegexText(i18n.t("This is not a valid email")); + emailRegField.setWidth(DEF_MEDIUM_FIELD_WIDTH); + emailRegField.setAllowBlank(false); + emailRegField.setValidationDelay(1000); + emailRegField.setId(EMAIL_FIELD); + add(emailRegField); + } + + public String getEmail() { + return emailRegField.getValue(); + } + + public String getLongName() { + return longNameRegField.getValue(); + } + + public String getRegisterPassword() { + return passwdRegField.getValue(); + } + + public String getShortName() { + return shortNameRegField.getValue(); + } + + public Field<String> getShortNameField() { + return shortNameRegField; + } +} Copied: trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/RegisterPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,141 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + +import cc.kune.common.client.noti.NotifyLevelImages; +import cc.kune.core.client.resources.CoreMessages; +import cc.kune.core.client.state.Session; +import cc.kune.core.shared.i18n.I18nTranslationService; + +import com.extjs.gxt.ui.client.widget.VerticalPanel; +import com.google.gwt.core.client.Scheduler; +import com.google.gwt.core.client.Scheduler.ScheduledCommand; +import com.google.inject.Inject; + +public class RegisterPanel extends SignInAbstractPanel implements RegisterView { + + public static final String CANCEL_BUTTON_ID = "k-regp-cb"; + + public static final String ERRMSG = "k-regp-errmsg"; + + public static final String REGISTER_BUTTON_ID = "k-regp-rb"; + public static final String REGISTER_DIALOG = "k-regp-dialog"; + public static final String REGISTER_FORM = "k-regp-p"; + public static final String WELCOME_DIALOG = "k-regp-wdiag"; + public static final String WELCOME_OK_BUTTON = "k-regp-okbt"; + private final RegisterForm registerForm; + + @Inject + public RegisterPanel(final I18nTranslationService i18n, final Session session, final NotifyLevelImages images) { + super(REGISTER_DIALOG, i18n, i18n.t(CoreMessages.REGISTER_TITLE), true, true, true, 400, 420, "", + i18n.t(CoreMessages.REGISTER_TITLE), REGISTER_BUTTON_ID, i18n.tWithNT("Cancel", "used in button"), + CANCEL_BUTTON_ID, images, ERRMSG, 11); + // super.addListener(new WindowListenerAdapter() { + // @Override + // public void onActivate(final Panel panel) { + // KuneUiUtils.focusOnField(registerForm.getShortNameField()); + // } + // + // @Override + // public void onShow(final Component component) { + // KuneUiUtils.focusOnField(registerForm.getShortNameField()); + // } + // }); + + final VerticalPanel panel = new VerticalPanel(); + // panel.setBorder(false); + registerForm = new RegisterForm(i18n, session); + registerForm.setWidth(370); + panel.add(registerForm.getFormPanel()); + super.getInnerPanel().add(panel); + panel.setId(REGISTER_FORM); + } + + @Override + public String getEmail() { + return registerForm.getEmail(); + } + + @Override + public String getLongName() { + return registerForm.getLongName(); + } + + @Override + public String getRegisterPassword() { + return registerForm.getRegisterPassword(); + } + + @Override + public String getShortName() { + return registerForm.getShortName(); + } + + @Override + public boolean isRegisterFormValid() { + return registerForm.isValid(); + } + + @Override + public boolean isValid() { + return registerForm.isValid(); + } + + @Override + public void reset() { + Scheduler.get().scheduleDeferred(new ScheduledCommand() { + @Override + public void execute() { + registerForm.reset(); + } + }); + } + + @Override + public void showWelcolmeDialog() { + // final InfoDialog welcomeDialog = new InfoDialog(WELCOME_DIALOG, + // i18n.t("Welcome"), + // i18n.t("Thanks for registering"), + // i18n.t("Now you can participate more actively in this site with other people and groups. " + // + "You can also use your personal space to publish contents. " + // + + // "Your email is not verified, please follow the instructions you will receive by email."), + // i18n.t("Ok"), WELCOME_OK_BUTTON, true, true, 380, 210); + // welcomeDialog.show(); + } + + @Override + public void showWelcolmeDialogNoHomepage() { + // final InfoDialog welcomeDialog = new InfoDialog(WELCOME_DIALOG, + // i18n.t("Welcome"), + // i18n.t("Thanks for registering"), + // i18n.t("Now you can participate more actively in this site with other people and groups. " + // + + // "Your email is not verified, please follow the instructions you will receive by email."), + // i18n.t("Ok"), WELCOME_OK_BUTTON, true, true, 380, 210); + // welcomeDialog.show(); + } + + @Override + public void validate() { + registerForm.validate(); + } + +} Copied: trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/RegisterPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,173 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + +import cc.kune.common.client.errors.UIException; +import cc.kune.common.client.noti.NotifyLevel; +import cc.kune.common.client.noti.NotifyUser; +import cc.kune.core.client.cookies.CookiesManager; +import cc.kune.core.client.errors.EmailAddressInUseException; +import cc.kune.core.client.errors.GroupNameInUseException; +import cc.kune.core.client.i18n.I18nUITranslationService; +import cc.kune.core.client.resources.CoreMessages; +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.shared.dto.I18nCountryDTO; +import cc.kune.core.shared.dto.I18nLanguageDTO; +import cc.kune.core.shared.dto.SubscriptionMode; +import cc.kune.core.shared.dto.TimeZoneDTO; +import cc.kune.core.shared.dto.UserDTO; +import cc.kune.core.shared.dto.UserInfoDTO; + +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.event.dom.client.ClickHandler; +import com.google.gwt.event.logical.shared.CloseEvent; +import com.google.gwt.event.logical.shared.CloseHandler; +import com.google.gwt.event.shared.EventBus; +import com.google.gwt.user.client.rpc.AsyncCallback; +import com.google.gwt.user.client.ui.PopupPanel; +import com.google.inject.Inject; +import com.google.inject.Provider; +import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit; +import com.gwtplatform.mvp.client.proxy.Proxy; +import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent; + +public class RegisterPresenter extends SignInAbstractPresenter<RegisterView, RegisterPresenter.RegisterProxy> implements + Register { + + @ProxyCodeSplit + public interface RegisterProxy extends Proxy<RegisterPresenter> { + } + private final Provider<SignIn> signInProvider; + + private final Provider<UserServiceAsync> userServiceProvider; + + @Inject + public RegisterPresenter(final EventBus eventBus, final RegisterView view, final RegisterProxy proxy, + final Session session, final StateManager stateManager, final I18nUITranslationService i18n, + final Provider<UserServiceAsync> userServiceProvider, final Provider<SignIn> signInProvider, + final CookiesManager cookiesManager) { + super(eventBus, view, proxy, session, stateManager, i18n, cookiesManager); + this.userServiceProvider = userServiceProvider; + this.signInProvider = signInProvider; + } + + @Override + public void doRegister() { + signInProvider.get().hide(); + if (!session.isLogged()) { + NotifyUser.showProgressProcessing(); + getView().show(); + // getView().center(); + NotifyUser.hideProgress(); + } else { + stateManager.restorePreviousToken(); + } + } + + @Override + public RegisterView getView() { + return (RegisterView) super.getView(); + } + + public void onFormRegister() { + if (getView().isRegisterFormValid()) { + getView().maskProcessing(); + + final I18nLanguageDTO language = new I18nLanguageDTO(); + language.setCode(i18n.getCurrentLanguage()); + + final I18nCountryDTO country = new I18nCountryDTO(); + country.setCode("GB"); + + final TimeZoneDTO timezone = new TimeZoneDTO(); + timezone.setId("GMT"); + + final boolean wantHomepage = true; + + final UserDTO user = new UserDTO(getView().getLongName(), getView().getShortName(), + getView().getRegisterPassword(), getView().getEmail(), language, country, timezone, null, true, + SubscriptionMode.manual, "blue"); + final AsyncCallback<UserInfoDTO> callback = new AsyncCallback<UserInfoDTO>() { + @Override + public void onFailure(final Throwable caught) { + getView().unMask(); + if (caught instanceof EmailAddressInUseException) { + getView().setErrorMessage(i18n.t(CoreMessages.EMAIL_IN_USE), NotifyLevel.error); + } else if (caught instanceof GroupNameInUseException) { + getView().setErrorMessage(i18n.t(CoreMessages.NAME_IN_USE), NotifyLevel.error); + } else { + getView().setErrorMessage(i18n.t("Error during registration."), NotifyLevel.error); + throw new UIException("Other kind of exception in user registration", caught); + + } + } + + @Override + public void onSuccess(final UserInfoDTO userInfoDTO) { + onSignIn(userInfoDTO); + stateManager.gotoToken(userInfoDTO.getHomePage()); + getView().hide(); + getView().unMask(); + if (wantHomepage) { + getView().showWelcolmeDialog(); + } else { + getView().showWelcolmeDialogNoHomepage(); + } + } + }; + userServiceProvider.get().createUser(user, wantHomepage, callback); + } + } + + @Override + protected void onReveal() { + super.onReveal(); + getView().getFirstBtn().addClickHandler(new ClickHandler() { + @Override + public void onClick(final ClickEvent event) { + getView().validate(); + if (getView().isValid()) { + onFormRegister(); + } + } + }); + getView().getSecondBtn().addClickHandler(new ClickHandler() { + + @Override + public void onClick(final ClickEvent event) { + onCancel(); + } + }); + getView().getClose().addCloseHandler(new CloseHandler<PopupPanel>() { + + @Override + public void onClose(final CloseEvent<PopupPanel> event) { + RegisterPresenter.this.onClose(); + } + }); + } + + @Override + protected void revealInParent() { + RevealRootContentEvent.fire(this, this); + } +} Copied: trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterView.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/RegisterView.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,42 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + +public interface RegisterView extends SignInAbstractView { + + String getEmail(); + + String getLongName(); + + String getRegisterPassword(); + + String getShortName(); + + boolean isRegisterFormValid(); + + boolean isValid(); + + void showWelcolmeDialog(); + + void showWelcolmeDialogNoHomepage(); + + void validate(); + +} Copied: trunk/src/main/java/cc/kune/core/client/auth/SignIn.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/SignIn.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/SignIn.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,29 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + + +public interface SignIn { + + void doSignIn(); + + void hide(); + +} Copied: trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,116 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + +import cc.kune.common.client.noti.NotifyLevel; +import cc.kune.common.client.noti.NotifyLevelImages; +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.google.gwt.core.client.GWT; +import com.google.gwt.event.dom.client.HasClickHandlers; +import com.google.gwt.event.logical.shared.HasCloseHandlers; +import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget; +import com.google.gwt.user.client.ui.PopupPanel; +import com.google.gwt.user.client.ui.Widget; +import com.gwtplatform.mvp.client.ViewImpl; + +public abstract class SignInAbstractPanel extends ViewImpl { + + private final BasicTopDialog dialog; + private final String errorLabelId; + protected final I18nTranslationService i18n; + private final NotifyLevelImages images; + private MessageToolbar messageErrorBar; + + public SignInAbstractPanel(final String dialogId, final I18nTranslationService i18n, final String title, + final boolean autohide, final boolean modal, final boolean autoscroll, final int width, 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); + this.i18n = i18n; + this.images = images; + this.errorLabelId = errorLabelId; + } + + @Override + public Widget asWidget() { + return dialog; + } + + private void createMessageErrorIfNeeded() { + if (messageErrorBar == null) { + messageErrorBar = new MessageToolbar(images, errorLabelId); + } + } + + public HasCloseHandlers<PopupPanel> getClose() { + return dialog.getClose(); + } + + public HasClickHandlers getFirstBtn() { + return dialog.getFirstBtn(); + } + + public ForIsWidget getInnerPanel() { + return dialog.getInnerPanel(); + } + + public HasClickHandlers getSecondBtn() { + return dialog.getSecondBtn(); + } + + public void hide() { + if (dialog.isVisible()) { + dialog.hide(); + } + } + + public void hideMessages() { + createMessageErrorIfNeeded(); + messageErrorBar.hideErrorMessage(); + } + + public void mask(final String message) { + GWT.log("Mask not implemented"); + + } + + public void maskProcessing() { + GWT.log("Mask not implemented"); + // mask(i18n.t("Processing")); + } + + public void setErrorMessage(final String message, final NotifyLevel level) { + createMessageErrorIfNeeded(); + messageErrorBar.setErrorMessage(message, level); + } + + public void show() { + dialog.show(); + } + + public void unMask() { + GWT.log("Unask not implemented"); + } +} Copied: trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPresenter.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,88 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + +import cc.kune.core.client.cookies.CookiesManager; +import cc.kune.core.client.i18n.I18nUITranslationService; +import cc.kune.core.client.state.Session; +import cc.kune.core.client.state.StateManager; +import cc.kune.core.shared.dto.I18nLanguageDTO; +import cc.kune.core.shared.dto.UserInfoDTO; + +import com.google.gwt.event.shared.EventBus; +import com.gwtplatform.mvp.client.Presenter; +import com.gwtplatform.mvp.client.View; +import com.gwtplatform.mvp.client.proxy.Proxy; + +public abstract class SignInAbstractPresenter<V extends View, Proxy_ extends Proxy<?>> extends + Presenter<View, Proxy<?>> { + + protected final CookiesManager cookiesManager; + protected final I18nUITranslationService i18n; + protected final Session session; + protected final StateManager stateManager; + + public SignInAbstractPresenter(final EventBus eventBus, final View view, final Proxy<?> proxy, + final Session session, final StateManager stateManager, final I18nUITranslationService i18n, + final CookiesManager cookiesManager) { + super(eventBus, view, proxy); + this.session = session; + this.stateManager = stateManager; + this.i18n = i18n; + this.cookiesManager = cookiesManager; + } + + @Override + public SignInAbstractView getView() { + return (SignInAbstractView) super.getView(); + } + + public void hide() { + getView().hide(); + } + + public void onCancel() { + getView().reset(); + getView().hideMessages(); + getView().hide(); + stateManager.restorePreviousToken(); + } + + public void onClose() { + getView().reset(); + getView().hideMessages(); + if (!session.isLogged()) { + stateManager.restorePreviousToken(); + } + } + + protected void onSignIn(final UserInfoDTO userInfoDTO) { + final String userHash = userInfoDTO.getUserHash(); + cookiesManager.setCookie(userHash); + getView().reset(); + session.setUserHash(userHash); + session.setCurrentUserInfo(userInfoDTO); + final I18nLanguageDTO language = userInfoDTO.getLanguage(); + i18n.changeCurrentLanguage(language.getCode()); + session.setCurrentLanguage(language); + stateManager.restorePreviousToken(); + } + +} Copied: trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractView.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractView.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractView.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractView.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,53 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + +import cc.kune.common.client.noti.NotifyLevel; + +import com.google.gwt.event.dom.client.HasClickHandlers; +import com.google.gwt.event.logical.shared.HasCloseHandlers; +import com.google.gwt.user.client.ui.PopupPanel; +import com.gwtplatform.mvp.client.View; + +public interface SignInAbstractView extends View { + + HasCloseHandlers<PopupPanel> getClose(); + + HasClickHandlers getFirstBtn(); + + HasClickHandlers getSecondBtn(); + + void hide(); + + void hideMessages(); + + void mask(final String message); + + void maskProcessing(); + + void reset(); + + void setErrorMessage(final String message, final NotifyLevel level); + + void show(); + + void unMask(); + +} Copied: trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInForm.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/SignInForm.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,88 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + \*/ +package cc.kune.core.client.auth; + +import cc.kune.core.client.ui.DefaultForm; +import cc.kune.core.shared.i18n.I18nTranslationService; + +import com.extjs.gxt.ui.client.event.Events; +import com.extjs.gxt.ui.client.event.FieldEvent; +import com.extjs.gxt.ui.client.event.Listener; +import com.extjs.gxt.ui.client.widget.form.Field; +import com.extjs.gxt.ui.client.widget.form.TextField; +import com.google.gwt.user.client.Window; + +public class SignInForm extends DefaultForm { + public static final String NICKOREMAIL_FIELD = "kune-sif-nkf"; + public static final String PASSWORD_FIELD = "kune-sif-psf"; + + private final TextField<String> loginNickOrEmailField; + private final TextField<String> loginPassField; + + public SignInForm(final I18nTranslationService i18n) { + super.addStyleName("kune-Margin-Large-trbl"); + + loginNickOrEmailField = new TextField<String>(); + loginNickOrEmailField.setFieldLabel(i18n.t("Nickname or email")); + loginNickOrEmailField.setName(NICKOREMAIL_FIELD); + loginNickOrEmailField.setWidth(DEF_SMALL_FIELD_WIDTH); + loginNickOrEmailField.setAllowBlank(false); + loginNickOrEmailField.setValidationDelay(1000); + loginNickOrEmailField.setId(NICKOREMAIL_FIELD); + loginNickOrEmailField.setTabIndex(100); + super.add(loginNickOrEmailField); + + loginPassField = new TextField<String>(); + loginPassField.setFieldLabel(i18n.t("Password")); + loginPassField.setName(PASSWORD_FIELD); + loginPassField.setWidth(DEF_MEDIUM_FIELD_WIDTH); + loginPassField.setPassword(true); + loginPassField.setAllowBlank(false); + loginPassField.setValidationDelay(1000); + loginPassField.setId(PASSWORD_FIELD); + loginPassField.setTabIndex(101); + loginPassField.addListener(Events.Change, new Listener<FieldEvent>() { + @Override + public void handleEvent(final FieldEvent fe) { + if (fe.getEvent().getKeyCode() == 13) { + Window.alert("SignInForm"); + // presenter.onFormSignIn(); + } + } + }); + super.add(loginPassField); + } + + public void focusLogin() { + loginNickOrEmailField.focus(); + } + + public String getLoginPassword() { + return loginPassField.getValue(); + } + + public String getNickOrEmail() { + return loginNickOrEmailField.getValue(); + } + + public Field<String> getNickOrEmailField() { + return loginNickOrEmailField; + } +} Copied: trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/SignInPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,118 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + +import cc.kune.common.client.noti.NotifyLevelImages; +import cc.kune.core.client.resources.CoreMessages; +import cc.kune.core.shared.i18n.I18nTranslationService; + +import com.extjs.gxt.ui.client.widget.VerticalPanel; +import com.extjs.gxt.ui.client.widget.form.Field; +import com.google.gwt.event.dom.client.HasClickHandlers; +import com.google.gwt.user.client.ui.HorizontalPanel; +import com.google.gwt.user.client.ui.Label; +import com.google.inject.Inject; + +public class SignInPanel extends SignInAbstractPanel implements SignInView { + + public static final String CANCEL_BUTTON_ID = "k-signinp-cb"; + public static final String CREATE_ONE = "k-signinp-create"; + public static final String ERROR_MSG = "k-sigp-errmsg"; + public static final String SIGN_IN_BUTTON_ID = "k-signinp-sib"; + public static final String SIGNIN_DIALOG = "k-signinp-dialog"; + private Label registerLabel; + private final SignInForm signInForm; + + @Inject + public SignInPanel(final I18nTranslationService i18n, final NotifyLevelImages images) { + super(SIGNIN_DIALOG, i18n, i18n.t(CoreMessages.SIGN_IN_TITLE), true, true, true, 360, 360, "", + i18n.t(CoreMessages.SIGN_IN_TITLE), SIGN_IN_BUTTON_ID, i18n.tWithNT("Cancel", "used in button"), + CANCEL_BUTTON_ID, images, ERROR_MSG, 102); + + // @Override + // public void onShow(final Component component) { + // KuneUiUtils.focusOnField(getNickname()); + // } + + final VerticalPanel panel = new VerticalPanel(); + // panel.setBorder(false); + signInForm = new SignInForm(i18n); + signInForm.setWidth(310); + panel.add(signInForm.getFormPanel()); + panel.add(createNoAccountRegister()); + super.getInnerPanel().add(panel); + } + + private VerticalPanel createNoAccountRegister() { + final VerticalPanel noAccRegisterPanel = new VerticalPanel(); + // noAccRegisterPanel.setBorder(false); + // noAccRegisterPanel.setMargins(0, 20, 0, 0); + final HorizontalPanel hpanel = new HorizontalPanel(); + final Label dontHaveAccount = new Label(i18n.t("Don't you have an account?")); + registerLabel = new Label(i18n.t("Create one.")); + registerLabel.ensureDebugId(CREATE_ONE); + registerLabel.addStyleName("kune-Margin-Medium-l"); + registerLabel.addStyleName("kune-link"); + hpanel.add(dontHaveAccount); + hpanel.add(registerLabel); + noAccRegisterPanel.add(hpanel); + return noAccRegisterPanel; + } + + @Override + public void focusOnNickname() { + signInForm.focusLogin(); + } + + @Override + public HasClickHandlers getAccountRegister() { + return registerLabel; + } + + @Override + public String getLoginPassword() { + return signInForm.getLoginPassword(); + } + + private Field<String> getNickname() { + return signInForm.getNickOrEmailField(); + } + + @Override + public String getNickOrEmail() { + return signInForm.getNickOrEmail(); + } + + @Override + public boolean isSignInFormValid() { + return signInForm.isValid(); + } + + @Override + public void reset() { + signInForm.reset(); + } + + @Override + public void validate() { + signInForm.validate(); + } + +} Copied: trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java (from rev 1224, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,171 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + +import cc.kune.common.client.noti.NotifyLevel; +import cc.kune.core.client.cookies.CookiesManager; +import cc.kune.core.client.errors.UserAuthException; +import cc.kune.core.client.i18n.I18nUITranslationService; +import cc.kune.core.client.notify.spiner.ProgressHideEvent; +import cc.kune.core.client.notify.spiner.ProgressShowEvent; +import cc.kune.core.client.resources.CoreMessages; +import cc.kune.core.client.rpcservices.UserServiceAsync; +import cc.kune.core.client.state.Session; +import cc.kune.core.client.state.SiteCommonTokens; +import cc.kune.core.client.state.StateManager; +import cc.kune.core.shared.dto.UserDTO; +import cc.kune.core.shared.dto.UserInfoDTO; + +import com.allen_sauer.gwt.log.client.Log; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.event.dom.client.ClickHandler; +import com.google.gwt.event.logical.shared.CloseEvent; +import com.google.gwt.event.logical.shared.CloseHandler; +import com.google.gwt.event.shared.EventBus; +import com.google.gwt.user.client.rpc.AsyncCallback; +import com.google.gwt.user.client.ui.PopupPanel; +import com.google.inject.Inject; +import com.google.inject.Provider; +import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit; +import com.gwtplatform.mvp.client.proxy.Proxy; +import com.gwtplatform.mvp.client.proxy.RevealRootContentEvent; + +public class SignInPresenter extends SignInAbstractPresenter<SignInView, SignInPresenter.SignInProxy> implements SignIn { + + @ProxyCodeSplit + public interface SignInProxy extends Proxy<SignInPresenter> { + } + + private final EventBus eventBus; + private final Provider<Register> registerProvider; + private final UserServiceAsync userService; + + @Inject + public SignInPresenter(final EventBus eventBus, final SignInView view, final SignInProxy proxy, + final Session session, final StateManager stateManager, final I18nUITranslationService i18n, + final UserServiceAsync userService, final Provider<Register> registerProvider, + final CookiesManager cookiesManager) { + super(eventBus, view, proxy, session, stateManager, i18n, cookiesManager); + this.eventBus = eventBus; + this.userService = userService; + this.registerProvider = registerProvider; + } + + @Override + public void doSignIn() { + registerProvider.get().hide(); + if (session.isLogged()) { + stateManager.restorePreviousToken(); + } else { + eventBus.fireEvent(new ProgressShowEvent()); + getView().show(); + // getView().center(); + eventBus.fireEvent(new ProgressHideEvent()); + getView().focusOnNickname(); + } + } + + @Override + public SignInView getView() { + return (SignInView) super.getView(); + } + + public void onAccountRegister() { + getView().reset(); + getView().hideMessages(); + getView().hide(); + stateManager.gotoToken(SiteCommonTokens.REGISTER); + } + + public void onFormSignIn() { + getView().validate(); + if (getView().isSignInFormValid()) { + getView().maskProcessing(); + + final String nickOrEmail = getView().getNickOrEmail(); + final String passwd = getView().getLoginPassword(); + + final UserDTO user = new UserDTO(); + user.setShortName(nickOrEmail); + user.setPassword(passwd); + + final AsyncCallback<UserInfoDTO> callback = new AsyncCallback<UserInfoDTO>() { + @Override + public void onFailure(final Throwable caught) { + getView().unMask(); + eventBus.fireEvent(new ProgressHideEvent()); + if (caught instanceof UserAuthException) { + getView().setErrorMessage(i18n.t(CoreMessages.INCORRECT_NICKNAME_EMAIL_OR_PASSWORD), + NotifyLevel.error); + } else { + getView().setErrorMessage("Error in login", NotifyLevel.error); + Log.error("Other kind of exception in SignInPresenter/doLogin"); + } + } + + @Override + public void onSuccess(final UserInfoDTO userInfoDTO) { + onSignIn(userInfoDTO); + stateManager.restorePreviousToken(); + getView().hide(); + getView().unMask(); + } + }; + userService.login(user.getShortName(), user.getPassword(), callback); + } + } + + @Override + protected void onReveal() { + super.onReveal(); + getView().getFirstBtn().addClickHandler(new ClickHandler() { + @Override + public void onClick(final ClickEvent event) { + onFormSignIn(); + } + }); + getView().getSecondBtn().addClickHandler(new ClickHandler() { + + @Override + public void onClick(final ClickEvent event) { + onCancel(); + } + }); + getView().getClose().addCloseHandler(new CloseHandler<PopupPanel>() { + + @Override + public void onClose(final CloseEvent<PopupPanel> event) { + SignInPresenter.this.onClose(); + } + }); + getView().getAccountRegister().addClickHandler(new ClickHandler() { + + @Override + public void onClick(final ClickEvent event) { + onAccountRegister(); + } + }); + } + + @Override + protected void revealInParent() { + RevealRootContentEvent.fire(this, this); + } +} Copied: trunk/src/main/java/cc/kune/core/client/auth/SignInView.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/auth/SignInView.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/auth/SignInView.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,38 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.auth; + +import com.google.gwt.event.dom.client.HasClickHandlers; + +public interface SignInView extends SignInAbstractView { + + void focusOnNickname(); + + HasClickHandlers getAccountRegister(); + + String getLoginPassword(); + + String getNickOrEmail(); + + boolean isSignInFormValid(); + + void validate(); + +} Modified: trunk/src/main/java/cc/kune/core/client/cookies/CookiesManager.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/cookies/CookiesManager.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/cookies/CookiesManager.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -4,4 +4,6 @@ String getCurrentCookie(); void removeCookie(); + + void setCookie(String userHash); } Modified: trunk/src/main/java/cc/kune/core/client/cookies/CookiesManagerImpl.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/cookies/CookiesManagerImpl.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/cookies/CookiesManagerImpl.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -4,6 +4,7 @@ import cc.kune.core.client.state.Session; +import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.Cookies; public class CookiesManagerImpl implements CookiesManager { @@ -27,4 +28,12 @@ Cookies.setCookie(Session.USERHASH, null, new Date(0), null, "/", false); } + @Override + public void setCookie(final String userHash) { + // http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ + final long duration = Session.SESSION_DURATION; + final Date expires = new Date(System.currentTimeMillis() + duration); + Cookies.setCookie(Session.USERHASH, userHash, expires, null, "/", false); + GWT.log("Received hash: " + userHash, null); + } } Modified: trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -24,6 +24,8 @@ import cc.kune.core.client.notify.msgs.UserNotifyEvent; import cc.kune.core.client.notify.spiner.ProgressHideEvent; import cc.kune.core.client.state.Session; +import cc.kune.core.client.state.SiteCommonTokens; +import cc.kune.core.client.state.StateManager; import cc.kune.core.shared.i18n.I18nTranslationService; import com.allen_sauer.gwt.log.client.Log; @@ -31,21 +33,20 @@ import com.google.gwt.event.shared.EventBus; import com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException; import com.google.inject.Inject; -import com.gwtplatform.mvp.client.proxy.PlaceManager; public class ErrorHandler { private final EventBus eventBus; private final I18nTranslationService i18n; - private final PlaceManager placeManager; private final Session session; + private final StateManager stateManager; @Inject - public ErrorHandler(final Session session, final I18nTranslationService i18n, final PlaceManager placeManager, + public ErrorHandler(final Session session, final I18nTranslationService i18n, final StateManager stateManager, final EventBus eventBus) { this.session = session; this.i18n = i18n; - this.placeManager = placeManager; + this.stateManager = stateManager; this.eventBus = eventBus; } @@ -55,7 +56,7 @@ } private void goHome() { - placeManager.revealDefaultPlace(); + stateManager.gotoToken(SiteCommonTokens.HOME); } private void logException(final Throwable caught) { Modified: trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/i18n/I18nUITranslationService.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -38,10 +38,10 @@ import com.google.inject.Inject; public class I18nUITranslationService extends I18nTranslationService { - private HashMap<String, String> lexicon; + private I18nLanguageDTO currentLang; private String currentLanguageCode; - private I18nLanguageDTO currentLang; private final I18nServiceAsync i18nService; + private HashMap<String, String> lexicon; private final Session session; @Inject @@ -85,6 +85,52 @@ } } + /** + * + * See in: + * http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread + * /5e4e25050d3be984/7035ec39354d06aa?lnk=gst&q=get+locale&rnum=23 + * + * JSNI method to change the locale of the application - it effectively + * parses the existing URL and creates a new one for the chosen locale. + * + * It additionally launches any JavaScript debugger that might be attached + * to the system (Windows only). To disable this functionality just remove + * the "debugger" line. + * + * @param newLocale + * String value of the new locale to go to. + */ + private native void changeLocale(String newLocale) + /*-{ + // Uncomment the "debugger;" line to see how to set debug statements in JSNI code + // When in web mode, if your browser has a JavaScript debugger attached, it will + // launch at this point in the code (when the user changes locale through the menu system). + // debugger; + + // Get the current location + var currLocation = $wnd.location.toString(); + // Get rid of any GWT History tokens that might be present + var noHistoryCurrLocArray = currLocation.split("#"); + var noHistoryCurrLoc = noHistoryCurrLocArray[0]; + var currHistory = noHistoryCurrLocArray[1]; + // Get rid of any locale string + var locArray = noHistoryCurrLoc.split("?"); + // Build the new href location and then send the browser there. + // $wnd.location.href = locArray[0]+"?locale="+newLocale+"#"+currHistory; + $wnd.location.href = locArray[0]+"?locale="+newLocale + + // extjs part: + // commented because the error: "Ext is not defined" + // we have to try other way + // var head = document.getElementsByTagName("head")[0]; + // var script = document.createElement('script'); + // script.id = 'localScript'; + // script.type = 'text/javascript'; + // script.src = "js/ext/locale/ext-lang-"+newLocale+".js"; + // head.appendChild(script); + }-*/; + public String formatDateWithLocale(final Date date) { return formatDateWithLocale(date, false); } @@ -174,50 +220,4 @@ return decodeHtml(translation); } - /** - * - * See in: - * http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread - * /5e4e25050d3be984/7035ec39354d06aa?lnk=gst&q=get+locale&rnum=23 - * - * JSNI method to change the locale of the application - it effectively - * parses the existing URL and creates a new one for the chosen locale. - * - * It additionally launches any JavaScript debugger that might be attached - * to the system (Windows only). To disable this functionality just remove - * the "debugger" line. - * - * @param newLocale - * String value of the new locale to go to. - */ - private native void changeLocale(String newLocale) - /*-{ - // Uncomment the "debugger;" line to see how to set debug statements in JSNI code - // When in web mode, if your browser has a JavaScript debugger attached, it will - // launch at this point in the code (when the user changes locale through the menu system). - // debugger; - - // Get the current location - var currLocation = $wnd.location.toString(); - // Get rid of any GWT History tokens that might be present - var noHistoryCurrLocArray = currLocation.split("#"); - var noHistoryCurrLoc = noHistoryCurrLocArray[0]; - var currHistory = noHistoryCurrLocArray[1]; - // Get rid of any locale string - var locArray = noHistoryCurrLoc.split("?"); - // Build the new href location and then send the browser there. - // $wnd.location.href = locArray[0]+"?locale="+newLocale+"#"+currHistory; - $wnd.location.href = locArray[0]+"?locale="+newLocale - - // extjs part: - // commented because the error: "Ext is not defined" - // we have to try other way - // var head = document.getElementsByTagName("head")[0]; - // var script = document.createElement('script'); - // script.id = 'localScript'; - // script.type = 'text/javascript'; - // script.src = "js/ext/locale/ext-lang-"+newLocale+".js"; - // head.appendChild(script); - }-*/; - } Modified: trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/init/AppStarterDefault.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -46,7 +46,7 @@ @Inject public AppStarterDefault(final Session session, final SiteServiceAsync siteService, final EventBus eventBus, - PrefetchUtilities prefetchUtilities) { + final PrefetchUtilities prefetchUtilities) { this.session = session; this.siteService = siteService; this.eventBus = eventBus; @@ -95,7 +95,9 @@ @Override public void execute() { hideInitialPanels(); - eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.info, "Success", "App Started.", true)); + // eventBus.fireEvent(new + // UserNotifyEvent(NotifyLevel.info, "Success", + // "App Started.", true)); } }); } Copied: trunk/src/main/java/cc/kune/core/client/logs (from rev 1223, trunk/src/main/java/cc/kune/core/client/actions) Deleted: trunk/src/main/java/cc/kune/core/client/logs/BeforeActionCollection.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/actions/BeforeActionCollection.java 2011-01-24 23:22:16 UTC (rev 1223) +++ trunk/src/main/java/cc/kune/core/client/logs/BeforeActionCollection.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,45 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package cc.kune.core.client.actions; - -import java.util.ArrayList; - -/** - * The Class BeforeActionCollection. - */ -public class BeforeActionCollection extends ArrayList<BeforeActionListener> { - - private static final long serialVersionUID = -1508664709628420137L; - - /** - * Check before action listeners. - * - * @return true, if all listener returns true - */ - public boolean checkBeforeAction() { - for (BeforeActionListener listener : this) { - if (!listener.beforeAction()) { - return false; - } - } - return true; - } - -} Deleted: trunk/src/main/java/cc/kune/core/client/logs/BeforeActionListener.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/actions/BeforeActionListener.java 2011-01-24 23:22:16 UTC (rev 1223) +++ trunk/src/main/java/cc/kune/core/client/logs/BeforeActionListener.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,31 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package cc.kune.core.client.actions; - -public interface BeforeActionListener { - - /** - * Return false to cancel the action - * - * @return - */ - boolean beforeAction(); - -} Added: trunk/src/main/java/cc/kune/core/client/logs/EventsLogger.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/logs/EventsLogger.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/logs/EventsLogger.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,44 @@ +package cc.kune.core.client.logs; + +import cc.kune.core.client.i18n.I18nReadyEvent; +import cc.kune.core.client.init.AppStartEvent; +import cc.kune.core.client.state.UserSignInEvent; +import cc.kune.core.client.state.UserSignOutEvent; + +import com.google.gwt.core.client.GWT; +import com.google.gwt.event.shared.EventBus; +import com.google.inject.Inject; + +public class EventsLogger { + + @Inject + public EventsLogger(final EventBus eventBus) { + eventBus.addHandler(AppStartEvent.getType(), new AppStartEvent.AppStartHandler() { + @Override + public void onAppStart(final AppStartEvent event) { + GWT.log("App Started"); + } + }); + eventBus.addHandler(I18nReadyEvent.getType(), new I18nReadyEvent.I18nReadyHandler() { + + @Override + public void onI18nReady(final I18nReadyEvent event) { + GWT.log("I18n Ready"); + } + }); + eventBus.addHandler(UserSignOutEvent.getType(), new UserSignOutEvent.UserSignOutHandler() { + + @Override + public void onUserSignOut(final UserSignOutEvent event) { + GWT.log("User signed out"); + } + }); + eventBus.addHandler(UserSignInEvent.getType(), new UserSignInEvent.UserSignInHandler() { + + @Override + public void onUserSignIn(final UserSignInEvent event) { + GWT.log("User signed in"); + } + }); + } +} Property changes on: trunk/src/main/java/cc/kune/core/client/logs/EventsLogger.java ___________________________________________________________________ Name: svn:mime-type + text/plain Copied: trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/platf/client/PlatfMessages.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/resources/CoreMessages.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,43 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.resources; + +public final class CoreMessages { + public final static String BUDDIES_NOT_PUBLIC = "The buddies of this user are not public"; + public final static String EMAIL_IN_USE = "This email address is being used by another user. Please, try with another one"; + public final static String ENT_LOGO_SELECTOR_NORMAL_TITLE = "Logo"; + public final static String ENT_LOGO_SELECTOR_PERSON_TITLE = "Avatar"; + public final static String FIELD_MUST_BE_BETWEEN_3_AND_15 = "The name must be between 3 and 15 lowercase characters. It can only contain Western characters, numbers, and dashes"; + public final static String GROUP_OPTIONS_DIALOG_TITLE = "Group options"; + public final static String INCORRECT_NICKNAME_EMAIL_OR_PASSWORD = "The nickname/email/password is incorrect"; + public final static String MEMBERS_NOT_PUBLIC = "The members of this group are not public"; + public final static String NAME_IN_ALREADY_IN_USE = "This name is already in use. Please try with a different name"; + public final static String NAME_IN_USE = "This name in already in use. Please try with a different name"; + public final static String REGISTER_A_NEW_GROUP_TITLE = "Register a new Group"; + public final static String REGISTER_TITLE = "Register"; + public final static String REGISTER_TO_CREATE_A_GROUP = "Please, sign in or register to create a group"; + public final static String SIGN_IN_TITLE = "Sign in"; + public final static String USER_DOESN_T_HAVE_A_HOMEPAGE = "This user does not have a homepage"; + public final static String USER_OPTIONS_DIALOG_TITLE = "User options"; + public final static String YOUR_HOMEPAGE = "Your homepage"; + + private CoreMessages() { + } +} Modified: trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -9,9 +9,402 @@ String loadingSpiner(); } + @Source("accept.png") + ImageResource accept(); + + @Source("add.png") + ImageResource add(); + + @Source("add-green.png") + ImageResource addGreen(); + + @Source("alert.png") + ImageResource alert(); + + @Source("anybody.png") + ImageResource anybody(); + + @Source("arrow-down-black.gif") + ImageResource arrowDownBlack(); + + @Source("arrow-down-green.png") + ImageResource arrowDownGreen(); + + @Source("arrow-down-white.gif") + ImageResource arrowDownWhite(); + + @Source("arrow_in.png") + ImageResource arrowIn(); + + @Source("arrow-left-green.png") + ImageResource arrowLeftGreen(); + + @Source("arrow_out.png") + ImageResource arrowOut(); + + @Source("arrow-right-black.gif") + ImageResource arrowRightBlack(); + + @Source("arrow-right-green.png") + ImageResource arrowRightGreen(); + + @Source("arrow-right-white.gif") + ImageResource arrowRightWhite(); + + @Source("arrow-up-green.png") + ImageResource arrowUpGreen(); + + @Source("bullet_add.png") + ImageResource bulletAdd(); + + @Source("bullet_black.png") + ImageResource bulletBlack(); + + @Source("bullet_blue.png") + ImageResource bulletBlue(); + + @Source("bullet_delete.png") + ImageResource bulletDelete(); + + @Source("bullet_green.png") + ImageResource bulletGreen(); + + @Source("bullet_pink.png") + ImageResource bulletPink(); + + @Source("bullet_purple.png") + ImageResource bulletPurple(); + + @Source("bullet_red.png") + ImageResource bulletRed(); + + @Source("bullet_star.png") + ImageResource bulletStar(); + + @Source("bullet_toggle_minus.png") + ImageResource bulletToggleMinus(); + + @Source("bullet_toggle_plus.png") + ImageResource bulletTogglePlus(); + + @Source("bullet_yellow.png") + ImageResource bulletYellow(); + + @Source("button15cblue.png") + ImageResource button15cblue(); + + @Source("button15cdark.png") + ImageResource button15cdark(); + + @Source("button15clight.png") + ImageResource button15clight(); + + @Source("button15cxlight.png") + ImageResource button15cxlight(); + + @Source("button15lblue.png") + ImageResource button15lblue(); + + @Source("button15ldark.png") + ImageResource button15ldark(); + + @Source("button15llight.png") + ImageResource button15llight(); + + @Source("button15lxlight.png") + ImageResource button15lxlight(); + + @Source("button15rblue.png") + ImageResource button15rblue(); + + @Source("button15rdark.png") + ImageResource button15rdark(); + + @Source("button15rlight.png") + ImageResource button15rlight(); + + @Source("button15rxlight.png") + ImageResource button15rxlight(); + + @Source("button17cblue.png") + ImageResource button17cblue(); + + @Source("button17cdark.png") + ImageResource button17cdark(); + + @Source("button17clight.png") + ImageResource button17clight(); + + @Source("button17cxlight.png") + ImageResource button17cxlight(); + + @Source("button17lblue.png") + ImageResource button17lblue(); + + @Source("button17ldark.png") + ImageResource button17ldark(); + + @Source("button17llight.png") + ImageResource button17llight(); + + @Source("button17lxlight.png") + ImageResource button17lxlight(); + + @Source("button17rblue.png") + ImageResource button17rblue(); + + @Source("button17rdark.png") + ImageResource button17rdark(); + + @Source("button17rlight.png") + ImageResource button17rlight(); + + @Source("button17rxlight.png") + ImageResource button17rxlight(); + + @Source("button20cblue.png") + ImageResource button20cblue(); + + @Source("button20cdark.png") + ImageResource button20cdark(); + + @Source("button20clight.png") + ImageResource button20clight(); + + @Source("button20cxlight.png") + ImageResource button20cxlight(); + + @Source("button20lblue.png") + ImageResource button20lblue(); + + @Source("button20ldark.png") + ImageResource button20ldark(); + + @Source("button20llight.png") + ImageResource button20llight(); + + @Source("button20lxlight.png") + ImageResource button20lxlight(); + + @Source("button20rblue.png") + ImageResource button20rblue(); + + @Source("button20rdark.png") + ImageResource button20rdark(); + + @Source("button20rlight.png") + ImageResource button20rlight(); + + @Source("button20rxlight.png") + ImageResource button20rxlight(); + + @Source("button-arrow-down.png") + ImageResource buttonArrowDown(); + + @Source("button-help-blue.png") + ImageResource buttonHelpBlue(); + + @Source("button-help-dark.png") + ImageResource buttonHelpDark(); + + @Source("button-help-light.png") + ImageResource buttonHelpLight(); + + @Source("arrowdown.gif") + ImageResource buttonSitebarArrowDown(); + + @Source("by80x15.png") + ImageResource by80x15(); + + @Source("bync80x15.png") + ImageResource bync80x15(); + + @Source("byncnd80x15.png") + ImageResource byncnd80x15(); + + @Source("byncsa80x15.png") + ImageResource byncsa80x15(); + + @Source("bynd80x15.png") + ImageResource bynd80x15(); + + @Source("bysa80x15.png") + ImageResource bysa80x15(); + + @Source("cancel.png") + ImageResource cancel(); + + @Source("clear.png") + ImageResource clear(); + + @Source("copyleft.png") + ImageResource copyleft(); + + @Source("cross.png") + ImageResource cross(); + + @Source("cross-dark.png") + ImageResource crossDark(); + + @Source("core.css") + Style css(); + + @Source("del.png") + ImageResource del(); + + @Source("emblem-important.png") + ImageResource emblemImportant(); + + @Source("emblem-system.png") + ImageResource emblemSystem(); + + @Source("error.png") + ImageResource error(); + + @Source("everybody.png") + ImageResource everybody(); + + @Source("fullscreen.png") + ImageResource fullscreen(); + + @Source("gnu-fdl.gif") + ImageResource gnuFdl(); + + @Source("group-def-icon.png") + ImageResource groupDefIcon(); + + @Source("group-home.png") + ImageResource groupHome(); + + @Source("important.png") + ImageResource important(); + + @Source("info.png") + ImageResource info(); + + @Source("info-light.png") + ImageResource infoLight(); + + @Source("kune-close.png") + ImageResource kuneClose(); + + @Source("kune-external-window.png") + ImageResource kuneExternalWindow(); + + @Source("kune-help-translation-icon.png") + ImageResource kuneHelpTranslationIcon(); + + @Source("kune-icon16.png") + ImageResource kuneIcon16(); + + @Source("kune-logo-16px.png") + ImageResource kuneLogo16px(); + + @Source("kune-preferences.png") + ImageResource kunePreferences(); + + @Source("kune-search-ico.png") + ImageResource kuneSearchIco(); + + @Source("kune-search-ico-push.png") + ImageResource kuneSearchIcoPush(); + + @Source("language.png") + ImageResource language(); + @Source("loading-spiner.gif") ImageResource loadingSpiner(); - @Source("core.css") - Style css(); + @Source("nobody.png") + ImageResource nobody(); + + @Source("no-copyleft.png") + ImageResource noCopyleft(); + + @Source("nt.png") + ImageResource nt(); + + @Source("opentriangle.gif") + ImageResource opentriangle(); + + @Source("person2-60.png") + ImageResource personAvatarDef(); + + @Source("person-def.png") + ImageResource personDef(); + + @Source("remove.png") + ImageResource remove(); + + @Source("rss-icon.png") + ImageResource rssIcon(); + + @Source("search-ico.png") + ImageResource searchIco(); + + @Source("spin-kune-thund-green.gif") + ImageResource spinKuneThundGreen(); + + @Source("splitter-vert-bar.gif") + ImageResource splitterVertBar(); + + @Source("star-10.png") + ImageResource star10(); + + @Source("star-20.png") + ImageResource star20(); + + @Source("star-30.png") + ImageResource star30(); + + @Source("star-40.png") + ImageResource star40(); + + @Source("star-50.png") + ImageResource star50(); + + @Source("star-60.png") + ImageResource star60(); + + @Source("star-70.png") + ImageResource star70(); + + @Source("star-80.png") + ImageResource star80(); + + @Source("star-90.png") + ImageResource star90(); + + @Source("star-grey.png") + ImageResource starGrey(); + + @Source("star-small-yellow.png") + ImageResource starSmallYellow(); + + @Source("star-vsmall-yellow.png") + ImageResource starVsmallYellow(); + + @Source("star-yellow.png") + ImageResource starYellow(); + + @Source("step1.png") + ImageResource step1(); + + @Source("step2.png") + ImageResource step2(); + + @Source("step3.png") + ImageResource step3(); + + @Source("step4.png") + ImageResource step4(); + + @Source("step5.png") + ImageResource step5(); + + @Source("theme-choose.png") + ImageResource themeChoose(); + + @Source("triangle.gif") + ImageResource triangle(); } Added: trunk/src/main/java/cc/kune/core/client/resources/accept.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/accept.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/add-green.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/add-green.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/add.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/add.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/alert.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/alert.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/anybody.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/anybody.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrow-down-black.gif =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrow-down-black.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrow-down-green.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrow-down-green.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrow-down-white.gif =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrow-down-white.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrow-left-green.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrow-left-green.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrow-right-black.gif =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrow-right-black.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrow-right-green.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrow-right-green.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrow-right-white.gif =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrow-right-white.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrow-up-green.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrow-up-green.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrow_in.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrow_in.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrow_out.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrow_out.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/arrowdown.gif =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrowdown.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_add.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_add.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_black.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_black.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_blue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_blue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_delete.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_delete.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_green.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_green.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_pink.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_pink.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_purple.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_purple.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_red.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_red.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_star.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_star.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_toggle_minus.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_toggle_minus.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_toggle_plus.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_toggle_plus.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bullet_yellow.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bullet_yellow.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button-arrow-down.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button-arrow-down.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button-help-blue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button-help-blue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button-help-dark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button-help-dark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button-help-light.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button-help-light.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15cblue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15cblue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15cdark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15cdark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15clight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15clight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15cxlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15cxlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15lblue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15lblue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15ldark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15ldark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15llight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15llight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15lxlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15lxlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15rblue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15rblue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15rdark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15rdark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15rlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15rlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button15rxlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button15rxlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17cblue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17cblue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17cdark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17cdark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17clight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17clight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17cxlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17cxlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17lblue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17lblue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17ldark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17ldark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17llight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17llight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17lxlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17lxlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17rblue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17rblue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17rdark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17rdark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17rlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17rlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button17rxlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button17rxlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20cblue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20cblue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20cdark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20cdark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20clight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20clight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20cxlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20cxlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20lblue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20lblue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20ldark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20ldark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20llight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20llight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20lxlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20lxlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20rblue.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20rblue.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20rdark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20rdark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20rlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20rlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/button20rxlight.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/button20rxlight.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/by80x15.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/by80x15.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bync80x15.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bync80x15.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/byncnd80x15.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/byncnd80x15.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/byncsa80x15.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/byncsa80x15.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bynd80x15.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bynd80x15.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/bysa80x15.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/bysa80x15.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/cancel.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/cancel.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/clear.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/clear.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/copyleft.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/copyleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/cross-dark.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/cross-dark.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/cross.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/cross.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/del.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/del.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/emblem-important.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/emblem-important.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/emblem-system.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/emblem-system.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/error.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/error.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/everybody.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/everybody.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/fullscreen.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/fullscreen.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/gnu-fdl.gif =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/gnu-fdl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/group-def-icon.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/group-def-icon.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/group-home.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/group-home.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/important.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/important.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/info-light.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/info-light.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/info.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/info.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/kune-close.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/kune-close.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/kune-external-window.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/kune-external-window.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/kune-help-translation-icon.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/kune-help-translation-icon.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/kune-icon16.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/kune-icon16.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/kune-logo-16px.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/kune-logo-16px.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/kune-preferences.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/kune-preferences.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/kune-search-ico-push.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/kune-search-ico-push.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/kune-search-ico.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/kune-search-ico.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/language.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/language.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/no-copyleft.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/no-copyleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/nobody.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nobody.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/nt.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/nt.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/opentriangle.gif =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/opentriangle.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/person-def.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/person-def.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/person2-60.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/person2-60.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/remove.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/remove.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/rss-icon.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/rss-icon.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/search-ico.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/search-ico.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/spin-kune-thund-green.gif =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/spin-kune-thund-green.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/splitter-vert-bar.gif =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/splitter-vert-bar.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-10.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-10.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-20.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-20.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-30.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-30.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-40.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-40.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-50.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-50.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-60.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-60.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-70.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-70.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-80.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-80.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-90.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-90.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-grey.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-grey.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-small-yellow.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-small-yellow.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-vsmall-yellow.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-vsmall-yellow.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/star-yellow.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/star-yellow.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/step1.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/step1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/step2.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/step2.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/step3.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/step3.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/step4.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/step4.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/step5.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/step5.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/theme-choose.png =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/theme-choose.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/src/main/java/cc/kune/core/client/resources/triangle.gif =================================================================== (Binary files differ) Property changes on: trunk/src/main/java/cc/kune/core/client/resources/triangle.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignInLink.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignInLink.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignInLink.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -4,6 +4,7 @@ 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.core.client.state.Session; import cc.kune.core.client.state.SiteCommonTokens; import cc.kune.core.client.state.StateManager; import cc.kune.core.client.state.UserSignInEvent; @@ -39,11 +40,11 @@ public static final String SITE_SIGN_IN = "kune-ssilp-hy"; @Inject - public SitebarSignInLink(final SitebarSignInAction action, final EventBus eventBus) { + public SitebarSignInLink(final SitebarSignInAction action, final EventBus eventBus, final Session session) { super(action); setStyles("k-floatright, k-no-backimage, k-btn-sitebar"); setId(SITE_SIGN_IN); - setVisible(false); + setVisible(!session.isLogged()); eventBus.addHandler(UserSignInEvent.getType(), new UserSignInHandler() { @Override public void onUserSignIn(final UserSignInEvent event) { Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -3,9 +3,9 @@ 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.BeforeActionCollection; import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor; import cc.kune.common.client.errors.UIException; -import cc.kune.core.client.actions.BeforeActionCollection; import cc.kune.core.client.cookies.CookiesManager; import cc.kune.core.client.errors.ErrorHandler; import cc.kune.core.client.errors.SessionExpiredEvent; @@ -16,6 +16,8 @@ import cc.kune.core.client.notify.spiner.ProgressShowEvent; import cc.kune.core.client.rpcservices.UserServiceAsync; 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.client.state.UserSignOutEvent; import cc.kune.core.client.state.UserSignOutEvent.UserSignOutHandler; import cc.kune.core.shared.i18n.I18nTranslationService; @@ -92,14 +94,14 @@ @Inject public SitebarSignOutLink(final SitebarSignOutAction action, final EventBus eventBus, - final ErrorHandler errorHandler) { + final ErrorHandler errorHandler, final Session session) { super(action); setStyles("k-floatright, k-no-backimage, k-btn-sitebar"); setId(SITE_SIGN_OUT); - setVisible(false); - eventBus.addHandler(UserSignOutEvent.getType(), new UserSignOutHandler() { + setVisible(session.isLogged()); + eventBus.addHandler(UserSignInEvent.getType(), new UserSignInHandler() { @Override - public void onUserSignOut(final UserSignOutEvent event) { + public void onUserSignIn(final UserSignInEvent event) { SitebarSignOutLink.this.setVisible(true); } }); Modified: trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoPresenter.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoPresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,7 +1,8 @@ package cc.kune.core.client.sitebar.logo; import cc.kune.core.client.init.AppStartEvent; -import cc.kune.core.client.ws.CorePlaceManager; +import cc.kune.core.client.state.SiteCommonTokens; +import cc.kune.core.client.state.StateManager; import com.google.gwt.event.shared.EventBus; import com.google.inject.Inject; @@ -24,23 +25,24 @@ void setSiteLogoUrl(String siteLogoUrl); } - private final CorePlaceManager placeManager; + private final StateManager stateManager; @Inject - public SiteLogoPresenter(EventBus eventBus, SiteLogoView view, SiteLogoProxy proxy, CorePlaceManager placeManager) { + public SiteLogoPresenter(final EventBus eventBus, final SiteLogoView view, final SiteLogoProxy proxy, + final StateManager stateManager) { super(eventBus, view, proxy); - this.placeManager = placeManager; + this.stateManager = stateManager; getView().setUiHandlers(this); } @ProxyEvent - public void onAppStart(AppStartEvent event) { + public void onAppStart(final AppStartEvent event) { getView().setSiteLogoUrl(event.getInitData().getSiteLogoUrl()); } @Override public void onClick() { - // placeManager.revealDefaultPlace(); + stateManager.gotoToken(SiteCommonTokens.HOME); } @Override Modified: trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoViewImpl.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoViewImpl.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/sitebar/logo/SiteLogoViewImpl.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -12,7 +12,6 @@ import com.google.gwt.user.client.ui.Widget; import com.google.inject.Inject; import com.gwtplatform.mvp.client.ViewWithUiHandlers; -import com.gwtplatform.mvp.client.proxy.PlaceManager; public class SiteLogoViewImpl extends ViewWithUiHandlers<SiteLogoUiHandlers> implements SiteLogoView { @@ -25,7 +24,7 @@ Image logo; @Inject - public SiteLogoViewImpl(WsArmor armor, PlaceManager placeManager) { + public SiteLogoViewImpl(final WsArmor armor) { armor.getSitebar().insert(uiBinder.createAndBindUi(this), 0); } @@ -35,14 +34,14 @@ } @UiHandler("logo") - void onLogoClick(ClickEvent event) { + void onLogoClick(final ClickEvent event) { if (getUiHandlers() != null) { getUiHandlers().onClick(); } } @Override - public void setSiteLogoUrl(String siteLogoUrl) { + public void setSiteLogoUrl(final String siteLogoUrl) { logo.setUrl(siteLogoUrl); } } Modified: trunk/src/main/java/cc/kune/core/client/state/SiteCommonTokens.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/state/SiteCommonTokens.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/state/SiteCommonTokens.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -5,6 +5,7 @@ * */ public final class SiteCommonTokens { + public final static String HOME = ""; public final static String NEWGROUP = "newgroup"; public final static String REGISTER = "register"; public final static String SIGNIN = "signin"; Added: trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,48 @@ +package cc.kune.core.client.state; + +import cc.kune.core.client.auth.Register; +import cc.kune.core.client.auth.SignIn; +import cc.kune.core.client.init.AppStartEvent; +import cc.kune.core.client.init.AppStartEvent.AppStartHandler; + +import com.google.gwt.event.shared.EventBus; +import com.google.inject.Inject; +import com.google.inject.Provider; +import com.google.inject.Singleton; + +@Singleton +public class SiteTokenListeners { + private final Provider<Register> register; + private final Provider<SignIn> signIn; + private final Provider<StateManager> stateManager; + + @Inject + public SiteTokenListeners(final EventBus eventBus, final Provider<StateManager> stateManager, + final Provider<SignIn> signIn, final Provider<Register> register) { + this.stateManager = stateManager; + this.signIn = signIn; + this.register = register; + init(); + eventBus.addHandler(AppStartEvent.getType(), new AppStartHandler() { + @Override + public void onAppStart(final AppStartEvent event) { + } + }); + + } + + private void init() { + stateManager.get().addSiteToken(SiteCommonTokens.SIGNIN, new HistoryTokenCallback() { + @Override + public void onHistoryToken() { + signIn.get().doSignIn(); + } + }); + stateManager.get().addSiteToken(SiteCommonTokens.REGISTER, new HistoryTokenCallback() { + @Override + public void onHistoryToken() { + register.get().doRegister(); + } + }); + } +} Property changes on: trunk/src/main/java/cc/kune/core/client/state/SiteTokenListeners.java ___________________________________________________________________ Name: svn:mime-type + text/plain Modified: trunk/src/main/java/cc/kune/core/client/state/StateManager.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/state/StateManager.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/state/StateManager.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -19,7 +19,7 @@ */ package cc.kune.core.client.state; -import cc.kune.core.client.actions.BeforeActionListener; +import cc.kune.common.client.actions.BeforeActionListener; import cc.kune.core.shared.domain.utils.StateToken; import cc.kune.core.shared.dto.SocialNetworkDataDTO; import cc.kune.core.shared.dto.StateAbstractDTO; Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -21,8 +21,8 @@ import java.util.HashMap; -import cc.kune.core.client.actions.BeforeActionCollection; -import cc.kune.core.client.actions.BeforeActionListener; +import cc.kune.common.client.actions.BeforeActionCollection; +import cc.kune.common.client.actions.BeforeActionListener; import cc.kune.core.client.notify.spiner.ProgressHideEvent; import cc.kune.core.client.rpcservices.AsyncCallbackSimple; import cc.kune.core.shared.domain.utils.StateToken; Added: trunk/src/main/java/cc/kune/core/client/ui/DefaultForm.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/ui/DefaultForm.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/ui/DefaultForm.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,152 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + \*/ +package cc.kune.core.client.ui; + +import java.util.List; + +import com.extjs.gxt.ui.client.Style.HorizontalAlignment; +import com.extjs.gxt.ui.client.event.BaseEvent; +import com.extjs.gxt.ui.client.event.EventType; +import com.extjs.gxt.ui.client.event.Listener; +import com.extjs.gxt.ui.client.widget.Component; +import com.extjs.gxt.ui.client.widget.Label; +import com.extjs.gxt.ui.client.widget.button.Button; +import com.extjs.gxt.ui.client.widget.form.Field; +import com.extjs.gxt.ui.client.widget.form.FieldSet; +import com.extjs.gxt.ui.client.widget.form.FormPanel; +import com.extjs.gxt.ui.client.widget.form.FormPanel.LabelAlign; + +public class DefaultForm { + + public static final int DEF_FIELD_LABEL_WITH = 75; + public static final int DEF_FIELD_WIDTH = 200; + public static final int DEF_MEDIUM_FIELD_WIDTH = 150; + public static final int DEF_SMALL_FIELD_WIDTH = 100; + public static final int DEF_XSMALL_FIELD_WIDTH = 50; + + private final FormPanel form; + + public DefaultForm() { + this(HorizontalAlignment.RIGHT); + } + + public DefaultForm(final HorizontalAlignment buttonAlign) { + form = new FormPanel(); + form.setFrame(true); + form.setPadding(10); + form.setBorders(false); + form.setLabelWidth(DEF_FIELD_LABEL_WITH); + form.setLabelAlign(LabelAlign.RIGHT); + form.setButtonAlign(buttonAlign); + form.setHeaderVisible(false); + } + + public DefaultForm(final String title) { + this(title, HorizontalAlignment.RIGHT); + } + + public DefaultForm(final String title, final HorizontalAlignment buttonAlign) { + this(buttonAlign); + form.setTitle(title); + } + + public void add(final Field<?> field) { + form.add(field); + } + + public void add(final FieldSet fieldset) { + form.add(fieldset); + } + + public void add(final Label label) { + form.add(label); + } + + public void addButton(final Button button) { + form.addButton(button); + } + + public void addListener(final EventType eventType, final Listener<? extends BaseEvent> listener) { + form.addListener(eventType, listener); + } + + public void addStyleName(final String cls) { + form.addStyleName(cls); + } + + public FormPanel getFormPanel() { + return form; + } + + public void insert(final int index, final Component component) { + form.insert(component, index); + } + + public boolean isValid() { + return form.isValid(); + } + + public void removeStyleName(final String cls) { + form.removeStyleName(cls); + } + + public void reset() { + form.reset(); + } + + public void setAutoHeight(final boolean autoHeight) { + form.setAutoHeight(autoHeight); + } + + public void setAutoWidth(final boolean autoWidth) { + form.setAutoWidth(autoWidth); + } + + public void setFrame(final boolean frame) { + form.setFrame(frame); + } + + public void setHeight(final int height) { + form.setHeight(height); + } + + public void setHideLabels(final boolean hide) { + form.setHideLabels(hide); + } + + public void setIconCls(final String iconCls) { + form.setIconStyle(iconCls); + } + + public void setPadding(final int padding) { + form.setPadding(padding); + } + + public void setWidth(final int width) { + form.setWidth(width); + } + + public void validate() { + final List<Field<?>> fields = form.getFields(); + for (final Field<?> field : fields) { + field.validate(); + } + } +} Property changes on: trunk/src/main/java/cc/kune/core/client/ui/DefaultForm.java ___________________________________________________________________ Name: svn:mime-type + text/plain Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,5 +1,8 @@ package cc.kune.core.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.uibinder.client.UiBinder; @@ -8,57 +11,54 @@ import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HasDirectionalText; import com.google.gwt.user.client.ui.HasText; -import com.google.gwt.user.client.ui.InlineLabel; import com.google.gwt.user.client.ui.InsertPanel.ForIsWidget; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; public class BasicDialog extends Composite implements BasicDialogView { + interface BasicDialogUiBinder extends UiBinder<Widget, BasicDialog> { + } private static BasicDialogUiBinder uiBinder = GWT.create(BasicDialogUiBinder.class); @UiField - InlineLabel title; + VerticalPanel bottomPanel; @UiField Button firstBtn; @UiField Button secondBtn; @UiField + IconLabel title; + @UiField VerticalPanel vp; - interface BasicDialogUiBinder extends UiBinder<Widget, BasicDialog> { - } - public BasicDialog() { initWidget(uiBinder.createAndBindUi(this)); - title.ensureDebugId("k-ucvi-title"); - firstBtn.ensureDebugId("k-ucvi-accept-btn"); - secondBtn.ensureDebugId("k-ucvi-cancel-btn"); } - public void setTitleId(String id) { - title.ensureDebugId(id); + public void ensureDebugIdFirstBtn(final String id) { + if (id != null && id.length() > 0) { + firstBtn.ensureDebugId(id); + } } - public void setFirstBtnId(String id) { - firstBtn.ensureDebugId(id); + public void ensureDebugIdSecondBtn(final String id) { + if (id != null && id.length() > 0) { + secondBtn.ensureDebugId(id); + } } - public void setSecondBtnId(String id) { - secondBtn.ensureDebugId(id); - } - @Override - public HasDirectionalText getTitleText() { - return title; + public ForIsWidget getBottomPanel() { + return bottomPanel; } @Override - public HasClickHandlers getSecondBtn() { - return secondBtn; + public HasClickHandlers getFirstBtn() { + return firstBtn; } @Override - public HasClickHandlers getFirstBtn() { + public HasText getFirstBtnText() { return firstBtn; } @@ -68,12 +68,36 @@ } @Override - public HasText getFirstBtnText() { - return firstBtn; + public HasClickHandlers getSecondBtn() { + return secondBtn; } @Override public HasText getSecondBtnText() { return secondBtn; } + + @Override + public HasDirectionalText getTitleText() { + return title; + } + + public void setFirstBtnId(final String id) { + firstBtn.ensureDebugId(id); + } + + public void setSecondBtnId(final String id) { + secondBtn.ensureDebugId(id); + } + + public void setTitleIcon(final String icon) { + if (TextUtils.notEmpty(icon)) { + title.setIcon(icon); + } + } + + public void setTitleId(final String id) { + title.ensureDebugId(id); + } + } Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.ui.xml =================================================================== --- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.ui.xml 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialog.ui.xml 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,19 +1,21 @@ <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" - xmlns:g="urn:import:com.google.gwt.user.client.ui"> - <g:VerticalPanel spacing="12" - addStyleNames="k-dialog-outerp, k-bottom-10corners, k-opacity80 "> - <g:SimplePanel> - <g:VerticalPanel ui:field="vp" - addStyleNames="k-dialog-innerp, k-3corners, k-opacity90" spacing="10"> - <g:InlineLabel ui:field="title" addStyleNames="k-dialog-title" /> - </g:VerticalPanel> - </g:SimplePanel> - <g:FlowPanel> - <g:Button ui:field="firstBtn" - addStyleNames="k-dialog-btn, k-dialog-firstBtn, k-5corners " /> - <g:Button ui:field="secondBtn" - addStyleNames="k-dialog-btn,k-dialog-secondBtn, k-5corners" /> - </g:FlowPanel> - </g:VerticalPanel> + xmlns:k="urn:import:cc.kune.common.client.ui" xmlns:g="urn:import:com.google.gwt.user.client.ui"> + <g:VerticalPanel spacing="12" + addStyleNames="k-dialog-outerp, k-bottom-10corners"> + <g:SimplePanel> + <g:VerticalPanel addStyleNames="k-dialog-innerp, k-3corners" + spacing="10"> + <k:IconLabel ui:field="title" addStyleNames="k-dialog-title" /> + <g:VerticalPanel ui:field="vp" /> + <g:VerticalPanel ui:field="bottomPanel"></g:VerticalPanel> + </g:VerticalPanel> + </g:SimplePanel> + <g:FlowPanel> + <g:Button ui:field="firstBtn" + addStyleNames="k-dialog-btn, k-dialog-firstBtn, k-5corners " /> + <g:Button ui:field="secondBtn" + addStyleNames="k-dialog-btn,k-dialog-secondBtn, k-5corners" /> + </g:FlowPanel> + </g:VerticalPanel> </ui:UiBinder> \ No newline at end of file Modified: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialogView.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialogView.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicDialogView.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -7,16 +7,18 @@ public interface BasicDialogView { + ForIsWidget getBottomPanel(); + + HasClickHandlers getFirstBtn(); + HasText getFirstBtnText(); - HasText getSecondBtnText(); + ForIsWidget getInnerPanel(); HasClickHandlers getSecondBtn(); - HasClickHandlers getFirstBtn(); + HasText getSecondBtnText(); HasDirectionalText getTitleText(); - ForIsWidget getInnerPanel(); - } \ No newline at end of file Added: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,41 @@ +package cc.kune.core.client.ui.dialogs; + +import cc.kune.common.client.ui.PopupPanelTopCentered; + +import com.google.gwt.event.logical.shared.HasCloseHandlers; +import com.google.gwt.user.client.ui.PopupPanel; + +public class BasicTopDialog extends BasicDialog { + + private final PopupPanelTopCentered popup; + + 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 PopupPanelTopCentered(autohide, modal); + popup.add(this); + popup.ensureDebugId(dialogId); + super.getTitleText().setText(title); + // super.setAutoscroll(autoscroll); + // super.setSize(String.valueOf(width), String.valueOf(height)); + super.setTitleIcon(icon); + super.getFirstBtnText().setText(firstButtonTitle); + super.getSecondBtnText().setText(cancelButtonTitle); + super.setFirstBtnId(firstButtonId); + super.setSecondBtnId(cancelButtonId); + } + + public HasCloseHandlers<PopupPanel> getClose() { + return popup; + } + + public void hide() { + popup.hide(); + + } + + public void show() { + popup.showCentered(); + } +} Property changes on: trunk/src/main/java/cc/kune/core/client/ui/dialogs/BasicTopDialog.java ___________________________________________________________________ Name: svn:mime-type + text/plain Copied: trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessageToolbar.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/MessageToolbar.java) =================================================================== --- trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessageToolbar.java (rev 0) +++ trunk/src/main/java/cc/kune/core/client/ui/dialogs/MessageToolbar.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,73 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package cc.kune.core.client.ui.dialogs; + +import cc.kune.common.client.noti.NotifyLevel; +import cc.kune.common.client.noti.NotifyLevelImages; + +import com.extjs.gxt.ui.client.widget.Label; +import com.extjs.gxt.ui.client.widget.WidgetComponent; +import com.extjs.gxt.ui.client.widget.toolbar.LabelToolItem; +import com.extjs.gxt.ui.client.widget.toolbar.ToolBar; +import com.google.gwt.resources.client.ImageResource; +import com.google.gwt.user.client.ui.Image; + +public class MessageToolbar { + private final Image errorIcon; + private final Label errorLabel; + private final NotifyLevelImages images; + private final ToolBar toolbar; + + public MessageToolbar(final NotifyLevelImages images, final String errorLabelId) { + this.images = images; + toolbar = new ToolBar(); + errorLabel = new Label(""); + errorLabel.ensureDebugId(errorLabelId); + errorIcon = new Image(); + errorIcon.setResource(images.getImage(NotifyLevel.error)); + toolbar.add(new LabelToolItem()); + toolbar.add(new LabelToolItem()); + toolbar.add(new WidgetComponent(errorIcon)); + toolbar.setStyleName("k-error-tb"); + toolbar.add(new LabelToolItem()); + toolbar.add(new LabelToolItem()); + toolbar.add(errorLabel); + errorIcon.setVisible(false); + toolbar.setVisible(false); + } + + public ToolBar getToolbar() { + return toolbar; + } + + public void hideErrorMessage() { + errorIcon.setVisible(false); + errorLabel.setText(""); + toolbar.setVisible(false); + } + + public void setErrorMessage(final String message, final NotifyLevel level) { + errorLabel.setText(message); + final ImageResource icon = images.getImage(level); + errorIcon.setResource(icon); + errorIcon.setVisible(true); + toolbar.setVisible(true); + } +} Modified: trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/ws/CorePlaceManager.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -3,9 +3,9 @@ import com.google.gwt.event.shared.EventBus; import com.google.inject.Inject; import com.gwtplatform.mvp.client.proxy.PlaceManagerImpl; -import com.gwtplatform.mvp.client.proxy.PlaceRequest; import com.gwtplatform.mvp.client.proxy.TokenFormatter; +@Deprecated public class CorePlaceManager extends PlaceManagerImpl { @Inject @@ -15,6 +15,6 @@ @Override public void revealDefaultPlace() { - revealPlace(new PlaceRequest(CorePresenter.HOME_TOKEN)); + // revealPlace(new PlaceRequest(CorePresenter.HOME_TOKEN)); } } Modified: trunk/src/main/java/cc/kune/core/client/ws/CorePresenter.java =================================================================== --- trunk/src/main/java/cc/kune/core/client/ws/CorePresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/client/ws/CorePresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -7,35 +7,32 @@ import com.google.inject.Inject; import com.gwtplatform.mvp.client.Presenter; import com.gwtplatform.mvp.client.View; -import com.gwtplatform.mvp.client.annotations.NameToken; -import com.gwtplatform.mvp.client.annotations.ProxyCodeSplit; import com.gwtplatform.mvp.client.annotations.ProxyEvent; -import com.gwtplatform.mvp.client.proxy.ProxyPlace; +import com.gwtplatform.mvp.client.annotations.ProxyStandard; +import com.gwtplatform.mvp.client.proxy.Proxy; import com.gwtplatform.mvp.client.proxy.RevealRootLayoutContentEvent; /** * The Class CorePresenter. */ public class CorePresenter extends Presenter<CorePresenter.CoreView, CorePresenter.CoreProxy> { - @ProxyCodeSplit - @NameToken(HOME_TOKEN) - public interface CoreProxy extends ProxyPlace<CorePresenter> { + @ProxyStandard + public interface CoreProxy extends Proxy<CorePresenter> { } public interface CoreView extends View { } - public static final String HOME_TOKEN = ""; - private final AppStarter appStarter; @Inject - public CorePresenter(final EventBus eventBus, final CoreView view, final CoreProxy proxy, AppStarter appStarter) { + public CorePresenter(final EventBus eventBus, final CoreView view, final CoreProxy proxy, + final AppStarter appStarter) { super(eventBus, view, proxy); this.appStarter = appStarter; } @ProxyEvent - public void onI18nReady(I18nReadyEvent event) { + public void onI18nReady(final I18nReadyEvent event) { appStarter.start(); } Modified: trunk/src/main/java/cc/kune/core/public/ws.css =================================================================== --- trunk/src/main/java/cc/kune/core/public/ws.css 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-01-28 00:16:03 UTC (rev 1225) @@ -3,18 +3,18 @@ body { background-color: white; color: black; - font-family: 'UbuntuRegular', Arial; + font-family: 'Ubuntu', Arial; font-size: small; margin: 5px; overflow: hidden; } * { - font-family: 'UbuntuRegular', Arial; + font-family: 'Ubuntu', Arial; } body.fontface { - font: 'UbuntuRegular', Arial; + font: 'Ubuntu', Arial; } a { @@ -368,17 +368,16 @@ } .x-btn button { - font: 18px/27px UbuntuRegular, arial; + font: 18px/27px 'Ubuntu', arial; } .k-btn-sitebar button { - font: 13px UbuntuRegular, arial; + font: 13px 'Ubuntu', arial; color:#B3B3B3; cursor:pointer; text-decoration:underline; white-space:nowrap; margin-top: -5px; - border-bottom:1px solid #B3B3B3; } .k-sitebar { Modified: trunk/src/main/java/cc/kune/core/public/ws.html =================================================================== --- trunk/src/main/java/cc/kune/core/public/ws.html 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/cc/kune/core/public/ws.html 2011-01-28 00:16:03 UTC (rev 1225) @@ -11,12 +11,11 @@ <script src="//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"></script> <script> WebFont.load({ - custom: { - families: ['UbuntuRegular', 'UbuntuItalic'], - urls : ['http://kune.ourproject.org/kothers/ubuntufontface.css'] - } -}); + google: { + families: [ 'Ubuntu' ] + }}); </script> +<link href='http://fonts.googleapis.com/css?family=Ubuntu:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'> <!-- <link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'> --> <link type="text/css" rel="stylesheet" href="gxt/css/gxt-all.css"> Modified: trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml =================================================================== --- trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/app/Kune.gwt.xml 2011-01-28 00:16:03 UTC (rev 1225) @@ -44,7 +44,7 @@ <inherits name="com.google.gwt.wave.Wave" /> <inherits name="org.ourproject.kune.ws.armor.WsArmor" /> <!-- Specify the app entry point class. --> - <entry-point class="org.ourproject.kune.app.client.KuneEntryPoint" /> + <entry-point class="org.ourproject.kune.app.client.OldKuneEntryPoint" /> <!-- excluding test sources for this module workaround for open issue 4454 see http://code.google.com/p/google-web-toolkit/issues/detail?id=4454 --> <source path='client' excludes="**/*Test.java,**/*Tests.java,**/*MockProvider.java"/> Deleted: trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,63 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.app.client; - -import org.ourproject.kune.platf.client.services.Loader; -import org.ourproject.kune.platf.client.services.PlatformModule; - -import com.allen_sauer.gwt.log.client.Log; -import com.google.gwt.core.client.EntryPoint; -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.core.client.Scheduler.ScheduledCommand; - -public class KuneEntryPoint implements EntryPoint { - - @Override - public void onModuleLoad() { - Log.setUncaughtExceptionHandler(); - - Scheduler.get().scheduleDeferred(new ScheduledCommand() { - @Override - public void execute() { - onModuleLoadCont(); - } - }); - } - - public void onModuleLoadCont() { - // At the moment, in runtime: - Log.setCurrentLogLevel(Log.LOG_LEVEL_DEBUG); - // final WsArmorResources resources = WsArmorResources.INSTANCE; - // resources.style().ensureInjected(); - // - // final Body body = new Body(); - // RootLayoutPanel.get().add(body); - // Loader.install(new RegistryModule(), new DocumentClientModule(), new - // BlogClientModule(), - // new WikiClientModule(), new GalleryClientModule(), new - // EmiteUIModule(), new ChatClientModule(), - // new WorkspaceModule(), new PlatformModule()); - - Loader.install(new PlatformModule()); - - // We install our HelloWorldModule - // Loader.install(new HelloWorldModule()); - } -} Copied: trunk/src/main/java/org/ourproject/kune/app/client/OldKuneEntryPoint.java (from rev 1223, trunk/src/main/java/org/ourproject/kune/app/client/KuneEntryPoint.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/app/client/OldKuneEntryPoint.java (rev 0) +++ trunk/src/main/java/org/ourproject/kune/app/client/OldKuneEntryPoint.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -0,0 +1,63 @@ +/* + * + * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.ourproject.kune.app.client; + +import org.ourproject.kune.platf.client.services.Loader; +import org.ourproject.kune.platf.client.services.PlatformModule; + +import com.allen_sauer.gwt.log.client.Log; +import com.google.gwt.core.client.EntryPoint; +import com.google.gwt.core.client.Scheduler; +import com.google.gwt.core.client.Scheduler.ScheduledCommand; + +public class OldKuneEntryPoint implements EntryPoint { + + @Override + public void onModuleLoad() { + Log.setUncaughtExceptionHandler(); + + Scheduler.get().scheduleDeferred(new ScheduledCommand() { + @Override + public void execute() { + onModuleLoadCont(); + } + }); + } + + public void onModuleLoadCont() { + // At the moment, in runtime: + Log.setCurrentLogLevel(Log.LOG_LEVEL_DEBUG); + // final WsArmorResources resources = WsArmorResources.INSTANCE; + // resources.style().ensureInjected(); + // + // final Body body = new Body(); + // RootLayoutPanel.get().add(body); + // Loader.install(new RegistryModule(), new DocumentClientModule(), new + // BlogClientModule(), + // new WikiClientModule(), new GalleryClientModule(), new + // EmiteUIModule(), new ChatClientModule(), + // new WorkspaceModule(), new PlatformModule()); + + Loader.install(new PlatformModule()); + + // We install our HelloWorldModule + // Loader.install(new HelloWorldModule()); + } +} Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/PlatfMessages.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/PlatfMessages.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/PlatfMessages.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,39 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.platf.client; - -public final class PlatfMessages { - public final static String BUDDIES_NOT_PUBLIC = "The buddies of this user are not public"; - public final static String MEMBERS_NOT_PUBLIC = "The members of this group are not public"; - public final static String REGISTER_TITLE = "Register"; - public final static String SIGN_IN_TITLE = "Sign in"; - public final static String EMAIL_IN_USE = "This email address is being used by another user. Please, try with another one"; - public final static String NAME_IN_USE = "This name in already in use. Please try with a different name"; - public final static String INCORRECT_NICKNAME_EMAIL_OR_PASSWORD = "The nickname/email/password is incorrect"; - public final static String YOUR_HOMEPAGE = "Your homepage"; - public final static String USER_DOESN_T_HAVE_A_HOMEPAGE = "This user does not have a homepage"; - public final static String ENT_LOGO_SELECTOR_NORMAL_TITLE = "Logo"; - public final static String ENT_LOGO_SELECTOR_PERSON_TITLE = "Avatar"; - public final static String GROUP_OPTIONS_DIALOG_TITLE = "Group options"; - public final static String USER_OPTIONS_DIALOG_TITLE = "User options"; - - private PlatfMessages() { - } -} Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/Images.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/services/Images.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/services/Images.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -23,6 +23,10 @@ import com.google.gwt.user.client.ui.AbstractImagePrototype; import com.google.gwt.user.client.ui.ImageBundle; +/** + * Use {@link #CoreResources} instead + **/ +@Deprecated public interface Images extends ImageBundle { public static class App { Modified: trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/services/PlatformModule.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -97,6 +97,7 @@ import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; import org.ourproject.kune.platf.client.utils.TimerWrapper; +import cc.kune.common.client.noti.NotifyLevelImages; import cc.kune.core.client.errors.ErrorHandler; import cc.kune.core.client.i18n.I18nUITranslationService; import cc.kune.core.client.state.AccessRightsClientManager; @@ -304,7 +305,7 @@ public EditHtmlDialog create() { final EditHtmlDialogPresenter presenter = new EditHtmlDialogPresenter(); final EditHtmlDialogPanel panel = new EditHtmlDialogPanel(presenter, i(I18nTranslationService.class), - i(RTEImgResources.class), i(Images.class), i(EditHtmlGroup.class)); + i(RTEImgResources.class), i(NotifyLevelImages.class), i(EditHtmlGroup.class)); presenter.init(panel); return presenter; } @@ -333,7 +334,7 @@ public InsertImageDialog create() { final InsertImageDialogPresenter presenter = new InsertImageDialogPresenter(); final InsertImageDialogPanel panel = new InsertImageDialogPanel(presenter, - i(I18nTranslationService.class), i(Images.class), i(InsertImageGroup.class)); + i(I18nTranslationService.class), i(NotifyLevelImages.class), i(InsertImageGroup.class)); presenter.init(panel); return presenter; } @@ -353,7 +354,7 @@ @Override public InsertLinkDialog create() { final InsertLinkDialogPresenter presenter = new InsertLinkDialogPresenter(); - final InsertLinkDialogPanel panel = new InsertLinkDialogPanel(presenter, i(Images.class), + final InsertLinkDialogPanel panel = new InsertLinkDialogPanel(presenter, i(NotifyLevelImages.class), i(I18nTranslationService.class), i(InsertLinkGroup.class)); presenter.init(panel); return presenter; @@ -375,7 +376,7 @@ @Override public InsertSpecialCharDialog create() { final InsertSpecialCharDialogPresenter presenter = new InsertSpecialCharDialogPresenter(); - final InsertSpecialCharDialogPanel panel = new InsertSpecialCharDialogPanel(presenter, i(Images.class), + final InsertSpecialCharDialogPanel panel = new InsertSpecialCharDialogPanel(presenter, i(NotifyLevelImages.class), i(I18nTranslationService.class), i(InsertSpecialCharGroup.class), i(RTEImgResources.class)); presenter.init(panel); return presenter; @@ -426,7 +427,7 @@ @Override public InsertMediaDialog create() { final InsertMediaDialogPresenter presenter = new InsertMediaDialogPresenter(); - final InsertMediaDialogPanel panel = new InsertMediaDialogPanel(presenter, i18n, i(Images.class), i(InsertMediaGroup.class)); + final InsertMediaDialogPanel panel = new InsertMediaDialogPanel(presenter, i18n, i(NotifyLevelImages.class), i(InsertMediaGroup.class)); presenter.init(panel); return presenter; } Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/InfoDialog.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/InfoDialog.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/InfoDialog.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -27,6 +27,7 @@ import com.gwtext.client.widgets.Panel; import com.gwtext.client.widgets.event.ButtonListenerAdapter; +@Deprecated public class InfoDialog extends BasicDialog { private final Panel mainPanel; Deleted: trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/MessageToolbar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/MessageToolbar.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/MessageToolbar.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,69 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.platf.client.ui.dialogs; - -import org.ourproject.kune.platf.client.services.Images; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; - -import com.google.gwt.user.client.ui.AbstractImagePrototype; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.Label; -import com.gwtext.client.widgets.Toolbar; - -public class MessageToolbar { - private final Toolbar toolbar; - private final Image errorIcon; - private final Label errorLabel; - - public MessageToolbar(Images images, String errorLabelId) { - toolbar = new Toolbar(); - errorLabel = new Label(""); - errorLabel.ensureDebugId(errorLabelId); - errorIcon = new Image(); - images.error().applyTo(errorIcon); - toolbar.addSpacer(); - toolbar.addElement(errorIcon.getElement()); - toolbar.setCls("k-error-tb"); - toolbar.addSpacer(); - toolbar.addSpacer(); - toolbar.addElement(errorLabel.getElement()); - errorIcon.setVisible(false); - toolbar.setVisible(false); - } - - public Toolbar getToolbar() { - return toolbar; - } - - public void hideErrorMessage() { - errorIcon.setVisible(false); - errorLabel.setText(""); - toolbar.setVisible(false); - } - - public void setErrorMessage(final String message, final Level level) { - errorLabel.setText(message); - AbstractImagePrototype icon = NotifyUser.getImage(level); - icon.applyTo(errorIcon); - errorIcon.setVisible(true); - toolbar.setVisible(true); - } -} Modified: 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialog.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -20,18 +20,19 @@ package org.ourproject.kune.platf.client.ui.dialogs.tabbed; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; +import cc.kune.common.client.noti.NotifyLevel; + public interface AbstractTabbedDialog { - public void hideMessages(); - - public void setErrorMessage(String message, Level level); - void activateTab(int index); void addTab(View view); + public void hideMessages(); + + public void setErrorMessage(String message, NotifyLevel level); + void show(); } Modified: 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -22,12 +22,13 @@ import java.util.ArrayList; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog; import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm; -import org.ourproject.kune.platf.client.ui.dialogs.MessageToolbar; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; +import cc.kune.common.client.noti.NotifyLevel; +import cc.kune.common.client.noti.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; @@ -37,24 +38,25 @@ 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 TabPanel tabPanel; + private final String errorLabelId; + private final int height; + private String iconCls; + private final NotifyLevelImages images; private MessageToolbar messageErrorBar; - private String title; - private final int width; - private final int height; + private final int minHeight; private final int minWidth; - private final int minHeight; private final boolean modal; - private final Images images; - private final String errorLabelId; - private String iconCls; private Listener0 onHideListener; - private final ArrayList<Button> buttons; + 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 Images images, final String errorLabelId) { + final int minWidth, final int minHeight, final boolean modal, final NotifyLevelImages images, + final String errorLabelId) { this.dialogId = dialogId; this.title = title; this.width = width; @@ -67,6 +69,7 @@ buttons = new ArrayList<Button>(); } + @Override public void activateTab(final int index) { createDialogIfNecessary(); tabPanel.activate(index); @@ -81,6 +84,20 @@ 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) { @@ -88,16 +105,62 @@ } } + @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(); @@ -111,6 +174,7 @@ } } + @Override public void hide() { if (dialog != null) { if (dialog.isVisible()) { @@ -119,23 +183,31 @@ } } + @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(); } - public void setErrorMessage(final String message, final Level level) { + @Override + public void setErrorMessage(final String message, final NotifyLevel level) { messageErrorBar.setErrorMessage(message, level); } @@ -161,66 +233,4 @@ createDialogIfNecessary(); dialog.show(); } - - 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(); - } - }); - } - - 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; - } - - private void createDialog() { - dialog = new BasicDialog(dialogId, title, modal, true, width, height, minWidth, minHeight); - dialog.setCollapsible(false); - messageErrorBar = new MessageToolbar(images, errorLabelId); - 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(); - } - } - - private void insertTabPanel(final int index, final Panel newTab) { - createDialogIfNecessary(); - tabPanel.insert(index, newTab); - } } Modified: 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -20,16 +20,19 @@ package org.ourproject.kune.platf.client.ui.dialogs.tabbed; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; +import cc.kune.common.client.noti.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); } @@ -42,6 +45,7 @@ view.hide(); } + @Override public void hideMessages() { view.hideMessages(); } @@ -54,10 +58,11 @@ view.insertTab(index, tab); } - public void setErrorMessage(final String message, final Level level) { + public void setErrorMessage(final String message, final NotifyLevel level) { view.setErrorMessage(message, level); } + @Override public void show() { hideMessages(); view.createAndShow(); Modified: 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/dialogs/tabbed/AbstractTabbedDialogView.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -20,8 +20,9 @@ package org.ourproject.kune.platf.client.ui.dialogs.tabbed; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; +import cc.kune.common.client.noti.NotifyLevel; + public interface AbstractTabbedDialogView extends View { void activateTab(int index); @@ -38,6 +39,6 @@ void insertTab(int index, View tab); - void setErrorMessage(final String message, final Level level); + void setErrorMessage(final String message, final NotifyLevel level); } 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/edithtml/EditHtmlDialogPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,10 +1,10 @@ package org.ourproject.kune.platf.client.ui.rte.edithtml; -import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; import org.ourproject.kune.platf.client.ui.rte.img.RTEImgResources; +import cc.kune.common.client.noti.NotifyLevel; +import cc.kune.common.client.noti.NotifyLevelImages; import cc.kune.core.shared.i18n.I18nTranslationService; import com.google.gwt.user.client.Window; @@ -14,15 +14,15 @@ public class EditHtmlDialogPanel extends AbstractTabbedDialogPanel implements EditHtmlDialogView { + public static final String EDIG_HTML_DIALOG_ERROR_ID = "ehtml-dialgo-error"; public static final String EDIT_HTML_DIALOG = "ehtml-dialog"; - public static final String EDIG_HTML_DIALOG_ERROR_ID = "ehtml-dialgo-error"; + private Button cancel; private final EditHtmlGroup editHtmlGroup; private final I18nTranslationService i18n; - private Button cancel; private final EditHtmlDialogPresenter presenter; - public EditHtmlDialogPanel(final EditHtmlDialogPresenter presenter, I18nTranslationService i18n, RTEImgResources resources, - Images images, EditHtmlGroup editHtmlGroup) { + public EditHtmlDialogPanel(final EditHtmlDialogPresenter presenter, final I18nTranslationService i18n, + final RTEImgResources resources, final NotifyLevelImages images, final EditHtmlGroup editHtmlGroup) { super(EDIT_HTML_DIALOG, i18n.tWithNT("Edit the HTML", "Option in a content editor to edit the html internal code (for advance users)"), Window.getClientWidth() - 100, HEIGHT + 80, Window.getClientWidth() - 100, HEIGHT + 80, true, images, @@ -38,16 +38,16 @@ public void createAndShow() { if (cancel == null) { cancel = new Button(i18n.t("Cancel")); - Button update = new Button(i18n.t("Update")); + final Button update = new Button(i18n.t("Update")); cancel.addListener(new ButtonListenerAdapter() { @Override - public void onClick(Button button, EventObject e) { + public void onClick(final Button button, final EventObject e) { presenter.onCancel(); } }); update.addListener(new ButtonListenerAdapter() { @Override - public void onClick(Button button, EventObject e) { + public void onClick(final Button button, final EventObject e) { presenter.onUpdate(); } }); @@ -56,6 +56,6 @@ } editHtmlGroup.createAll(); super.createAndShow(); - super.setErrorMessage(i18n.t("This option is only for advanced users"), Level.info); + super.setErrorMessage(i18n.t("This option is only for advanced users"), NotifyLevel.info); } } 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertimg/InsertImageDialogPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,8 +1,8 @@ package org.ourproject.kune.platf.client.ui.rte.insertimg; -import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel; +import cc.kune.common.client.noti.NotifyLevelImages; import cc.kune.core.shared.i18n.I18nTranslationService; import com.calclab.suco.client.events.Listener0; @@ -17,19 +17,20 @@ private final InsertImageGroup insertImageGroup; public InsertImageDialogPanel(final InsertImageDialogPresenter presenter, final I18nTranslationService i18n, - final Images images, final InsertImageGroup insertImageGroup) { + final NotifyLevelImages images, final InsertImageGroup insertImageGroup) { super(INSERT_IMG_DIALOG, i18n.t("Insert Image"), 390, HEIGHT + 100, 390, HEIGHT + 100, true, images, INSERT_IMG_DIALOG_ERROR_ID); super.setIconCls("k-picture-icon"); this.insertImageGroup = insertImageGroup; super.addHideListener(new Listener0() { + @Override public void onEvent() { insertImageGroup.resetAll(); } }); - Button insert = new Button(i18n.t("Insert")); + final Button insert = new Button(i18n.t("Insert")); insert.addListener(new ButtonListenerAdapter() { @Override public void onClick(final Button button, final EventObject e) { @@ -37,7 +38,7 @@ } }); - Button cancel = new Button(i18n.t("Cancel")); + final Button cancel = new Button(i18n.t("Cancel")); cancel.addListener(new ButtonListenerAdapter() { @Override public void onClick(final Button button, final EventObject e) { 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/InsertLinkDialogPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -19,9 +19,9 @@ */ package org.ourproject.kune.platf.client.ui.rte.insertlink; -import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel; +import cc.kune.common.client.noti.NotifyLevelImages; import cc.kune.core.shared.i18n.I18nTranslationService; import com.calclab.suco.client.events.Listener0; @@ -34,31 +34,32 @@ public static final String TEXT_EDT_INSERT_DIALOG_ERROR_ID = "k-ted-iep-dialog-err"; private final InsertLinkGroup textEditorInsertElementGroup; - public InsertLinkDialogPanel(final InsertLinkDialogPresenter presenter, Images images, I18nTranslationService i18n, - final InsertLinkGroup textEditorInsertElementGroup) { + public InsertLinkDialogPanel(final InsertLinkDialogPresenter presenter, final NotifyLevelImages images, + final I18nTranslationService i18n, final InsertLinkGroup textEditorInsertElementGroup) { super(TEXT_EDT_INSERT_DIALOG, i18n.tWithNT("Insert a link", "Option in a text editor to insert links and other elements"), 380, HEIGHT + 100, 380, HEIGHT + 100, true, images, TEXT_EDT_INSERT_DIALOG_ERROR_ID); super.setIconCls("k-link-icon"); this.textEditorInsertElementGroup = textEditorInsertElementGroup; super.addHideListener(new Listener0() { + @Override public void onEvent() { textEditorInsertElementGroup.resetAll(); } }); - Button insert = new Button(i18n.t("Insert")); + final Button insert = new Button(i18n.t("Insert")); insert.addListener(new ButtonListenerAdapter() { @Override - public void onClick(Button button, EventObject e) { + public void onClick(final Button button, final EventObject e) { presenter.onInsert(); } }); - Button cancel = new Button(i18n.t("Cancel")); + final Button cancel = new Button(i18n.t("Cancel")); cancel.addListener(new ButtonListenerAdapter() { @Override - public void onClick(Button button, EventObject e) { + public void onClick(final Button button, final EventObject e) { presenter.onCancel(); } }); 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/InsertMediaDialogPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,8 +1,8 @@ package org.ourproject.kune.platf.client.ui.rte.insertmedia; -import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel; +import cc.kune.common.client.noti.NotifyLevelImages; import cc.kune.core.shared.i18n.I18nTranslationService; import com.calclab.suco.client.events.Listener0; @@ -17,19 +17,20 @@ private final InsertMediaGroup insertMediaGroup; public InsertMediaDialogPanel(final InsertMediaDialogPresenter presenter, final I18nTranslationService i18n, - final Images images, final InsertMediaGroup insertMediaGroup) { + final NotifyLevelImages images, final InsertMediaGroup insertMediaGroup) { super(INSERT_MEDIA_DIALOG, i18n.t("Insert Media (audio/video)"), 390, HEIGHT + 100, 390, HEIGHT + 100, true, images, INSERT_MEDIA_DIALOG_ERROR_ID); super.setIconCls("k-film-icon"); this.insertMediaGroup = insertMediaGroup; super.addHideListener(new Listener0() { + @Override public void onEvent() { insertMediaGroup.resetAll(); } }); - Button insert = new Button(i18n.t("Insert")); + final Button insert = new Button(i18n.t("Insert")); insert.addListener(new ButtonListenerAdapter() { @Override public void onClick(final Button button, final EventObject e) { @@ -37,7 +38,7 @@ } }); - Button cancel = new Button(i18n.t("Cancel")); + final Button cancel = new Button(i18n.t("Cancel")); cancel.addListener(new ButtonListenerAdapter() { @Override public void onClick(final Button button, final EventObject e) { Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/ext/InsertMediaExtPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/ext/InsertMediaExtPresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertmedia/ext/InsertMediaExtPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,17 +1,17 @@ package org.ourproject.kune.platf.client.ui.rte.insertmedia.ext; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; import org.ourproject.kune.platf.client.ui.rte.insertmedia.ExternalMediaRegistry; import org.ourproject.kune.platf.client.ui.rte.insertmedia.InsertMediaDialog; import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.InsertMediaAbstractPresenter; +import cc.kune.common.client.noti.NotifyLevel; import cc.kune.core.shared.dto.ExtMediaDescripDTO; public class InsertMediaExtPresenter extends InsertMediaAbstractPresenter implements InsertMediaExt { - private InsertMediaExtView view; private final ExternalMediaRegistry externalMediaRegistry; private ExtMediaDescripDTO mediaDescriptor; + private InsertMediaExtView view; public InsertMediaExtPresenter(final InsertMediaDialog insertMediaDialog, final ExternalMediaRegistry externalMediaRegistry) { @@ -26,10 +26,10 @@ @Override public boolean isValid() { - String url = view.getSrc(); + final String url = view.getSrc(); mediaDescriptor = externalMediaRegistry.get(url); if (mediaDescriptor.equals(ExternalMediaRegistry.NO_MEDIA)) { - insertMediaDialog.setErrorMessage("We cannot process this video link", Level.error); + insertMediaDialog.setErrorMessage("We cannot process this video link", NotifyLevel.error); return false; } else { return true; 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertspecialchar/InsertSpecialCharDialogPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,9 +1,9 @@ package org.ourproject.kune.platf.client.ui.rte.insertspecialchar; -import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel; import org.ourproject.kune.platf.client.ui.rte.img.RTEImgResources; +import cc.kune.common.client.noti.NotifyLevelImages; import cc.kune.core.shared.i18n.I18nTranslationService; import com.gwtext.client.core.EventObject; @@ -16,14 +16,14 @@ private static final String INSERT_SPECIAL_CHAR_DIALOG_ERROR_ID = "iscdp-err"; private final InsertSpecialCharGroup insertSpecialCharGroup; - public InsertSpecialCharDialogPanel(final InsertSpecialCharDialogPresenter presenter, final Images images, - final I18nTranslationService i18n, final InsertSpecialCharGroup insertSpecialCharGroup, - final RTEImgResources imgResources) { + public InsertSpecialCharDialogPanel(final InsertSpecialCharDialogPresenter presenter, + final NotifyLevelImages images, final I18nTranslationService i18n, + final InsertSpecialCharGroup insertSpecialCharGroup, final RTEImgResources imgResources) { super(INSERT_SPECIAL_CHAR_DIALOG, i18n.t("Insert Special Character"), 495, HEIGHT + 90, 495, HEIGHT + 90, true, images, INSERT_SPECIAL_CHAR_DIALOG_ERROR_ID); super.setIconCls("k-specialchars-icon"); this.insertSpecialCharGroup = insertSpecialCharGroup; - Button close = new Button(i18n.t("Close")); + final Button close = new Button(i18n.t("Close")); close.addListener(new ButtonListenerAdapter() { @Override public void onClick(final Button button, final EventObject e) { Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditor.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditor.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditor.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -2,7 +2,7 @@ import org.ourproject.kune.platf.client.ui.rte.basic.RTEditor; -import cc.kune.core.client.actions.BeforeActionListener; +import cc.kune.common.client.actions.BeforeActionListener; import com.calclab.suco.client.events.Listener; import com.calclab.suco.client.events.Listener0; Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/saving/RTESavingEditorPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -23,7 +23,7 @@ import org.ourproject.kune.platf.client.utils.DeferredCommandWrapper; import org.ourproject.kune.platf.client.utils.TimerWrapper; -import cc.kune.core.client.actions.BeforeActionListener; +import cc.kune.common.client.actions.BeforeActionListener; import cc.kune.core.client.state.Session; import cc.kune.core.client.state.StateManager; import cc.kune.core.shared.i18n.I18nTranslationService; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceMessages.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceMessages.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceMessages.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -20,10 +20,6 @@ package org.ourproject.kune.workspace.client; public final class WorkspaceMessages { - public final static String REGISTER_A_NEW_GROUP_TITLE = "Register a new Group"; - public final static String FIELD_MUST_BE_BETWEEN_3_AND_15 = "The name must be between 3 and 15 lowercase characters. It can only contain Western characters, numbers, and dashes"; - public final static String NAME_IN_ALREADY_IN_USE = "This name is already in use. Please try with a different name"; - public final static String REGISTER_TO_CREATE_A_GROUP = "Please, sign in or register to create a group"; private WorkspaceMessages() { } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -155,14 +155,6 @@ import org.ourproject.kune.workspace.client.search.UserLiveSearcher; import org.ourproject.kune.workspace.client.search.UserLiveSearcherPanel; import org.ourproject.kune.workspace.client.search.UserLiveSearcherPresenter; -import org.ourproject.kune.workspace.client.signin.Register; -import org.ourproject.kune.workspace.client.signin.RegisterPanel; -import org.ourproject.kune.workspace.client.signin.RegisterPresenter; -import org.ourproject.kune.workspace.client.signin.RegisterView; -import org.ourproject.kune.workspace.client.signin.SignIn; -import org.ourproject.kune.workspace.client.signin.SignInPanel; -import org.ourproject.kune.workspace.client.signin.SignInPresenter; -import org.ourproject.kune.workspace.client.signin.SignInView; import org.ourproject.kune.workspace.client.site.WorkspaceNotifyUser; import org.ourproject.kune.workspace.client.site.msg.ToastMessage; import org.ourproject.kune.workspace.client.site.msg.ToastMessagePanel; @@ -236,6 +228,9 @@ import org.ourproject.kune.workspace.client.wave.WaveInsertPanel; import org.ourproject.kune.workspace.client.wave.WaveInsertPresenter; +import cc.kune.common.client.noti.NotifyLevelImages; +import cc.kune.core.client.auth.Register; +import cc.kune.core.client.auth.SignIn; import cc.kune.core.client.errors.ErrorHandler; import cc.kune.core.client.i18n.I18nUITranslationService; import cc.kune.core.client.rpcservices.ContentService; @@ -633,7 +628,7 @@ final GroupOptionsPresenter presenter = new GroupOptionsPresenter(i(StateManager.class), i(I18nTranslationService.class), i(ImgResources.class)); final GroupOptionsPanel panel = new GroupOptionsPanel(presenter, i(EntityHeader.class), - i(I18nTranslationService.class), i(Images.class), i(GroupOptionsCollection.class)); + i(I18nTranslationService.class), i(NotifyLevelImages.class), i(GroupOptionsCollection.class)); presenter.init(panel); return presenter; } @@ -646,7 +641,7 @@ i(StateManager.class), i(I18nTranslationService.class), i(ImgResources.class), i(SiteUserOptions.class)); final UserOptionsPanel panel = new UserOptionsPanel(presenter, i(EntityHeader.class), - i(I18nTranslationService.class), i(Images.class), i(UserOptionsCollection.class)); + i(I18nTranslationService.class), i(NotifyLevelImages.class), i(UserOptionsCollection.class)); presenter.init(panel); return presenter; } @@ -865,37 +860,44 @@ } }); - register(Singleton.class, new Factory<SignIn>(SignIn.class) { - @Override - public SignIn create() { - final SignInPresenter presenter = new SignInPresenter(i(Session.class), i(StateManager.class), - i(I18nUITranslationService.class), p(UserServiceAsync.class), p(Register.class)); - final SignInView panel = new SignInPanel(presenter, i(I18nTranslationService.class), - i(WorkspaceSkeleton.class), i(Images.class)); - presenter.init(panel); - return presenter; - } - }); + // register(Singleton.class, new Factory<SignIn>(SignIn.class) { + // @Override + // public SignIn create() { + // final SignInPresenter presenter = new + // SignInPresenter(i(Session.class), i(StateManager.class), + // i(I18nUITranslationService.class), p(UserServiceAsync.class), + // p(Register.class)); + // final SignInView panel = new SignInPanel(presenter, + // i(I18nTranslationService.class), + // i(WorkspaceSkeleton.class), i(NotifyLevelImages.class)); + // presenter.init(panel); + // return presenter; + // } + // }); + // + // register(Singleton.class, new Factory<Register>(Register.class) { + // @Override + // public Register create() { + // final RegisterPresenter presenter = new + // RegisterPresenter(i(Session.class), i(StateManager.class), + // i(I18nUITranslationService.class), p(UserServiceAsync.class), + // p(SignIn.class)); + // final RegisterView panel = new RegisterPanel(presenter, + // i(I18nTranslationService.class), + // i(WorkspaceSkeleton.class), i(Session.class), + // i(NotifyLevelImages.class)); + // presenter.init(panel); + // return presenter; + // } + // }); - register(Singleton.class, new Factory<Register>(Register.class) { - @Override - public Register create() { - final RegisterPresenter presenter = new RegisterPresenter(i(Session.class), i(StateManager.class), - i(I18nUITranslationService.class), p(UserServiceAsync.class), p(SignIn.class)); - final RegisterView panel = new RegisterPanel(presenter, i(I18nTranslationService.class), - i(WorkspaceSkeleton.class), i(Session.class), i(Images.class)); - presenter.init(panel); - return presenter; - } - }); - register(Singleton.class, new Factory<NewGroup>(NewGroup.class) { @Override public NewGroup create() { final NewGroupPresenter presenter = new NewGroupPresenter(i(I18nTranslationService.class), i(Session.class), i(StateManager.class), p(GroupServiceAsync.class)); final NewGroupPanel view = new NewGroupPanel(presenter, i(I18nTranslationService.class), - p(LicenseWizard.class), i(Images.class)); + p(LicenseWizard.class), i(NotifyLevelImages.class)); presenter.init(view); return presenter; } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -19,16 +19,16 @@ */ package org.ourproject.kune.workspace.client.newgroup; -import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.KuneUiUtils; import org.ourproject.kune.platf.client.ui.KuneWindowUtils; import org.ourproject.kune.platf.client.ui.dialogs.DefaultFormUtils; import org.ourproject.kune.platf.client.ui.dialogs.ExtendedDialog; -import org.ourproject.kune.platf.client.ui.dialogs.MessageToolbar; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; -import org.ourproject.kune.workspace.client.WorkspaceMessages; import org.ourproject.kune.workspace.client.licensewizard.LicenseWizard; +import cc.kune.common.client.noti.NotifyLevel; +import cc.kune.common.client.noti.NotifyLevelImages; +import cc.kune.core.client.resources.CoreMessages; +import cc.kune.core.client.ui.dialogs.MessageToolbar; import cc.kune.core.shared.dto.LicenseDTO; import cc.kune.core.shared.i18n.I18nTranslationService; @@ -57,45 +57,47 @@ import com.gwtext.client.widgets.layout.HorizontalLayout; public class NewGroupPanel extends ExtendedDialog implements NewGroupView { - private static final String MARGIN_LEFT_105PX = "margin-left: 105px"; + private static final int BIG_FIELD_WIDTH = 280; + public static final String CANCEL_BUTTON = "k-ngp-cancel-bt"; + public static final String COMM_GROUP_TYPE_ID = "k-ngp-type_of_group_comm"; + public static final String ERROR_MSG_BAR = "k-ngp-error-mb"; private static final int LABEL_WIDTH = 100; - public static final String SHORTNAME_FIELD = "k-ngp-short_name"; public static final String LONGNAME_FIELD = "k-ngp-long_name"; + private static final String MARGIN_LEFT_105PX = "margin-left: 105px"; + public static final String NEWGROUP_WIZARD = "k-ngp-wiz"; + public static final String ORG_GROUP_TYPE_ID = "k-ngp-type_of_group_org"; + public static final String PROJ_GROUP_TYPE_ID = "k-ngp-type_of_group_proj"; public static final String PUBLICDESC_FIELD = "k-ngp-public_desc"; + public static final String REGISTER_BUTTON = "k-ngp-finish-bt"; + public static final String SHORTNAME_FIELD = "k-ngp-short_name"; + public static final String TAGS_FIELD = "k-ngp-tags"; public static final String TYPEOFGROUP_FIELD = "k-ngp-type_of_group"; - public static final String PROJ_GROUP_TYPE_ID = "k-ngp-type_of_group_proj"; - public static final String ORG_GROUP_TYPE_ID = "k-ngp-type_of_group_org"; - public static final String COMM_GROUP_TYPE_ID = "k-ngp-type_of_group_comm"; - public static final String TAGS_FIELD = "k-ngp-tags"; - public static final String NEWGROUP_WIZARD = "k-ngp-wiz"; - public static final String REGISTER_BUTTON = "k-ngp-finish-bt"; - public static final String CANCEL_BUTTON = "k-ngp-cancel-bt"; - public static final String ERROR_MSG_BAR = "k-ngp-error-mb"; - private static final int BIG_FIELD_WIDTH = 280; + private Radio communityRadio; private final FormPanel form; - private Radio projectRadio; - private Radio orgRadio; - private Radio communityRadio; + private final I18nTranslationService i18n; + private LicenseDTO license; - private TextField shortNameField; + private Image licenseImage; + private final Provider<LicenseWizard> licenseWizard; private TextField longNameField; + private final MessageToolbar messageErrorBar; + private Radio orgRadio; + private Radio projectRadio; private TextArea publicDescField; + private TextField shortNameField; private TextField tags; - private final MessageToolbar messageErrorBar; - private final Provider<LicenseWizard> licenseWizard; - private final I18nTranslationService i18n; - private Image licenseImage; - private LicenseDTO license; public NewGroupPanel(final NewGroupPresenter presenter, final I18nTranslationService i18n, - final Provider<LicenseWizard> licenseWizard, final Images img) { - super(NEWGROUP_WIZARD, WorkspaceMessages.REGISTER_A_NEW_GROUP_TITLE, true, true, 450, 430, "k-newgroup-icon", + final Provider<LicenseWizard> licenseWizard, final NotifyLevelImages img) { + super(NEWGROUP_WIZARD, CoreMessages.REGISTER_A_NEW_GROUP_TITLE, true, true, 450, 430, "k-newgroup-icon", i18n.t("Cancel"), CANCEL_BUTTON, i18n.t("Register"), REGISTER_BUTTON, new Listener0() { + @Override public void onEvent() { presenter.onCancel(); } }, new Listener0() { + @Override public void onEvent() { presenter.onRegister(); } @@ -117,68 +119,17 @@ form = createNewGroupInitialDataForm(presenter); messageErrorBar = new MessageToolbar(img, ERROR_MSG_BAR); - super.setBottomToolbar(messageErrorBar.getToolbar()); + // FIXME in gxt super.setBottomToolbar(messageErrorBar.getToolbar()); super.add(form); } + @Override public void clearData() { form.getForm().reset(); shortNameField.focus(false); } - public LicenseDTO getLicense() { - return license; - } - - public String getLongName() { - return longNameField.getValueAsString(); - } - - public String getPublicDesc() { - return publicDescField.getValueAsString(); - } - - public String getShortName() { - return shortNameField.getValueAsString(); - } - - public String getTags() { - return tags.getRawValue(); - } - - public void hideMessage() { - messageErrorBar.hideErrorMessage(); - } - - public boolean isCommunity() { - return communityRadio.getValue(); - } - - public boolean isFormValid() { - return form.getForm().isValid(); - } - - public boolean isOrganization() { - return orgRadio.getValue(); - } - - public boolean isProject() { - return projectRadio.getValue(); - } - - public void maskProcessing() { - mask(i18n.t("Processing")); - } - - public void setLicense(final LicenseDTO license) { - setLicenseImpl(license); - } - - public void setMessage(final String message, final Level level) { - messageErrorBar.setErrorMessage(message, level); - } - private FormPanel createNewGroupInitialDataForm(final NewGroupPresenter presenter) { final FormPanel form = new FormPanel(); form.setFrame(true); @@ -203,9 +154,9 @@ shortNameField.setMaxLength(15); shortNameField.setAllowBlank(false); shortNameField.setRegex("^[a-z0-9_\\-]+$"); - shortNameField.setMinLengthText(i18n.t(WorkspaceMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); - shortNameField.setMaxLengthText(i18n.t(WorkspaceMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); - shortNameField.setRegexText(i18n.t(WorkspaceMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); + shortNameField.setMinLengthText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); + shortNameField.setMaxLengthText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); + shortNameField.setRegexText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); shortNameField.setValidationDelay(1000); form.add(shortNameField); @@ -246,6 +197,7 @@ licenseImage = new Image("images/lic/bysa80x15.png"); licenseImage.addClickHandler(new ClickHandler() { + @Override public void onClick(final ClickEvent event) { KuneWindowUtils.open(license.getUrl()); } @@ -262,6 +214,7 @@ @Override public void onClick(final Button button, final EventObject e) { licenseWizard.get().start(new Listener<LicenseDTO>() { + @Override public void onEvent(final LicenseDTO license) { setLicenseImpl(license); } @@ -314,9 +267,74 @@ return form; } + @Override + public LicenseDTO getLicense() { + return license; + } + + @Override + public String getLongName() { + return longNameField.getValueAsString(); + } + + @Override + public String getPublicDesc() { + return publicDescField.getValueAsString(); + } + + @Override + public String getShortName() { + return shortNameField.getValueAsString(); + } + + @Override + public String getTags() { + return tags.getRawValue(); + } + + @Override + public void hideMessage() { + messageErrorBar.hideErrorMessage(); + } + + @Override + public boolean isCommunity() { + return communityRadio.getValue(); + } + + @Override + public boolean isFormValid() { + return form.getForm().isValid(); + } + + @Override + public boolean isOrganization() { + return orgRadio.getValue(); + } + + @Override + public boolean isProject() { + return projectRadio.getValue(); + } + + @Override + public void maskProcessing() { + mask(i18n.t("Processing")); + } + + @Override + public void setLicense(final LicenseDTO license) { + setLicenseImpl(license); + } + private void setLicenseImpl(final LicenseDTO license) { this.license = license; licenseImage.setUrl(license.getImageUrl()); KuneUiUtils.setQuickTip(licenseImage, license.getLongName()); } + + @Override + public void setMessage(final String message, final NotifyLevel level) { + messageErrorBar.setErrorMessage(message, level); + } } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -21,11 +21,11 @@ import org.ourproject.kune.platf.client.View; import org.ourproject.kune.platf.client.ui.noti.NotifyUser; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; -import org.ourproject.kune.workspace.client.WorkspaceMessages; import cc.kune.common.client.errors.UIException; +import cc.kune.common.client.noti.NotifyLevel; import cc.kune.core.client.errors.GroupNameInUseException; +import cc.kune.core.client.resources.CoreMessages; import cc.kune.core.client.rpcservices.AsyncCallbackSimple; import cc.kune.core.client.rpcservices.GroupServiceAsync; import cc.kune.core.client.state.HistoryTokenCallback; @@ -79,7 +79,7 @@ NotifyUser.hideProgress(); } else { stateManager.restorePreviousToken(); - NotifyUser.info(i18n.t(WorkspaceMessages.REGISTER_TO_CREATE_A_GROUP)); + NotifyUser.info(i18n.t(CoreMessages.REGISTER_TO_CREATE_A_GROUP)); } } }); @@ -131,10 +131,10 @@ public void onFailure(final Throwable caught) { if (caught instanceof GroupNameInUseException) { view.unMask(); - setMessage(i18n.t(WorkspaceMessages.NAME_IN_ALREADY_IN_USE), Level.error); + setMessage(i18n.t(CoreMessages.NAME_IN_ALREADY_IN_USE), NotifyLevel.error); } else { view.unMask(); - setMessage(i18n.t("Error creating group"), Level.error); + setMessage(i18n.t("Error creating group"), NotifyLevel.error); throw new UIException("Other kind of exception in group registration", caught); } } @@ -157,7 +157,7 @@ mustGoToPrevious = true; } - public void setMessage(final String message, final Level level) { + public void setMessage(final String message, final NotifyLevel level) { view.setMessage(message, level); } } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupView.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupView.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -20,8 +20,8 @@ package org.ourproject.kune.workspace.client.newgroup; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; +import cc.kune.common.client.noti.NotifyLevel; import cc.kune.core.shared.dto.LicenseDTO; public interface NewGroupView extends View { @@ -56,7 +56,7 @@ void setLicense(LicenseDTO license); - void setMessage(String message, Level level); + void setMessage(String message, NotifyLevel level); void show(); Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePanel.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -19,10 +19,10 @@ \*/ package org.ourproject.kune.workspace.client.nohomepage; -import org.ourproject.kune.platf.client.PlatfMessages; import org.ourproject.kune.workspace.client.skel.EntityWorkspace; import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; +import cc.kune.core.client.resources.CoreMessages; import cc.kune.core.shared.i18n.I18nTranslationService; import com.google.gwt.user.client.ui.Label; @@ -35,7 +35,7 @@ public NoHomePagePanel(final NoHomePagePresenter presenter, final WorkspaceSkeleton ws, I18nTranslationService i18n) { this.ws = ws; - noHomepageCtnLabel = new Label(i18n.t(PlatfMessages.USER_DOESN_T_HAVE_A_HOMEPAGE)); + noHomepageCtnLabel = new Label(i18n.t(CoreMessages.USER_DOESN_T_HAVE_A_HOMEPAGE)); noHomepageCtnLabel.ensureDebugId(NO_HOME_PAGE_LABEL); noHomepageCtnLabel.setStyleName("kune-Content-Main"); noHomepageCtnLabel.addStyleName("kune-Margin-7-trbl"); Modified: 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/EntityOptions.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -21,18 +21,23 @@ import org.ourproject.kune.platf.client.View; import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialog; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; +import cc.kune.common.client.noti.NotifyLevel; + public interface EntityOptions extends AbstractTabbedDialog { + @Override public void addTab(View tab); public View getView(); + @Override public void hideMessages(); - public void setErrorMessage(String message, Level level); + @Override + public void setErrorMessage(String message, NotifyLevel level); + @Override public void show(); } Modified: 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -19,13 +19,13 @@ */ package org.ourproject.kune.workspace.client.options; -import org.ourproject.kune.platf.client.PlatfMessages; import org.ourproject.kune.platf.client.actions.ui.GuiActionDescrip; import org.ourproject.kune.platf.client.app.GroupOptionsCollection; -import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; +import cc.kune.common.client.noti.NotifyLevelImages; +import cc.kune.core.client.resources.CoreMessages; import cc.kune.core.shared.i18n.I18nTranslationService; public class GroupOptionsPanel extends AbstractTabbedDialogPanel implements GroupOptionsView { @@ -37,14 +37,16 @@ private final GroupOptionsCollection entityPreferencesGroup; public GroupOptionsPanel(final EntityOptions presenter, final EntityHeader entityHeader, - final I18nTranslationService i18n, final Images images, final GroupOptionsCollection entityOptionsGroup) { + 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(PlatfMessages.GROUP_OPTIONS_DIALOG_TITLE)); + super.setTitle(i18n.t(CoreMessages.GROUP_OPTIONS_DIALOG_TITLE)); } + @Override public void addAction(final GuiActionDescrip descriptor) { entityHeader.addAction(descriptor); } Modified: 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-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -19,12 +19,12 @@ */ package org.ourproject.kune.workspace.client.options; -import org.ourproject.kune.platf.client.PlatfMessages; import org.ourproject.kune.platf.client.app.UserOptionsCollection; -import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel; import org.ourproject.kune.workspace.client.entityheader.EntityHeader; +import cc.kune.common.client.noti.NotifyLevelImages; +import cc.kune.core.client.resources.CoreMessages; import cc.kune.core.shared.i18n.I18nTranslationService; public class UserOptionsPanel extends AbstractTabbedDialogPanel implements UserOptionsView { @@ -35,11 +35,12 @@ private final UserOptionsCollection userPreferencesGroup; public UserOptionsPanel(final EntityOptions presenter, final EntityHeader entityHeader, - final I18nTranslationService i18n, final Images images, final UserOptionsCollection userOptionsGroup) { + 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(PlatfMessages.USER_OPTIONS_DIALOG_TITLE)); + super.setTitle(i18n.t(CoreMessages.USER_OPTIONS_DIALOG_TITLE)); } @Override Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPanel.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -19,13 +19,13 @@ \*/ package org.ourproject.kune.workspace.client.options.logo; -import org.ourproject.kune.platf.client.PlatfMessages; import org.ourproject.kune.platf.client.ui.dialogs.DefaultFormUtils; import org.ourproject.kune.platf.client.ui.download.FileConstants; import org.ourproject.kune.platf.client.ui.noti.NotifyUser; import org.ourproject.kune.workspace.client.options.EntityOptionsView; import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; +import cc.kune.core.client.resources.CoreMessages; import cc.kune.core.shared.i18n.I18nTranslationService; import com.gwtext.client.core.Connection; @@ -140,7 +140,7 @@ + "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(PlatfMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE); + super.setTitle(CoreMessages.ENT_LOGO_SELECTOR_NORMAL_TITLE); doLayoutIfNeeded(); } @@ -149,7 +149,7 @@ + "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(PlatfMessages.ENT_LOGO_SELECTOR_PERSON_TITLE); + super.setTitle(CoreMessages.ENT_LOGO_SELECTOR_PERSON_TITLE); doLayoutIfNeeded(); } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/options/tools/EntityOptionsToolsConfPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -4,9 +4,9 @@ import java.util.List; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; import org.ourproject.kune.workspace.client.options.EntityOptions; +import cc.kune.common.client.noti.NotifyLevel; import cc.kune.core.client.rpcservices.GroupServiceAsync; import cc.kune.core.client.state.Session; import cc.kune.core.client.state.StateManager; @@ -19,12 +19,12 @@ public abstract class EntityOptionsToolsConfPresenter { - private EntityOptionsToolsConfView view; private final EntityOptions entityOptions; - protected final Session session; private final Provider<GroupServiceAsync> groupService; protected final I18nTranslationService i18n; + protected final Session session; protected final StateManager stateManager; + private EntityOptionsToolsConfView view; public EntityOptionsToolsConfPresenter(final Session session, final StateManager stateManager, final I18nTranslationService i18n, final EntityOptions entityOptions, @@ -36,10 +36,24 @@ this.groupService = groupService; } + protected abstract boolean applicable(); + + protected abstract Collection<ToolSimpleDTO> getAllTools(); + + protected abstract StateToken getDefContentToken(); + + protected abstract String getDefContentTooltip(); + + protected abstract List<String> getEnabledTools(); + + protected abstract StateToken getOperationToken(); + public View getView() { return view; } + protected abstract void gotoDifLocationIfNecessary(String toolName); + public void init(final EntityOptionsToolsConfView view) { this.view = view; setState(); @@ -61,20 +75,6 @@ } } - protected abstract boolean applicable(); - - protected abstract Collection<ToolSimpleDTO> getAllTools(); - - protected abstract StateToken getDefContentToken(); - - protected abstract String getDefContentTooltip(); - - protected abstract List<String> getEnabledTools(); - - protected abstract StateToken getOperationToken(); - - protected abstract void gotoDifLocationIfNecessary(String toolName); - protected void reset() { view.clear(); entityOptions.hideMessages(); @@ -104,11 +104,13 @@ protected void setToolCheckedInServer(final boolean checked, final String toolName) { groupService.get().setToolEnabled(session.getUserHash(), getOperationToken(), toolName, checked, new AsyncCallback<Void>() { + @Override public void onFailure(final Throwable caught) { view.setChecked(toolName, !checked); - entityOptions.setErrorMessage(i18n.t("Error configuring the tool"), Level.error); + entityOptions.setErrorMessage(i18n.t("Error configuring the tool"), NotifyLevel.error); } + @Override public void onSuccess(final Void result) { stateManager.reload(); } Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/Register.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/Register.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/Register.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,29 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - - -public interface Register { - - void doRegister(); - - void hide(); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterForm.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,284 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - \*/ -package org.ourproject.kune.workspace.client.signin; - -import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm; -import org.ourproject.kune.workspace.client.WorkspaceMessages; - -import cc.kune.core.client.state.Session; -import cc.kune.core.shared.i18n.I18nTranslationService; - -import com.gwtext.client.data.SimpleStore; -import com.gwtext.client.data.Store; -import com.gwtext.client.widgets.form.ComboBox; -import com.gwtext.client.widgets.form.Field; -import com.gwtext.client.widgets.form.FieldSet; -import com.gwtext.client.widgets.form.Radio; -import com.gwtext.client.widgets.form.TextField; -import com.gwtext.client.widgets.form.VType; -import com.gwtext.client.widgets.form.ValidationException; -import com.gwtext.client.widgets.form.Validator; - -public class RegisterForm extends DefaultForm { - - public static final String NICK_FIELD = "k-urf-nick-f"; - public static final String EMAIL_FIELD = "k-urf-email-f"; - public static final String LONGNAME_FIELD = "k-urf-long_name-f"; - public static final String PASSWORD_FIELD = "k-urf-password-f"; - public static final String PASSWORD_FIELD_DUP = "k-urf-passwordDup-f"; - public static final String LANG_FIELD = "k-urf-lang-f"; - public static final String COUNTRY_FIELD = "k-urf-country-f"; - public static final String TIMEZONE_FIELD = "k-urf-timezone-f"; - public static final String WANNAPERSONALHOMEPAGE_ID = "k-urf-wphp-id"; - public static final String NOPERSONALHOMEPAGE_ID = "k-urf-nphp-id"; - public static final String WANTHOMEPAGE_FIELD = "k-urf-wphp-f"; - - private final TextField shortNameRegField; - private final TextField longNameRegField; - private final TextField passwdRegField; - private final TextField passwdRegFieldDup; - private final TextField emailRegField; - private final ComboBox languageCombo; - private final ComboBox countryCombo; - private final ComboBox timezoneCombo; - private final Radio wantPersonalHomePage; - private final Radio noPersonalHomePage; - private final I18nTranslationService i18n; - - public RegisterForm(final I18nTranslationService i18n, final Session session) { - this.i18n = i18n; - super.addStyleName("kune-Margin-Large-l"); - - shortNameRegField = new TextField(); - shortNameRegField.setTabIndex(1); - shortNameRegField.setFieldLabel(i18n.t("Nickname")); - shortNameRegField.setName(NICK_FIELD); - shortNameRegField.setWidth(DEF_SMALL_FIELD_WIDTH); - shortNameRegField.setAllowBlank(false); - shortNameRegField.setMinLength(3); - shortNameRegField.setMaxLength(15); - shortNameRegField.setRegex("^[a-z0-9_\\-]+$"); - shortNameRegField.setMinLengthText(i18n.t(WorkspaceMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); - shortNameRegField.setMaxLengthText(i18n.t(WorkspaceMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); - shortNameRegField.setRegexText(i18n.t(WorkspaceMessages.FIELD_MUST_BE_BETWEEN_3_AND_15)); - shortNameRegField.setValidationEvent(false); - add(shortNameRegField); - - longNameRegField = new TextField(); - longNameRegField.setTabIndex(2); - longNameRegField.setFieldLabel(i18n.t("Full Name")); - longNameRegField.setName(LONGNAME_FIELD); - longNameRegField.setWidth(DEF_FIELD_WIDTH); - longNameRegField.setAllowBlank(false); - longNameRegField.setMinLength(3); - longNameRegField.setMaxLength(50); - longNameRegField.setValidationEvent(false); - longNameRegField.setId(LONGNAME_FIELD); - add(longNameRegField); - - passwdRegField = new TextField(); - passwdRegField.setTabIndex(3); - passwdRegField.setFieldLabel(i18n.t("Password")); - passwdRegField.setName(PASSWORD_FIELD); - passwdRegField.setPassword(true); - passwdRegField.setAllowBlank(false); - passwdRegField.setMaxLength(40); - passwdRegField.setWidth(DEF_MEDIUM_FIELD_WIDTH); - passwdRegField.setValidationEvent(false); - passwdRegField.setId(PASSWORD_FIELD); - add(passwdRegField); - - passwdRegFieldDup = new TextField(); - passwdRegFieldDup.setTabIndex(4); - passwdRegFieldDup.setFieldLabel(i18n.t("Retype password")); - passwdRegFieldDup.setName(PASSWORD_FIELD_DUP); - passwdRegFieldDup.setPassword(true); - passwdRegFieldDup.setAllowBlank(false); - passwdRegFieldDup.setMinLength(6); - passwdRegFieldDup.setMaxLength(40); - passwdRegFieldDup.setWidth(DEF_MEDIUM_FIELD_WIDTH); - passwdRegFieldDup.setInvalidText(i18n.t("Passwords do not match")); - passwdRegFieldDup.setValidator(new Validator() { - public boolean validate(final String value) throws ValidationException { - return passwdRegField.getValueAsString().equals(passwdRegFieldDup.getValueAsString()); - } - }); - passwdRegFieldDup.setValidationEvent(false); - passwdRegFieldDup.setId(PASSWORD_FIELD_DUP); - add(passwdRegFieldDup); - - emailRegField = new TextField(); - emailRegField.setTabIndex(5); - emailRegField.setFieldLabel(i18n.t("Email")); - emailRegField.setName(EMAIL_FIELD); - emailRegField.setVtype(VType.EMAIL); - emailRegField.setWidth(DEF_MEDIUM_FIELD_WIDTH); - emailRegField.setAllowBlank(false); - emailRegField.setValidationEvent(false); - emailRegField.setId(EMAIL_FIELD); - add(emailRegField); - - final Store langStore = new SimpleStore(new String[] { "abbr", "language" }, session.getLanguagesArray()); - langStore.load(); - - languageCombo = new ComboBox(); - languageCombo.setTabIndex(6); - languageCombo.setLazyRender(true); - languageCombo.setName(LANG_FIELD); - languageCombo.setMinChars(1); - languageCombo.setFieldLabel(i18n.t("Language")); - languageCombo.setStore(langStore); - languageCombo.setDisplayField("language"); - languageCombo.setMode(ComboBox.LOCAL); - languageCombo.setTriggerAction(ComboBox.ALL); - languageCombo.setEmptyText(i18n.t("Enter language")); - languageCombo.setLoadingText(i18n.t("Searching...")); - languageCombo.setTypeAhead(true); - languageCombo.setTypeAheadDelay(1000); - languageCombo.setSelectOnFocus(false); - languageCombo.setWidth(DEF_MEDIUM_FIELD_WIDTH); - languageCombo.setAllowBlank(false); - languageCombo.setValueField("abbr"); - languageCombo.setValue(session.getCurrentLanguage().getCode()); - languageCombo.setPageSize(6); - languageCombo.setForceSelection(true); - languageCombo.setValidationEvent(false); - // languageCombo.setId(LANG_FIELD); - add(languageCombo); - - final Store countryStore = new SimpleStore(new String[] { "abbr", "country" }, session.getCountriesArray()); - countryStore.load(); - - countryCombo = new ComboBox(); - countryCombo.setTabIndex(7); - countryCombo.setLazyRender(true); - countryCombo.setName(COUNTRY_FIELD); - countryCombo.setMinChars(1); - countryCombo.setFieldLabel(i18n.t("Country")); - countryCombo.setStore(countryStore); - countryCombo.setDisplayField("country"); - countryCombo.setMode(ComboBox.LOCAL); - countryCombo.setTriggerAction(ComboBox.ALL); - countryCombo.setEmptyText(i18n.t("Enter your country")); - countryCombo.setLoadingText(i18n.t("Searching...")); - countryCombo.setTypeAhead(true); - countryCombo.setTypeAheadDelay(1000); - countryCombo.setSelectOnFocus(false); - countryCombo.setWidth(DEF_MEDIUM_FIELD_WIDTH); - countryCombo.setAllowBlank(false); - countryCombo.setValueField("abbr"); - countryCombo.setPageSize(7); - countryCombo.setForceSelection(true); - countryCombo.setValidationEvent(false); - // countryCombo.setId(COUNTRY_FIELD); - add(countryCombo); - - final Store timezoneStore = new SimpleStore(new String[] { "id" }, session.getTimezones()); - timezoneStore.load(); - - timezoneCombo = new ComboBox(); - timezoneCombo.setTabIndex(8); - timezoneCombo.setLazyRender(true); - timezoneCombo.setName(TIMEZONE_FIELD); - timezoneCombo.setMinChars(1); - timezoneCombo.setFieldLabel(i18n.t("Timezone")); - timezoneCombo.setStore(timezoneStore); - timezoneCombo.setDisplayField("id"); - timezoneCombo.setMode(ComboBox.LOCAL); - timezoneCombo.setTriggerAction(ComboBox.ALL); - timezoneCombo.setEmptyText(i18n.t("Enter your timezone")); - timezoneCombo.setLoadingText(i18n.t("Searching...")); - timezoneCombo.setTypeAhead(true); - timezoneCombo.setTypeAheadDelay(1000); - timezoneCombo.setSelectOnFocus(false); - timezoneCombo.setWidth(DEF_MEDIUM_FIELD_WIDTH); - timezoneCombo.setAllowBlank(false); - timezoneCombo.setValueField("id"); - timezoneCombo.setPageSize(7); - timezoneCombo.setForceSelection(true); - timezoneCombo.setValidationEvent(false); - // timezoneCombo.setId(TIMEZONE_FIELD); - add(timezoneCombo); - - final FieldSet personalSpaceFieldSet = new FieldSet(i18n.t("Do you want a personal homepage?")); - personalSpaceFieldSet.setWidth(DEF_FIELD_WIDTH + DEF_FIELD_LABEL_WITH + 65); - wantPersonalHomePage = new Radio(); - wantPersonalHomePage.setTabIndex(9); - noPersonalHomePage = new Radio(); - noPersonalHomePage.setTabIndex(10); - personalSpaceFieldSet.setCollapsible(false); - createRadio(personalSpaceFieldSet, wantPersonalHomePage, - i18n.t("Yes, I want a homepage for publish my contents."), WANNAPERSONALHOMEPAGE_ID); - wantPersonalHomePage.setChecked(true); - createRadio(personalSpaceFieldSet, noPersonalHomePage, - i18n.t("No, I do not want. Maybe in the future i will."), NOPERSONALHOMEPAGE_ID); - add(personalSpaceFieldSet); - } - - public String getCountry() { - return countryCombo.getValueAsString(); - } - - public String getEmail() { - return emailRegField.getValueAsString(); - } - - public String getLanguage() { - return languageCombo.getValueAsString(); - } - - public String getLongName() { - return longNameRegField.getValueAsString(); - } - - public String getRegisterPassword() { - return passwdRegField.getValueAsString(); - } - - public String getRegisterPasswordDup() { - return passwdRegFieldDup.getValueAsString(); - } - - public String getShortName() { - return shortNameRegField.getValueAsString(); - } - - public Field getShortNameField() { - return shortNameRegField; - } - - public String getTimezone() { - return timezoneCombo.getValueAsString(); - } - - public boolean wantPersonalHomepage() { - return wantPersonalHomePage.getValue(); - } - - private void createRadio(final FieldSet fieldSet, final Radio radio, final String radioLabel, final String radioId) { - radio.setName(WANTHOMEPAGE_FIELD); - radio.setBoxLabel(i18n.t(radioLabel)); - radio.setAutoCreate(true); - radio.setHideLabel(true); - radio.setId(radioId); - fieldSet.add(radio); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,159 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - -import org.ourproject.kune.platf.client.PlatfMessages; -import org.ourproject.kune.platf.client.services.Images; -import org.ourproject.kune.platf.client.ui.KuneUiUtils; -import org.ourproject.kune.platf.client.ui.dialogs.InfoDialog; -import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; - -import cc.kune.core.client.state.Session; -import cc.kune.core.shared.i18n.I18nTranslationService; - -import com.calclab.suco.client.events.Listener0; -import com.google.gwt.core.client.Scheduler; -import com.google.gwt.core.client.Scheduler.ScheduledCommand; -import com.gwtext.client.widgets.Component; -import com.gwtext.client.widgets.Panel; -import com.gwtext.client.widgets.event.WindowListenerAdapter; - -public class RegisterPanel extends SignInAbstractPanel implements RegisterView { - - public static final String ERRMSG = "k-regp-errmsg"; - - private static RegisterForm registerForm; - - public static final String CANCEL_BUTTON_ID = "k-regp-cb"; - public static final String REGISTER_BUTTON_ID = "k-regp-rb"; - public static final String REGISTER_FORM = "k-regp-p"; - public static final String WELCOME_OK_BUTTON = "k-regp-okbt"; - public static final String WELCOME_DIALOG = "k-regp-wdiag"; - public static final String REGISTER_DIALOG = "k-regp-dialog"; - - public RegisterPanel(final RegisterPresenter presenter, final I18nTranslationService i18n, - final WorkspaceSkeleton ws, final Session session, final Images images) { - super(REGISTER_DIALOG, i18n, i18n.t(PlatfMessages.REGISTER_TITLE), true, true, 400, 420, "", - i18n.t(PlatfMessages.REGISTER_TITLE), REGISTER_BUTTON_ID, i18n.tWithNT("Cancel", "used in button"), - CANCEL_BUTTON_ID, new Listener0() { - public void onEvent() { - registerForm.validate(); - if (registerForm.isValid()) { - presenter.onFormRegister(); - } - } - }, new Listener0() { - public void onEvent() { - presenter.onCancel(); - } - }, images, ERRMSG, 11); - super.addListener(new WindowListenerAdapter() { - @Override - public void onActivate(final Panel panel) { - KuneUiUtils.focusOnField(registerForm.getShortNameField()); - } - - @Override - public void onHide(final Component component) { - presenter.onClose(); - } - - @Override - public void onShow(final Component component) { - KuneUiUtils.focusOnField(registerForm.getShortNameField()); - } - }); - - final Panel panel = new Panel(); - panel.setBorder(false); - registerForm = new RegisterForm(i18n, session); - registerForm.setWidth(370); - panel.add(registerForm.getFormPanel()); - add(panel); - panel.setId(REGISTER_FORM); - } - - public String getCountry() { - return registerForm.getCountry(); - } - - public String getEmail() { - return registerForm.getEmail(); - } - - public String getLanguage() { - return registerForm.getLanguage(); - } - - public String getLongName() { - return registerForm.getLongName(); - } - - public String getRegisterPassword() { - return registerForm.getRegisterPassword(); - } - - public String getRegisterPasswordDup() { - return registerForm.getRegisterPasswordDup(); - } - - public String getShortName() { - return registerForm.getShortName(); - } - - public String getTimezone() { - return registerForm.getTimezone(); - } - - public boolean isRegisterFormValid() { - return registerForm.isValid(); - } - - public void reset() { - Scheduler.get().scheduleDeferred(new ScheduledCommand() { - public void execute() { - registerForm.reset(); - } - }); - } - - public void showWelcolmeDialog() { - final InfoDialog welcomeDialog = new InfoDialog(WELCOME_DIALOG, i18n.t("Welcome"), - i18n.t("Thanks for registering"), - i18n.t("Now you can participate more actively in this site with other people and groups. " - + "You can also use your personal space to publish contents. " - + "Your email is not verified, please follow the instructions you will receive by email."), - i18n.t("Ok"), WELCOME_OK_BUTTON, true, true, 380, 210); - welcomeDialog.show(); - } - - public void showWelcolmeDialogNoHomepage() { - final InfoDialog welcomeDialog = new InfoDialog(WELCOME_DIALOG, i18n.t("Welcome"), - i18n.t("Thanks for registering"), - i18n.t("Now you can participate more actively in this site with other people and groups. " - + "Your email is not verified, please follow the instructions you will receive by email."), - i18n.t("Ok"), WELCOME_OK_BUTTON, true, true, 380, 210); - welcomeDialog.show(); - } - - public boolean wantPersonalHomepage() { - return registerForm.wantPersonalHomepage(); - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,125 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - -import org.ourproject.kune.platf.client.PlatfMessages; -import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; - -import cc.kune.common.client.errors.UIException; -import cc.kune.core.client.errors.EmailAddressInUseException; -import cc.kune.core.client.errors.GroupNameInUseException; -import cc.kune.core.client.i18n.I18nUITranslationService; -import cc.kune.core.client.rpcservices.UserServiceAsync; -import cc.kune.core.client.state.Session; -import cc.kune.core.client.state.StateManager; -import cc.kune.core.shared.dto.I18nCountryDTO; -import cc.kune.core.shared.dto.I18nLanguageDTO; -import cc.kune.core.shared.dto.SubscriptionMode; -import cc.kune.core.shared.dto.TimeZoneDTO; -import cc.kune.core.shared.dto.UserDTO; -import cc.kune.core.shared.dto.UserInfoDTO; - -import com.calclab.suco.client.ioc.Provider; -import com.google.gwt.user.client.rpc.AsyncCallback; - -public class RegisterPresenter extends SignInAbstractPresenter implements Register { - - private RegisterView view; - private final Provider<UserServiceAsync> userServiceProvider; - private final Provider<SignIn> signInProvider; - - public RegisterPresenter(final Session session, final StateManager stateManager, - final I18nUITranslationService i18n, final Provider<UserServiceAsync> userServiceProvider, - final Provider<SignIn> signInProvider) { - super(session, stateManager, i18n); - this.userServiceProvider = userServiceProvider; - this.signInProvider = signInProvider; - } - - public void doRegister() { - signInProvider.get().hide(); - if (!session.isLogged()) { - NotifyUser.showProgressProcessing(); - view.show(); - view.center(); - NotifyUser.hideProgress(); - } else { - stateManager.restorePreviousToken(); - } - } - - public View getView() { - return view; - } - - public void init(final RegisterView view) { - this.view = view; - super.view = view; - } - - public void onFormRegister() { - if (view.isRegisterFormValid()) { - view.maskProcessing(); - - final I18nLanguageDTO language = new I18nLanguageDTO(); - language.setCode(view.getLanguage()); - - final I18nCountryDTO country = new I18nCountryDTO(); - country.setCode(view.getCountry()); - - final TimeZoneDTO timezone = new TimeZoneDTO(); - timezone.setId(view.getTimezone()); - - final boolean wantHomepage = view.wantPersonalHomepage(); - - final UserDTO user = new UserDTO(view.getLongName(), view.getShortName(), view.getRegisterPassword(), - view.getEmail(), language, country, timezone, null, true, SubscriptionMode.manual, "blue"); - final AsyncCallback<UserInfoDTO> callback = new AsyncCallback<UserInfoDTO>() { - public void onFailure(final Throwable caught) { - view.unMask(); - if (caught instanceof EmailAddressInUseException) { - view.setErrorMessage(i18n.t(PlatfMessages.EMAIL_IN_USE), Level.error); - } else if (caught instanceof GroupNameInUseException) { - view.setErrorMessage(i18n.t(PlatfMessages.NAME_IN_USE), Level.error); - } else { - view.setErrorMessage(i18n.t("Error during registration."), Level.error); - throw new UIException("Other kind of exception in user registration", caught); - - } - } - - public void onSuccess(final UserInfoDTO userInfoDTO) { - onSignIn(userInfoDTO); - stateManager.gotoToken(userInfoDTO.getHomePage()); - view.hide(); - view.unMask(); - if (wantHomepage) { - view.showWelcolmeDialog(); - } else { - view.showWelcolmeDialogNoHomepage(); - } - } - }; - userServiceProvider.get().createUser(user, wantHomepage, callback); - } - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterView.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/RegisterView.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,48 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - -public interface RegisterView extends SignInAbstractView { - - String getCountry(); - - String getEmail(); - - String getLanguage(); - - String getLongName(); - - String getRegisterPassword(); - - String getRegisterPasswordDup(); - - String getShortName(); - - String getTimezone(); - - boolean isRegisterFormValid(); - - void showWelcolmeDialog(); - - void showWelcolmeDialogNoHomepage(); - - boolean wantPersonalHomepage(); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignIn.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,29 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - - -public interface SignIn { - - void doSignIn(); - - void hide(); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,90 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - -import java.util.Date; - -import org.ourproject.kune.platf.client.services.Images; -import org.ourproject.kune.platf.client.ui.dialogs.ExtendedDialog; -import org.ourproject.kune.platf.client.ui.dialogs.MessageToolbar; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; - -import cc.kune.core.client.state.Session; -import cc.kune.core.shared.i18n.I18nTranslationService; - -import com.calclab.suco.client.events.Listener0; -import com.google.gwt.core.client.GWT; -import com.google.gwt.user.client.Cookies; -import com.gwtext.client.core.Ext; - -public abstract class SignInAbstractPanel extends ExtendedDialog { - - protected final I18nTranslationService i18n; - private final MessageToolbar messageErrorBar; - - public SignInAbstractPanel(String dialogId, I18nTranslationService i18n, String title, boolean modal, - boolean autoscroll, int width, int heigth, String icon, String firstButtonTitle, String cancelButtonTitle, - Listener0 onFirstButtonClick, Listener0 onCancelButtonClick, Images images, String errorLabelId, - int tabIndexStart) { - this(dialogId, i18n, title, modal, autoscroll, width, heigth, icon, firstButtonTitle, Ext.generateId(), - cancelButtonTitle, Ext.generateId(), onFirstButtonClick, onCancelButtonClick, images, errorLabelId, - tabIndexStart); - } - - public SignInAbstractPanel(String dialogId, I18nTranslationService i18n, final String title, final boolean modal, - final boolean autoscroll, final int width, final int heigth, final String icon, - final String firstButtonTitle, final String firstButtonId, final String cancelButtonTitle, - final String cancelButtonId, final Listener0 onFirstButtonClick, final Listener0 onCancelButtonClick, - Images images, String errorLabelId, int tabIndexStart) { - super(dialogId, title, modal, autoscroll, width, heigth, icon, firstButtonTitle, firstButtonId, - cancelButtonTitle, cancelButtonId, onFirstButtonClick, onCancelButtonClick, tabIndexStart); - this.i18n = i18n; - - messageErrorBar = new MessageToolbar(images, errorLabelId); - super.setBottomToolbar(messageErrorBar.getToolbar()); - } - - @Override - public void hide() { - if (super.isVisible()) { - super.hide(); - } - } - - public void hideMessages() { - messageErrorBar.hideErrorMessage(); - } - - public void maskProcessing() { - mask(i18n.t("Processing")); - } - - public void setCookie(final String userHash) { - // http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ - final long duration = Session.SESSION_DURATION; - final Date expires = new Date(System.currentTimeMillis() + duration); - Cookies.setCookie(Session.USERHASH, userHash, expires, null, "/", false); - GWT.log("Received hash: " + userHash, null); - } - - public void setErrorMessage(final String message, final Level level) { - messageErrorBar.setErrorMessage(message, level); - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,73 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - - -import cc.kune.core.client.i18n.I18nUITranslationService; -import cc.kune.core.client.state.Session; -import cc.kune.core.client.state.StateManager; -import cc.kune.core.shared.dto.I18nLanguageDTO; -import cc.kune.core.shared.dto.UserInfoDTO; - -public class SignInAbstractPresenter { - - protected final Session session; - protected final StateManager stateManager; - protected final I18nUITranslationService i18n; - protected SignInAbstractView view; - - public SignInAbstractPresenter(Session session, StateManager stateManager, I18nUITranslationService i18n) { - this.session = session; - this.stateManager = stateManager; - this.i18n = i18n; - } - - public void hide() { - view.hide(); - } - - public void onCancel() { - view.reset(); - view.hideMessages(); - view.hide(); - stateManager.restorePreviousToken(); - } - - public void onClose() { - view.reset(); - view.hideMessages(); - if (!session.isLogged()) { - stateManager.restorePreviousToken(); - } - } - - protected void onSignIn(final UserInfoDTO userInfoDTO) { - final String userHash = userInfoDTO.getUserHash(); - view.setCookie(userHash); - view.reset(); - session.setUserHash(userHash); - session.setCurrentUserInfo(userInfoDTO); - final I18nLanguageDTO language = userInfoDTO.getLanguage(); - i18n.changeCurrentLanguage(language.getCode()); - session.setCurrentLanguage(language); - stateManager.restorePreviousToken(); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractView.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInAbstractView.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,47 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - -import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; - -public interface SignInAbstractView extends View { - - void center(); - - void hide(); - - void hideMessages(); - - void mask(final String message); - - void maskProcessing(); - - void reset(); - - void setCookie(String userHash); - - void setErrorMessage(final String message, final Level level); - - void show(); - - void unMask(); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInForm.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInForm.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInForm.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,87 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - \*/ -package org.ourproject.kune.workspace.client.signin; - -import org.ourproject.kune.platf.client.ui.dialogs.DefaultForm; - -import cc.kune.core.shared.i18n.I18nTranslationService; - -import com.gwtext.client.core.EventObject; -import com.gwtext.client.widgets.form.Field; -import com.gwtext.client.widgets.form.TextField; -import com.gwtext.client.widgets.form.event.FieldListenerAdapter; - -public class SignInForm extends DefaultForm { - public static final String NICKOREMAIL_FIELD = "kune-sif-nkf"; - public static final String PASSWORD_FIELD = "kune-sif-psf"; - - private final TextField loginNickOrEmailField; - private final TextField loginPassField; - - public SignInForm(final SignInPresenter presenter, final I18nTranslationService i18n) { - super.addStyleName("kune-Margin-Large-trbl"); - - loginNickOrEmailField = new TextField(); - loginNickOrEmailField.setFieldLabel(i18n.t("Nickname or email")); - loginNickOrEmailField.setName(NICKOREMAIL_FIELD); - loginNickOrEmailField.setWidth(DEF_SMALL_FIELD_WIDTH); - loginNickOrEmailField.setAllowBlank(false); - loginNickOrEmailField.setValidationEvent(false); - loginNickOrEmailField.setId(NICKOREMAIL_FIELD); - loginNickOrEmailField.setTabIndex(100); - super.add(loginNickOrEmailField); - - loginPassField = new TextField(); - loginPassField.setFieldLabel(i18n.t("Password")); - loginPassField.setName(PASSWORD_FIELD); - loginPassField.setWidth(DEF_MEDIUM_FIELD_WIDTH); - loginPassField.setPassword(true); - loginPassField.setAllowBlank(false); - loginPassField.setValidationEvent(false); - loginPassField.setId(PASSWORD_FIELD); - loginPassField.setTabIndex(101); - loginPassField.addListener(new FieldListenerAdapter() { - @Override - public void onSpecialKey(final Field field, final EventObject e) { - if (e.getKey() == 13) { - presenter.onFormSignIn(); - } - } - }); - - super.add(loginPassField); - } - - public void focusLogin() { - loginNickOrEmailField.focus(); - } - - public String getLoginPassword() { - return loginPassField.getValueAsString(); - } - - public String getNickOrEmail() { - return loginNickOrEmailField.getValueAsString(); - } - - public Field getNickOrEmailField() { - return loginNickOrEmailField; - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,134 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - -import org.ourproject.kune.platf.client.PlatfMessages; -import org.ourproject.kune.platf.client.services.Images; -import org.ourproject.kune.platf.client.ui.KuneUiUtils; -import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; - -import cc.kune.core.shared.i18n.I18nTranslationService; - -import com.calclab.suco.client.events.Listener0; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; -import com.gwtext.client.widgets.Component; -import com.gwtext.client.widgets.Panel; -import com.gwtext.client.widgets.event.WindowListenerAdapter; -import com.gwtext.client.widgets.form.Field; - -public class SignInPanel extends SignInAbstractPanel implements SignInView { - - public static final String ERROR_MSG = "k-sigp-errmsg"; - public static final String CANCEL_BUTTON_ID = "k-signinp-cb"; - public static final String SIGN_IN_BUTTON_ID = "k-signinp-sib"; - public static final String CREATE_ONE = "k-signinp-create"; - public static final String SIGNIN_DIALOG = "k-signinp-dialog"; - private final SignInForm signInForm; - private final SignInPresenter presenter; - - public SignInPanel(final SignInPresenter presenter, final I18nTranslationService i18n, final WorkspaceSkeleton ws, - final Images images) { - super(SIGNIN_DIALOG, i18n, i18n.t(PlatfMessages.SIGN_IN_TITLE), true, true, 340, 240, "", - i18n.t(PlatfMessages.SIGN_IN_TITLE), SIGN_IN_BUTTON_ID, i18n.tWithNT("Cancel", "used in button"), - CANCEL_BUTTON_ID, new Listener0() { - public void onEvent() { - presenter.onFormSignIn(); - } - }, new Listener0() { - public void onEvent() { - presenter.onCancel(); - } - }, images, ERROR_MSG, 102); - this.presenter = presenter; - - super.addListener(new WindowListenerAdapter() { - @Override - public void onHide(final Component component) { - presenter.onClose(); - } - - @Override - public void onShow(final Component component) { - KuneUiUtils.focusOnField(getNickname()); - } - }); - - final Panel panel = new Panel(); - panel.setBorder(false); - signInForm = new SignInForm(presenter, i18n); - signInForm.setWidth(310); - panel.add(signInForm.getFormPanel()); - panel.add(createNoAccountRegister()); - add(panel); - } - - public void focusOnNickname() { - signInForm.focusLogin(); - } - - public String getLoginPassword() { - return signInForm.getLoginPassword(); - } - - public String getNickOrEmail() { - return signInForm.getNickOrEmail(); - } - - public boolean isSignInFormValid() { - return signInForm.isValid(); - } - - public void reset() { - signInForm.reset(); - } - - public void validate() { - signInForm.validate(); - } - - private Panel createNoAccountRegister() { - final Panel noAccRegisterPanel = new Panel(); - noAccRegisterPanel.setBorder(false); - noAccRegisterPanel.setMargins(0, 20, 0, 0); - final HorizontalPanel hpanel = new HorizontalPanel(); - final Label dontHaveAccount = new Label(i18n.t("Don't you have an account?")); - final Label registerLabel = new Label(i18n.t("Create one.")); - registerLabel.ensureDebugId(CREATE_ONE); - registerLabel.addClickHandler(new ClickHandler() { - public void onClick(final ClickEvent event) { - presenter.onAccountRegister(); - } - }); - registerLabel.addStyleName("kune-Margin-Medium-l"); - registerLabel.addStyleName("kune-link"); - hpanel.add(dontHaveAccount); - hpanel.add(registerLabel); - noAccRegisterPanel.add(hpanel); - return noAccRegisterPanel; - } - - private Field getNickname() { - return signInForm.getNickOrEmailField(); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,119 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - -import org.ourproject.kune.platf.client.PlatfMessages; -import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser; -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; - -import cc.kune.core.client.errors.UserAuthException; -import cc.kune.core.client.i18n.I18nUITranslationService; -import cc.kune.core.client.rpcservices.UserServiceAsync; -import cc.kune.core.client.state.Session; -import cc.kune.core.client.state.SiteCommonTokens; -import cc.kune.core.client.state.StateManager; -import cc.kune.core.shared.dto.UserDTO; -import cc.kune.core.shared.dto.UserInfoDTO; - -import com.allen_sauer.gwt.log.client.Log; -import com.calclab.suco.client.ioc.Provider; -import com.google.gwt.user.client.rpc.AsyncCallback; - -public class SignInPresenter extends SignInAbstractPresenter implements SignIn { - - private final Provider<Register> registerProvider; - private final Provider<UserServiceAsync> userService; - private SignInView view; - - public SignInPresenter(final Session session, final StateManager stateManager, final I18nUITranslationService i18n, - final Provider<UserServiceAsync> userService, final Provider<Register> registerProvider) { - super(session, stateManager, i18n); - this.userService = userService; - this.registerProvider = registerProvider; - } - - @Override - public void doSignIn() { - registerProvider.get().hide(); - if (session.isLogged()) { - stateManager.restorePreviousToken(); - } else { - NotifyUser.showProgressProcessing(); - view.show(); - view.center(); - NotifyUser.hideProgress(); - view.focusOnNickname(); - } - } - - public View getView() { - return view; - } - - public void init(final SignInView view) { - this.view = view; - super.view = view; - } - - public void onAccountRegister() { - view.reset(); - view.hideMessages(); - view.hide(); - stateManager.gotoToken(SiteCommonTokens.REGISTER); - } - - public void onFormSignIn() { - view.validate(); - if (view.isSignInFormValid()) { - view.maskProcessing(); - - final String nickOrEmail = view.getNickOrEmail(); - final String passwd = view.getLoginPassword(); - - final UserDTO user = new UserDTO(); - user.setShortName(nickOrEmail); - user.setPassword(passwd); - - final AsyncCallback<UserInfoDTO> callback = new AsyncCallback<UserInfoDTO>() { - @Override - public void onFailure(final Throwable caught) { - view.unMask(); - NotifyUser.hideProgress(); - if (caught instanceof UserAuthException) { - view.setErrorMessage(i18n.t(PlatfMessages.INCORRECT_NICKNAME_EMAIL_OR_PASSWORD), Level.error); - } else { - view.setErrorMessage("Error in login", Level.error); - Log.error("Other kind of exception in SignInPresenter/doLogin"); - } - } - - @Override - public void onSuccess(final UserInfoDTO userInfoDTO) { - onSignIn(userInfoDTO); - stateManager.restorePreviousToken(); - view.hide(); - view.unMask(); - } - }; - userService.get().login(user.getShortName(), user.getPassword(), callback); - } - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/signin/SignInView.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -1,56 +0,0 @@ -/* - * - * Copyright (C) 2007-2009 The kune development team (see CREDITS for details) - * This file is part of kune. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.ourproject.kune.workspace.client.signin; - -import org.ourproject.kune.platf.client.ui.noti.NotifyUser.Level; - -public interface SignInView extends SignInAbstractView { - - void center(); - - void focusOnNickname(); - - String getLoginPassword(); - - String getNickOrEmail(); - - void hide(); - - void hideMessages(); - - boolean isSignInFormValid(); - - void mask(final String message); - - void maskProcessing(); - - void reset(); - - void setCookie(final String userHash); - - void setErrorMessage(final String message, final Level level); - - void show(); - - void unMask(); - - void validate(); - -} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLink.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLink.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLink.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -19,7 +19,7 @@ \*/ package org.ourproject.kune.workspace.client.sitebar.sitesign; -import cc.kune.core.client.actions.BeforeActionListener; +import cc.kune.common.client.actions.BeforeActionListener; public interface SiteSignOutLink { Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitesign/SiteSignOutLinkPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -24,9 +24,9 @@ import org.ourproject.kune.platf.client.View; import org.ourproject.kune.platf.client.ui.noti.NotifyUser; +import cc.kune.common.client.actions.BeforeActionCollection; +import cc.kune.common.client.actions.BeforeActionListener; import cc.kune.common.client.errors.UIException; -import cc.kune.core.client.actions.BeforeActionCollection; -import cc.kune.core.client.actions.BeforeActionListener; import cc.kune.core.client.errors.ErrorHandler; import cc.kune.core.client.errors.SessionExpiredException; import cc.kune.core.client.errors.UserMustBeLoggedException; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/siteusermenu/SiteUserOptionsPresenter.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -21,7 +21,6 @@ import java.util.List; -import org.ourproject.kune.platf.client.PlatfMessages; import org.ourproject.kune.platf.client.View; import org.ourproject.kune.platf.client.actions.AbstractExtendedAction; import org.ourproject.kune.platf.client.actions.Action; @@ -34,6 +33,7 @@ import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils; import org.ourproject.kune.platf.client.ui.img.ImgResources; +import cc.kune.core.client.resources.CoreMessages; import cc.kune.core.client.state.Session; import cc.kune.core.client.state.StateManager; import cc.kune.core.shared.dto.GroupDTO; @@ -116,7 +116,7 @@ goUserHome(); } }; - userHomeAction.putValue(Action.NAME, i18n.t(PlatfMessages.YOUR_HOMEPAGE)); + userHomeAction.putValue(Action.NAME, i18n.t(CoreMessages.YOUR_HOMEPAGE)); userHomeAction.putValue(Action.SMALL_ICON, img.groupHome()); final MenuItemDescriptor item = new MenuItemDescriptor(userHomeAction); item.setPosition(0); Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/BuddiesSummaryPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -19,7 +19,6 @@ \*/ package org.ourproject.kune.workspace.client.socialnet; -import org.ourproject.kune.platf.client.PlatfMessages; import org.ourproject.kune.platf.client.actions.ActionItem; import org.ourproject.kune.platf.client.actions.ActionItemCollection; import org.ourproject.kune.platf.client.actions.ActionManager; @@ -31,6 +30,7 @@ import org.ourproject.kune.workspace.client.skel.SummaryPanel; import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; +import cc.kune.core.client.resources.CoreMessages; import cc.kune.core.shared.dto.UserSimpleDTO; import cc.kune.core.shared.i18n.I18nTranslationService; @@ -72,7 +72,7 @@ vp.add((Widget) toolbar); super.add(vp); addInSummary(); - noBuddiesPublic = new Label(i18n.t(PlatfMessages.BUDDIES_NOT_PUBLIC)); + noBuddiesPublic = new Label(i18n.t(CoreMessages.BUDDIES_NOT_PUBLIC)); noBuddiesPublic.addStyleName("kune-Margin-7-trbl"); noBuddiesPublic.addStyleName("k-text-gray"); } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -19,7 +19,6 @@ \*/ package org.ourproject.kune.workspace.client.socialnet; -import org.ourproject.kune.platf.client.PlatfMessages; import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel; import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarView; import org.ourproject.kune.platf.client.ui.AbstractToolbar; @@ -30,6 +29,7 @@ import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton; import cc.kune.core.client.i18n.I18nUITranslationService; +import cc.kune.core.client.resources.CoreMessages; import cc.kune.core.shared.domain.utils.StateToken; import cc.kune.core.shared.dto.GroupDTO; @@ -72,7 +72,7 @@ gridMenuPanel.getBottomBar().setCls("k-blank-toolbar"); super.add(gridMenuPanel); - noMembersPublic = new Label(i18n.t(PlatfMessages.MEMBERS_NOT_PUBLIC)); + noMembersPublic = new Label(i18n.t(CoreMessages.MEMBERS_NOT_PUBLIC)); noMembersPublic.addStyleName("kune-Margin-7-trbl"); noMembersPublic.addStyleName("k-text-gray"); noMembersPublic.setVisible(false); Modified: trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java =================================================================== --- trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java 2011-01-26 21:18:00 UTC (rev 1224) +++ trunk/src/test/java/cc/kune/core/client/state/StateManagerTest.java 2011-01-28 00:16:03 UTC (rev 1225) @@ -6,7 +6,7 @@ import org.junit.Test; import org.mockito.Mockito; -import cc.kune.core.client.actions.BeforeActionListener; +import cc.kune.common.client.actions.BeforeActionListener; import cc.kune.core.shared.domain.utils.StateToken; import cc.kune.core.shared.dto.StateAbstractDTO;
participants (1)
-
Vicente J. Ruiz Jurado