r826 - in trunk/src/main/java/org/ourproject/kune/workspace/client: . component editor i18n i18n/ui newgroup search sitebar sitebar/bar sitebar/login sitebar/msg socialnet summary tags ui/ctx/items ui/newtmp ui/newtmp/entitylogo ui/newtmp/skel ui/newtmp/title workspace workspace/ui
Author: vjrj Date: 2008-08-05 03:27:03 +0200 (Tue, 05 Aug 2008) New Revision: 826 Added: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelector.java trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/SiteErrorType.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearchListener.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcher.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherView.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearchPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearcher.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearcherPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteBottomTrayButton.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcher.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcherPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcherPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummary.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummary.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummary.java trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummary.java trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogo.java trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogoPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogoPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogoView.java Removed: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceClientModule.java trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceEvents.java trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceFactory.java trunk/src/main/java/org/ourproject/kune/workspace/client/actions/ trunk/src/main/java/org/ourproject/kune/workspace/client/component/WorkspaceComponent.java trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelectorComponent.java trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/ui/ trunk/src/main/java/org/ourproject/kune/workspace/client/presence/ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearchListener.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherView.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupLiveSearcherPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserLiveSearcherPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/ui/ trunk/src/main/java/org/ourproject/kune/workspace/client/theme/ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarComponent.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarView.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitleComponent.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitlePresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitleView.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitleComponent.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitlePresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitleView.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarComponent.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarView.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/EntityLiveSearcher.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupLiveSearcher.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupMembersSummary.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupSummary.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ParticipationSummary.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/TagsSummary.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ThemeMenuComponent.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/UserLiveSearcher.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/Workspace.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceListener.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspacePresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceUIComponents.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceView.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/BottomIconsTrayPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentBottomToolBarPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentSubTitlePanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentTitlePanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentToolBarPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogo.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoView.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/GroupToolsBar.java trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/WorkspacePanel.java Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelectorPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/ui/I18nTranslatorPanel.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/search/SiteSearcherPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/Site.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInView.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/MessagePresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SimpleMessagePanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessage.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessagePresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessageView.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsPanel.java trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsPresenter.java trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextTopBar.java trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntitySummary.java trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/title/EntityTitlePresenter.java Log: Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceClientModule.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceClientModule.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceClientModule.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,52 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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; - -import org.ourproject.kune.platf.client.extend.ClientModule; -import org.ourproject.kune.platf.client.extend.Register; -import org.ourproject.kune.platf.client.state.Session; -import org.ourproject.kune.platf.client.state.StateManager; -import org.ourproject.kune.workspace.client.actions.RecalculateWorkspaceAction; -import org.ourproject.kune.workspace.client.actions.ReloadContextAction; -import org.ourproject.kune.workspace.client.actions.i18n.ShowTranslatorAction; -import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; -import org.ourproject.kune.workspace.client.workspace.Workspace; - -public class WorkspaceClientModule implements ClientModule { - - private final StateManager stateManager; - private final Workspace workspace; - private final Session session; - private final I18nUITranslationService i18n; - - public WorkspaceClientModule(final Session session, final StateManager stateManager, final Workspace workspace, - final I18nUITranslationService i18n) { - this.session = session; - this.stateManager = stateManager; - this.i18n = i18n; - this.workspace = workspace; - } - - public void configure(final Register register) { - register.addAction(WorkspaceEvents.SHOW_TRANSLATOR, new ShowTranslatorAction(session, workspace, i18n)); - register.addAction(WorkspaceEvents.RELOAD_CONTEXT, new ReloadContextAction(stateManager)); - register.addAction(WorkspaceEvents.RECALCULATE_WORKSPACE_SIZE, new RecalculateWorkspaceAction(workspace)); - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceEvents.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceEvents.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceEvents.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,29 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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; - -public interface WorkspaceEvents { - public static final String SHOW_TRANSLATOR = "i18n.ShowTranslator"; - public static final String RELOAD_CONTEXT = "ws.ReoloadContext"; - public static final String WS_SPLITTER_STARTRESIZING = "ws.SplitterStartResizing"; - public static final String WS_SPLITTER_STOPRESIZING = "ws.SplitterStopResizing"; - public static final String RECALCULATE_WORKSPACE_SIZE = "ws.RecalculateWorkspaceSize"; -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceFactory.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceFactory.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceFactory.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,130 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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; - -import org.ourproject.kune.platf.client.extend.ExtensibleWidgetsManager; -import org.ourproject.kune.platf.client.services.I18nTranslationService; -import org.ourproject.kune.platf.client.services.KuneErrorHandler; -import org.ourproject.kune.platf.client.state.Session; -import org.ourproject.kune.platf.client.state.StateManager; -import org.ourproject.kune.workspace.client.editor.TextEditor; -import org.ourproject.kune.workspace.client.editor.TextEditorListener; -import org.ourproject.kune.workspace.client.editor.TextEditorPanel; -import org.ourproject.kune.workspace.client.editor.TextEditorPresenter; -import org.ourproject.kune.workspace.client.i18n.LanguageSelectorComponent; -import org.ourproject.kune.workspace.client.i18n.LanguageSelectorPresenter; -import org.ourproject.kune.workspace.client.i18n.LanguageSelectorView; -import org.ourproject.kune.workspace.client.i18n.ui.LanguageSelectorPanel; -import org.ourproject.kune.workspace.client.licensefoot.LicenseComponent; -import org.ourproject.kune.workspace.client.licensefoot.LicensePresenter; -import org.ourproject.kune.workspace.client.licensefoot.LicenseView; -import org.ourproject.kune.workspace.client.licensefoot.ui.LicensePanel; -import org.ourproject.kune.workspace.client.ui.ctx.items.ContextItems; -import org.ourproject.kune.workspace.client.ui.ctx.items.ContextItemsPanel; -import org.ourproject.kune.workspace.client.ui.ctx.items.ContextItemsPresenter; -import org.ourproject.kune.workspace.client.workspace.ContentSubTitleComponent; -import org.ourproject.kune.workspace.client.workspace.ContentSubTitlePresenter; -import org.ourproject.kune.workspace.client.workspace.ContentSubTitleView; -import org.ourproject.kune.workspace.client.workspace.ContentTitleComponent; -import org.ourproject.kune.workspace.client.workspace.ContentTitlePresenter; -import org.ourproject.kune.workspace.client.workspace.ContentTitleView; -import org.ourproject.kune.workspace.client.workspace.ContentToolBarComponent; -import org.ourproject.kune.workspace.client.workspace.ContentToolBarPresenter; -import org.ourproject.kune.workspace.client.workspace.ContentToolBarView; -import org.ourproject.kune.workspace.client.workspace.Workspace; -import org.ourproject.kune.workspace.client.workspace.WorkspacePresenter; -import org.ourproject.kune.workspace.client.workspace.WorkspaceView; -import org.ourproject.kune.workspace.client.workspace.ui.ContentSubTitlePanel; -import org.ourproject.kune.workspace.client.workspace.ui.ContentTitlePanel; -import org.ourproject.kune.workspace.client.workspace.ui.ContentToolBarPanel; -import org.ourproject.kune.workspace.client.workspace.ui.WorkspacePanel; - -import com.calclab.suco.client.container.Provider; - -public class WorkspaceFactory { - - private static Session session; - private static I18nTranslationService i18n; - private static KuneErrorHandler errorHandler; - private static Provider<StateManager> stateManagerProvider; - - public static ContentSubTitleComponent createContentSubTitleComponent() { - final ContentSubTitlePresenter presenter = new ContentSubTitlePresenter(i18n); - final ContentSubTitleView view = new ContentSubTitlePanel(presenter, i18n); - presenter.init(view); - return presenter; - } - - public static ContentTitleComponent createContentTitleComponent() { - final ContentTitlePresenter presenter = new ContentTitlePresenter(i18n, errorHandler); - final ContentTitleView view = new ContentTitlePanel(presenter); - presenter.init(view); - return presenter; - } - - public static ContentToolBarComponent createContentToolBarComponent() { - final ContentToolBarPresenter presenter = new ContentToolBarPresenter(); - final ContentToolBarView view = new ContentToolBarPanel(presenter); - presenter.init(view); - return presenter; - } - - public static ContextItems createContextItems() { - final ContextItemsPresenter presenter = new ContextItemsPresenter(i18n); - final ContextItemsPanel panel = new ContextItemsPanel(presenter, i18n, stateManagerProvider); - presenter.init(panel); - return presenter; - } - - public static TextEditor createDocumentEditor(final TextEditorListener listener) { - final TextEditorPresenter presenter = new TextEditorPresenter(listener, true); - final TextEditorPanel panel = new TextEditorPanel(presenter, i18n); - presenter.init(panel); - return presenter; - } - - public static LanguageSelectorComponent createLanguageSelectorComponent() { - final LanguageSelectorPresenter presenter = new LanguageSelectorPresenter(session); - final LanguageSelectorView view = new LanguageSelectorPanel(presenter, i18n); - presenter.init(view); - return presenter; - } - - public static LicenseComponent createLicenseComponent() { - final LicensePresenter presenter = new LicensePresenter(); - final LicenseView view = new LicensePanel(presenter, i18n); - presenter.init(view); - return presenter; - } - - public static Workspace createWorkspace(final Session session, - final ExtensibleWidgetsManager extensionPointManager, final I18nTranslationService i18n, - final KuneErrorHandler errorHandler, final Provider<StateManager> stateManagerProvider) { - WorkspaceFactory.session = session; - WorkspaceFactory.i18n = i18n; - WorkspaceFactory.errorHandler = errorHandler; - WorkspaceFactory.stateManagerProvider = stateManagerProvider; - final WorkspacePresenter workspace = new WorkspacePresenter(session); - final WorkspaceView view = new WorkspacePanel(workspace, i18n); - workspace.init(view, extensionPointManager); - return workspace; - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/component/WorkspaceComponent.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/component/WorkspaceComponent.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/component/WorkspaceComponent.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,31 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.component; - -import org.ourproject.kune.platf.client.Component; - -public interface WorkspaceComponent extends Component { - - void detach(); - - void attach(); - -} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/TextEditorPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -40,7 +40,6 @@ private final Timer saveTimer; private final I18nTranslationService i18n; - @Deprecated public TextEditorPanel(final TextEditorPresenter presenter, final I18nTranslationService i18n) { this.presenter = presenter; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/I18nTranslatorPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -19,15 +19,10 @@ */ package org.ourproject.kune.workspace.client.i18n; -import org.ourproject.kune.platf.client.PlatformEvents; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.dispatch.DefaultDispatcher; import org.ourproject.kune.platf.client.dto.I18nLanguageDTO; -import org.ourproject.kune.platf.client.extend.ExtensibleWidgetChild; -import org.ourproject.kune.platf.client.extend.ExtensibleWidgetId; import org.ourproject.kune.platf.client.rpc.I18nServiceAsync; import org.ourproject.kune.platf.client.state.Session; -import org.ourproject.kune.workspace.client.WorkspaceEvents; import org.ourproject.kune.workspace.client.sitebar.Site; import com.google.gwt.user.client.rpc.AsyncCallback; @@ -45,19 +40,18 @@ this.i18n = i18n; } - public void attachIconToBottomBar(final View view) { - DefaultDispatcher.getInstance().fire(PlatformEvents.ATTACH_TO_EXTENSIBLE_WIDGET, - new ExtensibleWidgetChild(ExtensibleWidgetId.CONTENT_BOTTOM_ICONBAR, view)); - } - public void doClose() { view.hide(); - DefaultDispatcher.getInstance().fire(PlatformEvents.DETACH_FROM_EXTENSIBLE_WIDGET, - new ExtensibleWidgetChild(ExtensibleWidgetId.CONTENT_BOTTOM_ICONBAR, view)); } public void doShowTranslator() { - DefaultDispatcher.getInstance().fire(WorkspaceEvents.SHOW_TRANSLATOR, null); + Site.showProgressLoading(); + if (session.isLogged()) { + view.show(); + } else { + Site.info(i18n.t("Sign in or register to help with translation")); + } + Site.hideProgress(); } public void doTranslation(final String id, final String trKey, final String translation) { Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelector.java (from rev 792, trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelectorComponent.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelectorComponent.java 2008-07-06 13:51:18 UTC (rev 792) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelector.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,33 @@ +/* + * + * Copyright (C) 2007-2008 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.i18n; + +import org.ourproject.kune.platf.client.View; +import org.ourproject.kune.platf.client.dto.I18nLanguageDTO; + +public interface LanguageSelector { + + String getSelectedLanguage(); + + View getView(); + + void setLanguage(I18nLanguageDTO language); + +} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelectorComponent.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelectorComponent.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelectorComponent.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,31 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.i18n; - -import org.ourproject.kune.platf.client.Component; -import org.ourproject.kune.platf.client.dto.I18nLanguageDTO; - -public interface LanguageSelectorComponent extends Component { - - String getSelectedLanguage(); - - void setLanguage(I18nLanguageDTO language); - -} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelectorPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelectorPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/LanguageSelectorPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -23,33 +23,32 @@ import org.ourproject.kune.platf.client.dto.I18nLanguageDTO; import org.ourproject.kune.platf.client.state.Session; -public class LanguageSelectorPresenter implements LanguageSelectorComponent { +public class LanguageSelectorPresenter implements LanguageSelector { private LanguageSelectorView view; private final Session session; public LanguageSelectorPresenter(final Session session) { - this.session = session; + this.session = session; + } + public Object[][] getLanguages() { + return session.getLanguagesArray(); } - public void init(final LanguageSelectorView view) { - this.view = view; + public String getSelectedLanguage() { + return view.getLanguage(); } public View getView() { - return view; + return view; } - public String getSelectedLanguage() { - return view.getLanguage(); + public void init(final LanguageSelectorView view) { + this.view = view; } - public Object[][] getLanguages() { - return session.getLanguagesArray(); - } - public void setLanguage(final I18nLanguageDTO language) { - view.setLanguage(language.getCode()); + view.setLanguage(language.getCode()); } } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/ui/I18nTranslatorPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/ui/I18nTranslatorPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/i18n/ui/I18nTranslatorPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -23,16 +23,15 @@ import org.ourproject.kune.platf.client.services.I18nTranslationService; import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.AbstractSearcherPanel; -import org.ourproject.kune.platf.client.ui.BottomTrayIcon; import org.ourproject.kune.platf.client.ui.KuneStringUtils; import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog; -import org.ourproject.kune.workspace.client.WorkspaceFactory; import org.ourproject.kune.workspace.client.i18n.I18nTranslatorPresenter; import org.ourproject.kune.workspace.client.i18n.I18nTranslatorView; -import org.ourproject.kune.workspace.client.i18n.LanguageSelectorComponent; +import org.ourproject.kune.workspace.client.i18n.LanguageSelector; +import org.ourproject.kune.workspace.client.search.SiteBottomTrayButton; import org.ourproject.kune.workspace.client.sitebar.Site; +import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton; -import com.google.gwt.user.client.Command; import com.google.gwt.user.client.ui.Frame; import com.google.gwt.user.client.ui.HorizontalPanel; import com.gwtext.client.core.EventObject; @@ -69,260 +68,251 @@ private Window dialog; private final I18nTranslatorPresenter presenter; private LanguageSelectorPanel languageSelectorPanel; - private Store unTransStore; private Store transStore; - - private BottomTrayIcon bottomIcon; - private GridPanel transGrid; private GridPanel unTransGrid; + private final LanguageSelector languageSelector; + private final WorkspaceSkeleton ws; + private SiteBottomTrayButton traybarButton; - public I18nTranslatorPanel(final I18nTranslatorPresenter initPresenter, final I18nTranslationService i18n) { - super(i18n); - this.presenter = initPresenter; + public I18nTranslatorPanel(final I18nTranslatorPresenter initPresenter, final I18nTranslationService i18n, + final LanguageSelector languageSelector, final WorkspaceSkeleton ws) { + super(i18n); + this.presenter = initPresenter; + this.languageSelector = languageSelector; + this.ws = ws; } public void close() { - dialog.hide(); + dialog.hide(); } public void hide() { - dialog.hide(); + dialog.hide(); } public void show() { - if (dialog == null) { - dialog = createDialog(); - } - // By default we use the user lang to help in translation - final I18nLanguageDTO lang = presenter.getLanguage(); - setLanguage(lang); - final String languageNativeNameIfAvailable = lang.getNativeName().length() > 0 ? lang.getNativeName() : lang - .getEnglishName(); - dialog.setTitle(i18n.t("Help to translate kune to [%s]", languageNativeNameIfAvailable)); - dialog.show(); - dialog.expand(); - dialog.center(); - if (bottomIcon == null) { - bottomIcon = new BottomTrayIcon(i18n.t("Show/hide translator")); - bottomIcon.addMainButton(Images.App.getInstance().language(), new Command() { - public void execute() { - if (dialog.isVisible()) { - dialog.hide(); - } else { - dialog.show(); - } - } - }); - presenter.attachIconToBottomBar(bottomIcon); - } + if (dialog == null) { + dialog = createDialog(); + } + // By default we use the user lang to help in translation + final I18nLanguageDTO lang = presenter.getLanguage(); + setLanguage(lang); + final String languageNativeNameIfAvailable = lang.getNativeName().length() > 0 ? lang.getNativeName() : lang + .getEnglishName(); + dialog.setTitle(i18n.t("Help to translate kune to [%s]", languageNativeNameIfAvailable)); + dialog.show(); + dialog.expand(); + dialog.center(); + if (traybarButton == null) { + traybarButton = new SiteBottomTrayButton("images/language.gif", i18n.t("Show/hide translator"), dialog, ws); + } } private Window createDialog() { - final Panel north = new Panel(); - north.setBorder(false); + final Panel north = new Panel(); + north.setBorder(false); - final Panel center = new TabPanel(); - center.setAutoScroll(false); - center.setClosable(false); - center.setBorder(false); + final Panel center = new TabPanel(); + center.setAutoScroll(false); + center.setClosable(false); + center.setBorder(false); - final Window dialog = new BasicDialog("", false, false, 720, 330); - // dialog.setResizable(false); - dialog.setIconCls("i18n-icon"); + final Window dialog = new BasicDialog("", false, false, 720, 330); + // dialog.setResizable(false); + dialog.setIconCls("i18n-icon"); - final Button close = new Button(); - close.setText(i18n.tWithNT("Close", "used in button")); - close.addListener(new ButtonListenerAdapter() { - public void onClick(final Button button, final EventObject e) { - presenter.doClose(); - } - }); - dialog.addButton(close); + final Button close = new Button(); + close.setText(i18n.tWithNT("Close", "used in button")); + close.addListener(new ButtonListenerAdapter() { + public void onClick(final Button button, final EventObject e) { + presenter.doClose(); + } + }); + dialog.addButton(close); - final Panel unTransCenterPanel = new Panel(i18n.t("Untranslated")); - unTransCenterPanel.setAutoScroll(false); - unTransCenterPanel.setLayout(new FitLayout()); + final Panel unTransCenterPanel = new Panel(i18n.t("Untranslated")); + unTransCenterPanel.setAutoScroll(false); + unTransCenterPanel.setLayout(new FitLayout()); - final Panel transCenterPanel = new Panel(i18n.t("Translated")); - transCenterPanel.setAutoScroll(false); - transCenterPanel.setLayout(new FitLayout()); + final Panel transCenterPanel = new Panel(i18n.t("Translated")); + transCenterPanel.setAutoScroll(false); + transCenterPanel.setLayout(new FitLayout()); - final Panel recommendationPanel = new Panel(i18n.t("Recommendations")); - recommendationPanel.setAutoScroll(true); - recommendationPanel.setLayout(new FitLayout()); + final Panel recommendationPanel = new Panel(i18n.t("Recommendations")); + recommendationPanel.setAutoScroll(true); + recommendationPanel.setLayout(new FitLayout()); - transGrid = createGridPanel(true); - unTransGrid = createGridPanel(false); - final HorizontalPanel hp = new HorizontalPanel(); - final LanguageSelectorComponent langComponent = WorkspaceFactory.createLanguageSelectorComponent(); - languageSelectorPanel = (LanguageSelectorPanel) langComponent.getView(); - languageSelectorPanel.addChangeListener(new ComboBoxListenerAdapter() { - public void onSelect(final ComboBox comboBox, final Record record, final int index) { - setLanguage(record.getAsString(LanguageSelectorPanel.LANG_ID)); - dialog.setTitle(i18n.t("Help to translate kune to [%s]", record.getAsString("language"))); - } - }); - hp.add(languageSelectorPanel); - hp.addStyleName("kune-Margin-Large-trbl"); - north.add(hp); + transGrid = createGridPanel(true); + unTransGrid = createGridPanel(false); + final HorizontalPanel hp = new HorizontalPanel(); + languageSelectorPanel = (LanguageSelectorPanel) languageSelector.getView(); + languageSelectorPanel.addChangeListener(new ComboBoxListenerAdapter() { + public void onSelect(final ComboBox comboBox, final Record record, final int index) { + setLanguage(record.getAsString(LanguageSelectorPanel.LANG_ID)); + dialog.setTitle(i18n.t("Help to translate kune to [%s]", record.getAsString("language"))); + } + }); + hp.add(languageSelectorPanel); + hp.addStyleName("kune-Margin-Large-trbl"); + north.add(hp); - unTransCenterPanel.add(unTransGrid); - transCenterPanel.add(transGrid); - final Frame recommFrame = new Frame("html/i18n-recom.html"); - // recommFrame.setHeight("220"); - recommendationPanel.add(recommFrame); + unTransCenterPanel.add(unTransGrid); + transCenterPanel.add(transGrid); + final Frame recommFrame = new Frame("html/i18n-recom.html"); + // recommFrame.setHeight("220"); + recommendationPanel.add(recommFrame); - center.add(unTransCenterPanel); - center.add(transCenterPanel); - center.add(recommendationPanel); - dialog.add(north, new BorderLayoutData(RegionPosition.NORTH)); - dialog.add(center, new BorderLayoutData(RegionPosition.CENTER)); + center.add(unTransCenterPanel); + center.add(transCenterPanel); + center.add(recommendationPanel); + dialog.add(north, new BorderLayoutData(RegionPosition.NORTH)); + dialog.add(center, new BorderLayoutData(RegionPosition.CENTER)); - center.setActiveItemID(unTransCenterPanel.getId()); + center.setActiveItemID(unTransCenterPanel.getId()); - return dialog; + return dialog; } private GridPanel createGridPanel(final boolean translated) { - final Renderer renderNT = new Renderer() { - public String render(Object value, CellMetadata cellMetadata, Record record, int rowIndex, int colNum, - Store store) { - String renderer; - String[] splitted = splitNT((String) value); - if (splitted.length > 1) { - renderer = "{0} " + NOTE_FOR_TRANSLATORS_IMAGE_HTML; - String tip = "<div style='min-width: 75px'>" + splitted[1] + "</div>"; - cellMetadata.setHtmlAttribute("ext:qtip=\"" + tip + "\" ext:qtitle=\"Note for translators\""); - } else { - renderer = "{0}"; - } - return Format.format(renderer, splitted); - } - }; + final Renderer renderNT = new Renderer() { + public String render(Object value, CellMetadata cellMetadata, Record record, int rowIndex, int colNum, + Store store) { + String renderer; + String[] splitted = splitNT((String) value); + if (splitted.length > 1) { + renderer = "{0} " + NOTE_FOR_TRANSLATORS_IMAGE_HTML; + String tip = "<div style='min-width: 75px'>" + splitted[1] + "</div>"; + cellMetadata.setHtmlAttribute("ext:qtip=\"" + tip + "\" ext:qtitle=\"Note for translators\""); + } else { + renderer = "{0}"; + } + return Format.format(renderer, splitted); + } + }; - Store store; - final String id = "id"; - final FieldDef[] fieldDefs = new FieldDef[] { new StringFieldDef("trKey"), new StringFieldDef("text"), - new StringFieldDef(id) }; + Store store; + final String id = "id"; + final FieldDef[] fieldDefs = new FieldDef[] { new StringFieldDef("trKey"), new StringFieldDef("text"), + new StringFieldDef(id) }; - if (translated) { - final String url = "/kune/json/I18nTranslationJSONService/searchtranslated"; - transStore = createStore(fieldDefs, url, id); - store = transStore; - } else { - final String url = "/kune/json/I18nTranslationJSONService/search"; - unTransStore = createStore(fieldDefs, url, id); - store = unTransStore; - } + if (translated) { + final String url = "/kune/json/I18nTranslationJSONService/searchtranslated"; + transStore = createStore(fieldDefs, url, id); + store = transStore; + } else { + final String url = "/kune/json/I18nTranslationJSONService/search"; + unTransStore = createStore(fieldDefs, url, id); + store = unTransStore; + } - final ColumnConfig trKeyColumn = new ColumnConfig() { - { - setHeader(i18n.t("Text to translate")); - setDataIndex("trKey"); - setWidth(335); - setTooltip(i18n.t("Click to sort")); - setRenderer(renderNT); - } - }; + final ColumnConfig trKeyColumn = new ColumnConfig() { + { + setHeader(i18n.t("Text to translate")); + setDataIndex("trKey"); + setWidth(335); + setTooltip(i18n.t("Click to sort")); + setRenderer(renderNT); + } + }; - final GridEditor textColumnEditor = new GridEditor(new TextField()); + final GridEditor textColumnEditor = new GridEditor(new TextField()); - final ColumnConfig textColumn = new ColumnConfig() { - { - setHeader(i18n.t("Translation (click to edit)")); - setDataIndex("text"); - setWidth(335); - setEditor(textColumnEditor); - } - }; + final ColumnConfig textColumn = new ColumnConfig() { + { + setHeader(i18n.t("Translation (click to edit)")); + setDataIndex("text"); + setWidth(335); + setEditor(textColumnEditor); + } + }; - final ColumnModel columnModel = new ColumnModel(new ColumnConfig[] { trKeyColumn, textColumn }); + final ColumnModel columnModel = new ColumnModel(new ColumnConfig[] { trKeyColumn, textColumn }); - columnModel.setDefaultSortable(true); + columnModel.setDefaultSortable(true); - final EditorGridPanel grid = new EditorGridPanel((translated ? "grid-translated" : "grid-untranslated"), 695, - 180, store, columnModel); - createPagingToolbar(store, grid); + final EditorGridPanel grid = new EditorGridPanel((translated ? "grid-translated" : "grid-untranslated"), 695, + 180, store, columnModel); + createPagingToolbar(store, grid); - // final PagingToolbar pag = new PagingToolbar(store); - // pag.setPageSize(PAGINATION_SIZE); - // pag.setDisplayInfo(true); - // pag.setDisplayMsg(i18n.tWithNT("Displaying results {0} - {1} of - // {2}", - // "Respect {} values in translations, " - // + "these will produce: 'Displaying results 1 - 25 of 95465' for - // instance")); - // pag.setEmptyMsg(i18n.t("No results to display")); - // pag.setAfterPageText(i18n.tWithNT("of {0}", "Used to show - // multiple results: '1 of 30'")); - // pag.setBeforePageText(i18n.t("Page")); - // pag.setFirstText(i18n.t("First Page")); - // pag.setLastText(i18n.t("Last Page")); - // pag.setNextText(i18n.t("Next Page")); - // pag.setPrevText(i18n.t("Previous Page")); - // pag.setRefreshText(i18n.t("Refresh")); - // grid.setBottomToolbar(pag); - // grid.setLoadMask(true); - // grid.setLoadMask(i18n.t("Loading")); - grid.setClicksToEdit(1); - // grid.setStripeRows(true); - // grid.setFrame(true); - // grid.setSelectionModel(new RowSelectionModel()); + // final PagingToolbar pag = new PagingToolbar(store); + // pag.setPageSize(PAGINATION_SIZE); + // pag.setDisplayInfo(true); + // pag.setDisplayMsg(i18n.tWithNT("Displaying results {0} - {1} of + // {2}", + // "Respect {} values in translations, " + // + "these will produce: 'Displaying results 1 - 25 of 95465' for + // instance")); + // pag.setEmptyMsg(i18n.t("No results to display")); + // pag.setAfterPageText(i18n.tWithNT("of {0}", "Used to show + // multiple results: '1 of 30'")); + // pag.setBeforePageText(i18n.t("Page")); + // pag.setFirstText(i18n.t("First Page")); + // pag.setLastText(i18n.t("Last Page")); + // pag.setNextText(i18n.t("Next Page")); + // pag.setPrevText(i18n.t("Previous Page")); + // pag.setRefreshText(i18n.t("Refresh")); + // grid.setBottomToolbar(pag); + // grid.setLoadMask(true); + // grid.setLoadMask(i18n.t("Loading")); + grid.setClicksToEdit(1); + // grid.setStripeRows(true); + // grid.setFrame(true); + // grid.setSelectionModel(new RowSelectionModel()); - grid.addEditorGridListener(new EditorGridListenerAdapter() { - public void onAfterEdit(final GridPanel grid, final Record record, final String field, - final Object newValue, final Object oldValue, final int rowIndex, final int colIndex) { - final String idValue = record.getAsString(id); - final String trKey = record.getAsString("trKey"); - presenter.doTranslation(idValue, trKey, (String) newValue); - record.set(field, KuneStringUtils.escapeHtmlLight((String) newValue)); - } - }); + grid.addEditorGridListener(new EditorGridListenerAdapter() { + public void onAfterEdit(final GridPanel grid, final Record record, final String field, + final Object newValue, final Object oldValue, final int rowIndex, final int colIndex) { + final String idValue = record.getAsString(id); + final String trKey = record.getAsString("trKey"); + presenter.doTranslation(idValue, trKey, (String) newValue); + record.set(field, KuneStringUtils.escapeHtmlLight((String) newValue)); + } + }); - grid.addGridCellListener(new GridCellListenerAdapter() { - public void onCellDblClick(final GridPanel grid, final int rowIndex, final int colIndex, final EventObject e) { - final Record record = unTransStore.getRecordAt(rowIndex); - final String idValue = record.getAsString(id); - final String trKey = record.getAsString("trKey"); - final String text = record.getAsString("text"); - if (text == null || text.length() == 0) { - final String trWithoutNT = removeNT(trKey); - record.set("text", trWithoutNT); - presenter.doTranslation(idValue, trKey, trWithoutNT); - } - } - }); + grid.addGridCellListener(new GridCellListenerAdapter() { + public void onCellDblClick(final GridPanel grid, final int rowIndex, final int colIndex, final EventObject e) { + final Record record = unTransStore.getRecordAt(rowIndex); + final String idValue = record.getAsString(id); + final String trKey = record.getAsString("trKey"); + final String text = record.getAsString("text"); + if (text == null || text.length() == 0) { + final String trWithoutNT = removeNT(trKey); + record.set("text", trWithoutNT); + presenter.doTranslation(idValue, trKey, trWithoutNT); + } + } + }); - return grid; + return grid; } private String removeNT(final String string) { - return i18n.removeNT(string); + return i18n.removeNT(string); } private void setLanguage(final I18nLanguageDTO language) { - languageSelectorPanel.setLanguage(language.getCode()); - setLanguage(language.getCode()); + languageSelectorPanel.setLanguage(language.getCode()); + setLanguage(language.getCode()); } private void setLanguage(final String language) { - Site.showProgressLoading(); - query(unTransStore, unTransGrid, language); - query(transStore, transGrid, language); - Site.hideProgress(); + Site.showProgressLoading(); + query(unTransStore, unTransGrid, language); + query(transStore, transGrid, language); + Site.hideProgress(); } private String[] splitNT(final String textWithNT) { - String[] nt; - final String[] splitted = textWithNT.split(" \\[%NT "); - if (splitted.length > 1) { - nt = splitted[1].split("\\]$"); - splitted[1] = nt[0]; - } - return splitted; + String[] nt; + final String[] splitted = textWithNT.split(" \\[%NT "); + if (splitted.length > 1) { + nt = splitted[1].split("\\]$"); + splitted[1] = nt[0]; + } + return splitted; } } Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java (from rev 816, trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/ui/NewGroupPanel.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/ui/NewGroupPanel.java 2008-07-26 16:44:17 UTC (rev 816) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,344 @@ +/* + * + * Copyright (C) 2007-2008 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.newgroup; + +import org.ourproject.kune.platf.client.dto.LicenseDTO; +import org.ourproject.kune.platf.client.services.Images; +import org.ourproject.kune.platf.client.ui.KuneStringUtils; +import org.ourproject.kune.platf.client.ui.KuneUiUtils; +import org.ourproject.kune.platf.client.ui.dialogs.WizardDialog; +import org.ourproject.kune.platf.client.ui.dialogs.WizardListener; +import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; +import org.ourproject.kune.workspace.client.licensechoose.LicenseChoose; +import org.ourproject.kune.workspace.client.licensechoose.LicenseChoosePanel; +import org.ourproject.kune.workspace.client.sitebar.msg.SiteMessagePanel; + +import com.calclab.suco.client.container.Provider; +import com.google.gwt.user.client.ui.AbstractImagePrototype; +import com.google.gwt.user.client.ui.DeckPanel; +import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.HorizontalPanel; +import com.google.gwt.user.client.ui.Label; +import com.google.gwt.user.client.ui.VerticalPanel; +import com.google.gwt.user.client.ui.Widget; +import com.gwtext.client.core.Position; +import com.gwtext.client.widgets.Panel; +import com.gwtext.client.widgets.ToolTip; +import com.gwtext.client.widgets.form.Field; +import com.gwtext.client.widgets.form.FieldSet; +import com.gwtext.client.widgets.form.FormPanel; +import com.gwtext.client.widgets.form.Radio; +import com.gwtext.client.widgets.form.TextArea; +import com.gwtext.client.widgets.form.TextField; +import com.gwtext.client.widgets.layout.FitLayout; + +public class NewGroupPanel extends WizardDialog implements NewGroupView { + private static final AbstractImagePrototype INFO_IMAGE = Images.App.getInstance().info(); + private static final String MUST_BE_BETWEEN_3_AND_15 = "Must be between 3 and 15 lowercase characters. Can only contain characters, numbers, and dashes"; + private static final String SHORTNAME_FIELD = "short_name"; + private static final String LONGNAME_FIELD = "long_name"; + private static final String PUBLICDESC_FIELD = "public_desc"; + private static final String TYPEOFGROUP_FIELD = "type_of_group"; + private static final String TAGS_FIELD = "tags"; + + private final FormPanel newGroupInitialDataForm; + private Radio projectRadio; + private Radio orgRadio; + private Radio communityRadio; + private Radio orphanedProjectRadio; + private TextField shortNameField; + private TextField longNameField; + private TextArea publicDescField; + private final DeckPanel deck; + private final LicenseChoose licenseChoosePanel; + private final SiteMessagePanel messagesPanel; + private final I18nUITranslationService i18n; + private TextField tags; + + public NewGroupPanel(final NewGroupPresenter presenter, final I18nUITranslationService i18n, + final Provider<LicenseChoose> licenseChooseProvider) { + super(i18n.t("Register a new Group"), true, false, 460, 480, new WizardListener() { + public void onBack() { + presenter.onBack(); + } + + public void onCancel() { + presenter.onCancel(); + } + + public void onClose() { + presenter.onClose(); + } + + public void onFinish() { + presenter.onFinish(); + } + + public void onNext() { + presenter.onNext(); + } + }, i18n); + this.i18n = i18n; + Field.setMsgTarget("side"); + final Panel centerPanel = new Panel(); + centerPanel.setLayout(new FitLayout()); + deck = new DeckPanel(); + newGroupInitialDataForm = createNewGroupInitialDataForm(presenter); + licenseChoosePanel = licenseChooseProvider.get(); + final VerticalPanel newGroupInitialDataVP = new VerticalPanel(); + final HorizontalPanel newGroupInitialDataHP = new HorizontalPanel(); + final VerticalPanel chooseLicenseVP = new VerticalPanel(); + final HorizontalPanel chooseLicenseHP = new HorizontalPanel(); + final Images img = Images.App.getInstance(); + newGroupInitialDataHP.add(img.step1().createImage()); + final Label step1Label = new Label(i18n + .t("Please fill this form and follow the next steps to register a new group:")); + newGroupInitialDataHP.add(step1Label); + newGroupInitialDataVP.add(newGroupInitialDataHP); + newGroupInitialDataVP.add(newGroupInitialDataForm); + chooseLicenseHP.add(img.step2().createImage()); + final HTML step2Label = new HTML(i18n.t("Select a license to share your group contents with other people. " + + "We recomend [%s] licenses for practical works.", KuneStringUtils.generateHtmlLink( + "http://en.wikipedia.org/wiki/Copyleft", "copyleft"))); + chooseLicenseHP.add(step2Label); + final Label licenseTypeLabel = new Label(i18n.t("Choose a license type:")); + chooseLicenseVP.add(chooseLicenseHP); + chooseLicenseVP.add(licenseTypeLabel); + + newGroupInitialDataHP.addStyleName("kune-Margin-Medium-b"); + step1Label.addStyleName("kune-Margin-Large-l"); + step2Label.addStyleName("kune-Margin-Large-l"); + step1Label.addStyleName("kune-Margin-Medium-b"); + step2Label.addStyleName("kune-Margin-Medium-b"); + + messagesPanel = new SiteMessagePanel(null, false, i18n); + messagesPanel.setWidth("425"); + messagesPanel.setMessage("", SiteErrorType.info, SiteErrorType.error); + newGroupInitialDataVP.add(messagesPanel); + + chooseLicenseVP.add((Widget) licenseChoosePanel.getView()); + deck.add(newGroupInitialDataVP); + deck.add(chooseLicenseVP); + centerPanel.add(deck); + super.add(centerPanel); + deck.showWidget(0); + initBottomButtons(); + // newGroupInitialDataVP.addStyleName("kune-Default-Form"); + deck.addStyleName("kune-Default-Form"); + licenseTypeLabel.addStyleName("kune-License-CC-Header"); + newGroupInitialDataVP.setHeight("10"); // Ext set this to 100% ... + chooseLicenseVP.setHeight("10"); // (same here) + super.setFinishText(i18n.t("Register")); + } + + public void clearData() { + deck.showWidget(0); + newGroupInitialDataForm.getForm().reset(); + ((LicenseChoosePanel) licenseChoosePanel.getView()).reset(); + showNewGroupInitialDataForm(); + initBottomButtons(); + shortNameField.focus(false); + } + + public LicenseDTO getLicense() { + return licenseChoosePanel.getLicense(); + } + + 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() { + messagesPanel.hide(); + } + + public boolean isCommunity() { + return communityRadio.getValue(); + } + + public boolean isFormValid() { + return newGroupInitialDataForm.getForm().isValid(); + } + + public boolean isOrganization() { + return orgRadio.getValue(); + } + + public boolean isOrphanedProject() { + return orphanedProjectRadio.getValue(); + } + + public boolean isProject() { + return projectRadio.getValue(); + } + + public void setMessage(final String message, final SiteErrorType type) { + messagesPanel.setMessage(message, type, type); + messagesPanel.show(); + } + + public void showLicenseForm() { + deck.showWidget(1); + } + + public void showNewGroupInitialDataForm() { + deck.showWidget(0); + } + + private FormPanel createNewGroupInitialDataForm(final NewGroupPresenter presenter) { + final FormPanel form = new FormPanel(); + form.setBorder(false); + form.setWidth(420); + form.setLabelWidth(100); + form.setLabelAlign(Position.RIGHT); + form.setButtonAlign(Position.RIGHT); + + shortNameField = new TextField(); + shortNameField.setFieldLabel(i18n.t("Short name")); + shortNameField. + + setName(SHORTNAME_FIELD); + shortNameField.setWidth(175); + shortNameField.setMinLength(3); + shortNameField.setMaxLength(15); + shortNameField.setAllowBlank(false); + shortNameField.setRegex("^[a-z0-9_\\-]+$"); + shortNameField.setMinLengthText(i18n.t(MUST_BE_BETWEEN_3_AND_15)); + shortNameField.setMaxLengthText(i18n.t(MUST_BE_BETWEEN_3_AND_15)); + shortNameField.setRegexText(i18n.t(MUST_BE_BETWEEN_3_AND_15)); + shortNameField.setValidationDelay(1000); + + form.add(shortNameField); + + longNameField = new TextField(); + longNameField.setFieldLabel(i18n.t("Long name")); + longNameField.setName(LONGNAME_FIELD); + longNameField.setWidth(300); + longNameField.setAllowBlank(false); + + longNameField.setMinLength(3); + longNameField.setMaxLength(50); + longNameField.setValidationDelay(1000); + form.add(longNameField); + + publicDescField = new TextArea(); + publicDescField.setFieldLabel(i18n.t("Public description")); + publicDescField.setName(PUBLICDESC_FIELD); + publicDescField.setWidth(300); + publicDescField.setAllowBlank(false); + publicDescField.setMinLength(10); + publicDescField.setMaxLength(255); + publicDescField.setValidationDelay(1000); + form.add(publicDescField); + + tags = new TextField(); + tags.setFieldLabel(i18n.t("Group tags")); + tags.setName(TAGS_FIELD); + tags.setWidth(300); + tags.setAllowBlank(false); + final ToolTip fieldToolTip = new ToolTip(i18n.t("Some words related to this group (separated with spaces).")); + fieldToolTip.applyTo(tags); + tags.setValidationDelay(1000); + form.add(tags); + + final FieldSet groupTypeFieldSet = new FieldSet(i18n.t("Type of group")); + groupTypeFieldSet.setStyle("margin-left: 105px"); + + form.add(groupTypeFieldSet); + + projectRadio = new Radio(); + createRadio(groupTypeFieldSet, projectRadio, "Project", + "A project is a kind of group in which new members inclusion " + + "is moderated by the project administrators. " + + "An administrator is the person who creates the project " + + "and other people she/he choose in the future as administrator too."); + projectRadio.setChecked(true); + + orgRadio = new Radio(); + createRadio(groupTypeFieldSet, orgRadio, "Organization", "An organization is like a project, " + + "but organizations must be a legal entity."); + + communityRadio = new Radio(); + createRadio(groupTypeFieldSet, communityRadio, "Community", "Communities are social group of persons " + + "with shared interests and they are open to new members " + + "(for instance the environmental community or the LGBT community). " + + "Normally they aren't a legal entity."); + + orphanedProjectRadio = new Radio(); + createRadio(groupTypeFieldSet, orphanedProjectRadio, "Orphaned Project", + "If you have an idea but you don't have " + "capacity/possibilities/resources to work on it, " + + "just register a orphaned project, and permit others to work and develop it."); + + groupTypeFieldSet.setCollapsible(false); + + return form; + } + + private void createRadio(final FieldSet fieldSet, final Radio radio, final String radioLabel, final String radioTip) { + radio.setName(TYPEOFGROUP_FIELD); + radio.setBoxLabel(KuneUiUtils.genQuickTipLabel(i18n.t(radioLabel), null, i18n.t(radioTip), INFO_IMAGE)); + radio.setAutoCreate(true); + radio.setHideLabel(true); + fieldSet.add(radio); + // ToolTip fieldToolTip = new ToolTip("Tooltip on a Field."); + // fieldToolTip.applyTo(captchaField); + // Image info = new Image("images/silk/information.gif"); + // + // ToolTip tooltip = new ToolTip(); + // tooltip.setHtml("A <b>CAPTCHA</b> is a challenge-response test to + // determine whether " + + // "the user is human."); + // tooltip.setWidth(150); + // tooltip.applyTo(info.getElement()); + + // Tested: + // Set tooltip + // Image info = new Image(); + // ChatIcons.App.getInstance().info().applyTo(info); + // ToolTip tooltip = new ToolTip(); + // tooltip.setHtml(i18n.t("Note that the 'Jabber Id' sometimes is the + // same as the email " + // + "(in gmail accounts for instance).")); + // tooltip.setWidth(250); + // tooltip.applyTo(info.getElement()); + // jidPanel.addToRow(info, new ColumnLayoutData(1)); + // + // formPanel.add(jidPanel); + + } + + private void initBottomButtons() { + super.setEnabledBackButton(false); + super.setEnabledFinishButton(false); + super.setEnabledNextButton(true); + } +} 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 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -29,7 +29,6 @@ import org.ourproject.kune.platf.client.services.I18nTranslationService; import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; import org.ourproject.kune.workspace.client.sitebar.Site; import org.ourproject.kune.workspace.client.sitebar.SiteToken; 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 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/NewGroupView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -21,7 +21,6 @@ import org.ourproject.kune.platf.client.View; import org.ourproject.kune.platf.client.dto.LicenseDTO; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; public interface NewGroupView extends View { Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/SiteErrorType.java (from rev 792, trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/ui/SiteErrorType.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/ui/SiteErrorType.java 2008-07-06 13:51:18 UTC (rev 792) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/newgroup/SiteErrorType.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,5 @@ +package org.ourproject.kune.workspace.client.newgroup; + +public enum SiteErrorType { + error, veryimp, imp, info +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearchListener.java (from rev 792, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearchListener.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearchListener.java 2008-07-06 13:51:18 UTC (rev 792) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearchListener.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,28 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + +import org.ourproject.kune.platf.client.View; + +public interface EntityLiveSearchListener extends View { + + void onSelection(String shortName, String longName); + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcher.java (from rev 820, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/EntityLiveSearcher.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/EntityLiveSearcher.java 2008-07-27 03:03:11 UTC (rev 820) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcher.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,32 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + +import org.ourproject.kune.platf.client.dto.LinkDTO; + +import com.calclab.suco.client.signal.Slot; + +public interface EntityLiveSearcher { + + void onSelection(Slot<LinkDTO> slot); + + void show(); + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java (from rev 820, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/EntityLiveSearcherPanel.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/EntityLiveSearcherPanel.java 2008-07-27 03:03:11 UTC (rev 820) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,155 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + +import org.ourproject.kune.platf.client.dto.LinkDTO; +import org.ourproject.kune.platf.client.services.I18nTranslationService; +import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog; + +import com.google.gwt.user.client.Command; +import com.google.gwt.user.client.DeferredCommand; +import com.gwtext.client.core.Connection; +import com.gwtext.client.core.Template; +import com.gwtext.client.core.UrlParam; +import com.gwtext.client.data.DataProxy; +import com.gwtext.client.data.FieldDef; +import com.gwtext.client.data.HttpProxy; +import com.gwtext.client.data.JsonReader; +import com.gwtext.client.data.Record; +import com.gwtext.client.data.RecordDef; +import com.gwtext.client.data.Store; +import com.gwtext.client.data.StringFieldDef; +import com.gwtext.client.widgets.form.ComboBox; +import com.gwtext.client.widgets.form.FormPanel; +import com.gwtext.client.widgets.form.event.ComboBoxListenerAdapter; + +public class EntityLiveSearcherPanel implements EntityLiveSearcherView { + + private static final String LONG_NAME_FIELD = "longName"; + private static final String SHORT_NAME_FIELD = "shortName"; + private static final String ICON_URL_FIELD = "iconUrl"; + private static final String LINK_FIELD = "link"; + private static final int PAGINATION_SIZE = 10; + private final EntityLiveSearcherPresenter presenter; + private BasicDialog dialog; + private final int searchType; + private FormPanel searchForm; + private final I18nTranslationService i18n; + + public EntityLiveSearcherPanel(final EntityLiveSearcherPresenter presenter, final int searchType, + final I18nTranslationService i18n) { + this.presenter = presenter; + this.searchType = searchType; + this.i18n = i18n; + } + + public void center() { + dialog.center(); + } + + public void hide() { + dialog.hide(); + searchForm.getForm().reset(); + } + + public void show() { + if (dialog == null) { + createGroupSearchDialog(searchType); + } + dialog.show(); + dialog.center(); + } + + private void createGroupSearchDialog(final int searchType) { + String title; + if (searchType == EntityLiveSearcherView.SEARCH_GROUPS) { + title = i18n.t("Search existing users and groups"); + } else { + title = i18n.t("Search existing users"); + } + dialog = new BasicDialog(title, true, false, 285, 55); + dialog.setClosable(true); + dialog.setCollapsible(false); + + DataProxy dataProxy = null; + switch (searchType) { + case EntityLiveSearcherView.SEARCH_GROUPS: + dataProxy = new HttpProxy("/kune/json/GroupJSONService/search", Connection.POST); + break; + case EntityLiveSearcherView.SEARCH_USERS: + dataProxy = new HttpProxy("/kune/json/UserJSONService/search", Connection.POST); + break; + default: + break; + } + + final JsonReader reader = new JsonReader(new RecordDef( + new FieldDef[] { new StringFieldDef(SHORT_NAME_FIELD), new StringFieldDef(LONG_NAME_FIELD), + new StringFieldDef(LINK_FIELD), new StringFieldDef(ICON_URL_FIELD) })); + reader.setRoot("list"); + reader.setTotalProperty("size"); + reader.setId(SHORT_NAME_FIELD); + + final Store store = new Store(dataProxy, reader); + + store.load(new UrlParam[] { new UrlParam("query", "."), new UrlParam("first", 1), + new UrlParam("max", PAGINATION_SIZE) }); + + searchForm = new FormPanel(); + searchForm.setBorder(false); + searchForm.setWidth(275); + searchForm.setHideLabels(true); + + final Template resultTpl = new Template( + "<div class=\"search-item\"><span class=\"kune-IconHyperlink\"><img alt=\"group logo\" src=\"images/group-def-icon.png\" style=\"height: 16px; width: 16px;\" />{shortName}: {longName}</span></div>"); + final ComboBox cb = new ComboBox(); + cb.setStore(store); + cb.setEmptyText(i18n.t("Write here to search")); + cb.setDisplayField(LONG_NAME_FIELD); + cb.setTypeAhead(true); + cb.setLoadingText(i18n.t("Searching...")); + cb.setWidth(268); + cb.setPageSize(PAGINATION_SIZE); + cb.setTpl(resultTpl); + cb.setMode(ComboBox.REMOTE); + cb.setMinChars(2); + cb.setSelectOnFocus(false); + cb.setHideTrigger(true); + cb.setHideLabel(true); + // setTitle(i18n.t("User or group")); + cb.setItemSelector("div.search-item"); + + cb.addListener(new ComboBoxListenerAdapter() { + public void onSelect(final ComboBox comboBox, final Record record, final int index) { + DeferredCommand.addCommand(new Command() { + public void execute() { + final LinkDTO link = new LinkDTO(record.getAsString(SHORT_NAME_FIELD), record + .getAsString(LONG_NAME_FIELD), record.getAsString(ICON_URL_FIELD), record + .getAsString(LINK_FIELD)); + presenter.onSelection(link); + } + }); + } + }); + + searchForm.add(cb); + dialog.add(searchForm); + } +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPresenter.java (from rev 820, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherPresenter.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherPresenter.java 2008-07-27 03:03:11 UTC (rev 820) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,55 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + +import org.ourproject.kune.platf.client.View; +import org.ourproject.kune.platf.client.dto.LinkDTO; + +import com.calclab.suco.client.signal.Slot; + +public class EntityLiveSearcherPresenter implements EntityLiveSearcher { + + private EntityLiveSearcherView view; + private Slot<LinkDTO> slot; + + public EntityLiveSearcherPresenter() { + } + + public View getView() { + return view; + } + + public void init(final EntityLiveSearcherView view) { + this.view = view; + } + + public void onSelection(final LinkDTO link) { + slot.onEvent(link); + view.hide(); + } + + public void onSelection(final Slot<LinkDTO> slot) { + this.slot = slot; + } + + public void show() { + view.show(); + } +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherView.java (from rev 816, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherView.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherView.java 2008-07-26 16:44:17 UTC (rev 816) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,35 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + +import org.ourproject.kune.platf.client.View; + +public interface EntityLiveSearcherView extends View { + + final public static int SEARCH_GROUPS = 1; + final public static int SEARCH_USERS = 2; + + void show(); + + void hide(); + + void center(); + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearchPanel.java (from rev 816, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/GroupLiveSearchPanel.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/GroupLiveSearchPanel.java 2008-07-26 16:44:17 UTC (rev 816) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearchPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,30 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + +import org.ourproject.kune.platf.client.services.I18nTranslationService; + +public class GroupLiveSearchPanel extends EntityLiveSearcherPanel { + + public GroupLiveSearchPanel(final EntityLiveSearcherPresenter presenter, final I18nTranslationService i18n) { + super(presenter, EntityLiveSearcherView.SEARCH_GROUPS, i18n); + } + +} \ No newline at end of file Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearcher.java (from rev 816, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupLiveSearcher.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupLiveSearcher.java 2008-07-26 16:44:17 UTC (rev 816) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearcher.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,25 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + +public interface GroupLiveSearcher extends EntityLiveSearcher { + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearcherPresenter.java (from rev 816, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupLiveSearcherPresenter.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupLiveSearcherPresenter.java 2008-07-26 16:44:17 UTC (rev 816) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/GroupLiveSearcherPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,25 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + + +public class GroupLiveSearcherPresenter extends EntityLiveSearcherPresenter implements GroupLiveSearcher { + +} Added: trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteBottomTrayButton.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteBottomTrayButton.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteBottomTrayButton.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,33 @@ +package org.ourproject.kune.workspace.client.search; + +import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton; + +import com.gwtext.client.core.EventObject; +import com.gwtext.client.widgets.Button; +import com.gwtext.client.widgets.ToolbarButton; +import com.gwtext.client.widgets.Window; +import com.gwtext.client.widgets.event.ButtonListenerAdapter; + +public class SiteBottomTrayButton { + + private final ToolbarButton traybarButton; + + public SiteBottomTrayButton(final String icon, final String tooltip, final Window dialog, final WorkspaceSkeleton ws) { + traybarButton = new ToolbarButton(); + traybarButton.setTooltip(tooltip); + traybarButton.setIcon(icon); + traybarButton.addListener(new ButtonListenerAdapter() { + @Override + public void onClick(final Button button, final EventObject e) { + if (dialog.isVisible()) { + dialog.hide(); + } else { + dialog.show(); + } + } + + }); + ws.getSiteTraybar().addButton(traybarButton); + } + +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/SiteSearcherPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -37,7 +37,6 @@ import com.gwtext.client.widgets.Component; import com.gwtext.client.widgets.Panel; import com.gwtext.client.widgets.TabPanel; -import com.gwtext.client.widgets.ToolbarButton; import com.gwtext.client.widgets.Window; import com.gwtext.client.widgets.event.ButtonListenerAdapter; import com.gwtext.client.widgets.event.PanelListenerAdapter; @@ -63,7 +62,7 @@ private GridPanel groupsGrid; private GridPanel contentGrid; private final WorkspaceSkeleton ws; - private ToolbarButton traybarButton; + private SiteBottomTrayButton traybarButton; public SiteSearcherPanel(final SiteSearcherPresenter initPresenter, final I18nTranslationService i18n, final WorkspaceSkeleton ws) { @@ -100,21 +99,8 @@ dialog.expand(); dialog.center(); if (traybarButton == null) { - traybarButton = new ToolbarButton(); - traybarButton.setTooltip(i18n.t("Show/hide searcher")); - traybarButton.setIcon("images/kune-search-ico-push.gif"); - traybarButton.addListener(new ButtonListenerAdapter() { - @Override - public void onClick(final Button button, final EventObject e) { - if (dialog.isVisible()) { - dialog.hide(); - } else { - dialog.show(); - } - } - - }); - ws.getSiteTraybar().addButton(traybarButton); + traybarButton = new SiteBottomTrayButton("images/kune-search-ico-push.gif", i18n.t("Show/hide searcher"), + dialog, ws); } } Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcher.java (from rev 816, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/UserLiveSearcher.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/UserLiveSearcher.java 2008-07-26 16:44:17 UTC (rev 816) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcher.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,25 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + + +public interface UserLiveSearcher extends EntityLiveSearcher { +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcherPanel.java (from rev 816, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/UserLiveSearcherPanel.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/UserLiveSearcherPanel.java 2008-07-26 16:44:17 UTC (rev 816) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcherPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,30 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + +import org.ourproject.kune.platf.client.services.I18nTranslationService; + +public class UserLiveSearcherPanel extends EntityLiveSearcherPanel { + + public UserLiveSearcherPanel(final EntityLiveSearcherPresenter presenter, final I18nTranslationService i18n) { + super(presenter, EntityLiveSearcherView.SEARCH_USERS, i18n); + } + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcherPresenter.java (from rev 816, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserLiveSearcherPresenter.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserLiveSearcherPresenter.java 2008-07-26 16:44:17 UTC (rev 816) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/UserLiveSearcherPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,25 @@ +/* + * + * Copyright (C) 2007-2008 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.search; + + +public class UserLiveSearcherPresenter extends EntityLiveSearcherPresenter implements UserLiveSearcher { + +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/Site.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/Site.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/Site.java 2008-08-05 01:27:03 UTC (rev 826) @@ -21,7 +21,7 @@ import org.ourproject.kune.platf.client.services.I18nTranslationService; import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; +import org.ourproject.kune.workspace.client.newgroup.SiteErrorType; import org.ourproject.kune.workspace.client.sitebar.msg.SiteMessage; import org.ourproject.kune.workspace.client.ui.newtmp.sitebar.siteprogress.SiteProgress; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -27,7 +27,7 @@ import org.ourproject.kune.platf.client.services.Images; import org.ourproject.kune.platf.client.ui.IconLabel; import org.ourproject.kune.platf.client.ui.RoundedBorderDecorator; -import org.ourproject.kune.workspace.client.newgroup.ui.NewGroupPanel; +import org.ourproject.kune.workspace.client.newgroup.NewGroupPanel; import org.ourproject.kune.workspace.client.sitebar.Site; import org.ourproject.kune.workspace.client.sitebar.SiteToken; import org.ourproject.kune.workspace.client.sitebar.login.SignInPanel; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/bar/SiteBarPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -20,14 +20,12 @@ package org.ourproject.kune.workspace.client.sitebar.bar; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.dispatch.DefaultDispatcher; import org.ourproject.kune.platf.client.dto.GroupListDTO; import org.ourproject.kune.platf.client.dto.StateDTO; import org.ourproject.kune.platf.client.dto.StateToken; import org.ourproject.kune.platf.client.dto.UserInfoDTO; import org.ourproject.kune.platf.client.services.I18nTranslationService; import org.ourproject.kune.platf.client.state.Session; -import org.ourproject.kune.workspace.client.WorkspaceEvents; import org.ourproject.kune.workspace.client.sitebar.Site; public class SiteBarPresenter implements SiteBar { @@ -129,7 +127,6 @@ } public void onHelpInTranslation() { - DefaultDispatcher.getInstance().fire(WorkspaceEvents.SHOW_TRANSLATOR, null); } public void onLoginCancelled() { Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -22,7 +22,7 @@ import org.ourproject.kune.platf.client.ui.dialogs.BasicDialog; import org.ourproject.kune.platf.client.ui.dialogs.InfoDialog; import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; +import org.ourproject.kune.workspace.client.newgroup.SiteErrorType; import org.ourproject.kune.workspace.client.sitebar.Site; import org.ourproject.kune.workspace.client.sitebar.msg.SimpleMessagePanel; import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -33,7 +33,7 @@ import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; +import org.ourproject.kune.workspace.client.newgroup.SiteErrorType; import org.ourproject.kune.workspace.client.sitebar.Site; import org.ourproject.kune.workspace.client.sitebar.rpc.UserServiceAsync; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInView.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/login/SignInView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -20,7 +20,7 @@ package org.ourproject.kune.workspace.client.sitebar.login; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; +import org.ourproject.kune.workspace.client.newgroup.SiteErrorType; public interface SignInView extends View { Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/MessagePresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/MessagePresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/MessagePresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -20,7 +20,7 @@ package org.ourproject.kune.workspace.client.sitebar.msg; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; +import org.ourproject.kune.workspace.client.newgroup.SiteErrorType; public interface MessagePresenter { Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SimpleMessagePanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SimpleMessagePanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SimpleMessagePanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,7 +1,7 @@ package org.ourproject.kune.workspace.client.sitebar.msg; import org.ourproject.kune.platf.client.services.Images; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; +import org.ourproject.kune.workspace.client.newgroup.SiteErrorType; import com.google.gwt.user.client.ui.AbstractImagePrototype; import com.google.gwt.user.client.ui.HTML; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessage.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessage.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessage.java 2008-08-05 01:27:03 UTC (rev 826) @@ -20,7 +20,7 @@ package org.ourproject.kune.workspace.client.sitebar.msg; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; +import org.ourproject.kune.workspace.client.newgroup.SiteErrorType; public interface SiteMessage extends View { Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessagePresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessagePresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessagePresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -20,7 +20,7 @@ package org.ourproject.kune.workspace.client.sitebar.msg; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; +import org.ourproject.kune.workspace.client.newgroup.SiteErrorType; public class SiteMessagePresenter implements SiteMessage, MessagePresenter { private SiteMessageView view; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessageView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessageView.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/msg/SiteMessageView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -20,7 +20,7 @@ package org.ourproject.kune.workspace.client.sitebar.msg; import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.workspace.client.newgroup.ui.SiteErrorType; +import org.ourproject.kune.workspace.client.newgroup.SiteErrorType; public interface SiteMessageView extends View { Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearchListener.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearchListener.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearchListener.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,28 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.socialnet; - -import org.ourproject.kune.platf.client.View; - -public interface EntityLiveSearchListener extends View { - - void onSelection(String shortName, String longName); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,56 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.socialnet; - -import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.dto.LinkDTO; -import org.ourproject.kune.workspace.client.workspace.EntityLiveSearcher; - -import com.calclab.suco.client.signal.Slot; - -public class EntityLiveSearcherPresenter implements EntityLiveSearcher { - - private EntityLiveSearcherView view; - private Slot<LinkDTO> slot; - - public EntityLiveSearcherPresenter() { - } - - public View getView() { - return view; - } - - public void init(final EntityLiveSearcherView view) { - this.view = view; - } - - public void onSelection(final LinkDTO link) { - slot.onEvent(link); - view.hide(); - } - - public void onSelection(final Slot<LinkDTO> slot) { - this.slot = slot; - } - - public void show() { - view.show(); - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherView.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/EntityLiveSearcherView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,35 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.socialnet; - -import org.ourproject.kune.platf.client.View; - -public interface EntityLiveSearcherView extends View { - - final public static int SEARCH_GROUPS = 1; - final public static int SEARCH_USERS = 2; - - void show(); - - void hide(); - - void center(); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupLiveSearcherPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupLiveSearcherPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupLiveSearcherPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,26 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.socialnet; - -import org.ourproject.kune.workspace.client.workspace.GroupLiveSearcher; - -public class GroupLiveSearcherPresenter extends EntityLiveSearcherPresenter implements GroupLiveSearcher { - -} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummary.java (from rev 823, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupMembersSummary.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupMembersSummary.java 2008-08-01 10:53:22 UTC (rev 823) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummary.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,32 @@ +/* + * + * Copyright (C) 2007-2008 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.socialnet; + +import org.ourproject.kune.platf.client.dto.GroupDTO; +import org.ourproject.kune.platf.client.ui.MenuItem; + +public interface GroupMembersSummary { + + void addGroupOperation(MenuItem<GroupDTO> operation, boolean mustBeLogged); + + void removeGroupOperation(MenuItem<GroupDTO> operation, boolean mustBeLogged); + +} 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 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -14,6 +14,7 @@ import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; import com.calclab.emiteuimodule.client.users.UserGridPanel; +import com.calclab.suco.client.signal.Slot; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.DeferredCommand; import com.gwtext.client.core.EventObject; @@ -40,14 +41,19 @@ super.setHeaderTitle(i18n.t("People and groups collaborating in this group")); super.setBorderStylePrimaryName("k-dropdownouter-members"); super.addStyleName("kune-Margin-Medium-t"); - // super.addStyleName("kune-Margin-Small-r"); final GridDragConfiguration dragConf = new GridDragConfiguration(UserGridPanel.USER_GROUP_DD, i18n .t("Drop in the chat area to start a chat.") + "<br/>" + i18n.t("Drop into a room to invite the user to join the chat room")); gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This is an orphaned project, if you are interested " + "please request to join to work on it"), dragConf, true, true, false, true, false); + gridMenuPanel.onDoubleClick(new Slot<String>() { + public void onEvent(final String groupShortName) { + presenter.onDoubleClick(groupShortName); + } + }); final EntitySummary entitySummary = ws.getEntitySummary(); + this.setContent(gridMenuPanel); entitySummary.addInSummary(this); entitySummary.addListener(new ContainerListenerAdapter() { @Override @@ -56,7 +62,6 @@ gridMenuPanel.setWidth(adjWidth); } }); - this.setContent(gridMenuPanel); buttonsCache = new HashMap<GridButton, ToolbarButton>(); } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/GroupMembersSummaryPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -18,11 +18,10 @@ import org.ourproject.kune.platf.client.ui.gridmenu.GridButton; import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup; import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; +import org.ourproject.kune.workspace.client.search.UserLiveSearcher; import org.ourproject.kune.workspace.client.sitebar.Site; import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter; -import org.ourproject.kune.workspace.client.workspace.GroupMembersSummary; -import org.ourproject.kune.workspace.client.workspace.UserLiveSearcher; import com.calclab.suco.client.container.Provider; import com.calclab.suco.client.signal.Slot; @@ -176,4 +175,8 @@ } } + public void onDoubleClick(String groupShortName) { + stateManager.gotoToken(groupShortName); + } + } Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummary.java (from rev 823, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ParticipationSummary.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ParticipationSummary.java 2008-08-01 10:53:22 UTC (rev 823) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummary.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,26 @@ +/* + * + * Copyright (C) 2007-2008 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.socialnet; + + +public interface ParticipationSummary { + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java (from rev 822, trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/ParticipationSummaryPanel.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ui/ParticipationSummaryPanel.java 2008-07-31 13:28:16 UTC (rev 822) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,75 @@ +/* + * + * Copyright (C) 2007-2008 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.socialnet; + +import org.ourproject.kune.platf.client.dto.GroupDTO; +import org.ourproject.kune.platf.client.services.I18nTranslationService; +import org.ourproject.kune.platf.client.ui.DropDownPanel; +import org.ourproject.kune.platf.client.ui.gridmenu.GridItem; +import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuPanel; +import org.ourproject.kune.workspace.client.ui.newtmp.skel.EntitySummary; +import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton; + +import com.gwtext.client.widgets.BoxComponent; +import com.gwtext.client.widgets.event.ContainerListenerAdapter; + +public class ParticipationSummaryPanel extends DropDownPanel implements ParticipationSummaryView { + + private final GridMenuPanel<GroupDTO> gridMenuPanel; + + public ParticipationSummaryPanel(final ParticipationSummaryPresenter presenter, final I18nTranslationService i18n, + final WorkspaceSkeleton ws) { + super(true); + // super.setHeaderText(i18n.t("Participates as...")); + super.setHeaderText(i18n.t("Participates in")); + super.setHeaderTitle(i18n.t("Groups in which participates")); + super.setBorderStylePrimaryName("k-dropdownouter-part"); + super.addStyleName("kune-Margin-Medium-t"); + gridMenuPanel = new GridMenuPanel<GroupDTO>(i18n.t("This user is not member of any group"), false, false, + false, false, false); + final EntitySummary entitySummary = ws.getEntitySummary(); + this.setContent(gridMenuPanel); + entitySummary.addInSummary(this); + entitySummary.addListener(new ContainerListenerAdapter() { + @Override + public void onResize(final BoxComponent component, final int adjWidth, final int adjHeight, + final int rawWidth, final int rawHeight) { + gridMenuPanel.setWidth(adjWidth); + } + }); + } + + public void addItem(final GridItem<GroupDTO> gridItem) { + gridMenuPanel.addItem(gridItem); + } + + public void clear() { + gridMenuPanel.removeAll(); + } + + public void hide() { + this.setVisible(false); + } + + public void show() { + this.setVisible(true); + } + +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/ParticipationSummaryPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -34,7 +34,6 @@ import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter; -import org.ourproject.kune.workspace.client.workspace.ParticipationSummary; import com.calclab.suco.client.container.Provider; import com.calclab.suco.client.signal.Slot; Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/SocialNetworkPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -10,11 +10,11 @@ import org.ourproject.kune.platf.client.services.ImageUtils; import org.ourproject.kune.platf.client.state.Session; import org.ourproject.kune.platf.client.state.StateManager; +import org.ourproject.kune.platf.client.ui.MenuItem; import org.ourproject.kune.platf.client.ui.gridmenu.GridButton; import org.ourproject.kune.platf.client.ui.gridmenu.GridGroup; import org.ourproject.kune.platf.client.ui.gridmenu.GridItem; import org.ourproject.kune.platf.client.ui.gridmenu.GridMenu; -import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuItem; import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuItemCollection; import org.ourproject.kune.workspace.client.i18n.I18nUITranslationService; import org.ourproject.kune.workspace.client.sitebar.Site; @@ -26,14 +26,14 @@ protected GridButton requestJoin; protected GridButton unJoinButton; - protected GridMenuItem<GroupDTO> changeToCollabMenuItem; - protected GridMenuItem<GroupDTO> removeMemberMenuItem; - protected GridMenuItem<GroupDTO> changeToAdminMenuItem; - protected GridMenuItem<GroupDTO> acceptJoinGroupMenuItem; - protected GridMenuItem<GroupDTO> denyJoinGroupMenuItem; - protected GridMenuItem<GroupDTO> gotoMemberMenuItem; - protected GridMenuItem<GroupDTO> gotoGroupMenuItem; - protected GridMenuItem<GroupDTO> unJoinMenuItem; + protected MenuItem<GroupDTO> changeToCollabMenuItem; + protected MenuItem<GroupDTO> removeMemberMenuItem; + protected MenuItem<GroupDTO> changeToAdminMenuItem; + protected MenuItem<GroupDTO> acceptJoinGroupMenuItem; + protected MenuItem<GroupDTO> denyJoinGroupMenuItem; + protected MenuItem<GroupDTO> gotoMemberMenuItem; + protected MenuItem<GroupDTO> gotoGroupMenuItem; + protected MenuItem<GroupDTO> unJoinMenuItem; private final I18nUITranslationService i18n; private final StateManager stateManager; private final Provider<SocialNetworkServiceAsync> snServiceProvider; @@ -56,24 +56,24 @@ otherLoggedOperations = new GridMenuItemCollection<GroupDTO>(); } - public void addGroupOperation(final GridMenuItem<GroupDTO> operation, final boolean mustBeLogged) { + public void addGroupOperation(final MenuItem<GroupDTO> operation, final boolean mustBeLogged) { GridMenuItemCollection<GroupDTO> collection; collection = mustBeLogged ? otherLoggedOperations : otherOperations; collection.add(operation); } - public void removeGroupOperation(final GridMenuItem<GroupDTO> operation, final boolean mustBeLogged) { + public void removeGroupOperation(final MenuItem<GroupDTO> operation, final boolean mustBeLogged) { GridMenuItemCollection<GroupDTO> collection; collection = mustBeLogged ? otherLoggedOperations : otherOperations; collection.remove(operation); } protected GridItem<GroupDTO> createGridItem(final GridGroup groupCategory, final GroupDTO group, - final AccessRightsDTO rights, final GridMenuItem<GroupDTO>... gridMenuItems) { + final AccessRightsDTO rights, final MenuItem<GroupDTO>... gridMenuItems) { final GridItem<GroupDTO> gridItem = createDefMemberMenu(group, groupCategory); final GridMenu<GroupDTO> menu = gridItem.getMenu(); if (rights.isAdministrable()) { - for (final GridMenuItem<GroupDTO> item : gridMenuItems) { + for (final MenuItem<GroupDTO> item : gridMenuItems) { menu.addMenuItem(item); } } @@ -129,25 +129,25 @@ } private void createMenuActions() { - gotoGroupMenuItem = new GridMenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this group homepage"), + gotoGroupMenuItem = new MenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this group homepage"), new Slot<GroupDTO>() { public void onEvent(final GroupDTO groupDTO) { stateManager.gotoToken(groupDTO.getShortName()); } }); - gotoMemberMenuItem = new GridMenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this member homepage"), + gotoMemberMenuItem = new MenuItem<GroupDTO>("images/group-home.gif", i18n.t("Visit this member homepage"), new Slot<GroupDTO>() { public void onEvent(final GroupDTO groupDTO) { stateManager.gotoToken(groupDTO.getShortName()); } }); - unJoinMenuItem = new GridMenuItem<GroupDTO>("images/del.gif", i18n + unJoinMenuItem = new MenuItem<GroupDTO>("images/del.gif", i18n .t("Don't participate more as a member in this group"), new Slot<GroupDTO>() { public void onEvent(final GroupDTO groupDTO) { removeMemberAction(groupDTO); } }); - changeToCollabMenuItem = new GridMenuItem<GroupDTO>("images/arrow-down-green.gif", i18n + changeToCollabMenuItem = new MenuItem<GroupDTO>("images/arrow-down-green.gif", i18n .t("Change to collaborator"), new Slot<GroupDTO>() { public void onEvent(final GroupDTO group) { Site.showProgressProcessing(); @@ -162,7 +162,7 @@ }); } }); - removeMemberMenuItem = new GridMenuItem<GroupDTO>("images/del.gif", i18n.t("Remove this member"), + removeMemberMenuItem = new MenuItem<GroupDTO>("images/del.gif", i18n.t("Remove this member"), new Slot<GroupDTO>() { public void onEvent(final GroupDTO group) { Site.showProgressProcessing(); @@ -181,7 +181,7 @@ }); } }); - changeToAdminMenuItem = new GridMenuItem<GroupDTO>("images/arrow-up-green.gif", i18n.t("Change to admin"), + changeToAdminMenuItem = new MenuItem<GroupDTO>("images/arrow-up-green.gif", i18n.t("Change to admin"), new Slot<GroupDTO>() { public void onEvent(final GroupDTO group) { Site.showProgressProcessing(); @@ -196,7 +196,7 @@ }); } }); - acceptJoinGroupMenuItem = new GridMenuItem<GroupDTO>("images/accept.gif", i18n.t("Accept this member"), + acceptJoinGroupMenuItem = new MenuItem<GroupDTO>("images/accept.gif", i18n.t("Accept this member"), new Slot<GroupDTO>() { public void onEvent(final GroupDTO group) { Site.showProgressProcessing(); @@ -211,7 +211,7 @@ }); } }); - denyJoinGroupMenuItem = new GridMenuItem<GroupDTO>("images/cancel.gif", i18n.t("Don't accept this member"), + denyJoinGroupMenuItem = new MenuItem<GroupDTO>("images/cancel.gif", i18n.t("Don't accept this member"), new Slot<GroupDTO>() { public void onEvent(final GroupDTO group) { Site.showProgressProcessing(); Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserLiveSearcherPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserLiveSearcherPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/socialnet/UserLiveSearcherPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,26 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.socialnet; - -import org.ourproject.kune.workspace.client.workspace.UserLiveSearcher; - -public class UserLiveSearcherPresenter extends EntityLiveSearcherPresenter implements UserLiveSearcher { - -} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummary.java (from rev 823, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupSummary.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupSummary.java 2008-08-01 10:53:22 UTC (rev 823) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummary.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,26 @@ +/* + * + * Copyright (C) 2007-2008 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.summary; + + +public interface GroupSummary { + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPanel.java (from rev 823, trunk/src/main/java/org/ourproject/kune/workspace/client/presence/ui/GroupSummaryPanel.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/presence/ui/GroupSummaryPanel.java 2008-08-01 10:53:22 UTC (rev 823) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,55 @@ +/* + * + * Copyright (C) 2007-2008 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.summary; + +import org.ourproject.kune.platf.client.services.I18nTranslationService; +import org.ourproject.kune.platf.client.ui.DropDownPanel; +import org.ourproject.kune.workspace.client.sitebar.Site; +import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton; + +import com.google.gwt.user.client.ui.Label; +import com.google.gwt.user.client.ui.VerticalPanel; + +public class GroupSummaryPanel extends DropDownPanel implements GroupSummaryView { + + private final VerticalPanel vp; + + public GroupSummaryPanel(final GroupSummaryPresenter presenter, final I18nTranslationService i18n, + final WorkspaceSkeleton ws) { + super(i18n.t("Group Summary"), true); + setHeaderTitle(i18n.t("Some summarized information about current project" + Site.IN_DEVELOPMENT)); + vp = new VerticalPanel(); + vp.setWidth("100%"); + super.setContent(vp); + super.setContentVisible(true); + super.setBorderStylePrimaryName("k-dropdownouter-summary"); + addStyleName("kune-Margin-Medium-t"); + // Disabled while in development + // ws.getEntitySummary().addInSummary(this); + } + + public void setComment(final String comment) { + final Label label = new Label(comment); + label.addStyleName("kune-Margin-Small-trbl"); + vp.clear(); + vp.add(label); + } + +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/summary/GroupSummaryPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -24,7 +24,6 @@ import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter; -import org.ourproject.kune.workspace.client.workspace.GroupSummary; import com.calclab.suco.client.signal.Slot; import com.calclab.suco.client.signal.Slot2; Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummary.java (from rev 823, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/TagsSummary.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/TagsSummary.java 2008-08-01 10:53:22 UTC (rev 823) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummary.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,31 @@ +/* + * + * Copyright (C) 2007-2008 The kune development team (see CREDITS for details) + * This file is part of kune. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +package org.ourproject.kune.workspace.client.tags; + +import java.util.List; + +import org.ourproject.kune.platf.client.dto.TagResultDTO; + +public interface TagsSummary { + + void setGroupTags(List<TagResultDTO> result); + +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -29,10 +29,11 @@ import org.ourproject.kune.platf.client.ui.KuneUiUtils; import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton; +import com.google.gwt.user.client.Command; +import com.google.gwt.user.client.DeferredCommand; import com.google.gwt.user.client.ui.ClickListener; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.RootPanel; import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.Widget; @@ -60,31 +61,34 @@ addStyleName("kune-Margin-Medium-t"); flowPanel.addStyleName("kune-Margin-Small-trbl"); ws.getEntitySummary().addInSummary(this); - RootPanel.get("kuneinitialcurtain").setVisible(false); } public void setTags(final List<TagResultDTO> groupTags) { - flowPanel.clear(); - if (groupTags.size() == 0) { - flowPanel.add(noTagsLabel); - } else { - for (final Iterator<TagResultDTO> iterator = groupTags.iterator(); iterator.hasNext();) { - final TagResultDTO tagResult = iterator.next(); - final Label label = new Label(tagResult.getName()); - // i18n pluralization - if (tagResult.getCount().intValue() > 1) { - KuneUiUtils.setQuickTip(label, i18n.t("[%d] items with this tag", tagResult.getCount())); + DeferredCommand.addCommand(new Command() { + public void execute() { + flowPanel.clear(); + if (groupTags.size() == 0) { + flowPanel.add(noTagsLabel); } else { - KuneUiUtils.setQuickTip(label, i18n.t("[%d] item with this tag", tagResult.getCount())); + for (final Iterator<TagResultDTO> iterator = groupTags.iterator(); iterator.hasNext();) { + final TagResultDTO tagResult = iterator.next(); + final Label label = new Label(tagResult.getName()); + // i18n pluralization + if (tagResult.getCount().intValue() > 1) { + KuneUiUtils.setQuickTip(label, i18n.t("[%d] items with this tag", tagResult.getCount())); + } else { + KuneUiUtils.setQuickTip(label, i18n.t("[%d] item with this tag", tagResult.getCount())); + } + label.addClickListener(new ClickListener() { + public void onClick(final Widget sender) { + presenter.doSearchTag(tagResult.getName()); + } + }); + label.addStyleName("kune-TagsPanel-tag"); + flowPanel.add(label); + } } - label.addClickListener(new ClickListener() { - public void onClick(final Widget sender) { - presenter.doSearchTag(tagResult.getName()); - } - }); - label.addStyleName("kune-TagsPanel-tag"); - flowPanel.add(label); } - } + }); } } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -31,7 +31,6 @@ import org.ourproject.kune.workspace.client.search.SiteSearcherType; import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter; -import org.ourproject.kune.workspace.client.workspace.TagsSummary; import com.calclab.suco.client.container.Provider; import com.calclab.suco.client.signal.Slot; @@ -41,11 +40,11 @@ private TagsSummaryView view; private final Provider<SiteSearcher> searcherProvider; - private final Provider<Session> sessionProvider; + private final Session session; - public TagsSummaryPresenter(final Provider<Session> sessionProvider, final Provider<SiteSearcher> searcherProvider, + public TagsSummaryPresenter(final Session session, final Provider<SiteSearcher> searcherProvider, final StateManager stateManager, final WsThemePresenter wsThemePresenter) { - this.sessionProvider = sessionProvider; + this.session = session; this.searcherProvider = searcherProvider; stateManager.onStateChanged(new Slot<StateDTO>() { public void onEvent(final StateDTO state) { @@ -61,7 +60,7 @@ public void doSearchTag(final String name) { searcherProvider.get().doSearchOfType( - "group:" + sessionProvider.get().getCurrentState().getGroup().getShortName() + " tag:" + name, + "group:" + session.getCurrentState().getGroup().getShortName() + " tag:" + name, SiteSearcherType.content); } @@ -77,8 +76,13 @@ view.setTags(groupTags); } - private void setState(final StateDTO state) { - view.setTags(state.getGroupTags()); + void setState(final StateDTO state) { + if (state.getTags() != null && state.getTags().length() > 0) { + view.setVisible(true); + view.setTags(state.getGroupTags()); + } else { + view.setVisible(false); + } } } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/tags/TagsSummaryView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -32,4 +32,6 @@ void setTheme(WsTheme oldTheme, WsTheme newTheme); + void setVisible(boolean visible); + } Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -27,7 +27,6 @@ import org.ourproject.kune.platf.client.ui.HorizontalLine; import org.ourproject.kune.platf.client.ui.IconLabel; -import com.calclab.suco.client.container.Provider; import com.google.gwt.user.client.ui.AbstractImagePrototype; import com.google.gwt.user.client.ui.ClickListener; import com.google.gwt.user.client.ui.DockPanel; @@ -46,10 +45,10 @@ private final I18nTranslationService i18n; public ContextItemsPanel(final ContextItemsPresenter presenter, final I18nTranslationService i18n, - final Provider<StateManager> stateManagerProvider) { + final StateManager stateManager) { this.presenter = presenter; this.i18n = i18n; - topBar = new ContextTopBar(presenter, i18n, stateManagerProvider); + topBar = new ContextTopBar(presenter, i18n, stateManager); addTopBar(topBar); items = new ItemsPanel(presenter); Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextItemsPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -33,7 +33,7 @@ import org.ourproject.kune.platf.client.rpc.AsyncCallbackSimple; import org.ourproject.kune.platf.client.rpc.ParamCallback; import org.ourproject.kune.platf.client.services.I18nTranslationService; -import org.ourproject.kune.workspace.client.WorkspaceEvents; +import org.ourproject.kune.platf.client.state.StateManager; import org.ourproject.kune.workspace.client.sitebar.Site; import com.calclab.suco.client.signal.Slot; @@ -42,9 +42,11 @@ public class ContextItemsPresenter implements ContextItems { protected ContextItemsView view; private final I18nTranslationService i18n; + private final StateManager stateManager; - public ContextItemsPresenter(final I18nTranslationService i18n) { + public ContextItemsPresenter(final I18nTranslationService i18n, final StateManager stateManager) { this.i18n = i18n; + this.stateManager = stateManager; } public void canCreate(final String typeName, final String label, final Slot<?> slot) { @@ -83,7 +85,7 @@ DefaultDispatcher.getInstance().fire(DocsEvents.RENAME_CONTENT, new ParamCallback<String, Object>(text, new AsyncCallbackSimple<Object>() { public void onSuccess(final Object result) { - DefaultDispatcher.getInstance().fire(WorkspaceEvents.RELOAD_CONTEXT, null); + stateManager.reloadContextAndTitles(); Site.hideProgress(); } })); Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextTopBar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextTopBar.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/ctx/items/ContextTopBar.java 2008-08-05 01:27:03 UTC (rev 826) @@ -26,7 +26,6 @@ import org.ourproject.kune.platf.client.ui.KuneUiUtils; import org.ourproject.kune.platf.client.ui.RoundedBorderDecorator; -import com.calclab.suco.client.container.Provider; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.ui.ClickListener; import com.google.gwt.user.client.ui.HorizontalPanel; @@ -46,12 +45,12 @@ private final ContextItemsImages img; private final MenuBar pathSubmenu; private final I18nTranslationService i18n; - private final Provider<StateManager> stateManagerProvider; + private final StateManager stateManager; public ContextTopBar(final ContextItemsPresenter presenter, final I18nTranslationService i18n, - final Provider<StateManager> stateManagerProvider) { + final StateManager stateManager) { this.i18n = i18n; - this.stateManagerProvider = stateManagerProvider; + this.stateManager = stateManager; img = ContextItemsImages.App.getInstance(); firstRow = new HorizontalPanel(); final HorizontalPanel secondRow = new HorizontalPanel(); @@ -114,7 +113,7 @@ } pathSubmenu.addItem(indent + img.folder().getHTML() + " " + folderName, true, new Command() { public void execute() { - stateManagerProvider.get().gotoContainer(folder.getId()); + stateManager.gotoContainer(folder.getId()); } }); indent = indent + "  "; Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogo.java (from rev 823, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogo.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogo.java 2008-08-01 10:53:22 UTC (rev 823) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogo.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,6 @@ +package org.ourproject.kune.workspace.client.ui.newtmp.entitylogo; + + +public interface EntityLogo { + +} \ No newline at end of file Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogoPanel.java (from rev 823, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPanel.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPanel.java 2008-08-01 10:53:22 UTC (rev 823) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogoPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,123 @@ +/* + * + * Copyright (C) 2007-2008 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.ui.newtmp.entitylogo; + +import org.ourproject.kune.platf.client.services.I18nTranslationService; +import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton; +import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; + +import com.google.gwt.user.client.DOM; +import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.HorizontalPanel; +import com.google.gwt.user.client.ui.Hyperlink; +import com.google.gwt.user.client.ui.Image; +import com.google.gwt.user.client.ui.Label; +import com.google.gwt.user.client.ui.SimplePanel; +import com.google.gwt.user.client.ui.VerticalPanel; + +public class EntityLogoPanel extends SimplePanel implements EntityLogoView { + class EntityTextLogo extends VerticalPanel { + + private static final int GROUP_NAME_LIMIT_SIZE = 90; + private static final String LOGO_SMALL_FONT_SIZE = "108%"; + private static final String LOGO_DEFAULT_FONT_SIZE = "167%"; + private final Label defTextLogoLabel; + private final Hyperlink defTextPutYourLogoHL; + private final HorizontalPanel putYourLogoHP; + + public EntityTextLogo() { + // Initialize + super(); + defTextLogoLabel = new Label(); + final HTML expandCell = new HTML("<b></b>"); + putYourLogoHP = new HorizontalPanel(); + defTextPutYourLogoHL = new Hyperlink(); + + // Layout + add(defTextLogoLabel); + add(putYourLogoHP); + putYourLogoHP.add(expandCell); + putYourLogoHP.add(defTextPutYourLogoHL); + + // Set properties + // TODO: Put your logo here functionality + defTextPutYourLogoHL.setText(i18n.t("Put Your Logo Here")); + expandCell.setWidth("100%"); + putYourLogoHP.setCellWidth(expandCell, "100%"); + // TODO: link to configure the logo + setStylePrimaryName("k-entitytextlogo"); + setDefaultText(""); + } + + public void setDefaultText(final String text) { + if (text.length() > GROUP_NAME_LIMIT_SIZE) { + DOM.setStyleAttribute(defTextLogoLabel.getElement(), "fontSize", LOGO_SMALL_FONT_SIZE); + } else { + DOM.setStyleAttribute(defTextLogoLabel.getElement(), "fontSize", LOGO_DEFAULT_FONT_SIZE); + } + defTextLogoLabel.setText(text); + + } + + public void setPutYourLogoVisible(final boolean visible) { + putYourLogoHP.setVisible(visible); + } + + } + + private EntityTextLogo entityTextLogo; + private final I18nTranslationService i18n; + + public EntityLogoPanel(final I18nTranslationService i18n, final WorkspaceSkeleton ws) { + this.i18n = i18n; + ws.getEntityMainHeader().add(this); + } + + public void setLogo(final Image image) { + clear(); + add(image); + } + + public void setLogo(final String groupName) { + clear(); + add(getEntityTextLogo()); + entityTextLogo.setDefaultText(groupName); + } + + public void setPutYourLogoVisible(final boolean visible) { + getEntityTextLogo().setPutYourLogoVisible(visible); + } + + public void setTheme(final WsTheme oldTheme, final WsTheme newTheme) { + if (oldTheme != null) { + getEntityTextLogo().removeStyleDependentName(oldTheme.toString()); + } + getEntityTextLogo().addStyleDependentName(newTheme.toString()); + } + + private EntityTextLogo getEntityTextLogo() { + if (entityTextLogo == null) { + this.entityTextLogo = new EntityTextLogo(); + } + return entityTextLogo; + } + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogoPresenter.java (from rev 823, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPresenter.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPresenter.java 2008-08-01 10:53:22 UTC (rev 823) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogoPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,37 @@ +package org.ourproject.kune.workspace.client.ui.newtmp.entitylogo; + +import org.ourproject.kune.platf.client.dto.GroupDTO; +import org.ourproject.kune.platf.client.dto.StateDTO; +import org.ourproject.kune.platf.client.state.StateManager; +import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; +import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter; + +import com.calclab.suco.client.signal.Slot; +import com.calclab.suco.client.signal.Slot2; + +public class EntityLogoPresenter implements EntityLogo { + private EntityLogoView view; + + public EntityLogoPresenter(final StateManager stateManager, final WsThemePresenter theme) { + stateManager.onStateChanged(new Slot<StateDTO>() { + public void onEvent(final StateDTO state) { + final GroupDTO group = state.getGroup(); + final boolean isAdmin = state.getGroupRights().isAdministrable(); + + view.setLogo(group.getLongName()); + view.setPutYourLogoVisible(isAdmin); + } + }); + theme.onThemeChanged(new Slot2<WsTheme, WsTheme>() { + public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) { + view.setTheme(oldTheme, newTheme); + } + }); + } + + public void init(final EntityLogoView view) { + this.view = view; + + } + +} Copied: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogoView.java (from rev 823, trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoView.java) =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoView.java 2008-08-01 10:53:22 UTC (rev 823) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/entitylogo/EntityLogoView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -0,0 +1,17 @@ +package org.ourproject.kune.workspace.client.ui.newtmp.entitylogo; + +import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; + +import com.google.gwt.user.client.ui.Image; + +public interface EntityLogoView { + + // FIXME: Don' use Image + public abstract void setLogo(final Image image); + + public abstract void setLogo(final String groupName); + + public abstract void setPutYourLogoVisible(final boolean visible); + + public abstract void setTheme(final WsTheme oldTheme, WsTheme newTheme); +} Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntitySummary.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntitySummary.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/skel/EntitySummary.java 2008-08-05 01:27:03 UTC (rev 826) @@ -36,7 +36,7 @@ public void addInTools(final Widget widget) { entityTools.add(widget); - mainPanel.doLayoutIfNeeded(true); + mainPanel.doLayoutIfNeeded(); } public void addListener(final ContainerListener listener) { Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/title/EntityTitlePresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/title/EntityTitlePresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/ui/newtmp/title/EntityTitlePresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -30,7 +30,6 @@ import org.ourproject.kune.platf.client.services.I18nTranslationService; import org.ourproject.kune.platf.client.services.KuneErrorHandler; import org.ourproject.kune.platf.client.state.StateManager; -import org.ourproject.kune.workspace.client.WorkspaceEvents; import org.ourproject.kune.workspace.client.sitebar.Site; import com.calclab.suco.client.signal.Slot; @@ -42,11 +41,13 @@ private EntityTitleView view; private final I18nTranslationService i18n; private final KuneErrorHandler errorHandler; + private final StateManager stateManager; public EntityTitlePresenter(final I18nTranslationService i18n, final KuneErrorHandler errorHandler, final StateManager stateManager) { this.i18n = i18n; this.errorHandler = errorHandler; + this.stateManager = stateManager; stateManager.onStateChanged(new Slot<StateDTO>() { public void onEvent(final StateDTO state) { setState(state); @@ -73,7 +74,7 @@ public void onSuccess(final String result) { Site.hideProgress(); view.setContentTitle(result); - DefaultDispatcher.getInstance().fire(WorkspaceEvents.RELOAD_CONTEXT, null); + stateManager.reloadContextAndTitles(); } }; DefaultDispatcher.getInstance().fire(DocsEvents.RENAME_CONTENT, Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarComponent.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarComponent.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarComponent.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,32 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.Component; -import org.ourproject.kune.platf.client.dto.StateDTO; - -public interface ContentBottomToolBarComponent extends Component { - - void setEnabledRateIt(boolean enabled); - - void setRate(StateDTO state, boolean logged); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,76 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.dto.StateDTO; - -public class ContentBottomToolBarPresenter implements ContentBottomToolBarComponent { - - private ContentBottomToolBarView view; - - public void init(final ContentBottomToolBarView view) { - this.view = view; - } - - public View getView() { - return view; - } - - public void setRate(final StateDTO state, boolean logged) { - if (state.isRateable()) { - if (!logged) { - setRate(state.getRate(), state.getRateByUsers()); - } else { - setRate(state.getRate(), state.getRateByUsers(), state.getCurrentUserRate()); - } - } else { - setRateVisible(false); - setRateItVisible(false); - } - } - - private void setRate(final Double value, final Integer rateByUsers, final Double currentUserRate) { - view.setRate(value, rateByUsers); - view.setRateIt(currentUserRate); - setRateVisible(true); - setRateItVisible(true); - } - - private void setRate(final Double value, final Integer rateByUsers) { - view.setRate(value, rateByUsers); - setRateVisible(true); - setRateItVisible(false); - } - - private void setRateVisible(final boolean visible) { - view.setRateVisible(visible); - } - - private void setRateItVisible(final boolean visible) { - view.setRateItVisible(visible); - } - - public void setEnabledRateIt(final boolean enabled) { - view.setRateItVisible(enabled); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarView.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentBottomToolBarView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,35 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.View; - -public interface ContentBottomToolBarView extends View { - - void setRate(Double value, Integer rateByUsers); - - void setRateIt(Double currentUserRate); - - void setRateVisible(boolean b); - - void setRateItVisible(boolean visible); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitleComponent.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitleComponent.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitleComponent.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,32 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.Component; -import org.ourproject.kune.platf.client.dto.StateDTO; - -public interface ContentSubTitleComponent extends Component { - - void setState(StateDTO state); - - void setContentLanguage(String langName); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitlePresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitlePresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitlePresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,65 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.dto.StateDTO; -import org.ourproject.kune.platf.client.services.I18nTranslationService; - -public class ContentSubTitlePresenter implements ContentSubTitleComponent { - - private ContentSubTitleView view; - private final I18nTranslationService i18n; - - public ContentSubTitlePresenter(final I18nTranslationService i18n) { - this.i18n = i18n; - } - - public View getView() { - return view; - } - - public void init(final ContentSubTitleView view) { - this.view = view; - } - - public void setContentLanguage(final String langName) { - view.setContentSubTitleRight(i18n.t("Language: [%s]", langName)); - } - - public void setState(final StateDTO state) { - if (state.hasDocument()) { - view.setContentSubTitleLeft(i18n.tWithNT("by: [%s]", "used in a list of authors", state.getAuthors().get(0) - .getName())); - view.setContentSubTitleLeftVisible(true); - } else { - view.setContentSubTitleLeftVisible(false); - } - if (state.getLanguage() != null) { - String langName = state.getLanguage().getEnglishName(); - setContentLanguage(langName); - view.setContentSubTitleRightVisible(true); - } else { - view.setContentSubTitleRightVisible(false); - } - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitleView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitleView.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentSubTitleView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,34 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.View; - -public interface ContentSubTitleView extends View { - - void setContentSubTitleLeft(String subTitle); - - void setContentSubTitleRight(String subTitle); - - void setContentSubTitleLeftVisible(boolean visible); - - void setContentSubTitleRightVisible(boolean visible); -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitleComponent.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitleComponent.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitleComponent.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,34 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import java.util.Date; - -import org.ourproject.kune.platf.client.Component; -import org.ourproject.kune.platf.client.dto.StateDTO; - -public interface ContentTitleComponent extends Component { - - void setState(StateDTO state); - - void setContentDate(Date publishedOn); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitlePresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitlePresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitlePresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,106 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import java.util.Date; - -import org.ourproject.kune.docs.client.actions.DocsEvents; -import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.dispatch.DefaultDispatcher; -import org.ourproject.kune.platf.client.dto.StateDTO; -import org.ourproject.kune.platf.client.rpc.ParamCallback; -import org.ourproject.kune.platf.client.services.I18nTranslationService; -import org.ourproject.kune.platf.client.services.KuneErrorHandler; -import org.ourproject.kune.workspace.client.WorkspaceEvents; -import org.ourproject.kune.workspace.client.sitebar.Site; - -import com.google.gwt.i18n.client.DateTimeFormat; -import com.google.gwt.user.client.rpc.AsyncCallback; - -public class ContentTitlePresenter implements ContentTitleComponent { - - private ContentTitleView view; - private final I18nTranslationService i18n; - private final KuneErrorHandler errorHandler; - - public ContentTitlePresenter(final I18nTranslationService i18n, final KuneErrorHandler errorHandler) { - this.i18n = i18n; - this.errorHandler = errorHandler; - } - - public View getView() { - return view; - } - - public void init(final ContentTitleView view) { - this.view = view; - } - - public void onTitleRename(final String text) { - Site.showProgressSaving(); - AsyncCallback<String> callback = new AsyncCallback<String>() { - public void onFailure(final Throwable caught) { - view.restoreOldTitle(); - errorHandler.process(caught); - } - - public void onSuccess(final String result) { - Site.hideProgress(); - view.setContentTitle(result); - DefaultDispatcher.getInstance().fire(WorkspaceEvents.RELOAD_CONTEXT, null); - } - }; - DefaultDispatcher.getInstance().fire(DocsEvents.RENAME_CONTENT, - new ParamCallback<String, String>(text, callback)); - } - - public void setContentDate(final Date publishedOn) { - DateTimeFormat fmt = DateTimeFormat.getFormat("MM/dd/yyyy, Z"); - view.setContentDate(i18n.t("Published on: [%s]", fmt.format(publishedOn))); - } - - public void setState(final StateDTO state) { - if (state.hasDocument()) { - setContentTitle(state.getTitle(), state.getContentRights().isEditable()); - setContentDateVisible(true); - setContentDate(state.getPublishedOn()); - } else { - if (state.getFolder().getParentFolderId() == null) { - // We translate root folder names (documents, chat room, - // etcetera) - setContentTitle(i18n.t(state.getTitle()), false); - } else { - setContentTitle(state.getTitle(), state.getContentRights().isEditable()); - } - setContentDateVisible(false); - } - } - - private void setContentDateVisible(final boolean visible) { - view.setDateVisible(visible); - } - - private void setContentTitle(final String title, final boolean editable) { - view.setContentTitle(title); - view.setContentTitleEditable(editable); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitleView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitleView.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentTitleView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,37 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.View; - -public interface ContentTitleView extends View { - - void setContentTitle(String title); - - void setContentDate(String date); - - void setDateVisible(boolean visible); - - void setContentTitleEditable(boolean editable); - - void restoreOldTitle(); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarComponent.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarComponent.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarComponent.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,26 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.Component; - -public interface ContentToolBarComponent extends Component { - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,36 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.View; - -public class ContentToolBarPresenter implements ContentToolBarComponent { - - private ContentToolBarView view; - - public void init(final ContentToolBarView view) { - this.view = view; - } - - public View getView() { - return view; - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarView.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ContentToolBarView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,27 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.View; - -public interface ContentToolBarView extends View { - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/EntityLiveSearcher.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/EntityLiveSearcher.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/EntityLiveSearcher.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,32 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.dto.LinkDTO; - -import com.calclab.suco.client.signal.Slot; - -public interface EntityLiveSearcher { - - void onSelection(Slot<LinkDTO> slot); - - void show(); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupLiveSearcher.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupLiveSearcher.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupLiveSearcher.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,25 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -public interface GroupLiveSearcher extends EntityLiveSearcher { - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupMembersSummary.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupMembersSummary.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupMembersSummary.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,32 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.dto.GroupDTO; -import org.ourproject.kune.platf.client.ui.gridmenu.GridMenuItem; - -public interface GroupMembersSummary { - - void addGroupOperation(GridMenuItem<GroupDTO> operation, boolean mustBeLogged); - - void removeGroupOperation(GridMenuItem<GroupDTO> operation, boolean mustBeLogged); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupSummary.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupSummary.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/GroupSummary.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,26 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - - -public interface GroupSummary { - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ParticipationSummary.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ParticipationSummary.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ParticipationSummary.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,26 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - - -public interface ParticipationSummary { - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/TagsSummary.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/TagsSummary.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/TagsSummary.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,31 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import java.util.List; - -import org.ourproject.kune.platf.client.dto.TagResultDTO; - -public interface TagsSummary { - - void setGroupTags(List<TagResultDTO> result); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ThemeMenuComponent.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ThemeMenuComponent.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ThemeMenuComponent.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,31 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.Component; - -public interface ThemeMenuComponent extends Component { - - void setThemes(String themes[]); - - void setVisible(boolean visible); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/UserLiveSearcher.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/UserLiveSearcher.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/UserLiveSearcher.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,24 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -public interface UserLiveSearcher extends EntityLiveSearcher { -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/Workspace.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/Workspace.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/Workspace.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,57 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import java.util.Iterator; - -import org.ourproject.kune.platf.client.Component; -import org.ourproject.kune.platf.client.dto.GroupDTO; -import org.ourproject.kune.platf.client.tool.ClientTool; -import org.ourproject.kune.workspace.client.licensefoot.LicenseComponent; - -public interface Workspace extends Component { - - public static final int MIN_WIDTH = 800; - - public static final int MIN_HEIGHT = 480; - - public void adjustSize(int windowWidth, int clientHeight); - - public void attachTools(Iterator<ClientTool> iterator); - - public int calculateHeight(int clientHeight); - - public int calculateWidth(int clientWidth); - - public ContentSubTitleComponent getContentSubTitleComponent(); - - public ContentTitleComponent getContentTitleComponent(); - - public LicenseComponent getLicenseComponent(); - - public void setTheme(String theme); - - public void setTool(String toolName); - - public void setVisible(boolean visible); - - public void showGroup(GroupDTO group, boolean isAdmin); - -} \ No newline at end of file Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceListener.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceListener.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceListener.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,24 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -public interface WorkspaceListener { - void onTabSelected(int tabIndex); -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspacePresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspacePresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspacePresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,164 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import java.util.HashMap; -import java.util.Iterator; - -import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.dispatch.DefaultDispatcher; -import org.ourproject.kune.platf.client.dto.GroupDTO; -import org.ourproject.kune.platf.client.extend.ExtensibleWidget; -import org.ourproject.kune.platf.client.extend.ExtensibleWidgetChild; -import org.ourproject.kune.platf.client.extend.ExtensibleWidgetsManager; -import org.ourproject.kune.platf.client.state.Session; -import org.ourproject.kune.platf.client.tool.ClientTool; -import org.ourproject.kune.workspace.client.WorkspaceEvents; -import org.ourproject.kune.workspace.client.component.WorkspaceComponent; -import org.ourproject.kune.workspace.client.licensefoot.LicenseComponent; - -import com.google.gwt.user.client.ui.Widget; - -public class WorkspacePresenter implements Workspace { - private WorkspaceView view; - private WorkspaceComponent context; - private WorkspaceComponent content; - private WorkspaceUIComponents components; - private ExtensibleWidgetsManager extensionPointManager; - - public WorkspacePresenter(final Session session) { - } - - public void adjustSize(final int windowWidth, final int clientHeight) { - view.adjustSize(windowWidth, clientHeight); - } - - public void attachToExtensibleWidget(final ExtensibleWidgetChild child) { - extensionPointManager.attachToExtensible(child); - } - - public void attachTools(final Iterator<ClientTool> iterator) { - ClientTool clientTool; - while (iterator.hasNext()) { - clientTool = iterator.next(); - // view.addTab(clientTool.getTrigger()); - } - } - - /** - * Calculates Workspaceheight depending of the client Window size but with a - * limit - */ - public int calculateHeight(final int clientHeight) { - // 15 is the size of scrollbar - return clientHeight <= MIN_HEIGHT ? MIN_HEIGHT - 15 : clientHeight; - } - - /** - * Calculates Workspace width depending of the client Window size but with a - * limit - */ - public int calculateWidth(final int clientWidth) { - return clientWidth <= MIN_WIDTH ? MIN_WIDTH - 15 : clientWidth; - } - - public void clearExtensibleWidget(final String id) { - extensionPointManager.detachAll(id); - } - - public void detachFromExtensibleWidget(final ExtensibleWidgetChild child) { - extensionPointManager.detachFromExtensible(child); - } - - public ContentSubTitleComponent getContentSubTitleComponent() { - return components.getContentSubTitleComponent(); - } - - public ContentTitleComponent getContentTitleComponent() { - return components.getContentTitleComponent(); - } - - public LicenseComponent getLicenseComponent() { - return components.getLicenseComponent(); - } - - public View getView() { - return view; - } - - public void init(final WorkspaceView view, final ExtensibleWidgetsManager extensionPointManager) { - this.view = view; - this.extensionPointManager = extensionPointManager; - this.components = new WorkspaceUIComponents(this); - view.setComponents(components); - view.registerUIExtensionPoints(); - } - - public void onSplitterStartResizing(final Widget sender) { - DefaultDispatcher.getInstance().fire(WorkspaceEvents.WS_SPLITTER_STARTRESIZING, null); - } - - public void onSplitterStopResizing(final Widget sender) { - DefaultDispatcher.getInstance().fire(WorkspaceEvents.WS_SPLITTER_STOPRESIZING, null); - } - - public void registerExtensibleWidget(final String id, final ExtensibleWidget extensibleWidget) { - extensionPointManager.registerExtensibleWidget(id, extensibleWidget); - } - - public void registerExtensibleWidgets(final HashMap<String, ExtensibleWidget> extensibleWidget) { - extensionPointManager.registerExtensibleWidgets(extensibleWidget); - } - - public void setContent(final WorkspaceComponent contentComponent) { - if (content != null) { - content.detach(); - } - content = contentComponent; - content.attach(); - view.setContent(content.getView()); - } - - public void setContext(final WorkspaceComponent contextComponent) { - if (context != null) { - context.detach(); - } - context = contextComponent; - context.attach(); - view.setContext(context.getView()); - } - - public void setTheme(final String theme) { - view.setTheme(theme); - } - - public void setTool(final String toolName) { - view.setTool(toolName); - } - - public void setVisible(final boolean visible) { - view.setVisible(visible); - } - - public void showGroup(final GroupDTO group, final boolean isAdmin) { - view.setGroupLogo(group.getLongName()); - view.setPutYourLogoVisible(isAdmin); - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceUIComponents.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceUIComponents.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceUIComponents.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,63 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.workspace.client.WorkspaceFactory; -import org.ourproject.kune.workspace.client.licensefoot.LicenseComponent; - -public class WorkspaceUIComponents { - private LicenseComponent license; - private ContentTitleComponent contentTitle; - private ContentSubTitleComponent contentSubTitle; - private ContentToolBarComponent contentToolBar; - - public WorkspaceUIComponents(final WorkspacePresenter presenter) { - } - - public ContentSubTitleComponent getContentSubTitleComponent() { - if (contentSubTitle == null) { - contentSubTitle = WorkspaceFactory.createContentSubTitleComponent(); - } - return contentSubTitle; - } - - public ContentTitleComponent getContentTitleComponent() { - if (contentTitle == null) { - contentTitle = WorkspaceFactory.createContentTitleComponent(); - } - return contentTitle; - } - - public ContentToolBarComponent getContentToolBarComponent() { - if (contentToolBar == null) { - contentToolBar = WorkspaceFactory.createContentToolBarComponent(); - } - return contentToolBar; - } - - public LicenseComponent getLicenseComponent() { - if (license == null) { - license = WorkspaceFactory.createLicenseComponent(); - } - return license; - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceView.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/WorkspaceView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,73 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace; - -import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.tool.ToolTrigger; - -import com.google.gwt.user.client.ui.Image; - -public interface WorkspaceView extends View { - - void setGroupLogo(String groupName); - - void setGroupLogo(Image image); - - void setContent(View contentView); - - void setContext(View contextView); - - void setTool(String toolName); - - void adjustSize(int windowWidth, int clientHeight); - - void addTab(ToolTrigger trigger); - - void setContentTitle(View view); - - void setContentSubTitle(View view); - - void setBottom(View view); - - void setGroupMembers(View view); - - void setParticipation(View view); - - void setSummary(View view); - - void addBottomIconComponent(View view); - - void setTheme(String theme); - - void setVisible(boolean visible); - - void setTags(View view); - - void setContentToolBar(View view); - - void setContentBottomToolBar(View view); - - void setPutYourLogoVisible(boolean visible); - - void registerUIExtensionPoints(); - - void setComponents(WorkspaceUIComponents components); - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/BottomIconsTrayPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/BottomIconsTrayPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/BottomIconsTrayPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,23 +0,0 @@ -package org.ourproject.kune.workspace.client.workspace.ui; - -import org.ourproject.kune.platf.client.extend.ExtensibleWidget; -import org.ourproject.kune.platf.client.extend.ExtensibleWidgetChild; - -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Widget; - -public class BottomIconsTrayPanel extends HorizontalPanel implements ExtensibleWidget { - - public void attach(final ExtensibleWidgetChild child) { - super.add((Widget) child.getView()); - } - - public void detach(final ExtensibleWidgetChild child) { - super.remove((Widget) child.getView()); - } - - public void detachAll(final String id) { - super.clear(); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentBottomToolBarPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentBottomToolBarPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentBottomToolBarPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,88 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace.ui; - -import org.ourproject.kune.platf.client.services.I18nTranslationService; -import org.ourproject.kune.platf.client.ui.CustomPushButton; -import org.ourproject.kune.workspace.client.workspace.ContentBottomToolBarPresenter; -import org.ourproject.kune.workspace.client.workspace.ContentBottomToolBarView; - -import com.google.gwt.user.client.ui.ClickListener; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.VerticalPanel; - -public class ContentBottomToolBarPanel extends HorizontalPanel implements ContentBottomToolBarView { - - // private final RatePanel rate; - // private final RateItPresenter rateItPresenter; - // private final RateItPanel rateIt; - private CustomPushButton btn; - - public ContentBottomToolBarPanel(final ContentBottomToolBarPresenter presenter, final I18nTranslationService i18n) { - // rate = new RatePanel(null, null, i18n); - // rateItPresenter = null; - // rateIt = new RateItPanel(rateItPresenter, i18n, null); - // rateItPresenter.init(rateIt); - final Label expand = new Label(""); - // this.add(rateIt); - this.add(expand); - // this.add(rate); - this.setWidth("100%"); - expand.setWidth("100%"); - this.setCellWidth(expand, "100%"); - this.addStyleName("kune-ContentToolBarPanel"); - this.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE); - // this.setCellVerticalAlignment(rate, VerticalPanel.ALIGN_MIDDLE); - // this.setCellVerticalAlignment(rateIt, VerticalPanel.ALIGN_MIDDLE); - // rate.setVisible(false); - // rateIt.setVisible(false); - // TODO setEnabled false to RateIt - } - - public void addButton(final String caption, final ClickListener listener) { - btn = new CustomPushButton(caption, listener); - this.insert(btn, 0); - btn.addStyleName("kune-Button-Large-lrSpace"); - } - - public void setButtonVisible(final boolean isEnabled) { - btn.setVisible(isEnabled); - } - - public void setRate(final Double value, final Integer rateByUsers) { - // rate.setRate(value); - // rate.setByUsers(rateByUsers); - } - - public void setRateIt(final Double currentUserRate) { - // rateItPresenter.setRate(currentUserRate); - } - - public void setRateItVisible(final boolean visible) { - // rateIt.setVisible(visible); - } - - public void setRateVisible(final boolean visible) { - // rate.setVisible(visible); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentSubTitlePanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentSubTitlePanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentSubTitlePanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,82 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace.ui; - -import org.ourproject.kune.platf.client.services.I18nTranslationService; -import org.ourproject.kune.workspace.client.workspace.ContentSubTitlePresenter; -import org.ourproject.kune.workspace.client.workspace.ContentSubTitleView; - -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.VerticalPanel; - -public class ContentSubTitlePanel extends HorizontalPanel implements ContentSubTitleView { - private final Label subTitleLeftLabel; - private final Label subTitleRightLabel; - - public ContentSubTitlePanel(final ContentSubTitlePresenter presenter, final I18nTranslationService i18n) { - - subTitleLeftLabel = new Label(); - HorizontalPanel rigthHP = new HorizontalPanel(); - subTitleRightLabel = new Label(); - - add(subTitleLeftLabel); - add(rigthHP); - rigthHP.add(subTitleRightLabel); - - setWidth("100%"); - subTitleRightLabel.setText(i18n.t("Language:")); - subTitleLeftLabel.addStyleName("kune-Margin-Large-l"); - subTitleLeftLabel.addStyleName("kune-ft15px"); - subTitleLeftLabel.addStyleName("kune-ContentSubTitleBar-l"); - subTitleRightLabel.addStyleName("kune-Margin-Large-r"); - subTitleRightLabel.addStyleName("kune-ft12px"); - rigthHP.addStyleName("kune-ContentSubTitleBar-r"); - setCellVerticalAlignment(rigthHP, VerticalPanel.ALIGN_MIDDLE); - rigthHP.setCellVerticalAlignment(subTitleLeftLabel, VerticalPanel.ALIGN_MIDDLE); - rigthHP.setCellVerticalAlignment(subTitleRightLabel, VerticalPanel.ALIGN_MIDDLE); - } - - public void setColors(final String background, final String textColor) { - DOM.setStyleAttribute(this.getElement(), "backgroundColor", background); - DOM.setStyleAttribute(subTitleLeftLabel.getElement(), "color", textColor); - DOM.setStyleAttribute(subTitleRightLabel.getElement(), "color", textColor); - } - - public void setContentSubTitleLeft(final String subTitle) { - subTitleLeftLabel.setText(subTitle); - } - - public void setContentSubTitleLeftVisible(final boolean visible) { - subTitleLeftLabel.setVisible(visible); - } - - public void setContentSubTitleRight(final String subTitle) { - subTitleRightLabel.setText(subTitle); - - } - - public void setContentSubTitleRightVisible(final boolean visible) { - subTitleRightLabel.setVisible(visible); - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentTitlePanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentTitlePanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentTitlePanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,88 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace.ui; - -import org.ourproject.kune.platf.client.ui.EditableIconLabel; -import org.ourproject.kune.platf.client.ui.EditableClickListener; -import org.ourproject.kune.workspace.client.workspace.ContentTitlePresenter; -import org.ourproject.kune.workspace.client.workspace.ContentTitleView; - -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.VerticalPanel; - -public class ContentTitlePanel extends HorizontalPanel implements ContentTitleView { - private final EditableIconLabel titleLabel; - private final Label dateLabel; - - public ContentTitlePanel(final ContentTitlePresenter presenter) { - titleLabel = new EditableIconLabel(new EditableClickListener() { - public void onEdited(final String text) { - presenter.onTitleRename(text); - } - }); - HorizontalPanel rigthHP = new HorizontalPanel(); - dateLabel = new Label(); - - add(titleLabel); - add(rigthHP); - rigthHP.add(dateLabel); - - setWidth("100%"); - titleLabel.addStyleName("kune-Margin-Large-l"); - titleLabel.addStyleName("kune-ft17px"); - dateLabel.addStyleName("kune-Margin-Large-r"); - dateLabel.addStyleName("kune-ft12px"); - titleLabel.addStyleName("kune-ContentTitleBar-l"); - rigthHP.addStyleName("kune-ContentTitleBar-r"); - setCellVerticalAlignment(titleLabel, VerticalPanel.ALIGN_MIDDLE); - setCellVerticalAlignment(rigthHP, VerticalPanel.ALIGN_MIDDLE); - rigthHP.setCellVerticalAlignment(dateLabel, VerticalPanel.ALIGN_MIDDLE); - } - - public void setContentTitle(final String title) { - titleLabel.setText(title); - } - - public void setContentTitleEditable(final boolean editable) { - titleLabel.setEditable(editable); - } - - public void setContentDate(final String date) { - dateLabel.setText(date); - } - - public void setColors(final String background, final String textColor) { - DOM.setStyleAttribute(this.getElement(), "backgroundColor", background); - DOM.setStyleAttribute(titleLabel.getElement(), "color", textColor); - DOM.setStyleAttribute(dateLabel.getElement(), "color", textColor); - } - - public void setDateVisible(final boolean visible) { - dateLabel.setVisible(visible); - - } - - public void restoreOldTitle() { - titleLabel.restoreOldText(); - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentToolBarPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentToolBarPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/ContentToolBarPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,70 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace.ui; - -import java.util.HashMap; - -import org.ourproject.kune.platf.client.extend.ExtensibleWidget; -import org.ourproject.kune.platf.client.extend.ExtensibleWidgetChild; -import org.ourproject.kune.platf.client.extend.ExtensibleWidgetId; -import org.ourproject.kune.workspace.client.workspace.ContentToolBarPresenter; -import org.ourproject.kune.workspace.client.workspace.ContentToolBarView; - -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.Widget; - -public class ContentToolBarPanel extends HorizontalPanel implements ContentToolBarView, ExtensibleWidget { - - private final HorizontalPanel leftHP; - - public ContentToolBarPanel(final ContentToolBarPresenter presenter) { - leftHP = new HorizontalPanel(); - add(leftHP); - add(new Label("")); - this.setWidth("100%"); - this.addStyleName("kune-ContentToolBarPanel"); - leftHP.addStyleName("kune-Margin-Large-l"); - } - - public HashMap<String, ExtensibleWidget> getExtensionPoints() { - HashMap<String, ExtensibleWidget> extPoints = new HashMap<String, ExtensibleWidget>(); - extPoints.put(ExtensibleWidgetId.CONTENT_TOOLBAR_LEFT, this); - return extPoints; - } - - public void attach(final ExtensibleWidgetChild child) { - if (child.getParentId().equals(ExtensibleWidgetId.CONTENT_TOOLBAR_LEFT)) { - leftHP.add((Widget) child.getView()); - } - } - - public void detach(final ExtensibleWidgetChild child) { - if (child.getParentId().equals(ExtensibleWidgetId.CONTENT_TOOLBAR_LEFT)) { - leftHP.remove((Widget) child.getView()); - } - } - - public void detachAll(final String id) { - if (id.equals(ExtensibleWidgetId.CONTENT_TOOLBAR_LEFT)) { - leftHP.clear(); - } - } -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogo.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogo.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogo.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,6 +0,0 @@ -package org.ourproject.kune.workspace.client.workspace.ui; - - -public interface EntityLogo { - -} \ No newline at end of file Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,123 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace.ui; - -import org.ourproject.kune.platf.client.services.I18nTranslationService; -import org.ourproject.kune.workspace.client.ui.newtmp.skel.WorkspaceSkeleton; -import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; - -import com.google.gwt.user.client.DOM; -import com.google.gwt.user.client.ui.HTML; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.Hyperlink; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.Label; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.VerticalPanel; - -public class EntityLogoPanel extends SimplePanel implements EntityLogoView { - class EntityTextLogo extends VerticalPanel { - - private static final int GROUP_NAME_LIMIT_SIZE = 90; - private static final String LOGO_SMALL_FONT_SIZE = "108%"; - private static final String LOGO_DEFAULT_FONT_SIZE = "167%"; - private final Label defTextLogoLabel; - private final Hyperlink defTextPutYourLogoHL; - private final HorizontalPanel putYourLogoHP; - - public EntityTextLogo() { - // Initialize - super(); - defTextLogoLabel = new Label(); - final HTML expandCell = new HTML("<b></b>"); - putYourLogoHP = new HorizontalPanel(); - defTextPutYourLogoHL = new Hyperlink(); - - // Layout - add(defTextLogoLabel); - add(putYourLogoHP); - putYourLogoHP.add(expandCell); - putYourLogoHP.add(defTextPutYourLogoHL); - - // Set properties - // TODO: Put your logo here functionality - defTextPutYourLogoHL.setText(i18n.t("Put Your Logo Here")); - expandCell.setWidth("100%"); - putYourLogoHP.setCellWidth(expandCell, "100%"); - // TODO: link to configure the logo - setStylePrimaryName("k-entitytextlogo"); - setDefaultText(""); - } - - public void setDefaultText(final String text) { - if (text.length() > GROUP_NAME_LIMIT_SIZE) { - DOM.setStyleAttribute(defTextLogoLabel.getElement(), "fontSize", LOGO_SMALL_FONT_SIZE); - } else { - DOM.setStyleAttribute(defTextLogoLabel.getElement(), "fontSize", LOGO_DEFAULT_FONT_SIZE); - } - defTextLogoLabel.setText(text); - - } - - public void setPutYourLogoVisible(final boolean visible) { - putYourLogoHP.setVisible(visible); - } - - } - - private EntityTextLogo entityTextLogo; - private final I18nTranslationService i18n; - - public EntityLogoPanel(final I18nTranslationService i18n, final WorkspaceSkeleton ws) { - this.i18n = i18n; - ws.getEntityMainHeader().add(this); - } - - public void setLogo(final Image image) { - clear(); - add(image); - } - - public void setLogo(final String groupName) { - clear(); - add(getEntityTextLogo()); - entityTextLogo.setDefaultText(groupName); - } - - public void setPutYourLogoVisible(final boolean visible) { - getEntityTextLogo().setPutYourLogoVisible(visible); - } - - public void setTheme(final WsTheme oldTheme, final WsTheme newTheme) { - if (oldTheme != null) { - getEntityTextLogo().removeStyleDependentName(oldTheme.toString()); - } - getEntityTextLogo().addStyleDependentName(newTheme.toString()); - } - - private EntityTextLogo getEntityTextLogo() { - if (entityTextLogo == null) { - this.entityTextLogo = new EntityTextLogo(); - } - return entityTextLogo; - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPresenter.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPresenter.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoPresenter.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,37 +0,0 @@ -package org.ourproject.kune.workspace.client.workspace.ui; - -import org.ourproject.kune.platf.client.dto.GroupDTO; -import org.ourproject.kune.platf.client.dto.StateDTO; -import org.ourproject.kune.platf.client.state.StateManager; -import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; -import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsThemePresenter; - -import com.calclab.suco.client.signal.Slot; -import com.calclab.suco.client.signal.Slot2; - -public class EntityLogoPresenter implements EntityLogo { - private EntityLogoView view; - - public EntityLogoPresenter(final StateManager stateManager, final WsThemePresenter theme) { - stateManager.onStateChanged(new Slot<StateDTO>() { - public void onEvent(final StateDTO state) { - final GroupDTO group = state.getGroup(); - final boolean isAdmin = state.getGroupRights().isAdministrable(); - - view.setLogo(group.getLongName()); - view.setPutYourLogoVisible(isAdmin); - } - }); - theme.onThemeChanged(new Slot2<WsTheme, WsTheme>() { - public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) { - view.setTheme(oldTheme, newTheme); - } - }); - } - - public void init(final EntityLogoView view) { - this.view = view; - - } - -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoView.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoView.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/EntityLogoView.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,17 +0,0 @@ -package org.ourproject.kune.workspace.client.workspace.ui; - -import org.ourproject.kune.workspace.client.ui.newtmp.themes.WsTheme; - -import com.google.gwt.user.client.ui.Image; - -public interface EntityLogoView { - - // FIXME: Don' use Image - public abstract void setLogo(final Image image); - - public abstract void setLogo(final String groupName); - - public abstract void setPutYourLogoVisible(final boolean visible); - - public abstract void setTheme(final WsTheme oldTheme, WsTheme newTheme); -} Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/GroupToolsBar.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/GroupToolsBar.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/GroupToolsBar.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,106 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace.ui; - -import java.util.HashMap; -import java.util.Iterator; - -import org.ourproject.kune.platf.client.tool.ToolTrigger; -import org.ourproject.kune.platf.client.tool.ToolTrigger.TriggerListener; -import org.ourproject.kune.platf.client.ui.HasColor; -import org.ourproject.kune.platf.client.ui.RoundedBorderDecorator; - -import com.google.gwt.user.client.ui.Hyperlink; -import com.google.gwt.user.client.ui.SimplePanel; -import com.google.gwt.user.client.ui.VerticalPanel; -import com.google.gwt.user.client.ui.Widget; - -class GroupToolsBar extends VerticalPanel { - private static final String ITEM_SELECTED = "kune-GroupToolsBar-itemSelected"; - private static final String ITEM_NOT_SELECTED = "kune-GroupToolsBar-itemNotSelected"; - private Widget currentTab; - private final HashMap<String, Widget> tabs; - - public GroupToolsBar() { - // this.colorTheme = colorTheme; - tabs = new HashMap<String, Widget>(); - currentTab = null; - addStyleName("kune-GroupToolsBar"); - } - - public void addItem(final ToolTrigger trigger) { - final int nextIndex = this.getWidgetCount(); - final Widget menuItem = createItem(nextIndex, trigger); - setTabSelected(menuItem, false); - tabs.put(trigger.getName(), menuItem); - this.add(menuItem); - } - - public void selectItem(final String toolName) { - if (currentTab != null) { - setTabSelected(currentTab, false); - } - currentTab = getWidget(toolName); - setTabSelected(currentTab, true); - } - - public void setTabsColors(final String selectedColor, final String unSelectedColor) { - final Iterator<Widget> iter = tabs.values().iterator(); - while (iter.hasNext()) { - final Widget w = iter.next(); - if (w == currentTab) { - ((HasColor) w).setColor(selectedColor); - } else { - ((HasColor) w).setColor(unSelectedColor); - } - } - } - - private Widget createItem(final int index, final ToolTrigger trigger) { - final SimplePanel menuItem = new SimplePanel(); - addStyleName("Tab"); - final Hyperlink hl = new Hyperlink(trigger.getLabel(), ""); - trigger.setListener(new TriggerListener() { - public void onStateChanged(final String encoded) { - hl.setTargetHistoryToken(encoded); - } - }); - menuItem.add(hl); - return new RoundedBorderDecorator(menuItem, RoundedBorderDecorator.RIGHT); - } - - private Widget getWidget(final String toolName) { - return tabs.get(toolName); - } - - private void setTabSelected(final Widget tab, final boolean isSelected) { - if (isSelected) { - tab.removeStyleName(ITEM_NOT_SELECTED); - tab.addStyleName(ITEM_SELECTED); - } else { - tab.removeStyleName(ITEM_SELECTED); - tab.addStyleName(ITEM_NOT_SELECTED); - } - // tring color = isSelected ? colorTheme.getToolSelected() : - // colorTheme.getToolUnselected(); - // ((HasColor) tab).setColor(color); - } - -} \ No newline at end of file Deleted: trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/WorkspacePanel.java =================================================================== --- trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/WorkspacePanel.java 2008-08-04 12:44:04 UTC (rev 825) +++ trunk/src/main/java/org/ourproject/kune/workspace/client/workspace/ui/WorkspacePanel.java 2008-08-05 01:27:03 UTC (rev 826) @@ -1,369 +0,0 @@ -/* - * - * Copyright (C) 2007-2008 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.workspace.ui; - -import org.ourproject.kune.platf.client.View; -import org.ourproject.kune.platf.client.extend.ExtensibleWidgetId; -import org.ourproject.kune.platf.client.services.I18nTranslationService; -import org.ourproject.kune.platf.client.services.Images; -import org.ourproject.kune.platf.client.tool.ToolTrigger; -import org.ourproject.kune.platf.client.ui.RoundedBorderDecorator; -import org.ourproject.kune.platf.client.ui.SplitterListener; -import org.ourproject.kune.platf.client.ui.gwtcustom.CustomHorizontalSplitPanel; -import org.ourproject.kune.workspace.client.licensefoot.ui.LicensePanel; -import org.ourproject.kune.workspace.client.workspace.WorkspacePresenter; -import org.ourproject.kune.workspace.client.workspace.WorkspaceUIComponents; -import org.ourproject.kune.workspace.client.workspace.WorkspaceView; - -import com.allen_sauer.gwt.log.client.Log; -import com.google.gwt.user.client.ui.AbstractImagePrototype; -import com.google.gwt.user.client.ui.ChangeListener; -import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.HorizontalPanel; -import com.google.gwt.user.client.ui.HorizontalSplitPanelImages; -import com.google.gwt.user.client.ui.Image; -import com.google.gwt.user.client.ui.ScrollPanel; -import com.google.gwt.user.client.ui.VerticalPanel; -import com.google.gwt.user.client.ui.Widget; - -public class WorkspacePanel extends Composite implements WorkspaceView { - private static final int DEF_CONTEXT_WIDTH = 175; - private static final Images img = Images.App.getInstance(); - - // private final EntityLogoPanel groupLogoPanel; - private final HorizontalPanel contentTitleBarHP; - private final HorizontalPanel contentSubTitleBarHP; - private final GroupToolsBar groupToolsBar; - private final CustomHorizontalSplitPanel cntcxtHSP; - private final VerticalPanel contextVP; - private final VerticalPanel contentVP; - private final HorizontalPanel contentBottomBarHP; - private final VerticalPanel groupDropDownsVP; - private final RoundedBorderDecorator contentTitleBarBorderDec; - private final RoundedBorderDecorator bottomBorderDecorator; - private final VerticalPanel cntcxtVP; - private final ScrollPanel groupDropDownsSP; - private final BottomIconsTrayPanel bottomIconsTrayPanel; - private ContentTitlePanel contentTitlePanel; - private ContentSubTitlePanel contentSubTitlePanel; - private ContentToolBarPanel contentToolBarPanel; - private final HorizontalPanel contentToolBarHP; - private final ScrollPanel contentSP; - private final HorizontalPanel contentBottomToolBarHP; - private ContentBottomToolBarPanel contentBottomToolBarPanel; - private LicensePanel bottomPanel; - - private int previousRightWidgetWidth; - private final WorkspacePresenter presenter; - - public WorkspacePanel(final WorkspacePresenter presenter, final I18nTranslationService i18n) { - this.presenter = presenter; - // Initialize - final VerticalPanel generalVP = new VerticalPanel(); - initWidget(generalVP); - // groupLogoPanel = new EntityLogoPanel(i18n); - final HorizontalPanel generalHP = new HorizontalPanel(); - cntcxtVP = new VerticalPanel(); - final VerticalPanel groupNavBarVP = new VerticalPanel(); - groupToolsBar = new GroupToolsBar(); - bottomIconsTrayPanel = new BottomIconsTrayPanel(); - groupDropDownsSP = new ScrollPanel(); - groupDropDownsVP = new VerticalPanel(); - contentTitleBarHP = new HorizontalPanel(); - contentTitleBarBorderDec = new RoundedBorderDecorator(contentTitleBarHP, RoundedBorderDecorator.TOPLEFT); - contentSubTitleBarHP = new HorizontalPanel(); - contentToolBarHP = new HorizontalPanel(); - cntcxtHSP = new CustomHorizontalSplitPanel(new HorizontalSplitPanelImages() { - public AbstractImagePrototype horizontalSplitPanelThumb() { - return img.splitterVertBar(); - } - }); - cntcxtHSP.addChangeListener(new ChangeListener() { - public void onChange(final Widget sender) { - adjustSizeContentSP(); - saveCurrentRightWidgetWidth(cntcxtHSP.getRightWidgetAvailableWidth()); - } - }); - cntcxtHSP.addSplitterListener(new SplitterListener() { - public void onStartResizing(final Widget sender) { - presenter.onSplitterStartResizing(sender); - } - - public void onStopResizing(final Widget sender) { - presenter.onSplitterStopResizing(sender); - } - }); - contentVP = new VerticalPanel(); - contextVP = new VerticalPanel(); - contentSP = new ScrollPanel(); - contentBottomToolBarHP = new HorizontalPanel(); - contentBottomBarHP = new HorizontalPanel(); - bottomBorderDecorator = new RoundedBorderDecorator(contentBottomBarHP, RoundedBorderDecorator.BOTTOMLEFT); - - // Layout - // generalVP.add(groupLogoPanel); - generalVP.add(generalHP); - generalHP.add(cntcxtVP); - generalHP.add(groupNavBarVP); - groupNavBarVP.add(groupToolsBar); - groupNavBarVP.add(groupDropDownsSP); - groupNavBarVP.add(bottomIconsTrayPanel); - groupDropDownsSP.add(groupDropDownsVP); - cntcxtVP.add(contentTitleBarBorderDec); - cntcxtVP.add(contentSubTitleBarHP); - cntcxtVP.add(cntcxtHSP); - cntcxtHSP.setLeftWidget(contentVP); - cntcxtHSP.setRightWidget(contextVP); - cntcxtVP.add(bottomBorderDecorator); - contentVP.add(contentToolBarHP); - contentVP.add(contentSP); - contentVP.add(contentBottomToolBarHP); - - contentVP.addStyleName("kune-WorkspacePanel-Content"); - contextVP.addStyleName("kune-WorkspacePanel-Context"); - contentVP.setWidth("100%"); - contextVP.setWidth("100%"); - contextVP.setHeight("100%"); - - // Set properties - addStyleName("kune-WorkspacePanel"); - setGroupLogo(""); - generalHP.addStyleName("GeneralHP"); - // contentTitleBarBorderDec.setColor(colorTheme.getContentMainBorder()); - contentTitleBarHP.setWidth("100%"); - contentSubTitleBarHP.setWidth("100%"); - contentTitleBarHP.addStyleName("kune-ContentTitleBar"); - contentSubTitleBarHP.addStyleName("kune-ContentSubTitleBar"); - contentToolBarHP.setWidth("100%"); - cntcxtVP.addStyleName("ContextPanel"); - cntcxtVP.setCellVerticalAlignment(contentTitleBarHP, VerticalPanel.ALIGN_MIDDLE); - cntcxtVP.setCellVerticalAlignment(contentSubTitleBarHP, VerticalPanel.ALIGN_MIDDLE); - cntcxtVP.setCellVerticalAlignment(bottomBorderDecorator, VerticalPanel.ALIGN_MIDDLE); - contentTitleBarHP.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE); - contentSubTitleBarHP.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE); - contentBottomToolBarHP.setWidth("100%"); - contentBottomBarHP.addStyleName("kune-ContentBottomBar"); - contentBottomBarHP.addStyleName("kune-ft12px"); - groupDropDownsVP.addStyleName("kune-GroupSummaryPanel"); - // bottomBorderDecorator.setColor(colorTheme.getContentMainBorder()); - bottomIconsTrayPanel.addStyleName("kune-Margin-Medium-l"); - bottomIconsTrayPanel.addStyleName("kune-BottomIconsTrayPanel"); - bottomIconsTrayPanel.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER); - bottomIconsTrayPanel.setVerticalAlignment(VerticalPanel.ALIGN_MIDDLE); - previousRightWidgetWidth = DEF_CONTEXT_WIDTH; - } - - public void addBottomIconComponent(final View view) { - bottomIconsTrayPanel.add((Widget) view); - } - - public void addTab(final ToolTrigger trigger) { - // groupToolsBar.addItem(trigger); - } - - public void adjustSize(final int windowWidth, final int windowHeight) { - final int contentWidth = windowWidth - 184; - final int contentHeight = windowHeight - 176; - - // FireLog.debug("w1: " + windowWidth + ", h1: " + windowHeight); - // FireLog.debug("w2: " + contentWidth + ", h2: " + contentHeight); - // FireLog.debug("sp1: " + previousRightWidgetWidth); - cntcxtHSP.setSize("" + contentWidth + "px", "" + contentHeight + "px"); - if (contentWidth > previousRightWidgetWidth) { - cntcxtHSP.setSplitPosition("" + (contentWidth - previousRightWidgetWidth - 6) + "px"); - saveCurrentRightWidgetWidth(previousRightWidgetWidth); - } else { - setDefaultSplitterPosition(); - } - adjustSizeContentSP(); - - final int bottomMarginForTray = 35; - final int distanceFromTop = 89; - final int groupDropDownsHeight = windowHeight - groupToolsBar.getOffsetHeight() - distanceFromTop - - bottomMarginForTray; - groupDropDownsSP.setHeight("" + groupDropDownsHeight + "px"); - } - - public void registerUIExtensionPoints() { - presenter.registerExtensibleWidgets(contentToolBarPanel.getExtensionPoints()); - presenter.registerExtensibleWidget(ExtensibleWidgetId.CONTENT_BOTTOM_ICONBAR, bottomIconsTrayPanel); - } - - public void setBottom(final View view) { - bottomPanel = (LicensePanel) view; - contentBottomBarHP.add(bottomPanel); - contentBottomBarHP.setCellVerticalAlignment(bottomPanel, VerticalPanel.ALIGN_MIDDLE); - } - - public void setComponents(final WorkspaceUIComponents components) { - setContentTitle(components.getContentTitleComponent().getView()); - setContentSubTitle(components.getContentSubTitleComponent().getView()); - setContentToolBar(components.getContentToolBarComponent().getView()); - // setContentBottomToolBar(components.getContentBottomToolBarComponent().getView()); - setBottom(components.getLicenseComponent().getView()); - // addBottomIconComponent(components.getThemeMenuComponent().getView()); - } - - public void setContent(final View content) { - contentSP.clear(); - final Widget widget = (Widget) content; - contentSP.add(widget); - } - - public void setContentBottomToolBar(final View view) { - contentBottomToolBarPanel = (ContentBottomToolBarPanel) view; - contentBottomToolBarHP.add(contentBottomToolBarPanel); - contentBottomToolBarHP.setCellVerticalAlignment(contentBottomToolBarPanel, VerticalPanel.ALIGN_MIDDLE); - } - - public void setContentSubTitle(final View view) { - contentSubTitlePanel = (ContentSubTitlePanel) view; - contentSubTitleBarHP.add(contentSubTitlePanel); - contentSubTitleBarHP.setCellVerticalAlignment(contentSubTitlePanel, VerticalPanel.ALIGN_MIDDLE); - } - - public void setContentTitle(final View view) { - contentTitlePanel = (ContentTitlePanel) view; - contentTitleBarHP.add(contentTitlePanel); - contentTitleBarHP.setCellVerticalAlignment(contentTitlePanel, VerticalPanel.ALIGN_MIDDLE); - } - - public void setContentToolBar(final View view) { - contentToolBarPanel = (ContentToolBarPanel) view; - contentToolBarHP.add(contentToolBarPanel); - contentToolBarHP.setCellVerticalAlignment(contentToolBarPanel, VerticalPanel.ALIGN_MIDDLE); - } - - public void setContext(final View contextMenu) { - contextVP.clear(); - final Widget widget = (Widget) contextMenu; - contextVP.add(widget); - widget.setHeight("100%"); - widget.setWidth("100%"); - contextVP.setCellWidth(widget, "100%"); - contextVP.setCellHeight(widget, "100%"); - } - - public void setGroupLogo(final Image image) { - // groupLogoPanel.setLogo(image); - } - - public void setGroupLogo(final String groupName) { - // groupLogoPanel.setLogo(groupName); - } - - public void setGroupMembers(final View view) { - // groupMembersPanel = (DropDownPanel) view; - // AddDropDown(groupMembersPanel, colorTheme.getGroupMembersDD()); - } - - public void setParticipation(final View view) { - // participationPanel = (DropDownPanel) view; - // AddDropDown(participationPanel, colorTheme.getParticipationDD()); - } - - public void setPutYourLogoVisible(final boolean visible) { - // groupLogoPanel.setPutYourLogoVisible(visible); - } - - public void setSummary(final View view) { - // groupSummaryPanel = (DropDownPanel) view; - // AddDropDown(groupSummaryPanel, colorTheme.getSummaryDD()); - } - - public void setTags(final View view) { - // tagsPanel = (DropDownPanel) view; - // AddDropDown(tagsPanel, colorTheme.getTagsDD()); - } - - public void setTheme(final String theme) { - // colorTheme.setTheme(theme); - // final String mainColor = colorTheme.getContentMainBorder(); - // // groupLogoPanel.setTextColor(colorTheme.getContentTitleText()); - // contentTitleBarBorderDec.setColor(mainColor); - // bottomBorderDecorator.setColor(mainColor); - // DOM.setStyleAttribute(cntcxtVP.getElement(), "borderRightColor", - // mainColor); - // contentTitlePanel.setColors(colorTheme.getContentTitle(), - // colorTheme.getContentTitleText()); - // contentSubTitlePanel.setColors(mainColor, - // colorTheme.getContentSubTitleText()); - // DOM.setStyleAttribute(contentTitleBarHP.getElement(), - // "borderLeftColor", mainColor); - // DOM.setStyleAttribute(contentTitleBarHP.getElement(), - // "backgroundColor", colorTheme.getContentTitle()); - // DOM.setStyleAttribute(contentSubTitleBarHP.getElement(), - // "backgroundColor", mainColor); - // DOM.setStyleAttribute(contentBottomBarHP.getElement(), - // "backgroundColor", mainColor); - // DOM.setStyleAttribute(cntcxtHSP.getRightWidget().getElement(), - // "backgroundColor", colorTheme.getContext()); - // DOM.setStyleAttribute(DOM.getChild(DOM.getChild(cntcxtHSP.getElement(), - // 0), 1), "backgroundColor", colorTheme - // .getSplitter()); - // DOM.setStyleAttribute(contentBottomBarHP.getWidget(0).getElement(), - // "color", colorTheme.getContentBottomText()); - // groupMembersPanel.setColor(colorTheme.getGroupMembersDD()); - // participationPanel.setColor(colorTheme.getParticipationDD()); - // groupSummaryPanel.setColor(colorTheme.getSummaryDD()); - // tagsPanel.setColor(colorTheme.getTagsDD()); - // groupToolsBar.setTabsColors(colorTheme.getToolSelected(), - // colorTheme.getToolUnselected()); - } - - public void setTool(final String toolName) { - groupToolsBar.selectItem(toolName); - } - - public void setVisible(final boolean visible) { - // false: Used when the app stops - super.setVisible(visible); - } - - private void adjustSizeContentSP() { - final int width = cntcxtHSP.getLeftWidgetAvailableWidth() - 2; - final int height = cntcxtHSP.getOffsetHeight() - 29 - contentToolBarHP.getOffsetHeight(); - if (width > 0 && height > 0) { - contentSP.setSize("" + width + "px", "" + height + "px"); - } else { - Log.debug("Can't resize ScrollPanel now"); - } - } - - private void saveCurrentRightWidgetWidth(final int newRightWidgetWidth) { - previousRightWidgetWidth = newRightWidgetWidth; - } - - private void setDefaultSplitterPosition() { - final int newLefttWidgetWidth = (int) (cntcxtHSP.getOffsetWidth() * 0.7); - cntcxtHSP.setSplitPosition(newLefttWidgetWidth + "px"); - saveCurrentRightWidgetWidth(cntcxtHSP.getLeftWidgetAvailableWidth()); - } - - // private void logSplitter(final String count) { - // FireLog.debug("" + count + " cntcxtHSP.getRightWidgetAvailableWidth: " - // + cntcxtHSP.getRightWidgetAvailableWidth()); - // FireLog - // .debug("" + count + " cntcxtHSP.getLeftWidgetAvailableWidth: " - // + cntcxtHSP.getLeftWidgetAvailableWidth()); - // } - -}
participants (1)
-
vjrj