[kune-commits] r1249 - in branches: . wave-jetty-embed-guice/src/main/java/cc/kune/chat/client wave-jetty-embed-guice/src/main/java/cc/kune/client wave-jetty-embed-guice/src/main/java/cc/kune/common wave-jetty-embed-guice/src/main/java/cc/kune/core/client wave-jetty-embed-guice/src/main/java/cc/kune/core/client/ws wave-jetty-embed-guice/src/main/java/cc/kune/core/public wave-jetty-embed-guice/src/main/java/org/ourproject/kune/app/public/css wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client wave-jetty-embed-guice/src/main/java/org/ourproject/kune/rack wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/nohomepage wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/oldsn/other wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo wave-jetty-embed-guice/src/test/java/cc/kune/core/client wave-jetty-embed-guice/src/test/java/org/ourproject/kune/workspace/client wave-jetty-embed-guice/src/test/java/testsuites
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Sat Feb 12 03:18:54 CET 2011
Author: vjrj_
Date: 2011-02-12 03:18:52 +0100 (Sat, 12 Feb 2011)
New Revision: 1249
Added:
branches/wave-jetty-embed-guice/
branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/AddAsBuddieHeaderButton.java
branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/ChatGinModule.java
branches/wave-jetty-embed-guice/src/main/java/cc/kune/client/KuneGinjector.java
branches/wave-jetty-embed-guice/src/main/java/cc/kune/common/KuneCommon.gwt.xml
branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreGinModule.java
branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreParts.java
branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/ws/entheader/
branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/public/ws.css
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheadermaxmin/
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePresenter.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPresenter.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPresenter.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPresenter.java
branches/wave-jetty-embed-guice/src/test/java/cc/kune/core/client/ws/
branches/wave-jetty-embed-guice/src/test/java/testsuites/OthersTestSuite.java
Removed:
branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/ChatGinModule.java
branches/wave-jetty-embed-guice/src/main/java/cc/kune/client/KuneGinjector.java
branches/wave-jetty-embed-guice/src/main/java/cc/kune/common/KuneCommon.gwt.xml
branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreGinModule.java
branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreParts.java
branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/public/ws.css
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeader.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderButton.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPanel.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderView.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityTextLogo.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/maxmin/
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePresenter.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/oldsn/other/AddAsBuddieHeaderButton.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPresenter.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPresenter.java
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPresenter.java
branches/wave-jetty-embed-guice/src/test/java/org/ourproject/kune/workspace/client/entityheader/
branches/wave-jetty-embed-guice/src/test/java/testsuites/OthersTestSuite.java
Modified:
branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/rack/RackServletFilter.java
Log:
some wave startup testing
Copied: branches/wave-jetty-embed-guice (from rev 1247, trunk)
Copied: branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/AddAsBuddieHeaderButton.java (from rev 1248, trunk/src/main/java/cc/kune/chat/client/AddAsBuddieHeaderButton.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/AddAsBuddieHeaderButton.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/AddAsBuddieHeaderButton.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,117 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.chat.client;
+
+import cc.kune.common.client.actions.AbstractAction;
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.PropertyChangeEvent;
+import cc.kune.common.client.actions.PropertyChangeListener;
+import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.common.client.noti.NotifyUser;
+import cc.kune.core.client.resources.icons.IconConstants;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateChangedEvent;
+import cc.kune.core.client.state.StateChangedEvent.StateChangedHandler;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.emite.im.client.roster.XmppRoster;
+import com.calclab.emite.im.client.roster.events.RosterGroupChangedEvent;
+import com.calclab.emite.im.client.roster.events.RosterGroupChangedHandler;
+import com.calclab.suco.client.Suco;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class AddAsBuddieHeaderButton {
+
+ public static class AddAsBuddieAction extends AbstractExtendedAction {
+ private final Provider<ChatClientDefault> chatEngine;
+ private final Session session;
+
+ @Inject
+ public AddAsBuddieAction(final Provider<ChatClientDefault> chatEngine, final Session session,
+ final StateManager stateManager, final I18nTranslationService i18n, final IconResources img) {
+ super();
+ this.chatEngine = chatEngine;
+ this.session = session;
+ stateManager.onStateChanged(new StateChangedHandler() {
+ @Override
+ public void onStateChanged(final StateChangedEvent event) {
+ setState(event.getState());
+ }
+ });
+ Suco.get(XmppRoster.class).addRosterGroupChangedHandler(new RosterGroupChangedHandler() {
+
+ @Override
+ public void onGroupChanged(final RosterGroupChangedEvent event) {
+ setState(session.getCurrentState());
+ }
+ });
+ putValue(Action.NAME, i18n.t("Add as a buddie"));
+ putValue(Action.SMALL_ICON, IconConstants.toPath(img.addGreen()));
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ chatEngine.get().addNewBuddie(session.getCurrentState().getGroup().getShortName());
+ NotifyUser.info("Added as buddie. Waiting buddie response");
+ setEnabled(false);
+ }
+
+ private boolean currentGroupsIsAsPerson(final StateAbstractDTO state) {
+ return state.getGroup().isPersonal();
+ }
+
+ private boolean isNotMe(final String groupName) {
+ return !session.getCurrentUser().getShortName().equals(groupName);
+ }
+
+ private void setState(final StateAbstractDTO state) {
+ final String groupName = state.getGroup().getShortName();
+ final boolean imLogged = session.isLogged();
+ final boolean isNotBuddie = !chatEngine.get().isBuddie(groupName);
+ if (imLogged && currentGroupsIsAsPerson(state) && isNotBuddie && isNotMe(groupName)) {
+ setEnabled(true);
+ } else {
+ setEnabled(false);
+ }
+ }
+ }
+
+ @Inject
+ public AddAsBuddieHeaderButton(final AddAsBuddieAction buddieAction, final EntityHeader entityHeader) {
+ final ButtonDescriptor button = new ButtonDescriptor(buddieAction);
+ button.setVisible(false);
+ buddieAction.addPropertyChangeListener(new PropertyChangeListener() {
+ @Override
+ public void propertyChange(final PropertyChangeEvent event) {
+ if (event.getPropertyName().equals(AbstractAction.ENABLED)) {
+ button.setVisible((Boolean) event.getNewValue());
+ }
+ }
+ });
+ entityHeader.addAction(button);
+ }
+}
\ No newline at end of file
Deleted: branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/ChatGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/ChatGinModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,36 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.chat.client;
-
-import com.google.inject.Singleton;
-import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
-
-public class ChatGinModule extends AbstractPresenterModule {
- /*
- * (non-Javadoc)
- *
- * @see com.google.gwt.inject.client.AbstractGinModule#configure()
- */
- @Override
- protected void configure() {
- bind(ChatClient.class).to(ChatClientDefault.class).in(Singleton.class);
- bind(ChatOptions.class).in(Singleton.class);
- }
-}
\ No newline at end of file
Copied: branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/ChatGinModule.java (from rev 1248, trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/ChatGinModule.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/chat/client/ChatGinModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,37 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.chat.client;
+
+import com.google.inject.Singleton;
+import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
+
+public class ChatGinModule extends AbstractPresenterModule {
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.google.gwt.inject.client.AbstractGinModule#configure()
+ */
+ @Override
+ protected void configure() {
+ bind(ChatClient.class).to(ChatClientDefault.class).in(Singleton.class);
+ bind(ChatOptions.class).in(Singleton.class);
+ bind(AddAsBuddieHeaderButton.class).in(Singleton.class);
+ }
+}
\ No newline at end of file
Deleted: branches/wave-jetty-embed-guice/src/main/java/cc/kune/client/KuneGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/client/KuneGinjector.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,119 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.client;
-
-import cc.kune.chat.client.ChatClient;
-import cc.kune.chat.client.ChatGinModule;
-import cc.kune.common.client.actions.gwtui.GwtGuiProvider;
-import cc.kune.common.client.actions.gxtui.GxtGuiProvider;
-import cc.kune.common.client.actions.ui.bind.GuiProvider;
-import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
-import cc.kune.core.client.CoreGinModule;
-import cc.kune.core.client.CoreParts;
-import cc.kune.core.client.auth.RegisterPresenter;
-import cc.kune.core.client.auth.SignInPresenter;
-import cc.kune.core.client.cookies.CookiesManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.groups.newgroup.NewGroupPresenter;
-import cc.kune.core.client.logs.EventBusWithLogging;
-import cc.kune.core.client.notify.confirm.UserConfirmPresenter;
-import cc.kune.core.client.notify.msgs.UserNotifierPresenter;
-import cc.kune.core.client.notify.spiner.SpinerPresenter;
-import cc.kune.core.client.sitebar.SitebarActionsPresenter;
-import cc.kune.core.client.sitebar.logo.SiteLogoPresenter;
-import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter;
-import cc.kune.core.client.sn.GroupMembersPresenter;
-import cc.kune.core.client.state.SiteTokenListeners;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.client.ui.footer.license.EntityLicensePresenter;
-import cc.kune.core.client.ws.CorePresenter;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.pspace.client.PSpaceGinModule;
-import cc.kune.pspace.client.PSpacePresenter;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.inject.client.AsyncProvider;
-import com.google.gwt.inject.client.GinModules;
-import com.google.gwt.inject.client.Ginjector;
-import com.google.inject.Provider;
-import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler;
-
- at GinModules({ CoreGinModule.class, ChatGinModule.class, PSpaceGinModule.class })
-public interface KuneGinjector extends Ginjector {
-
- /*
- * You have to add here all the GWTPresenters (as Provider or AsyncProvider)
- * see the GWTPlatform doc
- */
-
- ChatClient getChatClient();
-
- AsyncProvider<CookiesManager> getCookiesManager();
-
- CoreParts getCoreParts();
-
- Provider<CorePresenter> getCorePresenter();
-
- AsyncProvider<EntityLicensePresenter> getEntityLicensePresenter();
-
- ErrorHandler getErrorHandler();
-
- EventBus getEventBus();
-
- EventBusWithLogging getEventLogger();
-
- GlobalShortcutRegister getGlobalShortcutRegister();
-
- AsyncProvider<GroupMembersPresenter> getGroupMembersPresenter();
-
- GuiProvider getGuiProvider();
-
- GwtGuiProvider getGwtGuiProvider();
-
- GxtGuiProvider getGxtGuiProvider();
-
- I18nTranslationService getI18n();
-
- AsyncProvider<NewGroupPresenter> getNewGroupPresenter();
-
- ProxyFailureHandler getProxyFailureHandler();
-
- AsyncProvider<PSpacePresenter> getPSpacePresenter();
-
- AsyncProvider<RegisterPresenter> getRegisterPresenter();
-
- AsyncProvider<SignInPresenter> getSignInPresenter();
-
- AsyncProvider<SitebarActionsPresenter> getSitebarActionsPresenter();
-
- AsyncProvider<SiteLogoPresenter> getSiteLogoPresenter();
-
- SiteTokenListeners getSiteTokenListeners();
-
- AsyncProvider<SpaceSelectorPresenter> getSpacesTabPresenter();
-
- AsyncProvider<SpinerPresenter> getSpinerPresenter();
-
- StateManager getStateManager();
-
- AsyncProvider<UserConfirmPresenter> getUserConfirmPresenter();
-
- AsyncProvider<UserNotifierPresenter> getUserNotifierPresenter();
-}
\ No newline at end of file
Copied: branches/wave-jetty-embed-guice/src/main/java/cc/kune/client/KuneGinjector.java (from rev 1248, trunk/src/main/java/cc/kune/client/KuneGinjector.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/cc/kune/client/KuneGinjector.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/client/KuneGinjector.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,122 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.client;
+
+import cc.kune.chat.client.ChatClient;
+import cc.kune.chat.client.ChatGinModule;
+import cc.kune.common.client.actions.gwtui.GwtGuiProvider;
+import cc.kune.common.client.actions.gxtui.GxtGuiProvider;
+import cc.kune.common.client.actions.ui.bind.GuiProvider;
+import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.core.client.CoreGinModule;
+import cc.kune.core.client.CoreParts;
+import cc.kune.core.client.auth.RegisterPresenter;
+import cc.kune.core.client.auth.SignInPresenter;
+import cc.kune.core.client.cookies.CookiesManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.groups.newgroup.NewGroupPresenter;
+import cc.kune.core.client.logs.EventBusWithLogging;
+import cc.kune.core.client.notify.confirm.UserConfirmPresenter;
+import cc.kune.core.client.notify.msgs.UserNotifierPresenter;
+import cc.kune.core.client.notify.spiner.SpinerPresenter;
+import cc.kune.core.client.sitebar.SitebarActionsPresenter;
+import cc.kune.core.client.sitebar.logo.SiteLogoPresenter;
+import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter;
+import cc.kune.core.client.sn.GroupMembersPresenter;
+import cc.kune.core.client.state.SiteTokenListeners;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ui.footer.license.EntityLicensePresenter;
+import cc.kune.core.client.ws.CorePresenter;
+import cc.kune.core.client.ws.entheader.EntityHeaderPresenter;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.pspace.client.PSpaceGinModule;
+import cc.kune.pspace.client.PSpacePresenter;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.gwt.inject.client.AsyncProvider;
+import com.google.gwt.inject.client.GinModules;
+import com.google.gwt.inject.client.Ginjector;
+import com.google.inject.Provider;
+import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler;
+
+ at GinModules({ CoreGinModule.class, ChatGinModule.class, PSpaceGinModule.class })
+public interface KuneGinjector extends Ginjector {
+
+ /*
+ * You have to add here all the GWTPresenters (as Provider or AsyncProvider)
+ * see the GWTPlatform doc
+ */
+
+ ChatClient getChatClient();
+
+ AsyncProvider<CookiesManager> getCookiesManager();
+
+ CoreParts getCoreParts();
+
+ Provider<CorePresenter> getCorePresenter();
+
+ AsyncProvider<EntityHeaderPresenter> getEntityHeaderPresenter();
+
+ AsyncProvider<EntityLicensePresenter> getEntityLicensePresenter();
+
+ ErrorHandler getErrorHandler();
+
+ EventBus getEventBus();
+
+ EventBusWithLogging getEventLogger();
+
+ GlobalShortcutRegister getGlobalShortcutRegister();
+
+ AsyncProvider<GroupMembersPresenter> getGroupMembersPresenter();
+
+ GuiProvider getGuiProvider();
+
+ GwtGuiProvider getGwtGuiProvider();
+
+ GxtGuiProvider getGxtGuiProvider();
+
+ I18nTranslationService getI18n();
+
+ AsyncProvider<NewGroupPresenter> getNewGroupPresenter();
+
+ ProxyFailureHandler getProxyFailureHandler();
+
+ AsyncProvider<PSpacePresenter> getPSpacePresenter();
+
+ AsyncProvider<RegisterPresenter> getRegisterPresenter();
+
+ AsyncProvider<SignInPresenter> getSignInPresenter();
+
+ AsyncProvider<SitebarActionsPresenter> getSitebarActionsPresenter();
+
+ AsyncProvider<SiteLogoPresenter> getSiteLogoPresenter();
+
+ SiteTokenListeners getSiteTokenListeners();
+
+ AsyncProvider<SpaceSelectorPresenter> getSpacesTabPresenter();
+
+ AsyncProvider<SpinerPresenter> getSpinerPresenter();
+
+ StateManager getStateManager();
+
+ AsyncProvider<UserConfirmPresenter> getUserConfirmPresenter();
+
+ AsyncProvider<UserNotifierPresenter> getUserNotifierPresenter();
+}
\ No newline at end of file
Deleted: branches/wave-jetty-embed-guice/src/main/java/cc/kune/common/KuneCommon.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/common/KuneCommon.gwt.xml 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/common/KuneCommon.gwt.xml 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<module>
- <!-- Inherit the core Web Toolkit stuff. -->
- <inherits name='com.google.gwt.user.User' />
- <!-- Inherit the default GWT style sheet. You can change -->
- <!-- the theme of your GWT application by uncommenting -->
- <!-- any one of the following lines. -->
- <!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
- <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
- <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
- <!-- Other module inherits -->
- <!-- Specify the app entry point class. -->
-<!-- <entry-point class='cc.kune.msgs.client.KuneMessagesSampleEntryPoint' />-->
- <!-- Specify the paths for translatable code -->
- <source path='client' />
- <public path="public" />
- <inherits name='org.cobogw.gwt.user.User' />
- <inherits name='com.google.gwt.inject.Inject' />
- <inherits name="com.extjs.gxt.ui.GXT" />
- <stylesheet src="kune-common.css" />
-</module>
\ No newline at end of file
Copied: branches/wave-jetty-embed-guice/src/main/java/cc/kune/common/KuneCommon.gwt.xml (from rev 1248, trunk/src/main/java/cc/kune/common/KuneCommon.gwt.xml)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/cc/kune/common/KuneCommon.gwt.xml (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/common/KuneCommon.gwt.xml 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module>
+ <!-- Inherit the core Web Toolkit stuff. -->
+ <inherits name='com.google.gwt.user.User' />
+ <!-- Inherit the default GWT style sheet. You can change -->
+ <!-- the theme of your GWT application by uncommenting -->
+ <!-- any one of the following lines. -->
+ <!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
+ <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
+ <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
+ <!-- Other module inherits -->
+ <!-- Specify the app entry point class. -->
+ <!-- <entry-point class='cc.kune.msgs.client.KuneMessagesSampleEntryPoint'
+ /> -->
+ <!-- Specify the paths for translatable code -->
+ <source path='client'
+ excludes="**/*Test.java,**/*Tests.java,**/*MockProvider.java" />
+ <public path="public" />
+ <inherits name='org.cobogw.gwt.user.User' />
+ <inherits name='com.google.gwt.inject.Inject' />
+ <inherits name="com.extjs.gxt.ui.GXT" />
+ <stylesheet src="kune-common.css" />
+</module>
\ No newline at end of file
Deleted: branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,194 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package cc.kune.core.client;
-
-import cc.kune.common.client.actions.gwtui.GwtGuiProvider;
-import cc.kune.common.client.actions.gxtui.GxtGuiProvider;
-import cc.kune.common.client.actions.ui.bind.DefaultGuiProvider;
-import cc.kune.common.client.actions.ui.bind.GuiProvider;
-import cc.kune.common.client.shortcuts.DefaultGlobalShortcutRegister;
-import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
-import cc.kune.common.client.ui.MaskWidget;
-import cc.kune.common.client.ui.MaskWidgetView;
-import cc.kune.core.client.auth.Register;
-import cc.kune.core.client.auth.RegisterPanel;
-import cc.kune.core.client.auth.RegisterPresenter;
-import cc.kune.core.client.auth.RegisterView;
-import cc.kune.core.client.auth.SignIn;
-import cc.kune.core.client.auth.SignInPanel;
-import cc.kune.core.client.auth.SignInPresenter;
-import cc.kune.core.client.auth.SignInView;
-import cc.kune.core.client.auth.UserPassAutocompleteManager;
-import cc.kune.core.client.auth.UserPassAutocompleteManagerImpl;
-import cc.kune.core.client.cookies.CookiesManager;
-import cc.kune.core.client.cookies.CookiesManagerImpl;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.groups.newgroup.NewGroup;
-import cc.kune.core.client.groups.newgroup.NewGroupPanel;
-import cc.kune.core.client.groups.newgroup.NewGroupPresenter;
-import cc.kune.core.client.groups.newgroup.NewGroupView;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.init.AppStarter;
-import cc.kune.core.client.init.AppStarterDefault;
-import cc.kune.core.client.init.PrefetchUtilities;
-import cc.kune.core.client.logs.EventBusWithLogging;
-import cc.kune.core.client.notify.confirm.UserConfirmPanel;
-import cc.kune.core.client.notify.confirm.UserConfirmPresenter;
-import cc.kune.core.client.notify.msgs.UserNotifierPresenter;
-import cc.kune.core.client.notify.msgs.UserNotifierPresenter.UserNotifierProxy;
-import cc.kune.core.client.notify.msgs.UserNotifierViewImpl;
-import cc.kune.core.client.notify.spiner.SpinerPresenter;
-import cc.kune.core.client.notify.spiner.SpinerViewImpl;
-import cc.kune.core.client.sitebar.SiteUserOptions;
-import cc.kune.core.client.sitebar.SiteUserOptionsPresenter;
-import cc.kune.core.client.sitebar.SitebarActionsPanel;
-import cc.kune.core.client.sitebar.SitebarActionsPresenter;
-import cc.kune.core.client.sitebar.SitebarNewGroupLink;
-import cc.kune.core.client.sitebar.SitebarSignInLink;
-import cc.kune.core.client.sitebar.SitebarSignOutLink;
-import cc.kune.core.client.sitebar.SitebarSignOutLink.BeforeSignOut;
-import cc.kune.core.client.sitebar.logo.SiteLogoPresenter;
-import cc.kune.core.client.sitebar.logo.SiteLogoViewImpl;
-import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter;
-import cc.kune.core.client.sitebar.spaces.SpaceSelectorViewImpl;
-import cc.kune.core.client.sn.GroupMembersPanel;
-import cc.kune.core.client.sn.GroupMembersPresenter;
-import cc.kune.core.client.sn.actions.registry.GroupMembersActionsRegistry;
-import cc.kune.core.client.sn.actions.registry.SNAdminsMenuItemsRegistry;
-import cc.kune.core.client.sn.actions.registry.SNCollabsMenuItemsRegistry;
-import cc.kune.core.client.sn.actions.registry.SNPendingsMenuItemsRegistry;
-import cc.kune.core.client.state.AccessRightsClientManager;
-import cc.kune.core.client.state.ContentProvider;
-import cc.kune.core.client.state.ContentProviderDefault;
-import cc.kune.core.client.state.HistoryWrapper;
-import cc.kune.core.client.state.HistoryWrapperDefault;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.SessionDefault;
-import cc.kune.core.client.state.SiteTokenListeners;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.client.state.StateManagerDefault;
-import cc.kune.core.client.ui.footer.license.EntityLicensePanel;
-import cc.kune.core.client.ui.footer.license.EntityLicensePresenter;
-import cc.kune.core.client.ws.CorePresenter;
-import cc.kune.core.client.ws.CoreViewImpl;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.WsArmor;
-import cc.kune.gspace.client.WsArmorImpl;
-import cc.kune.msgs.client.UserMessagesPanel;
-import cc.kune.msgs.client.UserMessagesPresenter;
-
-import com.google.gwt.event.shared.EventBus;
-import com.google.inject.Singleton;
-import com.gwtplatform.mvp.client.DefaultProxyFailureHandler;
-import com.gwtplatform.mvp.client.RootPresenter;
-import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
-import com.gwtplatform.mvp.client.proxy.ParameterTokenFormatter;
-import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler;
-import com.gwtplatform.mvp.client.proxy.TokenFormatter;
-
-public class CoreGinModule extends AbstractPresenterModule {
-
- /*
- * (non-Javadoc)
- *
- * @see com.google.gwt.inject.client.AbstractGinModule#configure()
- */
- @Override
- protected void configure() {
- bind(EventBus.class).to(EventBusWithLogging.class).in(Singleton.class);
- bind(TokenFormatter.class).to(ParameterTokenFormatter.class).in(Singleton.class);
- bind(RootPresenter.class).asEagerSingleton();
- bind(ProxyFailureHandler.class).to(DefaultProxyFailureHandler.class).in(Singleton.class);
- bind(I18nUITranslationService.class).in(Singleton.class);
- bind(I18nTranslationService.class).to(I18nUITranslationService.class).in(Singleton.class);
-
- // Presenters
- bindPresenter(CorePresenter.class, CorePresenter.CoreView.class, CoreViewImpl.class,
- CorePresenter.CoreProxy.class);
- bindPresenter(SpinerPresenter.class, SpinerPresenter.SpinerView.class, SpinerViewImpl.class,
- SpinerPresenter.SpinerProxy.class);
- bindPresenter(UserNotifierPresenter.class, UserNotifierPresenter.UserNotifierView.class,
- UserNotifierViewImpl.class, UserNotifierProxy.class);
-
- bindPresenter(SpaceSelectorPresenter.class, SpaceSelectorPresenter.SpaceSelectorView.class,
- SpaceSelectorViewImpl.class, SpaceSelectorPresenter.SpaceSelectorProxy.class);
- bindPresenter(SiteLogoPresenter.class, SiteLogoPresenter.SiteLogoView.class, SiteLogoViewImpl.class,
- SiteLogoPresenter.SiteLogoProxy.class);
- bindPresenter(SitebarActionsPresenter.class, SitebarActionsPresenter.SitebarActionsView.class,
- SitebarActionsPanel.class, SitebarActionsPresenter.SitebarActionsProxy.class);
- bindPresenter(NewGroupPresenter.class, NewGroupView.class, NewGroupPanel.class,
- NewGroupPresenter.NewGroupProxy.class);
- bindPresenter(GroupMembersPresenter.class, GroupMembersPresenter.GroupMembersView.class,
- GroupMembersPanel.class, GroupMembersPresenter.GroupMembersProxy.class);
- bindPresenter(EntityLicensePresenter.class, EntityLicensePresenter.EntityLicenseView.class,
- EntityLicensePanel.class, EntityLicensePresenter.EntityLicenseProxy.class);
-
- bind(UserPassAutocompleteManager.class).to(UserPassAutocompleteManagerImpl.class).in(Singleton.class);
- bindPresenter(SignInPresenter.class, SignInView.class, SignInPanel.class, SignInPresenter.SignInProxy.class);
- bindPresenter(RegisterPresenter.class, RegisterView.class, RegisterPanel.class,
- RegisterPresenter.RegisterProxy.class);
- bind(SignIn.class).to(SignInPresenter.class).in(Singleton.class);
- bind(Register.class).to(RegisterPresenter.class).in(Singleton.class);
- bind(NewGroup.class).to(NewGroupPresenter.class).in(Singleton.class);
-
- bind(UserMessagesPresenter.class).in(Singleton.class);
- bind(UserMessagesPanel.class).in(Singleton.class);
- bindPresenter(UserConfirmPresenter.class, UserConfirmPresenter.UserConfirmView.class, UserConfirmPanel.class,
- UserConfirmPresenter.UserConfirmProxy.class);
-
- // bind(MessagePanelView.class).to(MessagePanel.class);
-
- // UI
- bind(WsArmorImpl.class).in(Singleton.class);
- bind(WsArmor.class).to(WsArmorImpl.class).in(Singleton.class);
- bind(GuiProvider.class).to(DefaultGuiProvider.class).in(Singleton.class);
- bind(GxtGuiProvider.class).in(Singleton.class);
- bind(GwtGuiProvider.class).in(Singleton.class);
- bind(GlobalShortcutRegister.class).to(DefaultGlobalShortcutRegister.class).in(Singleton.class);
- bind(MaskWidgetView.class).to(MaskWidget.class).in(Singleton.class);
-
- // Core App
- bind(Session.class).to(SessionDefault.class).in(Singleton.class);
- bind(ErrorHandler.class).in(Singleton.class);
- bind(StateManagerDefault.class).in(Singleton.class);
- bind(StateManager.class).to(StateManagerDefault.class).in(Singleton.class);
- bind(AccessRightsClientManager.class).in(Singleton.class);
- bind(ContentProvider.class).to(ContentProviderDefault.class).in(Singleton.class);
- bind(HistoryWrapper.class).to(HistoryWrapperDefault.class).in(Singleton.class);
- bind(PrefetchUtilities.class).in(Singleton.class);
- bind(AppStarter.class).to(AppStarterDefault.class).in(Singleton.class);
- bind(CookiesManager.class).to(CookiesManagerImpl.class).in(Singleton.class);
- bind(BeforeSignOut.class).in(Singleton.class);
- bind(SiteTokenListeners.class).asEagerSingleton();
- bind(CoreParts.class).asEagerSingleton();
-
- // SN
- bind(SNAdminsMenuItemsRegistry.class).in(Singleton.class);
- bind(SNCollabsMenuItemsRegistry.class).in(Singleton.class);
- bind(SNPendingsMenuItemsRegistry.class).in(Singleton.class);
- bind(GroupMembersActionsRegistry.class).in(Singleton.class);
-
- bind(SiteUserOptions.class).to(SiteUserOptionsPresenter.class).in(Singleton.class);
- bind(SitebarNewGroupLink.class).in(Singleton.class);
- bind(SitebarSignInLink.class).in(Singleton.class);
- bind(SitebarSignOutLink.class).in(Singleton.class);
-
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreGinModule.java (from rev 1248, trunk/src/main/java/cc/kune/core/client/CoreGinModule.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreGinModule.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,200 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.core.client;
+
+import cc.kune.common.client.actions.gwtui.GwtGuiProvider;
+import cc.kune.common.client.actions.gxtui.GxtGuiProvider;
+import cc.kune.common.client.actions.ui.bind.DefaultGuiProvider;
+import cc.kune.common.client.actions.ui.bind.GuiProvider;
+import cc.kune.common.client.shortcuts.DefaultGlobalShortcutRegister;
+import cc.kune.common.client.shortcuts.GlobalShortcutRegister;
+import cc.kune.common.client.ui.MaskWidget;
+import cc.kune.common.client.ui.MaskWidgetView;
+import cc.kune.core.client.auth.Register;
+import cc.kune.core.client.auth.RegisterPanel;
+import cc.kune.core.client.auth.RegisterPresenter;
+import cc.kune.core.client.auth.RegisterView;
+import cc.kune.core.client.auth.SignIn;
+import cc.kune.core.client.auth.SignInPanel;
+import cc.kune.core.client.auth.SignInPresenter;
+import cc.kune.core.client.auth.SignInView;
+import cc.kune.core.client.auth.UserPassAutocompleteManager;
+import cc.kune.core.client.auth.UserPassAutocompleteManagerImpl;
+import cc.kune.core.client.cookies.CookiesManager;
+import cc.kune.core.client.cookies.CookiesManagerImpl;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.groups.newgroup.NewGroup;
+import cc.kune.core.client.groups.newgroup.NewGroupPanel;
+import cc.kune.core.client.groups.newgroup.NewGroupPresenter;
+import cc.kune.core.client.groups.newgroup.NewGroupView;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.init.AppStarter;
+import cc.kune.core.client.init.AppStarterDefault;
+import cc.kune.core.client.init.PrefetchUtilities;
+import cc.kune.core.client.logs.EventBusWithLogging;
+import cc.kune.core.client.notify.confirm.UserConfirmPanel;
+import cc.kune.core.client.notify.confirm.UserConfirmPresenter;
+import cc.kune.core.client.notify.msgs.UserNotifierPresenter;
+import cc.kune.core.client.notify.msgs.UserNotifierPresenter.UserNotifierProxy;
+import cc.kune.core.client.notify.msgs.UserNotifierViewImpl;
+import cc.kune.core.client.notify.spiner.SpinerPresenter;
+import cc.kune.core.client.notify.spiner.SpinerViewImpl;
+import cc.kune.core.client.sitebar.SiteUserOptions;
+import cc.kune.core.client.sitebar.SiteUserOptionsPresenter;
+import cc.kune.core.client.sitebar.SitebarActionsPanel;
+import cc.kune.core.client.sitebar.SitebarActionsPresenter;
+import cc.kune.core.client.sitebar.SitebarNewGroupLink;
+import cc.kune.core.client.sitebar.SitebarSignInLink;
+import cc.kune.core.client.sitebar.SitebarSignOutLink;
+import cc.kune.core.client.sitebar.SitebarSignOutLink.BeforeSignOut;
+import cc.kune.core.client.sitebar.logo.SiteLogoPresenter;
+import cc.kune.core.client.sitebar.logo.SiteLogoViewImpl;
+import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter;
+import cc.kune.core.client.sitebar.spaces.SpaceSelectorViewImpl;
+import cc.kune.core.client.sn.GroupMembersPanel;
+import cc.kune.core.client.sn.GroupMembersPresenter;
+import cc.kune.core.client.sn.actions.registry.GroupMembersActionsRegistry;
+import cc.kune.core.client.sn.actions.registry.SNAdminsMenuItemsRegistry;
+import cc.kune.core.client.sn.actions.registry.SNCollabsMenuItemsRegistry;
+import cc.kune.core.client.sn.actions.registry.SNPendingsMenuItemsRegistry;
+import cc.kune.core.client.state.AccessRightsClientManager;
+import cc.kune.core.client.state.ContentProvider;
+import cc.kune.core.client.state.ContentProviderDefault;
+import cc.kune.core.client.state.HistoryWrapper;
+import cc.kune.core.client.state.HistoryWrapperDefault;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.SessionDefault;
+import cc.kune.core.client.state.SiteTokenListeners;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.StateManagerDefault;
+import cc.kune.core.client.ui.footer.license.EntityLicensePanel;
+import cc.kune.core.client.ui.footer.license.EntityLicensePresenter;
+import cc.kune.core.client.ws.CorePresenter;
+import cc.kune.core.client.ws.CoreViewImpl;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.client.ws.entheader.EntityHeaderPanel;
+import cc.kune.core.client.ws.entheader.EntityHeaderPresenter;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.WsArmor;
+import cc.kune.gspace.client.WsArmorImpl;
+import cc.kune.msgs.client.UserMessagesPanel;
+import cc.kune.msgs.client.UserMessagesPresenter;
+
+import com.google.gwt.event.shared.EventBus;
+import com.google.inject.Singleton;
+import com.gwtplatform.mvp.client.DefaultProxyFailureHandler;
+import com.gwtplatform.mvp.client.RootPresenter;
+import com.gwtplatform.mvp.client.gin.AbstractPresenterModule;
+import com.gwtplatform.mvp.client.proxy.ParameterTokenFormatter;
+import com.gwtplatform.mvp.client.proxy.ProxyFailureHandler;
+import com.gwtplatform.mvp.client.proxy.TokenFormatter;
+
+public class CoreGinModule extends AbstractPresenterModule {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.google.gwt.inject.client.AbstractGinModule#configure()
+ */
+ @Override
+ protected void configure() {
+ bind(EventBus.class).to(EventBusWithLogging.class).in(Singleton.class);
+ bind(TokenFormatter.class).to(ParameterTokenFormatter.class).in(Singleton.class);
+ bind(RootPresenter.class).asEagerSingleton();
+ bind(ProxyFailureHandler.class).to(DefaultProxyFailureHandler.class).in(Singleton.class);
+ bind(I18nUITranslationService.class).in(Singleton.class);
+ bind(I18nTranslationService.class).to(I18nUITranslationService.class).in(Singleton.class);
+
+ // Presenters
+ bindPresenter(CorePresenter.class, CorePresenter.CoreView.class, CoreViewImpl.class,
+ CorePresenter.CoreProxy.class);
+ bindPresenter(SpinerPresenter.class, SpinerPresenter.SpinerView.class, SpinerViewImpl.class,
+ SpinerPresenter.SpinerProxy.class);
+ bindPresenter(UserNotifierPresenter.class, UserNotifierPresenter.UserNotifierView.class,
+ UserNotifierViewImpl.class, UserNotifierProxy.class);
+
+ bindPresenter(SpaceSelectorPresenter.class, SpaceSelectorPresenter.SpaceSelectorView.class,
+ SpaceSelectorViewImpl.class, SpaceSelectorPresenter.SpaceSelectorProxy.class);
+ bindPresenter(SiteLogoPresenter.class, SiteLogoPresenter.SiteLogoView.class, SiteLogoViewImpl.class,
+ SiteLogoPresenter.SiteLogoProxy.class);
+ bindPresenter(SitebarActionsPresenter.class, SitebarActionsPresenter.SitebarActionsView.class,
+ SitebarActionsPanel.class, SitebarActionsPresenter.SitebarActionsProxy.class);
+ bindPresenter(NewGroupPresenter.class, NewGroupView.class, NewGroupPanel.class,
+ NewGroupPresenter.NewGroupProxy.class);
+ bindPresenter(GroupMembersPresenter.class, GroupMembersPresenter.GroupMembersView.class,
+ GroupMembersPanel.class, GroupMembersPresenter.GroupMembersProxy.class);
+ bindPresenter(EntityLicensePresenter.class, EntityLicensePresenter.EntityLicenseView.class,
+ EntityLicensePanel.class, EntityLicensePresenter.EntityLicenseProxy.class);
+ bindPresenter(EntityHeaderPresenter.class, EntityHeaderPresenter.EntityHeaderView.class,
+ EntityHeaderPanel.class, EntityHeaderPresenter.EntityHeaderProxy.class);
+
+ bind(UserPassAutocompleteManager.class).to(UserPassAutocompleteManagerImpl.class).in(Singleton.class);
+ bindPresenter(SignInPresenter.class, SignInView.class, SignInPanel.class, SignInPresenter.SignInProxy.class);
+ bindPresenter(RegisterPresenter.class, RegisterView.class, RegisterPanel.class,
+ RegisterPresenter.RegisterProxy.class);
+ bind(SignIn.class).to(SignInPresenter.class).in(Singleton.class);
+ bind(Register.class).to(RegisterPresenter.class).in(Singleton.class);
+ bind(NewGroup.class).to(NewGroupPresenter.class).in(Singleton.class);
+ bind(EntityHeader.class).to(EntityHeaderPresenter.class).in(Singleton.class);
+
+ bind(UserMessagesPresenter.class).in(Singleton.class);
+ bind(UserMessagesPanel.class).in(Singleton.class);
+ bindPresenter(UserConfirmPresenter.class, UserConfirmPresenter.UserConfirmView.class, UserConfirmPanel.class,
+ UserConfirmPresenter.UserConfirmProxy.class);
+
+ // bind(MessagePanelView.class).to(MessagePanel.class);
+
+ // UI
+ bind(WsArmorImpl.class).in(Singleton.class);
+ bind(WsArmor.class).to(WsArmorImpl.class).in(Singleton.class);
+ bind(GuiProvider.class).to(DefaultGuiProvider.class).in(Singleton.class);
+ bind(GxtGuiProvider.class).in(Singleton.class);
+ bind(GwtGuiProvider.class).in(Singleton.class);
+ bind(GlobalShortcutRegister.class).to(DefaultGlobalShortcutRegister.class).in(Singleton.class);
+ bind(MaskWidgetView.class).to(MaskWidget.class).in(Singleton.class);
+
+ // Core App
+ bind(Session.class).to(SessionDefault.class).in(Singleton.class);
+ bind(ErrorHandler.class).in(Singleton.class);
+ bind(StateManagerDefault.class).in(Singleton.class);
+ bind(StateManager.class).to(StateManagerDefault.class).in(Singleton.class);
+ bind(AccessRightsClientManager.class).in(Singleton.class);
+ bind(ContentProvider.class).to(ContentProviderDefault.class).in(Singleton.class);
+ bind(HistoryWrapper.class).to(HistoryWrapperDefault.class).in(Singleton.class);
+ bind(PrefetchUtilities.class).in(Singleton.class);
+ bind(AppStarter.class).to(AppStarterDefault.class).in(Singleton.class);
+ bind(CookiesManager.class).to(CookiesManagerImpl.class).in(Singleton.class);
+ bind(BeforeSignOut.class).in(Singleton.class);
+ bind(SiteTokenListeners.class).asEagerSingleton();
+ bind(CoreParts.class).asEagerSingleton();
+
+ // SN
+ bind(SNAdminsMenuItemsRegistry.class).in(Singleton.class);
+ bind(SNCollabsMenuItemsRegistry.class).in(Singleton.class);
+ bind(SNPendingsMenuItemsRegistry.class).in(Singleton.class);
+ bind(GroupMembersActionsRegistry.class).in(Singleton.class);
+
+ bind(SiteUserOptions.class).to(SiteUserOptionsPresenter.class).in(Singleton.class);
+ bind(SitebarNewGroupLink.class).in(Singleton.class);
+ bind(SitebarSignInLink.class).in(Singleton.class);
+ bind(SitebarSignOutLink.class).in(Singleton.class);
+
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreParts.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreParts.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreParts.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,27 +0,0 @@
-package cc.kune.core.client;
-
-import cc.kune.core.client.init.AppStartEvent;
-import cc.kune.core.client.init.AppStartEvent.AppStartHandler;
-import cc.kune.core.client.sitebar.SiteUserOptionsPresenter;
-import cc.kune.core.client.sn.GroupMembersPresenter;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.ui.footer.license.EntityLicensePresenter;
-
-import com.google.inject.Inject;
-import com.google.inject.Provider;
-
-public class CoreParts {
-
- @Inject
- public CoreParts(final Session session, final Provider<GroupMembersPresenter> grouMembersPresenter,
- final Provider<SiteUserOptionsPresenter> userOptions, final Provider<EntityLicensePresenter> licenseFooter) {
- session.onInitDataReceived(new AppStartHandler() {
- @Override
- public void onAppStart(final AppStartEvent event) {
- grouMembersPresenter.get();
- userOptions.get();
- licenseFooter.get();
- }
- });
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreParts.java (from rev 1248, trunk/src/main/java/cc/kune/core/client/CoreParts.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreParts.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/CoreParts.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,30 @@
+package cc.kune.core.client;
+
+import cc.kune.chat.client.AddAsBuddieHeaderButton;
+import cc.kune.core.client.init.AppStartEvent;
+import cc.kune.core.client.init.AppStartEvent.AppStartHandler;
+import cc.kune.core.client.sitebar.SiteUserOptionsPresenter;
+import cc.kune.core.client.sn.GroupMembersPresenter;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.ui.footer.license.EntityLicensePresenter;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class CoreParts {
+
+ @Inject
+ public CoreParts(final Session session, final Provider<GroupMembersPresenter> grouMembersPresenter,
+ final Provider<SiteUserOptionsPresenter> userOptions, final Provider<EntityLicensePresenter> licenseFooter,
+ final Provider<AddAsBuddieHeaderButton> buddieButton) {
+ session.onInitDataReceived(new AppStartHandler() {
+ @Override
+ public void onAppStart(final AppStartEvent event) {
+ grouMembersPresenter.get();
+ userOptions.get();
+ licenseFooter.get();
+ buddieButton.get();
+ }
+ });
+ }
+}
Copied: branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/client/ws/entheader (from rev 1248, trunk/src/main/java/cc/kune/core/client/ws/entheader)
Deleted: branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/public/ws.css 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,935 +0,0 @@
- at CHARSET "UTF-8";
-
-body {
- background-color: white;
- color: black;
- font-family: 'Ubuntu', Arial;
- font-size: small;
- margin: 5px;
- overflow: hidden;
-}
-
-* {
- font-family: 'Ubuntu', Arial;
-}
-
-body.fontface {
- font: 'Ubuntu', Arial;
-}
-
-/*
-a {
- color: darkblue;
-}
-
-a:visited {
- color: darkblue;
-}
-*/
-.gwt-DialogBox {
- border: 2px solid #AAAAAA;
- background-color: white;
-}
-
-.gwt-DialogBox .Caption {
- background-image: url(gray_gradient.gif);
- background-repeat: repeat-x;
- padding: 4px;
- padding-bottom: 8px;
- font-weight: bold;
- cursor: default;
-}
-
-.gwt-MenuBar {
- background-color: #C3D9FF;
- cursor: default;
-}
-
-.gwt-MenuItem {
- font-size: 80%;
- margin: 1px;
- cursor: default;
-}
-
-.gwt-MenuItem-selected {
- background-color: #E8EEF7;
-}
-
-.gwt-Tree {
-
-}
-
-.gwt-Tree .gwt-TreeItem {
- font-size: 80%;
- cursor: default;
-}
-
-.gwt-Tree .gwt-TreeItem-selected {
- background-color: #C3D9FF;
-}
-
-.gwt-StackPanel {
- background-color: white;
- border: 1px solid #AAAAAA;
- width: 15em;
-}
-
-.gwt-StackPanel .gwt-StackPanelItem {
- background-image: url(blue_gradient.gif);
- background-repeat: repeat-x;
- background-color: #EEEEEE;
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-StackPanel .gwt-StackPanelItem-selected {
-
-}
-
-.gwt-TabPanel {
-
-}
-
-.gwt-TabPanelBottom {
- border-left: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- border-bottom: 1px solid #87b3ff;
-}
-
-.gwt-TabBar {
- font-size: smaller;
-}
-
-.gwt-TabBar .gwt-TabBarFirst {
- height: 100%;
- border-bottom: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- padding-left: 3px;
-}
-
-.gwt-TabBar .gwt-TabBarRest {
- border-bottom: 1px solid #87b3ff;
- padding-right: 3px;
-}
-
-.gwt-TabBar .gwt-TabBarItem {
- border-top: 1px solid #87b3ff;
- border-bottom: 1px solid #87b3ff;
- padding: 2px;
- cursor: hand;
- white-space: nowrap;
- border-right: 1px solid #87b3ff;
-}
-
-.gwt-TabBar .gwt-TabBarItem-selected {
- font-weight: bold;
- background-color: #e8eef7;
- border-top: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- border-bottom: 1px solid #e8eef7;
- padding: 2px;
- cursor: default;
- white-space: nowrap;
-}
-
-.gwt-PushButton-up {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-PushButton-up-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-PushButton-down {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-PushButton-down-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-up {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-up-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-down {
- background-color: #C3D9FF;
- padding: 2px;
- background-color: #E8F1FF;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-down-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- background-color: #E8F1FF;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-RichTextArea {
- border: 1px solid black;
- background-color: white;
-}
-
-.gwt-RichTextToolbar {
- background-color: #C3D9FF;
- padding: 2px;
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-up {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-down {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-up {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
- rgb(232, 241, 255);
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-down {
- margin-right: 2px;
- background-color: #E8F1FF;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
- margin-right: 2px;
- background-color: #E8F1FF;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
- rgb(157, 174, 205);
-}
-
-.gwt-HorizontalSplitPanel {
- border: 8px solid #C3D9FF;
-}
-
-.gwt-HorizontalSplitPanel .splitter {
- background-color: #C3D9FF;
- cursor: move;
-}
-
-.gwt-HorizontalSplitPanel .left {
- background-color: #E8EEF7;
-}
-
-.gwt-VerticalSplitPanel {
- border: 8px solid #C3D9FF;
-}
-
-.gwt-VerticalSplitPanel .splitter {
- background-color: #C3D9FF;
- height: 8px;
- cursor: move;
-}
-
-.gwt-SuggestBoxPopup {
- border: 2px solid #C3D9FF;
-}
-
-.gwt-SuggestBoxPopup .item {
- padding: 2px;
-}
-
-.gwt-SuggestBoxPopup .item-selected {
- background-color: #C3D9FF;
- padding: 2px;
-}
-
-.gwt-DisclosurePanel {
- border: 2px solid #C3D9FF;
-}
-
-.gwt-DisclosurePanel .header {
- background-color: #e8eef7;
- cursor: hand;
-}
-
-.gwt-SplitLayoutPanel {
-
-}
-
-.gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-HDragger {
- background-color: white;
- background: none;
- cursor: col-resize;
-}
-
-.gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-VDragger {
- background-color: white;
- background: none;
- cursor: row-resize;
-}
-
-.kLoadingPanel {
- background-color: #FF9999;
- -webkit-border-bottom-right-radius: 4px;
- -moz-border-radius-bottomright: 4px;
- border-bottom-right-radius: 4px;
- padding: 0 1px 0 3px;
- border-collapse: separate;
- border-spacing: 2px;
-}
-
-.kLoadingLabel {
- font-size: 14px;
- color: white;
- font-weight: bold;
- padding: 0 5px 0 5px;
-}
-
-.k-space-sel {
- margin-right: 10px;
- background-color: #F2F2F2;
-}
-
-.k-space-sel-btn {
- padding: 0 1px 0 1px;
- margin: 0 0 -2px;
-}
-
-.k-sitebar-logo {
- margin-top: 2px;
-}
-
-.x-btn button {
- font: 18px/27px 'Ubuntu', arial;
-}
-
-.k-btn-sitebar,.k-btn-sitebar button {
- font: 13px 'Ubuntu', arial;
- color: #B3B3B3;
- cursor: pointer;
- text-decoration: underline;
- white-space: nowrap;
-}
-
-.k-btn-sitebar button {
- margin-top: -5px;
-}
-
-.k-sitebar { /* margin-top: -30px; */
-
-}
-
-.k-link {
- text-decoration: underline;
- color: green;
- cursor: pointer;
-}
-
-/* Margins */
-.kune-Margin-40-trbl {
- margin: 40px;
-}
-
-.kune-Margin-40-lr {
- margin-left: 40px;
- margin-right: 40px;
-}
-
-.kune-Margin-40-tl {
- margin-top: 40px;
- margin-left: 40px;
-}
-
-.kune-Margin-40-tb {
- margin-top: 40px;
- margin-bottom: 40px;
-}
-
-.kune-Margin-40-t {
- margin-top: 40px;
-}
-
-.kune-Margin-40-r {
- margin-right: 40px;
-}
-
-.kune-Margin-40-l {
- margin-left: 40px;
-}
-
-.kune-Margin-20-trbl {
- margin: 20px;
-}
-
-.kune-Margin-20-lr {
- margin-left: 20px;
- margin-right: 20px;
-}
-
-.kune-Margin-20-tl {
- margin-top: 20px;
- margin-left: 20px;
-}
-
-.kune-Margin-20-tb {
- margin-top: 20px;
- margin-bottom: 20px;
-}
-
-.kune-Margin-20-t {
- margin-top: 20px;
-}
-
-.kune-Margin-20-r {
- margin-right: 20px;
-}
-
-.kune-Margin-20-l {
- margin-left: 20px;
-}
-
-.kune-Margin-Large-trbl {
- margin: 10px;
-}
-
-.kune-Margin-Large-lr {
- margin-left: 10px;
- margin-right: 10px;
-}
-
-.kune-Margin-Large-tl {
- margin-top: 10px;
- margin-left: 10px;
-}
-
-.kune-Margin-Large-tb {
- margin-top: 10px;
- margin-bottom: 10px;
-}
-
-.kune-Margin-Large-t {
- margin-top: 10px;
-}
-
-.kune-Margin-Large-r {
- margin-right: 10px;
-}
-
-.kune-Margin-Large-l {
- margin-left: 10px;
-}
-
-.kune-Margin-7-trbl {
- margin: 7px;
-}
-
-.kune-Margin-7-lr {
- margin-left: 7px;
- margin-right: 7px;
-}
-
-.kune-Margin-7-tl {
- margin-top: 7px;
- margin-left: 7px;
-}
-
-.kune-Margin-7-tb {
- margin-top: 7px;
- margin-bottom: 7px;
-}
-
-.kune-Margin-7-t {
- margin-top: 7px;
-}
-
-.kune-Margin-7-r {
- margin-right: 7px;
-}
-
-.kune-Margin-7-b {
- margin-bottom: 7px;
-}
-
-.kune-Margin-7-l {
- margin-left: 7px;
-}
-
-.kune-Margin-Medium-trbl {
- margin: 5px;
-}
-
-.kune-Margin-Medium-lr {
- margin-left: 5px;
- margin-right: 5px;
-}
-
-.kune-Margin-Medium-tl {
- margin-top: 5px;
- margin-left: 5px;
-}
-
-.kune-Margin-Medium-tb {
- margin-top: 5px;
- margin-bottom: 5px;
-}
-
-.kune-Margin-Medium-t {
- margin-top: 5px;
-}
-
-.kune-Margin-Medium-r {
- margin-right: 5px;
-}
-
-.kune-Margin-Medium-b {
- margin-bottom: 5px;
-}
-
-.kune-Margin-Medium-l {
- margin-left: 5px;
-}
-
-.kune-Margin-Small-trbl {
- margin: 3px;
-}
-
-.kune-Margin-Small-lr {
- margin-left: 3px;
- margin-right: 3px;
-}
-
-.kune-Margin-Small-tl {
- margin-top: 3px;
- margin-left: 3px;
-}
-
-.kune-Margin-Small-tb {
- margin-top: 3px;
- margin-bottom: 3px;
-}
-
-.kune-Margin-Small-t {
- margin-top: 3px;
-}
-
-.kune-Margin-Small-l {
- margin-left: 3px;
-}
-
-.kune-Margin-Small-r {
- margin-right: 3px;
-}
-
-.kune-Margin-Small-b {
- margin-bottom: 3px;
-}
-
-.kune-Margin-Mini-trbl {
- margin: 1px;
-}
-
-.kune-Margin-Mini-lr {
- margin-left: 1px;
- margin-right: 1px;
-}
-
-.kune-Margin-Mini-tl {
- margin-top: 1px;
- margin-left: 1px;
-}
-
-.kune-Margin-Mini-tb {
- margin-top: 1px;
- margin-bottom: 1px;
-}
-
-.kune-Margin-Mini-t {
- margin-top: 1px;
-}
-
-.kune-Margin-Mini-r {
- margin-right: 1px;
-}
-
-.kune-Margin-Mini-b {
- margin-bottom: 1px;
-}
-
-.kune-Margin-Mini-l {
- margin-left: 1px;
-}
-
-.k-publicspace-msg {
- background-color: #E0E0E0;
-}
-
-.k-publicspace-mask { /* background-color: #fff !important;
- kfilter: alpha(opacity = 68) !important;
- -moz-opacity: 0.68 !important;
- -khtml-opacity: 0.68 !important;
- opacity: 0.68 !important;*/
-
-}
-
-.k-publicspace-panel {
- margin: 5px;
- display: table-row;
-}
-
-.k-publicspace-icon {
- margin: 3px 3px 3px 0;
- float: left;
-}
-
-.k-publicspace-title {
- font-weight: bold;
- display: block;
- margin-bottom: 5px;
- font-size: 16px;
- display: table-caption;
-}
-
-.k-publicspace-description {
- font-size: 14px;
- display: table-cell;
-}
-
-.k-publicspace-actions {
- display: inline;
-}
-
-.k-message-panel {
- margin: 5px;
- display: table-row;
-}
-
-.k-message-icon {
- margin: 3px 3px 3px 0;
- float: left;
-}
-
-.k-message-title {
- font-weight: bold;
- display: block;
- margin-bottom: 5px;
- font-size: 16px;
- display: table-caption;
-}
-
-.k-message-description {
- font-size: 14px;
- display: table-cell;
-}
-
-.k-error-tb {
- background: #FFB380 none repeat scroll 0% 50%;
- /* color: #250; */
- padding: 10px;
-}
-
-.k-error-tb img {
- margin: 0 10px;
- float: left;
-}
-
-.k-error-tb div {
- font-size: 14px;
- display: table-cell;
-}
-
-.k-mask {
- background-color: #F2F2F2 !important;
- /* kfilter: alpha(opacity = 78) !important; */
- -moz-opacity: 0.78 !important;
- -khtml-opacity: 0.78 !important;
- opacity: 0.78 !important;
-}
-
-.x-form-item-label {
- font-size: 14px;
- font-weight: bold;
- color: brown;
-}
-
-.x-form-text {
- font-size: 14px;
-}
-
-.x-fieldset-header-text,.x-form-group-label,.x-form-cb-label {
- font-size: 14px;
- font-family: 'Ubuntu', Arial;
-}
-
-.k-form-intro {
- font-size: 14px;
- margin-bottom: 10px;
-}
-
-.k-form-fieldset {
- font-size: 16px;
- margin-left: 105px;
-}
-
-.k-basic-thumb {
- background-color: #F2F2F2;
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
- border-radius: 2px;
-}
-
-.k-basic-thumb img {
- margin: 2px 2px 0px 2px;
-}
-
-.k-basic-thumb div {
- margin: -3px 0px 0px 0px;
- font-weight: normal;
- font-size: 12px;
-}
-
-.k-sn-mainpanel {
- font-size: 16px;
- font-weight: bold;
-}
-
-.k-sn-maintitle {
- margin: 5px;
-}
-
-.k-sn-maintitle {
- color: #a05a2c;
- font-size: 20px;
-}
-
-.k-sn-adminslabel,.k-sn-collabslabel,.k-sn-pendingslabel {
- color: #FFF;
- text-transform: lowercase;
- padding-left: 10px;
- float: left;
-}
-
-.k-sn-adminsCountlabel,.k-sn-collabsCountlabel,.k-sn-pendingsCountlabel
- {
- float: left;
- padding-left: 5px;
- color: #e0e0e0;
-}
-
-.k-sn-adminslabel {
-
-}
-
-.k-sn-mainpanel .k-basic-thumb {
- float: left;
-}
-
-/*
-.k-sn-mainpanel .x-btn button {
- text-decoration: underline;
- white-space: nowrap;
-}
-*/
-.k-sn-mainpanel .x-btn button {
- font: 13px 'Ubuntu', arial;
- border: 2px solid #CCCCCC;
- cursor: pointer;
- margin: 0;
- padding: 3px 0;
- text-decoration: none;
- background-color: #F2F2F2;
- color: #855585;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- vertical-align: middle;
- line-height: 2em !important;
- height: 26px !important;
- /*
-font-size:small;
- cursor: pointer;
- border: 2px gray solid;
- padding-left: 25px !important; */
-}
-
-.k-sn-mainpanel .x-btn button:hover {
- border: 2px orange solid;
- background: #f0f0f0;
- color: #855585;
-}
-
-.k-sn-mainpanel .x-btn button:active {
- border-top-color: #ffffff;
- background: #ffffff;
-}
-
-.k-sn-collabslabel {
-
-}
-
-.k-sn-pendingslabel {
-
-}
-
-.k-sn-orphan-label {
- padding: 10px;
-}
-
-.k-sn-novisible-label {
- padding: 10px;
-}
-
-.k-sn-adminspanel {
- background-color: #a05a2c;
-}
-
-.k-sn-collabspanel {
-
-}
-
-.k-sn-pendingspanel { /* background-color: #a05a2c; */
-
-}
-
-.k-sn-adminsscroll,.k-sn-collabsscroll,.k-sn-pendingsscroll {
-
-}
-
-.k-sn-adminsflow,.k-sn-collabsflow,.k-sn-pendingsflow {
- margin-left: 10px;
-}
-
-.k-sn-adminsscroll {
-
-}
-
-.k-sn-collabsscroll {
-
-}
-
-.k-sn-pendingsscroll {
-
-}
-
-.k-userconfirm-label {
- width: 300px;
- margin: 10px;
-}
-
-.k-sn-deck {
-
-}
-
-.k-sn-bottomPanel {
- padding: 0 10px;
- float: right;
-}
-
-.k-sn-bottomPanel-actions {
- width: 100%;
-}
-
-.k-sn-novisible-label,.k-sn-orphan-label {
- color: #FFF;
- font-size: 16px;
- font-weight: bold;
-}
-
-.k-frame-def {
- margin: 0px;
- border: 0px;
-}
-
-.k-maxsize {
- width: 100%;
- height: 100%;
-}
-
-.k-footer-license-label {
- float: right;
- margin-top: 8px;
- cursor: pointer;
- font-weight: bold;
- font-size: 16px;
- color: #784421;
-}
-.k-footer-license-label-title {
- margin-right: 5px;
- color: #280b0b;
-}
-
-.k-footer-license-img {
- float: right;
- margin: 10px 15px 0px 5px;
- cursor: pointer;
-}
\ No newline at end of file
Copied: branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/public/ws.css (from rev 1248, trunk/src/main/java/cc/kune/core/public/ws.css)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/public/ws.css (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/cc/kune/core/public/ws.css 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,1011 @@
+ at CHARSET "UTF-8";
+
+body {
+ background-color: white;
+ color: black;
+ font-family: 'Ubuntu', Arial;
+ font-size: small;
+ margin: 5px;
+ overflow: hidden;
+}
+
+* {
+ font-family: 'Ubuntu', Arial;
+}
+
+body.fontface {
+ font: 'Ubuntu', Arial;
+}
+
+/*
+a {
+ color: darkblue;
+}
+
+a:visited {
+ color: darkblue;
+}
+*/
+.gwt-DialogBox {
+ border: 2px solid #AAAAAA;
+ background-color: white;
+}
+
+.gwt-DialogBox .Caption {
+ background-image: url(gray_gradient.gif);
+ background-repeat: repeat-x;
+ padding: 4px;
+ padding-bottom: 8px;
+ font-weight: bold;
+ cursor: default;
+}
+
+.gwt-MenuBar {
+ background-color: #C3D9FF;
+ cursor: default;
+}
+
+.gwt-MenuItem {
+ font-size: 80%;
+ margin: 1px;
+ cursor: default;
+}
+
+.gwt-MenuItem-selected {
+ background-color: #E8EEF7;
+}
+
+.gwt-Tree {
+
+}
+
+.gwt-Tree .gwt-TreeItem {
+ font-size: 80%;
+ cursor: default;
+}
+
+.gwt-Tree .gwt-TreeItem-selected {
+ background-color: #C3D9FF;
+}
+
+.gwt-StackPanel {
+ background-color: white;
+ border: 1px solid #AAAAAA;
+ width: 15em;
+}
+
+.gwt-StackPanel .gwt-StackPanelItem {
+ background-image: url(blue_gradient.gif);
+ background-repeat: repeat-x;
+ background-color: #EEEEEE;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-StackPanel .gwt-StackPanelItem-selected {
+
+}
+
+.gwt-TabPanel {
+
+}
+
+.gwt-TabPanelBottom {
+ border-left: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ border-bottom: 1px solid #87b3ff;
+}
+
+.gwt-TabBar {
+ font-size: smaller;
+}
+
+.gwt-TabBar .gwt-TabBarFirst {
+ height: 100%;
+ border-bottom: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ padding-left: 3px;
+}
+
+.gwt-TabBar .gwt-TabBarRest {
+ border-bottom: 1px solid #87b3ff;
+ padding-right: 3px;
+}
+
+.gwt-TabBar .gwt-TabBarItem {
+ border-top: 1px solid #87b3ff;
+ border-bottom: 1px solid #87b3ff;
+ padding: 2px;
+ cursor: hand;
+ white-space: nowrap;
+ border-right: 1px solid #87b3ff;
+}
+
+.gwt-TabBar .gwt-TabBarItem-selected {
+ font-weight: bold;
+ background-color: #e8eef7;
+ border-top: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ border-bottom: 1px solid #e8eef7;
+ padding: 2px;
+ cursor: default;
+ white-space: nowrap;
+}
+
+.gwt-PushButton-up {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-up-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down {
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-RichTextArea {
+ border: 1px solid black;
+ background-color: white;
+}
+
+.gwt-RichTextToolbar {
+ background-color: #C3D9FF;
+ padding: 2px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205)
+ rgb(232, 241, 255);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down {
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255)
+ rgb(157, 174, 205);
+}
+
+.gwt-HorizontalSplitPanel {
+ border: 8px solid #C3D9FF;
+}
+
+.gwt-HorizontalSplitPanel .splitter {
+ background-color: #C3D9FF;
+ cursor: move;
+}
+
+.gwt-HorizontalSplitPanel .left {
+ background-color: #E8EEF7;
+}
+
+.gwt-VerticalSplitPanel {
+ border: 8px solid #C3D9FF;
+}
+
+.gwt-VerticalSplitPanel .splitter {
+ background-color: #C3D9FF;
+ height: 8px;
+ cursor: move;
+}
+
+.gwt-SuggestBoxPopup {
+ border: 2px solid #C3D9FF;
+}
+
+.gwt-SuggestBoxPopup .item {
+ padding: 2px;
+}
+
+.gwt-SuggestBoxPopup .item-selected {
+ background-color: #C3D9FF;
+ padding: 2px;
+}
+
+.gwt-DisclosurePanel {
+ border: 2px solid #C3D9FF;
+}
+
+.gwt-DisclosurePanel .header {
+ background-color: #e8eef7;
+ cursor: hand;
+}
+
+.gwt-SplitLayoutPanel {
+
+}
+
+.gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-HDragger {
+ background-color: white;
+ background: none;
+ cursor: col-resize;
+}
+
+.gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-VDragger {
+ background-color: white;
+ background: none;
+ cursor: row-resize;
+}
+
+.kLoadingPanel {
+ background-color: #FF9999;
+ -webkit-border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ border-bottom-right-radius: 4px;
+ padding: 0 1px 0 3px;
+ border-collapse: separate;
+ border-spacing: 2px;
+}
+
+.kLoadingLabel {
+ font-size: 14px;
+ color: white;
+ font-weight: bold;
+ padding: 0 5px 0 5px;
+}
+
+.k-space-sel {
+ margin-right: 10px;
+ background-color: #F2F2F2;
+}
+
+.k-space-sel-btn {
+ padding: 0 1px 0 1px;
+ margin: 0 0 -2px;
+}
+
+.k-sitebar-logo {
+ margin-top: 2px;
+}
+
+.x-btn button {
+ font: 18px/27px 'Ubuntu', arial;
+}
+
+.k-btn-sitebar,.k-btn-sitebar button {
+ font: 13px 'Ubuntu', arial;
+ color: #B3B3B3;
+ cursor: pointer;
+ text-decoration: underline;
+ white-space: nowrap;
+}
+
+.k-btn-sitebar button {
+ margin-top: -5px;
+}
+
+.k-sitebar { /* margin-top: -30px; */
+
+}
+
+.k-link {
+ text-decoration: underline;
+ color: green;
+ cursor: pointer;
+}
+
+/* Margins */
+.kune-Margin-40-trbl {
+ margin: 40px;
+}
+
+.kune-Margin-40-lr {
+ margin-left: 40px;
+ margin-right: 40px;
+}
+
+.kune-Margin-40-tl {
+ margin-top: 40px;
+ margin-left: 40px;
+}
+
+.kune-Margin-40-tb {
+ margin-top: 40px;
+ margin-bottom: 40px;
+}
+
+.kune-Margin-40-t {
+ margin-top: 40px;
+}
+
+.kune-Margin-40-r {
+ margin-right: 40px;
+}
+
+.kune-Margin-40-l {
+ margin-left: 40px;
+}
+
+.kune-Margin-20-trbl {
+ margin: 20px;
+}
+
+.kune-Margin-20-lr {
+ margin-left: 20px;
+ margin-right: 20px;
+}
+
+.kune-Margin-20-tl {
+ margin-top: 20px;
+ margin-left: 20px;
+}
+
+.kune-Margin-20-tb {
+ margin-top: 20px;
+ margin-bottom: 20px;
+}
+
+.kune-Margin-20-t {
+ margin-top: 20px;
+}
+
+.kune-Margin-20-r {
+ margin-right: 20px;
+}
+
+.kune-Margin-20-l {
+ margin-left: 20px;
+}
+
+.kune-Margin-Large-trbl {
+ margin: 10px;
+}
+
+.kune-Margin-Large-lr {
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+.kune-Margin-Large-tl {
+ margin-top: 10px;
+ margin-left: 10px;
+}
+
+.kune-Margin-Large-tb {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
+.kune-Margin-Large-t {
+ margin-top: 10px;
+}
+
+.kune-Margin-Large-r {
+ margin-right: 10px;
+}
+
+.kune-Margin-Large-l {
+ margin-left: 10px;
+}
+
+.kune-Margin-7-trbl {
+ margin: 7px;
+}
+
+.kune-Margin-7-lr {
+ margin-left: 7px;
+ margin-right: 7px;
+}
+
+.kune-Margin-7-tl {
+ margin-top: 7px;
+ margin-left: 7px;
+}
+
+.kune-Margin-7-tb {
+ margin-top: 7px;
+ margin-bottom: 7px;
+}
+
+.kune-Margin-7-t {
+ margin-top: 7px;
+}
+
+.kune-Margin-7-r {
+ margin-right: 7px;
+}
+
+.kune-Margin-7-b {
+ margin-bottom: 7px;
+}
+
+.kune-Margin-7-l {
+ margin-left: 7px;
+}
+
+.kune-Margin-Medium-trbl {
+ margin: 5px;
+}
+
+.kune-Margin-Medium-lr {
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+.kune-Margin-Medium-tl {
+ margin-top: 5px;
+ margin-left: 5px;
+}
+
+.kune-Margin-Medium-tb {
+ margin-top: 5px;
+ margin-bottom: 5px;
+}
+
+.kune-Margin-Medium-t {
+ margin-top: 5px;
+}
+
+.kune-Margin-Medium-r {
+ margin-right: 5px;
+}
+
+.kune-Margin-Medium-b {
+ margin-bottom: 5px;
+}
+
+.kune-Margin-Medium-l {
+ margin-left: 5px;
+}
+
+.kune-Margin-Small-trbl {
+ margin: 3px;
+}
+
+.kune-Margin-Small-lr {
+ margin-left: 3px;
+ margin-right: 3px;
+}
+
+.kune-Margin-Small-tl {
+ margin-top: 3px;
+ margin-left: 3px;
+}
+
+.kune-Margin-Small-tb {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+
+.kune-Margin-Small-t {
+ margin-top: 3px;
+}
+
+.kune-Margin-Small-l {
+ margin-left: 3px;
+}
+
+.kune-Margin-Small-r {
+ margin-right: 3px;
+}
+
+.kune-Margin-Small-b {
+ margin-bottom: 3px;
+}
+
+.kune-Margin-Mini-trbl {
+ margin: 1px;
+}
+
+.kune-Margin-Mini-lr {
+ margin-left: 1px;
+ margin-right: 1px;
+}
+
+.kune-Margin-Mini-tl {
+ margin-top: 1px;
+ margin-left: 1px;
+}
+
+.kune-Margin-Mini-tb {
+ margin-top: 1px;
+ margin-bottom: 1px;
+}
+
+.kune-Margin-Mini-t {
+ margin-top: 1px;
+}
+
+.kune-Margin-Mini-r {
+ margin-right: 1px;
+}
+
+.kune-Margin-Mini-b {
+ margin-bottom: 1px;
+}
+
+.kune-Margin-Mini-l {
+ margin-left: 1px;
+}
+
+.k-publicspace-msg {
+ background-color: #E0E0E0;
+}
+
+.k-publicspace-mask { /* background-color: #fff !important;
+ kfilter: alpha(opacity = 68) !important;
+ -moz-opacity: 0.68 !important;
+ -khtml-opacity: 0.68 !important;
+ opacity: 0.68 !important;*/
+
+}
+
+.k-publicspace-panel {
+ margin: 5px;
+ display: table-row;
+}
+
+.k-publicspace-icon {
+ margin: 3px 3px 3px 0;
+ float: left;
+}
+
+.k-publicspace-title {
+ font-weight: bold;
+ display: block;
+ margin-bottom: 5px;
+ font-size: 16px;
+ display: table-caption;
+}
+
+.k-publicspace-description {
+ font-size: 14px;
+ display: table-cell;
+}
+
+.k-publicspace-actions {
+ display: inline;
+}
+
+.k-message-panel {
+ margin: 5px;
+ display: table-row;
+}
+
+.k-message-icon {
+ margin: 3px 3px 3px 0;
+ float: left;
+}
+
+.k-message-title {
+ font-weight: bold;
+ display: block;
+ margin-bottom: 5px;
+ font-size: 16px;
+ display: table-caption;
+}
+
+.k-message-description {
+ font-size: 14px;
+ display: table-cell;
+}
+
+.k-error-tb {
+ background: #FFB380 none repeat scroll 0% 50%;
+ /* color: #250; */
+ padding: 10px;
+}
+
+.k-error-tb img {
+ margin: 0 10px;
+ float: left;
+}
+
+.k-error-tb div {
+ font-size: 14px;
+ display: table-cell;
+}
+
+.k-mask {
+ background-color: #F2F2F2 !important;
+ /* kfilter: alpha(opacity = 78) !important; */
+ -moz-opacity: 0.78 !important;
+ -khtml-opacity: 0.78 !important;
+ opacity: 0.78 !important;
+}
+
+.x-form-item-label {
+ font-size: 14px;
+ font-weight: bold;
+ color: brown;
+}
+
+.x-form-text {
+ font-size: 14px;
+}
+
+.x-fieldset-header-text,.x-form-group-label,.x-form-cb-label {
+ font-size: 14px;
+ font-family: 'Ubuntu', Arial;
+}
+
+.k-form-intro {
+ font-size: 14px;
+ margin-bottom: 10px;
+}
+
+.k-form-fieldset {
+ font-size: 16px;
+ margin-left: 105px;
+}
+
+.k-basic-thumb {
+ background-color: #F2F2F2;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
+}
+
+.k-basic-thumb img {
+ margin: 2px 2px 0px 2px;
+}
+
+.k-basic-thumb div {
+ margin: -3px 0px 0px 0px;
+ font-weight: normal;
+ font-size: 12px;
+}
+
+.k-sn-mainpanel {
+ font-size: 16px;
+ font-weight: bold;
+}
+
+.k-sn-maintitle {
+ margin: 5px;
+}
+
+.k-sn-maintitle {
+ color: #a05a2c;
+ font-size: 20px;
+}
+
+.k-sn-adminslabel,.k-sn-collabslabel,.k-sn-pendingslabel {
+ color: #FFF;
+ text-transform: lowercase;
+ padding-left: 10px;
+ float: left;
+}
+
+.k-sn-adminsCountlabel,.k-sn-collabsCountlabel,.k-sn-pendingsCountlabel
+ {
+ float: left;
+ padding-left: 5px;
+ color: #e0e0e0;
+}
+
+.k-sn-adminslabel {
+
+}
+
+.k-sn-mainpanel .k-basic-thumb {
+ float: left;
+}
+
+/*
+.k-sn-mainpanel .x-btn button {
+ text-decoration: underline;
+ white-space: nowrap;
+}
+*/
+.k-sn-mainpanel .x-btn button {
+ font: 13px 'Ubuntu', arial;
+ border: 2px solid #CCCCCC;
+ cursor: pointer;
+ margin: 0;
+ padding: 3px 0;
+ text-decoration: none;
+ background-color: #F2F2F2;
+ color: #855585;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ vertical-align: middle;
+ line-height: 2em !important;
+ height: 26px !important;
+ /*
+font-size:small;
+ cursor: pointer;
+ border: 2px gray solid;
+ padding-left: 25px !important; */
+}
+
+.k-sn-mainpanel .x-btn button:hover {
+ border: 2px orange solid;
+ background: #f0f0f0;
+ color: #855585;
+}
+
+.k-sn-mainpanel .x-btn button:active {
+ border-top-color: #ffffff;
+ background: #ffffff;
+}
+
+.k-sn-collabslabel {
+
+}
+
+.k-sn-pendingslabel {
+
+}
+
+.k-sn-orphan-label {
+ padding: 10px;
+}
+
+.k-sn-novisible-label {
+ padding: 10px;
+}
+
+.k-sn-adminspanel {
+ background-color: #a05a2c;
+}
+
+.k-sn-collabspanel {
+
+}
+
+.k-sn-pendingspanel { /* background-color: #a05a2c; */
+
+}
+
+.k-sn-adminsscroll,.k-sn-collabsscroll,.k-sn-pendingsscroll {
+
+}
+
+.k-sn-adminsflow,.k-sn-collabsflow,.k-sn-pendingsflow {
+ margin-left: 10px;
+}
+
+.k-sn-adminsscroll {
+
+}
+
+.k-sn-collabsscroll {
+
+}
+
+.k-sn-pendingsscroll {
+
+}
+
+.k-userconfirm-label {
+ width: 300px;
+ margin: 10px;
+}
+
+.k-sn-deck {
+
+}
+
+.k-sn-bottomPanel {
+ padding: 0 10px;
+ float: right;
+}
+
+.k-sn-bottomPanel-actions {
+ width: 100%;
+}
+
+.k-sn-novisible-label,.k-sn-orphan-label {
+ color: #FFF;
+ font-size: 16px;
+ font-weight: bold;
+}
+
+.k-frame-def {
+ margin: 0px;
+ border: 0px;
+}
+
+.k-maxsize {
+ width: 100%;
+ height: 100%;
+}
+
+.k-footer-license-label {
+ float: right;
+ margin-top: 8px;
+ cursor: pointer;
+ font-weight: bold;
+ font-size: 16px;
+ color: #784421;
+}
+
+.k-footer-license-label-title {
+ margin-right: 5px;
+ color: #280b0b;
+}
+
+.k-footer-license-img {
+ float: right;
+ margin: 10px 15px 0px 5px;
+ cursor: pointer;
+}
+
+
+.k-entitytextlogo-border {
+ border: 2px solid #F2F2F2;
+}
+
+.k-entitytextlogo-no-border {
+ border: none;
+}
+
+.k-entitytextlogo {
+ height: 60px;
+ margin: 5px;
+ overflow: hidden;
+ width: 468px;
+}
+
+.k-entitytextlogo table {
+ vertical-align: middle;
+}
+
+.k-elogo-l-l {
+ font-size: 46px;
+}
+
+.k-elogo-l-m {
+ font-size: 167%;
+}
+
+.k-elogo-l-s {
+ font-size: 108%;
+}
+
+.k-entitytextlogo .gwt-Label {
+ font-weight: 700;
+ margin: 5px;
+ height: 27px;
+}
+
+.k-entitytextlogo-default .gwt-Label {
+ color: #69312F;
+}
+
+.k-entitytextlogo-green .gwt-Label {
+ color: #250;
+}
+
+.k-entitytextlogo-blue .gwt-Label {
+ color: #000080;
+}
+
+.k-entitytextlogo-grey .gwt-Label {
+ color: #1A1A1A;
+}
+
+.k-entitytextlogo-purple .gwt-Label {
+ color: #440055;
+}
+
+.k-entitytextlogo-red .gwt-Label {
+ color: #800000;
+}
+
+.k-elogo-plink {
+ color: #CCC;
+ font-size: 85%;
+ margin: 5px;
+ text-decoration: underline;
+ white-space: nowrap;
+ background-color: #FFF;
+}
+
+.k-elogop-expand {
+ background-color: transparent;
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,1097 +0,0 @@
-.k-site-traybar {
- background: transparent none repeat scroll 0% 50%;
-}
-
-.k-blank-toolbar {
- background: #FFF none repeat scroll 0% 50%;
-}
-
-.k-sitebar .kune-IconHyperlink {
- white-space: nowrap;
-}
-
-.k-sitebar .kune-IconHyperlink a:link {
- cursor: pointer;
- text-decoration: underline;
- color: #B3B3B3;
-}
-
-.k-sitebar .kune-IconHyperlink a:hover {
- text-decoration: underline;
-}
-
-.k-sitebar .kune-IconHyperlink a:visited {
- color: #B3B3B3;
-}
-
-.k-sitebar-labellink {
- white-space: nowrap;
- color: #B3B3B3;
- cursor: pointer;
- text-decoration: underline;
-}
-
-.k-sitebar {
- margin-right: 10px;
- height: 16px;
-}
-
-.k-sitebar .gwt-TextBox {
- border: 1px solid #E4A374;
- margin: 0 15px 0 3px;
- padding-left: 1px;
- color: #B3B3B3;
- background: transparent;
-}
-
-.k-sitebar .gwt-Hyperlink a {
- white-space: nowrap;
- color: #B3B3B3;
- text-decoration: underline;
- cursor: pointer;
-}
-
-.k-sitebar .gwt-PushButton {
- cursor: pointer;
-}
-
-.k-sitebar-LabelLink {
- white-space: nowrap;
- color: #B3B3B3;
- cursor: pointer;
- text-decoration: underline;
-}
-
-.k-entity-summary {
- border-left-color: transparent;
- border-left-width: 5px;
- border-bottom-color: transparent;
- border-bottom-width: 5px;
-}
-
-.k-entitytextlogo-border {
- border: 2px solid #F2F2F2;
-}
-
-.k-entitytextlogo-no-border {
- border: none;
-}
-
-.k-entitytextlogo {
- height: 60px;
- margin: 0 0 4px 0;
- overflow: hidden;
- width: 468px;
-}
-
-.k-entitytextlogo table {
- vertical-align: middle;
-}
-
-.k-elogo-l-l {
- font-size: 272%;
-}
-
-.k-elogo-l-m {
- font-size: 167%;
-}
-
-.k-elogo-l-s {
- font-size: 108%;
-}
-
-.k-entitytextlogo .gwt-Label {
- font-weight: 700;
- margin: 5px;
- height: 27px;
-}
-
-.k-entitytextlogo-default .gwt-Label {
- color: #69312F;
-}
-
-.k-entitytextlogo-green .gwt-Label {
- color: #250;
-}
-
-.k-entitytextlogo-blue .gwt-Label {
- color: #000080;
-}
-
-.k-entitytextlogo-grey .gwt-Label {
- color: #1A1A1A;
-}
-
-.k-entitytextlogo-purple .gwt-Label {
- color: #440055;
-}
-
-.k-entitytextlogo-red .gwt-Label {
- color: #800000;
-}
-
-.k-elogo-plink {
- color: #CCC;
- font-size: 85%;
- margin: 5px;
- text-decoration: underline;
- white-space: nowrap;
- background-color: #FFF;
-}
-
-.k-elogop-expand {
- background-color: transparent;
-}
-
-.k-entity-default .x-layout-split,.k-entity-default .x-layout-collapsed
- {
- background: #DD8A3D none repeat scroll 0% 50%;
-}
-
-.k-entity-green .x-layout-split,.k-entity-green .x-layout-collapsed {
- background: #5FD35F none repeat scroll 0% 50%;
-}
-
-.k-entity-blue .x-layout-split,.k-entity-blue .x-layout-collapsed {
- background: #0066FF none repeat scroll 0% 50%;
-}
-
-.k-entity-grey .x-layout-split,.k-entity-grey .x-layout-collapsed {
- background: #4D4D4D none repeat scroll 0% 50%;
-}
-
-.k-entity-purple .x-layout-split,.k-entity-purple .x-layout-collapsed {
- background: #660080 none repeat scroll 0% 50%;
-}
-
-.k-entity-red .x-layout-split,.k-entity-red .x-layout-collapsed {
- background: #D40000 none repeat scroll 0% 50%;
-}
-
-.k-entityworkspace .x-layout-split,.k-entityworkspace .x-layout-collapsed
- {
- background: transparent none repeat scroll 0% 50%;
-}
-
-.k-entityworkspace-default .x-layout-split,.k-entityworkspace-default .x-layout-collapsed
- {
- background: #DEAA87 none repeat scroll 0% 50%;
-}
-
-.k-entityworkspace-green .x-layout-split,.k-entityworkspace-green .x-layout-collapsed
- {
- background: #DCE8AB none repeat scroll 0% 50%;
-}
-
-.k-entityworkspace-blue .x-layout-split,.k-entityworkspace-blue .x-layout-collapsed
- {
- background: #D5D5FF none repeat scroll 0% 50%;
-}
-
-.k-entityworkspace-grey .x-layout-split,.k-entityworkspace-grey .x-layout-collapsed
- {
- background: #999999 none repeat scroll 0% 50%;
-}
-
-.k-entityworkspace-purple .x-layout-split,.k-entityworkspace-purple .x-layout-collapsed
- {
- background: #A793AC none repeat scroll 0% 50%;
-}
-
-.k-entityworkspace-red .x-layout-split,.k-entityworkspace-red .x-layout-collapsed
- {
- background: #FF5555 none repeat scroll 0% 50%;
-}
-
-.k-entity-title {
- border-left-style: solid;
- border-left-width: 5px;
-}
-
-.k-entity-title div {
- line-height: 22px;
- white-space: nowrap;
-}
-
-.k-entity-subtitle {
-
-}
-
-.k-entity-subtitle div {
- line-height: 22px;
- white-space: nowrap;
-}
-
-.k-entity-title-rd-default {
- background: #DD8A3D;
-}
-
-.k-entity-title-rd-green {
- background: #5FD35F;
-}
-
-.k-entity-title-rd-blue {
- background: #0066FF;
-}
-
-.k-entity-title-rd-grey {
- background: #4D4D4D;
-}
-
-.k-entity-title-rd-purple {
- background: #660080;
-}
-
-.k-entity-title-rd-red {
- background: #D40000;
-}
-
-.k-entity-title-default {
- background: #F1BB59 none repeat scroll 0% 50%;
- border-left-color: #DD8A3D;
-}
-
-.k-entity-title-green {
- background: #AFA none repeat scroll 0% 50%;
- border-left-color: #5FD35F;
-}
-
-.k-entity-title-blue {
- background: #AFDDE9 none repeat scroll 0% 50%;
- border-left-color: #0066FF;
-}
-
-.k-entity-title-grey {
- background: #CCCCCC none repeat scroll 0% 50%;
- border-left-color: #4D4D4D;
-}
-
-.k-entity-title-purple {
- background: #DDAFE9 none repeat scroll 0% 50%;
- border-left-color: #660080;
-}
-
-.k-entity-title-red {
- background: #FF8080 none repeat scroll 0% 50%;
- border-left-color: #D40000;
-}
-
-.k-entity-title-default div {
- color: #69312F;
-}
-
-.k-entity-title-green div {
- color: #250;
-}
-
-.k-entity-title-blue div {
- color: #000080;
-}
-
-.k-entity-title-grey div {
- color: #1A1A1A;
-}
-
-.k-entity-title-purple div {
- color: #440055;
-}
-
-.k-entity-title-red div {
- color: #800000;
-}
-
-.k-entity-subtitle-default {
- background: #DD8A3D none repeat scroll 0% 50%;
-}
-
-.k-entity-subtitle-green {
- background: #5FD35F none repeat scroll 0% 50%;
-}
-
-.k-entity-subtitle-blue {
- background: #0066FF none repeat scroll 0% 50%;
-}
-
-.k-entity-subtitle-grey {
- background: #4D4D4D none repeat scroll 0% 50%;
-}
-
-.k-entity-subtitle-purple {
- background: #660080 none repeat scroll 0% 50%;
-}
-
-.k-entity-subtitle-red {
- background: #D40000 none repeat scroll 0% 50%;
-}
-
-.k-entity-subtitle-default div {
- color: #FFF;
-}
-
-.k-entity-subtitle-green div {
- color: #FFF;
-}
-
-.k-entity-subtitle-blue div {
- color: #FFF;
-}
-
-.k-entity-subtitle-grey div {
- color: #FFF;
-}
-
-.k-entity-subtitle-purple div {
- color: #FFF;
-}
-
-.k-entity-subtitle-red div {
- color: #FFF;
-}
-
-.k-entity-bottom-rd-default,.k-entity-bottom-default,.k-toolselectoritem-sel-default
- {
- background: #DD8A3D;
-}
-
-.k-entity-bottom-rd-green,.k-entity-bottom-green,.k-toolselectoritem-sel-green
- {
- background: #5FD35F;
-}
-
-.k-entity-bottom-rd-blue,.k-entity-bottom-blue,.k-toolselectoritem-sel-blue
- {
- background: #0066FF;
-}
-
-.k-entity-bottom-rd-grey,.k-entity-bottom-grey,.k-toolselectoritem-sel-grey
- {
- background: #4D4D4D;
-}
-
-.k-entity-bottom-rd-purple,.k-entity-bottom-purple,.k-toolselectoritem-sel-purple
- {
- background: #660080;
-}
-
-.k-entity-bottom-rd-red,.k-entity-bottom-red,.k-toolselectoritem-sel-red
- {
- background: #D40000;
-}
-
-.k-entity-context-default div,.k-entity-context-default .x-tree .x-panel-body
- {
- background: #FFD09D none repeat scroll 0% 50%;
-}
-
-.k-entity-context-green div,.k-entity-context-green .x-tree .x-panel-body
- {
- background: #CFA none repeat scroll 0% 50%;
-}
-
-.k-entity-context-blue div,.k-entity-context-blue .x-tree .x-panel-body
- {
- background: #AACCFF none repeat scroll 0% 50%;
-}
-
-.k-entity-context-grey div,.k-entity-context-grey .x-tree .x-panel-body
- {
- background: #B3B3B3 none repeat scroll 0% 50%;
-}
-
-.k-entity-context-purple div,.k-entity-context-purple .x-tree .x-panel-body
- {
- background: #DDAFE9 none repeat scroll 0% 50%;
-}
-
-.k-entity-context-red div,.k-entity-context-red .x-tree .x-panel-body {
- background: #FFAAAA none repeat scroll 0% 50%;
-}
-
-.k-entity-context-purple .x-tree .x-panel-body {
- background: #DDAFE9 none repeat scroll 0% 50%;
-}
-
-.k-entity-content {
- background: #FFF;
-}
-
-.k-entity-bottom div { /* line-height: 24px; */
- color: #FFF;
-}
-
-.k-toolbar-top-line {
- border-top-color: rgb(208, 208, 208);
- border-top-style: solid;
- border-top-width: 1px;
-}
-
-.k-toolbar-bottom-line {
- border-bottom-color: rgb(208, 208, 208);
- border-bottom-style: solid;
- border-bottom-width: 1px;
-}
-
-.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label
- {
- white-space: nowrap;
- font: normal 100% arial, sans;
- line-height: 19px;
-}
-
-.k-toolbar-sep {
- padding-top: 4px;
- padding-left: 5px;
-}
-
-/* Custom gwt-ext styles */
-.ytb-sep {
- background-image:
- url(../js/ext/resources/images/default/grid/grid-split.gif);
- background-position: center;
- background-repeat: no-repeat;
- display: block;
- font-size: 1px;
- height: 16px;
- width: 4px;
- overflow: hidden;
- cursor: default;
- margin: 0 2px 0;
- border: 0;
-}
-
-.ytb-spacer {
- width: 2px;
-}
-
-.x-grid-group-hd {
- border-bottom: 2px solid grey;
- cursor: pointer;
- padding-top: 3px;
-}
-
-/* Drop down */
-.k-dropdownouter {
- background-color: grey;
-}
-
-.k-dropdownouter-members {
-
-}
-
-.k-dropdownouter-members-default {
- background-color: #DF5244;
-}
-
-.k-dropdownouter-members-green {
- background-color: #008000;
-}
-
-.k-dropdownouter-members-blue {
- background-color: #5500D4;
-}
-
-.k-dropdownouter-members-grey {
- background-color: #4D4D4D;
-}
-
-.k-dropdownouter-members-purple {
- background-color: #672178;
-}
-
-.k-dropdownouter-members-red {
- background-color: #A02C2C;
-}
-
-.k-dropdownouter-part {
-
-}
-
-.k-dropdownouter-part-default {
- background-color: #CA5842;
-}
-
-.k-dropdownouter-part-green {
- background-color: #00AA00;
-}
-
-.k-dropdownouter-part-blue {
- background-color: #6600FF;
-}
-
-.k-dropdownouter-part-grey {
- background-color: #666666;
-}
-
-.k-dropdownouter-part-purple {
- background-color: #892CA0;
-}
-
-.k-dropdownouter-part-red {
- background-color: #C83737;
-}
-
-.k-dropdownouter-tags {
-
-}
-
-.k-dropdownouter-tags-default {
- background-color: #87501E;
-}
-
-.k-dropdownouter-tags-green {
- background-color: #00D400;
-}
-
-.k-dropdownouter-tags-blue {
- background-color: #9955FF;
-}
-
-.k-dropdownouter-tags-grey {
- background-color: #808080;
-}
-
-.k-dropdownouter-tags-purple {
- background-color: #AB37C8;
-}
-
-.k-dropdownouter-tags-red {
- background-color: #D35F5F;
-}
-
-.k-dropdownouter-summary {
-
-}
-
-.k-dropdownouter-summary-default {
- background-color: #9F734B;
-}
-
-.k-dropdownouter-summary-green {
- background-color: #4CE14C;
-}
-
-.k-dropdownouter-summary-blue {
- background-color: #69A5FF;
-}
-
-.k-dropdownouter-summary-grey {
- background-color: #A6A6A6;
-}
-
-.k-dropdownouter-summary-purple {
- background-color: #C473D8;
-}
-
-.k-dropdownouter-summary-red {
- background-color: #E08F8F;
-}
-
-.k-dropdowninner {
- margin: 0 3px 1px 3px;
- background: green;
- background-color: #FFF;
- /* padding: 3px; */
-}
-
-.k-dropdownlabel {
- color: #FFF;
- cursor: pointer;
-}
-
-.k-dropdownlabel .gwt-Label {
- margin: 0 5px 0 0;
- width: 100%;
-}
-
-.k-dropdownlabel img {
- margin: 0 3px 0 1px;
-}
-
-/* WsTheme */
-.k-wstheme-icon-default {
- background: #FF8C00;
-}
-
-.k-wstheme-icon-green {
- background: green;
-}
-
-.k-wstheme-icon-blue {
- background: blue;
-}
-
-.k-wstheme-icon-grey {
- background: grey;
-}
-
-.k-wstheme-icon-purple {
- background: purple;
-}
-
-.k-wstheme-icon-red {
- background: red;
-}
-
-/* Tool selector items */
-.k-toolselectoritem {
- width: auto;
- margin-bottom: 5px;
- cursor: pointer;
-}
-
-.k-toolselectoritem-sel {
-
-}
-
-.k-toolselectoritem-notsel-default {
- background: #FFE9A5;
-}
-
-.k-toolselectoritem-notsel-green {
- background: #D6F4D6;
-}
-
-.k-toolselectoritem-notsel-blue {
- background: #D7D7F4;
-}
-
-.k-toolselectoritem-notsel-grey {
- background: #E6E6E6;
-}
-
-.k-toolselectoritem-notsel-purple {
- background: #EED7F4;
-}
-
-.k-toolselectoritem-notsel-red {
- background: #FFD5D5;
-}
-
-.k-toolselectoritem-sel a {
- color: #FFF;
- padding: 0 9px;
- text-decoration: none;
-}
-
-.k-toolselectoritem-sel a:hover {
- text-decoration: none;
-}
-
-.k-toolselectoritem-notsel {
-
-}
-
-.k-toolselectoritem-notsel a {
- color: #0000FF;
- padding: 0 9px;
- text-decoration: none;
-}
-
-.k-toolselectoritem-notsel a:hover {
- text-decoration: underline;
-}
-
-/* others */ /*
-.x-tree-node a span, .x-dd-drag-ghost a span {
- color:#000000;
- padding: 1px 0px 1px 1px;
- text-decoration:none;
-}
-*/
-.x-tree-node .k-ctn-status-normal a span {
-
-}
-
-.x-tree-node .k-ctn-status-deleted a span {
- text-decoration: line-through;
- color: gray;
-}
-
-.x-tree-node .k-ctn-status-rejected a span {
- text-decoration: line-through;
- /* color: #FF6633; */
- color: #FF3300;
-}
-
-.x-tree-node .k-ctn-status-editing a span {
- font-style: italic;
- color: gray;
-}
-
-.x-tree-node .k-ctn-status-submitted a span {
- color: green;
-}
-
-.k-info-links {
- text-decoration: underline;
- color: gray;
- cursor: pointer;
-}
-
-.x-tool-kmenu {
- background-position: 0 -75px;
-}
-
-.x-tool-kmenu-over {
- background-position: -15px -75px;
-}
-
-.k-border-openbox {
- border-bottom: 1px #D0D0D0 solid;
- border-right: 1px #D0D0D0 solid;
- border-left: 1px #D0D0D0 solid;
-}
-
-/* SiteToastMessages */
-.k-stm-info-icon {
- background-image: url(img/info.gif) !important;
-}
-
-.k-stm-imp-icon {
- background-image: url(img/alert.gif) !important;
-}
-
-.k-stm-verimp-icon {
- background-image: url(img/important.gif) !important;
-}
-
-.k-stm-error-icon {
- background-image: url(img/error.gif) !important;
-}
-
-.k-infod-head {
- font-size: 108%;
- margin-bottom: 10px;
-}
-
-.gwt-DisclosurePanel {
-
-}
-
-.gwt-DisclosurePanel-open {
-
-}
-
-.gwt-DisclosurePanel-closed {
-
-}
-
-.gwt-DisclosurePanel .header,.gwt-DisclosurePanel .header a,.gwt-DisclosurePanel .header td
- {
- text-decoration: none; /* Remove underline from header */
- color: black;
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-DisclosurePanel .content {
- border-left: 3px solid #e8eef7;
- padding: 4px 0px 4px 8px;
- margin-left: 6px;
-}
-
-.k-basic-thumb {
- background: #FAFAFA none repeat scroll 0% 50%;
- border: 1px solid #EBEBEB;
- padding: 3px;
- margin: 3px;
-}
-
-.k-basic-thumb td {
- padding: 2px 3px 2px 3px;
- border: none;
-}
-
-.k-text-gray {
- color: gray;
-}
-
-.k-elp-limg {
- margin-top: 4px;
- margin-left: 5px;
- cursor: pointer;
- overflow: hidden;
-}
-
-.k-tsp-tag {
- float: left;
- padding: 3px;
- cursor: pointer;
- color: #0000FF;
-}
-
-.k-tsp-cloud {
- line-height: 1.5em;
- text-align: center;
-}
-
-.k-link-icon {
- background-image: url(img/link.gif) !important;
-}
-
-.k-options-icon {
- background-image: url(img/emblem-system.gif) !important;
-}
-
-.k-copyleft-icon {
- background-image: url(img/copyleft.png) !important;
-}
-
-.k-picture-icon {
- background-image: url(img/picture.png) !important;
-}
-
-.k-film-icon {
- background-image: url(img/film.png) !important;
-}
-
-.k-specialchars-icon {
- background-image: url(img/specialchars.png) !important;
-}
-
-.k-info-icon {
- background-image: url(img/info.gif) !important;
-}
-
-.k-newgroup-icon {
- background-image: url(img/kune-icon16.png) !important;
-}
-
-.k-colors-icon {
- background-image: url(img/colors.gif) !important;
-}
-
-.x-toolbar-body table { /* width: 100%; */
-
-}
-
-.k-preview-msg {
- background: #FFCCAA;
-}
-
-.k-preview-msg-lab {
- background: #FFCCAA;
- padding: 0 5px;
-}
-
-.k-eil-edit {
- border: thin solid black;
-}
-
-/* duplicated in rte.css */
-.k-rte-comment {
- border: 1px dashed #C0C0C0;
- line-height: 1.4;
- padding: 1px;
- background-color: #D7FFD7;
-}
-
-.k-specialchar-grid {
- border: 1px solid #ACA899;
-}
-
-.k-specialchar-grid table {
-
-}
-
-.k-specialchar-grid div {
- line-height: 22px;
-}
-
-.k-specialchar-grid td {
- padding: 1px;
-}
-
-.k-specialchar-pb {
- border: 1px solid #EBE8D7;
- cursor: pointer;
- font-size: 108% !important;
- text-align: center;
- vertical-align: middle;
- width: 18px;
- height: 18px;
-}
-
-.k-specialchar-pb-up {
-
-}
-
-.k-specialchar-big {
- padding: 3px;
- line-height: 22px;
- font-size: 197% !important;
-}
-
-.k-specialchar-adv-label {
- margin-left: -10px;
-}
-
-.k-specialchar-popup
-,
-{
-border
-
-
-
-
-
-
-:
-
-
-
-
-
-
-
-1
-px
-
-
-
-
-
-
-
-solid
-
-
-
-
-
-
-
-#C0C0C0
-
-
-
-
-
-
-;
-z-index
-
-
-
-
-
-
-:
-
-
-
-
-
-
-
-9999
-!
-important
-
-
-
-
-
-
-;
-background-color
-
-
-
-
-
-
-:
-
-
-
-
-
-
-
-#FFF
-
-
-
-
-
-
-;
-}
-.k-specialchar-pb-down {
- color: #161616;
-}
-
-.k-specialchar-pb-up-hovering {
- border: thin solid #ACA899;
-}
-
-.k-specialchar-pb-down-hovering {
- color: #161616;
-}
-
-.k-preview-panel {
- border: dashed 1px gray;
- padding: 5px;
-}
-
-.k-rte-changelink {
- white-space: nowrap;
- color: navy;
- cursor: pointer;
- text-decoration: underline;
- margin: 5px;
-}
-
-.k-rte-changelink-popup {
- border: 1px solid #C0C0C0;
- z-index: 9999 !important;
- background-color: #ECECEC;
-}
-
-.e-ui-room {
- height: 27px;
- line-height: 22px;
-}
-
-.e-ui-room input {
- font-size: 100%;
- margin-left: 0px;
- margin-top: 0px;
-}
-
-.k-def-popup {
- z-index: 9999 !important;
- background-color: #FFF;
- border: 1px solid gray;
-}
-
-#k-mshortcut {
- position: absolute;
- right: 10px;
-}
-
-#k-mshortcut-hidden {
- visibility: hidden;
-}
-
-#k-mshortcut a {
- text-decoration: none;
- color: black;
-}
-
-.k-plain-iframe iframe {
- border: 1px solid gray;
-}
-
-.k-transp .x-panel-body {
- background: transparent;
-}
-
-.k-transp {
- background: transparent;
-}
-
-.k-blank {
- background: #FFF;
-}
\ No newline at end of file
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/app/public/css/kune-new.css (from rev 1248, trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/app/public/css/kune-new.css (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/app/public/css/kune-new.css 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,1023 @@
+.k-site-traybar {
+ background: transparent none repeat scroll 0% 50%;
+}
+
+.k-blank-toolbar {
+ background: #FFF none repeat scroll 0% 50%;
+}
+
+.k-sitebar .kune-IconHyperlink {
+ white-space: nowrap;
+}
+
+.k-sitebar .kune-IconHyperlink a:link {
+ cursor: pointer;
+ text-decoration: underline;
+ color: #B3B3B3;
+}
+
+.k-sitebar .kune-IconHyperlink a:hover {
+ text-decoration: underline;
+}
+
+.k-sitebar .kune-IconHyperlink a:visited {
+ color: #B3B3B3;
+}
+
+.k-sitebar-labellink {
+ white-space: nowrap;
+ color: #B3B3B3;
+ cursor: pointer;
+ text-decoration: underline;
+}
+
+.k-sitebar {
+ margin-right: 10px;
+ height: 16px;
+}
+
+.k-sitebar .gwt-TextBox {
+ border: 1px solid #E4A374;
+ margin: 0 15px 0 3px;
+ padding-left: 1px;
+ color: #B3B3B3;
+ background: transparent;
+}
+
+.k-sitebar .gwt-Hyperlink a {
+ white-space: nowrap;
+ color: #B3B3B3;
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+.k-sitebar .gwt-PushButton {
+ cursor: pointer;
+}
+
+.k-sitebar-LabelLink {
+ white-space: nowrap;
+ color: #B3B3B3;
+ cursor: pointer;
+ text-decoration: underline;
+}
+
+.k-entity-summary {
+ border-left-color: transparent;
+ border-left-width: 5px;
+ border-bottom-color: transparent;
+ border-bottom-width: 5px;
+}
+
+.k-entity-default .x-layout-split,.k-entity-default .x-layout-collapsed
+ {
+ background: #DD8A3D none repeat scroll 0% 50%;
+}
+
+.k-entity-green .x-layout-split,.k-entity-green .x-layout-collapsed {
+ background: #5FD35F none repeat scroll 0% 50%;
+}
+
+.k-entity-blue .x-layout-split,.k-entity-blue .x-layout-collapsed {
+ background: #0066FF none repeat scroll 0% 50%;
+}
+
+.k-entity-grey .x-layout-split,.k-entity-grey .x-layout-collapsed {
+ background: #4D4D4D none repeat scroll 0% 50%;
+}
+
+.k-entity-purple .x-layout-split,.k-entity-purple .x-layout-collapsed {
+ background: #660080 none repeat scroll 0% 50%;
+}
+
+.k-entity-red .x-layout-split,.k-entity-red .x-layout-collapsed {
+ background: #D40000 none repeat scroll 0% 50%;
+}
+
+.k-entityworkspace .x-layout-split,.k-entityworkspace .x-layout-collapsed
+ {
+ background: transparent none repeat scroll 0% 50%;
+}
+
+.k-entityworkspace-default .x-layout-split,.k-entityworkspace-default .x-layout-collapsed
+ {
+ background: #DEAA87 none repeat scroll 0% 50%;
+}
+
+.k-entityworkspace-green .x-layout-split,.k-entityworkspace-green .x-layout-collapsed
+ {
+ background: #DCE8AB none repeat scroll 0% 50%;
+}
+
+.k-entityworkspace-blue .x-layout-split,.k-entityworkspace-blue .x-layout-collapsed
+ {
+ background: #D5D5FF none repeat scroll 0% 50%;
+}
+
+.k-entityworkspace-grey .x-layout-split,.k-entityworkspace-grey .x-layout-collapsed
+ {
+ background: #999999 none repeat scroll 0% 50%;
+}
+
+.k-entityworkspace-purple .x-layout-split,.k-entityworkspace-purple .x-layout-collapsed
+ {
+ background: #A793AC none repeat scroll 0% 50%;
+}
+
+.k-entityworkspace-red .x-layout-split,.k-entityworkspace-red .x-layout-collapsed
+ {
+ background: #FF5555 none repeat scroll 0% 50%;
+}
+
+.k-entity-title {
+ border-left-style: solid;
+ border-left-width: 5px;
+}
+
+.k-entity-title div {
+ line-height: 22px;
+ white-space: nowrap;
+}
+
+.k-entity-subtitle {
+
+}
+
+.k-entity-subtitle div {
+ line-height: 22px;
+ white-space: nowrap;
+}
+
+.k-entity-title-rd-default {
+ background: #DD8A3D;
+}
+
+.k-entity-title-rd-green {
+ background: #5FD35F;
+}
+
+.k-entity-title-rd-blue {
+ background: #0066FF;
+}
+
+.k-entity-title-rd-grey {
+ background: #4D4D4D;
+}
+
+.k-entity-title-rd-purple {
+ background: #660080;
+}
+
+.k-entity-title-rd-red {
+ background: #D40000;
+}
+
+.k-entity-title-default {
+ background: #F1BB59 none repeat scroll 0% 50%;
+ border-left-color: #DD8A3D;
+}
+
+.k-entity-title-green {
+ background: #AFA none repeat scroll 0% 50%;
+ border-left-color: #5FD35F;
+}
+
+.k-entity-title-blue {
+ background: #AFDDE9 none repeat scroll 0% 50%;
+ border-left-color: #0066FF;
+}
+
+.k-entity-title-grey {
+ background: #CCCCCC none repeat scroll 0% 50%;
+ border-left-color: #4D4D4D;
+}
+
+.k-entity-title-purple {
+ background: #DDAFE9 none repeat scroll 0% 50%;
+ border-left-color: #660080;
+}
+
+.k-entity-title-red {
+ background: #FF8080 none repeat scroll 0% 50%;
+ border-left-color: #D40000;
+}
+
+.k-entity-title-default div {
+ color: #69312F;
+}
+
+.k-entity-title-green div {
+ color: #250;
+}
+
+.k-entity-title-blue div {
+ color: #000080;
+}
+
+.k-entity-title-grey div {
+ color: #1A1A1A;
+}
+
+.k-entity-title-purple div {
+ color: #440055;
+}
+
+.k-entity-title-red div {
+ color: #800000;
+}
+
+.k-entity-subtitle-default {
+ background: #DD8A3D none repeat scroll 0% 50%;
+}
+
+.k-entity-subtitle-green {
+ background: #5FD35F none repeat scroll 0% 50%;
+}
+
+.k-entity-subtitle-blue {
+ background: #0066FF none repeat scroll 0% 50%;
+}
+
+.k-entity-subtitle-grey {
+ background: #4D4D4D none repeat scroll 0% 50%;
+}
+
+.k-entity-subtitle-purple {
+ background: #660080 none repeat scroll 0% 50%;
+}
+
+.k-entity-subtitle-red {
+ background: #D40000 none repeat scroll 0% 50%;
+}
+
+.k-entity-subtitle-default div {
+ color: #FFF;
+}
+
+.k-entity-subtitle-green div {
+ color: #FFF;
+}
+
+.k-entity-subtitle-blue div {
+ color: #FFF;
+}
+
+.k-entity-subtitle-grey div {
+ color: #FFF;
+}
+
+.k-entity-subtitle-purple div {
+ color: #FFF;
+}
+
+.k-entity-subtitle-red div {
+ color: #FFF;
+}
+
+.k-entity-bottom-rd-default,.k-entity-bottom-default,.k-toolselectoritem-sel-default
+ {
+ background: #DD8A3D;
+}
+
+.k-entity-bottom-rd-green,.k-entity-bottom-green,.k-toolselectoritem-sel-green
+ {
+ background: #5FD35F;
+}
+
+.k-entity-bottom-rd-blue,.k-entity-bottom-blue,.k-toolselectoritem-sel-blue
+ {
+ background: #0066FF;
+}
+
+.k-entity-bottom-rd-grey,.k-entity-bottom-grey,.k-toolselectoritem-sel-grey
+ {
+ background: #4D4D4D;
+}
+
+.k-entity-bottom-rd-purple,.k-entity-bottom-purple,.k-toolselectoritem-sel-purple
+ {
+ background: #660080;
+}
+
+.k-entity-bottom-rd-red,.k-entity-bottom-red,.k-toolselectoritem-sel-red
+ {
+ background: #D40000;
+}
+
+.k-entity-context-default div,.k-entity-context-default .x-tree .x-panel-body
+ {
+ background: #FFD09D none repeat scroll 0% 50%;
+}
+
+.k-entity-context-green div,.k-entity-context-green .x-tree .x-panel-body
+ {
+ background: #CFA none repeat scroll 0% 50%;
+}
+
+.k-entity-context-blue div,.k-entity-context-blue .x-tree .x-panel-body
+ {
+ background: #AACCFF none repeat scroll 0% 50%;
+}
+
+.k-entity-context-grey div,.k-entity-context-grey .x-tree .x-panel-body
+ {
+ background: #B3B3B3 none repeat scroll 0% 50%;
+}
+
+.k-entity-context-purple div,.k-entity-context-purple .x-tree .x-panel-body
+ {
+ background: #DDAFE9 none repeat scroll 0% 50%;
+}
+
+.k-entity-context-red div,.k-entity-context-red .x-tree .x-panel-body {
+ background: #FFAAAA none repeat scroll 0% 50%;
+}
+
+.k-entity-context-purple .x-tree .x-panel-body {
+ background: #DDAFE9 none repeat scroll 0% 50%;
+}
+
+.k-entity-content {
+ background: #FFF;
+}
+
+.k-entity-bottom div { /* line-height: 24px; */
+ color: #FFF;
+}
+
+.k-toolbar-top-line {
+ border-top-color: rgb(208, 208, 208);
+ border-top-style: solid;
+ border-top-width: 1px;
+}
+
+.k-toolbar-bottom-line {
+ border-bottom-color: rgb(208, 208, 208);
+ border-bottom-style: solid;
+ border-bottom-width: 1px;
+}
+
+.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label
+ {
+ white-space: nowrap;
+ font: normal 100% arial, sans;
+ line-height: 19px;
+}
+
+.k-toolbar-sep {
+ padding-top: 4px;
+ padding-left: 5px;
+}
+
+/* Custom gwt-ext styles */
+.ytb-sep {
+ background-image:
+ url(../js/ext/resources/images/default/grid/grid-split.gif);
+ background-position: center;
+ background-repeat: no-repeat;
+ display: block;
+ font-size: 1px;
+ height: 16px;
+ width: 4px;
+ overflow: hidden;
+ cursor: default;
+ margin: 0 2px 0;
+ border: 0;
+}
+
+.ytb-spacer {
+ width: 2px;
+}
+
+.x-grid-group-hd {
+ border-bottom: 2px solid grey;
+ cursor: pointer;
+ padding-top: 3px;
+}
+
+/* Drop down */
+.k-dropdownouter {
+ background-color: grey;
+}
+
+.k-dropdownouter-members {
+
+}
+
+.k-dropdownouter-members-default {
+ background-color: #DF5244;
+}
+
+.k-dropdownouter-members-green {
+ background-color: #008000;
+}
+
+.k-dropdownouter-members-blue {
+ background-color: #5500D4;
+}
+
+.k-dropdownouter-members-grey {
+ background-color: #4D4D4D;
+}
+
+.k-dropdownouter-members-purple {
+ background-color: #672178;
+}
+
+.k-dropdownouter-members-red {
+ background-color: #A02C2C;
+}
+
+.k-dropdownouter-part {
+
+}
+
+.k-dropdownouter-part-default {
+ background-color: #CA5842;
+}
+
+.k-dropdownouter-part-green {
+ background-color: #00AA00;
+}
+
+.k-dropdownouter-part-blue {
+ background-color: #6600FF;
+}
+
+.k-dropdownouter-part-grey {
+ background-color: #666666;
+}
+
+.k-dropdownouter-part-purple {
+ background-color: #892CA0;
+}
+
+.k-dropdownouter-part-red {
+ background-color: #C83737;
+}
+
+.k-dropdownouter-tags {
+
+}
+
+.k-dropdownouter-tags-default {
+ background-color: #87501E;
+}
+
+.k-dropdownouter-tags-green {
+ background-color: #00D400;
+}
+
+.k-dropdownouter-tags-blue {
+ background-color: #9955FF;
+}
+
+.k-dropdownouter-tags-grey {
+ background-color: #808080;
+}
+
+.k-dropdownouter-tags-purple {
+ background-color: #AB37C8;
+}
+
+.k-dropdownouter-tags-red {
+ background-color: #D35F5F;
+}
+
+.k-dropdownouter-summary {
+
+}
+
+.k-dropdownouter-summary-default {
+ background-color: #9F734B;
+}
+
+.k-dropdownouter-summary-green {
+ background-color: #4CE14C;
+}
+
+.k-dropdownouter-summary-blue {
+ background-color: #69A5FF;
+}
+
+.k-dropdownouter-summary-grey {
+ background-color: #A6A6A6;
+}
+
+.k-dropdownouter-summary-purple {
+ background-color: #C473D8;
+}
+
+.k-dropdownouter-summary-red {
+ background-color: #E08F8F;
+}
+
+.k-dropdowninner {
+ margin: 0 3px 1px 3px;
+ background: green;
+ background-color: #FFF;
+ /* padding: 3px; */
+}
+
+.k-dropdownlabel {
+ color: #FFF;
+ cursor: pointer;
+}
+
+.k-dropdownlabel .gwt-Label {
+ margin: 0 5px 0 0;
+ width: 100%;
+}
+
+.k-dropdownlabel img {
+ margin: 0 3px 0 1px;
+}
+
+/* WsTheme */
+.k-wstheme-icon-default {
+ background: #FF8C00;
+}
+
+.k-wstheme-icon-green {
+ background: green;
+}
+
+.k-wstheme-icon-blue {
+ background: blue;
+}
+
+.k-wstheme-icon-grey {
+ background: grey;
+}
+
+.k-wstheme-icon-purple {
+ background: purple;
+}
+
+.k-wstheme-icon-red {
+ background: red;
+}
+
+/* Tool selector items */
+.k-toolselectoritem {
+ width: auto;
+ margin-bottom: 5px;
+ cursor: pointer;
+}
+
+.k-toolselectoritem-sel {
+
+}
+
+.k-toolselectoritem-notsel-default {
+ background: #FFE9A5;
+}
+
+.k-toolselectoritem-notsel-green {
+ background: #D6F4D6;
+}
+
+.k-toolselectoritem-notsel-blue {
+ background: #D7D7F4;
+}
+
+.k-toolselectoritem-notsel-grey {
+ background: #E6E6E6;
+}
+
+.k-toolselectoritem-notsel-purple {
+ background: #EED7F4;
+}
+
+.k-toolselectoritem-notsel-red {
+ background: #FFD5D5;
+}
+
+.k-toolselectoritem-sel a {
+ color: #FFF;
+ padding: 0 9px;
+ text-decoration: none;
+}
+
+.k-toolselectoritem-sel a:hover {
+ text-decoration: none;
+}
+
+.k-toolselectoritem-notsel {
+
+}
+
+.k-toolselectoritem-notsel a {
+ color: #0000FF;
+ padding: 0 9px;
+ text-decoration: none;
+}
+
+.k-toolselectoritem-notsel a:hover {
+ text-decoration: underline;
+}
+
+/* others */ /*
+.x-tree-node a span, .x-dd-drag-ghost a span {
+ color:#000000;
+ padding: 1px 0px 1px 1px;
+ text-decoration:none;
+}
+*/
+.x-tree-node .k-ctn-status-normal a span {
+
+}
+
+.x-tree-node .k-ctn-status-deleted a span {
+ text-decoration: line-through;
+ color: gray;
+}
+
+.x-tree-node .k-ctn-status-rejected a span {
+ text-decoration: line-through;
+ /* color: #FF6633; */
+ color: #FF3300;
+}
+
+.x-tree-node .k-ctn-status-editing a span {
+ font-style: italic;
+ color: gray;
+}
+
+.x-tree-node .k-ctn-status-submitted a span {
+ color: green;
+}
+
+.k-info-links {
+ text-decoration: underline;
+ color: gray;
+ cursor: pointer;
+}
+
+.x-tool-kmenu {
+ background-position: 0 -75px;
+}
+
+.x-tool-kmenu-over {
+ background-position: -15px -75px;
+}
+
+.k-border-openbox {
+ border-bottom: 1px #D0D0D0 solid;
+ border-right: 1px #D0D0D0 solid;
+ border-left: 1px #D0D0D0 solid;
+}
+
+/* SiteToastMessages */
+.k-stm-info-icon {
+ background-image: url(img/info.gif) !important;
+}
+
+.k-stm-imp-icon {
+ background-image: url(img/alert.gif) !important;
+}
+
+.k-stm-verimp-icon {
+ background-image: url(img/important.gif) !important;
+}
+
+.k-stm-error-icon {
+ background-image: url(img/error.gif) !important;
+}
+
+.k-infod-head {
+ font-size: 108%;
+ margin-bottom: 10px;
+}
+
+.gwt-DisclosurePanel {
+
+}
+
+.gwt-DisclosurePanel-open {
+
+}
+
+.gwt-DisclosurePanel-closed {
+
+}
+
+.gwt-DisclosurePanel .header,.gwt-DisclosurePanel .header a,.gwt-DisclosurePanel .header td
+ {
+ text-decoration: none; /* Remove underline from header */
+ color: black;
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-DisclosurePanel .content {
+ border-left: 3px solid #e8eef7;
+ padding: 4px 0px 4px 8px;
+ margin-left: 6px;
+}
+
+.k-basic-thumb {
+ background: #FAFAFA none repeat scroll 0% 50%;
+ border: 1px solid #EBEBEB;
+ padding: 3px;
+ margin: 3px;
+}
+
+.k-basic-thumb td {
+ padding: 2px 3px 2px 3px;
+ border: none;
+}
+
+.k-text-gray {
+ color: gray;
+}
+
+.k-elp-limg {
+ margin-top: 4px;
+ margin-left: 5px;
+ cursor: pointer;
+ overflow: hidden;
+}
+
+.k-tsp-tag {
+ float: left;
+ padding: 3px;
+ cursor: pointer;
+ color: #0000FF;
+}
+
+.k-tsp-cloud {
+ line-height: 1.5em;
+ text-align: center;
+}
+
+.k-link-icon {
+ background-image: url(img/link.gif) !important;
+}
+
+.k-options-icon {
+ background-image: url(img/emblem-system.gif) !important;
+}
+
+.k-copyleft-icon {
+ background-image: url(img/copyleft.png) !important;
+}
+
+.k-picture-icon {
+ background-image: url(img/picture.png) !important;
+}
+
+.k-film-icon {
+ background-image: url(img/film.png) !important;
+}
+
+.k-specialchars-icon {
+ background-image: url(img/specialchars.png) !important;
+}
+
+.k-info-icon {
+ background-image: url(img/info.gif) !important;
+}
+
+.k-newgroup-icon {
+ background-image: url(img/kune-icon16.png) !important;
+}
+
+.k-colors-icon {
+ background-image: url(img/colors.gif) !important;
+}
+
+.x-toolbar-body table { /* width: 100%; */
+
+}
+
+.k-preview-msg {
+ background: #FFCCAA;
+}
+
+.k-preview-msg-lab {
+ background: #FFCCAA;
+ padding: 0 5px;
+}
+
+.k-eil-edit {
+ border: thin solid black;
+}
+
+/* duplicated in rte.css */
+.k-rte-comment {
+ border: 1px dashed #C0C0C0;
+ line-height: 1.4;
+ padding: 1px;
+ background-color: #D7FFD7;
+}
+
+.k-specialchar-grid {
+ border: 1px solid #ACA899;
+}
+
+.k-specialchar-grid table {
+
+}
+
+.k-specialchar-grid div {
+ line-height: 22px;
+}
+
+.k-specialchar-grid td {
+ padding: 1px;
+}
+
+.k-specialchar-pb {
+ border: 1px solid #EBE8D7;
+ cursor: pointer;
+ font-size: 108% !important;
+ text-align: center;
+ vertical-align: middle;
+ width: 18px;
+ height: 18px;
+}
+
+.k-specialchar-pb-up {
+
+}
+
+.k-specialchar-big {
+ padding: 3px;
+ line-height: 22px;
+ font-size: 197% !important;
+}
+
+.k-specialchar-adv-label {
+ margin-left: -10px;
+}
+
+.k-specialchar-popup
+,
+{
+border
+
+
+
+
+
+
+:
+
+
+
+
+
+
+
+1
+px
+
+
+
+
+
+
+
+solid
+
+
+
+
+
+
+
+#C0C0C0
+
+
+
+
+
+
+;
+z-index
+
+
+
+
+
+
+:
+
+
+
+
+
+
+
+9999
+!
+important
+
+
+
+
+
+
+;
+background-color
+
+
+
+
+
+
+:
+
+
+
+
+
+
+
+#FFF
+
+
+
+
+
+
+;
+}
+.k-specialchar-pb-down {
+ color: #161616;
+}
+
+.k-specialchar-pb-up-hovering {
+ border: thin solid #ACA899;
+}
+
+.k-specialchar-pb-down-hovering {
+ color: #161616;
+}
+
+.k-preview-panel {
+ border: dashed 1px gray;
+ padding: 5px;
+}
+
+.k-rte-changelink {
+ white-space: nowrap;
+ color: navy;
+ cursor: pointer;
+ text-decoration: underline;
+ margin: 5px;
+}
+
+.k-rte-changelink-popup {
+ border: 1px solid #C0C0C0;
+ z-index: 9999 !important;
+ background-color: #ECECEC;
+}
+
+.e-ui-room {
+ height: 27px;
+ line-height: 22px;
+}
+
+.e-ui-room input {
+ font-size: 100%;
+ margin-left: 0px;
+ margin-top: 0px;
+}
+
+.k-def-popup {
+ z-index: 9999 !important;
+ background-color: #FFF;
+ border: 1px solid gray;
+}
+
+#k-mshortcut {
+ position: absolute;
+ right: 10px;
+}
+
+#k-mshortcut-hidden {
+ visibility: hidden;
+}
+
+#k-mshortcut a {
+ text-decoration: none;
+ color: black;
+}
+
+.k-plain-iframe iframe {
+ border: 1px solid gray;
+}
+
+.k-transp .x-panel-body {
+ background: transparent;
+}
+
+.k-transp {
+ background: transparent;
+}
+
+.k-blank {
+ background: #FFF;
+}
\ No newline at end of file
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,113 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.blogs.client;
-
-import static org.ourproject.kune.blogs.client.BlogClientTool.TYPE_BLOG;
-import static org.ourproject.kune.blogs.client.BlogClientTool.TYPE_POST;
-import static org.ourproject.kune.blogs.client.BlogClientTool.TYPE_ROOT;
-import static org.ourproject.kune.blogs.client.BlogClientTool.TYPE_UPLOADEDFILE;
-
-import org.ourproject.kune.blogs.client.cnt.BlogViewer;
-import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
-import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-
-import com.calclab.suco.client.ioc.Provider;
-
-public class BlogClientActions extends AbstractFoldableContentActions {
- public BlogClientActions(final I18nUITranslationService i18n, final ContextNavigator contextNavigator,
- final Session session, final StateManager stateManager, final SchedulerManager deferredCommandWrapper,
- final Provider<ContentServiceAsync> contentServiceProvider,
- final Provider<GroupServiceAsync> groupServiceProvider, final Provider<FileUploader> fileUploaderProvider,
- final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
- final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
- final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
- final BlogViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
- final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
- super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
- contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
- contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
- documentViewer, entityLogo, publicLink, wsBackManager);
- }
-
- @Override
- protected void createActions() {
- final String[] all = { TYPE_ROOT, TYPE_BLOG, TYPE_POST, TYPE_UPLOADEDFILE };
- final String[] contentsModerated = { TYPE_POST, TYPE_UPLOADEDFILE };
- final String[] containers = { TYPE_ROOT, TYPE_BLOG };
- final String[] containersNoRoot = { TYPE_BLOG };
- final String[] contents = { TYPE_POST, TYPE_UPLOADEDFILE };
-
- final String parentMenuTitle = i18n.t("Post");
- final String parentMenuTitleCtx = i18n.t("Blog");
-
- createNewContainerAction(TYPE_BLOG, "images/nav/blog_add.png", i18n.t("New blog"), parentMenuTitleCtx,
- i18n.t("New"), i18n.t("New blog"), Position.ctx, TYPE_ROOT);
- createNewContentAction(TYPE_POST, "images/nav/post_add.png", i18n.t("New post"), parentMenuTitleCtx,
- Position.ctx, TYPE_BLOG);
-
- createContentRenameAction(parentMenuTitle, i18n.t("Rename"), contents);
- createEditAction(parentMenuTitle, TYPE_POST);
- createContentModeratedActions(parentMenuTitle, contentsModerated);
- createRenameContentInCtxAction(parentMenuTitleCtx, i18n.t("Rename"), containersNoRoot);
-
- // final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupCxt =
- // createSetAsDefContent(parentMenuTitleCtx);
-
- createRefreshCntAction(parentMenuTitle, contents);
- createRefreshCxtAction(parentMenuTitleCtx, containers);
-
- createUploadAction(i18n.t("Upload file"), "images/nav/upload.png", i18n.t("Upload files (images, PDFs...)"),
- null, containersNoRoot);
-
- createSetAsDefContent(parentMenuTitle, contents);
- createSetGroupBackImageAction(parentMenuTitle, TYPE_UPLOADEDFILE);
-
- createGoAction(all);
- createGoHomeAction(containers);
-
- // ContentRPC Authorized must permit folders
- // contentActionRegistry.addAction(setAsDefGroupCxt, TYPE_BLOG);
-
- createDelContainerAction("Delete blog", parentMenuTitleCtx, containersNoRoot);
- createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
- createShowDeletedItems(parentMenuTitleCtx, all);
- }
-
- @Override
- protected void createPostSessionInitActions() {
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientActions.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,113 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.blogs.client;
+
+import static org.ourproject.kune.blogs.client.BlogClientTool.TYPE_BLOG;
+import static org.ourproject.kune.blogs.client.BlogClientTool.TYPE_POST;
+import static org.ourproject.kune.blogs.client.BlogClientTool.TYPE_ROOT;
+import static org.ourproject.kune.blogs.client.BlogClientTool.TYPE_UPLOADEDFILE;
+
+import org.ourproject.kune.blogs.client.cnt.BlogViewer;
+import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
+import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
+import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
+import org.ourproject.kune.workspace.client.editor.ContentEditor;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
+import org.ourproject.kune.workspace.client.themes.WsBackManager;
+import org.ourproject.kune.workspace.client.upload.FileUploader;
+
+import cc.kune.common.client.utils.SchedulerManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+
+import com.calclab.suco.client.ioc.Provider;
+
+public class BlogClientActions extends AbstractFoldableContentActions {
+ public BlogClientActions(final I18nUITranslationService i18n, final ContextNavigator contextNavigator,
+ final Session session, final StateManager stateManager, final SchedulerManager deferredCommandWrapper,
+ final Provider<ContentServiceAsync> contentServiceProvider,
+ final Provider<GroupServiceAsync> groupServiceProvider, final Provider<FileUploader> fileUploaderProvider,
+ final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
+ final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
+ final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
+ final BlogViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
+ final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
+ super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
+ contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
+ contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
+ documentViewer, entityLogo, publicLink, wsBackManager);
+ }
+
+ @Override
+ protected void createActions() {
+ final String[] all = { TYPE_ROOT, TYPE_BLOG, TYPE_POST, TYPE_UPLOADEDFILE };
+ final String[] contentsModerated = { TYPE_POST, TYPE_UPLOADEDFILE };
+ final String[] containers = { TYPE_ROOT, TYPE_BLOG };
+ final String[] containersNoRoot = { TYPE_BLOG };
+ final String[] contents = { TYPE_POST, TYPE_UPLOADEDFILE };
+
+ final String parentMenuTitle = i18n.t("Post");
+ final String parentMenuTitleCtx = i18n.t("Blog");
+
+ createNewContainerAction(TYPE_BLOG, "images/nav/blog_add.png", i18n.t("New blog"), parentMenuTitleCtx,
+ i18n.t("New"), i18n.t("New blog"), Position.ctx, TYPE_ROOT);
+ createNewContentAction(TYPE_POST, "images/nav/post_add.png", i18n.t("New post"), parentMenuTitleCtx,
+ Position.ctx, TYPE_BLOG);
+
+ createContentRenameAction(parentMenuTitle, i18n.t("Rename"), contents);
+ createEditAction(parentMenuTitle, TYPE_POST);
+ createContentModeratedActions(parentMenuTitle, contentsModerated);
+ createRenameContentInCtxAction(parentMenuTitleCtx, i18n.t("Rename"), containersNoRoot);
+
+ // final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupCxt =
+ // createSetAsDefContent(parentMenuTitleCtx);
+
+ createRefreshCntAction(parentMenuTitle, contents);
+ createRefreshCxtAction(parentMenuTitleCtx, containers);
+
+ createUploadAction(i18n.t("Upload file"), "images/nav/upload.png", i18n.t("Upload files (images, PDFs...)"),
+ null, containersNoRoot);
+
+ createSetAsDefContent(parentMenuTitle, contents);
+ createSetGroupBackImageAction(parentMenuTitle, TYPE_UPLOADEDFILE);
+
+ createGoAction(all);
+ createGoHomeAction(containers);
+
+ // ContentRPC Authorized must permit folders
+ // contentActionRegistry.addAction(setAsDefGroupCxt, TYPE_BLOG);
+
+ createDelContainerAction("Delete blog", parentMenuTitleCtx, containersNoRoot);
+ createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
+ createShowDeletedItems(parentMenuTitleCtx, all);
+ }
+
+ @Override
+ protected void createPostSessionInitActions() {
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,124 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.blogs.client;
-
-import org.ourproject.kune.blogs.client.cnt.BlogFolderContent;
-import org.ourproject.kune.blogs.client.cnt.BlogFolderContentPanel;
-import org.ourproject.kune.blogs.client.cnt.BlogFolderContentPresenter;
-import org.ourproject.kune.blogs.client.cnt.BlogFolderContentView;
-import org.ourproject.kune.blogs.client.cnt.BlogViewer;
-import org.ourproject.kune.blogs.client.cnt.BlogViewerPanel;
-import org.ourproject.kune.blogs.client.cnt.BlogViewerPresenter;
-import org.ourproject.kune.blogs.client.cnt.BlogViewerView;
-import org.ourproject.kune.blogs.client.ctx.BlogContext;
-import org.ourproject.kune.blogs.client.ctx.BlogContextPresenter;
-import org.ourproject.kune.platf.client.app.ToolGroup;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
-import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
-import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
-import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.ioc.decorator.Singleton;
-import com.calclab.suco.client.ioc.module.Factory;
-
-public class BlogClientModule extends AbstractExtendedModule {
-
- @Override
- public void onInstall() {
-
- register(ToolGroup.class, new Factory<BlogClientTool>(BlogClientTool.class) {
- @Override
- public BlogClientTool create() {
- i(BlogClientActions.class);
- return new BlogClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
- i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
- }
- });
-
- register(ToolGroup.class, new Factory<BlogClientActions>(BlogClientActions.class) {
- @Override
- public BlogClientActions create() {
- return new BlogClientActions(i(I18nUITranslationService.class), i(ContextNavigator.class),
- i(Session.class), i(StateManager.class), i(SchedulerManager.class),
- p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
- i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
- i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(BlogViewer.class),
- p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
- }
- });
-
- register(ToolGroup.class, new Factory<BlogContext>(BlogContext.class) {
- @Override
- public BlogContext create() {
- final BlogContextPresenter presenter = new BlogContextPresenter(i(StateManager.class),
- p(ContextNavigator.class), p(ContextPropEditor.class));
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<BlogViewer>(BlogViewer.class) {
- @Override
- public BlogViewer create() {
- final BlogViewerPresenter presenter = new BlogViewerPresenter(i(StateManager.class), i(Session.class),
- i(I18nUITranslationService.class), i(ActionContentToolbar.class),
- i(ContentActionRegistry.class), p(FileDownloadUtils.class), p(MediaUtils.class));
- final BlogViewerView view = new BlogViewerPanel(i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- register(ToolGroup.class, new Factory<BlogFolderContent>(BlogFolderContent.class) {
- @Override
- public BlogFolderContent create() {
- final BlogFolderContentPresenter presenter = new BlogFolderContentPresenter(i(StateManager.class),
- i(Session.class), i(ActionContentToolbar.class), i(ContentActionRegistry.class),
- i(I18nTranslationService.class), p(FileDownloadUtils.class), p(MediaUtils.class));
- final BlogFolderContentView view = new BlogFolderContentPanel(i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(view);
- return presenter;
- }
- });
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/blogs/client/BlogClientModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,124 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.blogs.client;
+
+import org.ourproject.kune.blogs.client.cnt.BlogFolderContent;
+import org.ourproject.kune.blogs.client.cnt.BlogFolderContentPanel;
+import org.ourproject.kune.blogs.client.cnt.BlogFolderContentPresenter;
+import org.ourproject.kune.blogs.client.cnt.BlogFolderContentView;
+import org.ourproject.kune.blogs.client.cnt.BlogViewer;
+import org.ourproject.kune.blogs.client.cnt.BlogViewerPanel;
+import org.ourproject.kune.blogs.client.cnt.BlogViewerPresenter;
+import org.ourproject.kune.blogs.client.cnt.BlogViewerView;
+import org.ourproject.kune.blogs.client.ctx.BlogContext;
+import org.ourproject.kune.blogs.client.ctx.BlogContextPresenter;
+import org.ourproject.kune.platf.client.app.ToolGroup;
+import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
+import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
+import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
+import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
+import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
+import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
+import org.ourproject.kune.workspace.client.editor.ContentEditor;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.themes.WsBackManager;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+import org.ourproject.kune.workspace.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.upload.FileUploader;
+
+import cc.kune.common.client.utils.SchedulerManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.ioc.decorator.Singleton;
+import com.calclab.suco.client.ioc.module.Factory;
+
+public class BlogClientModule extends AbstractExtendedModule {
+
+ @Override
+ public void onInstall() {
+
+ register(ToolGroup.class, new Factory<BlogClientTool>(BlogClientTool.class) {
+ @Override
+ public BlogClientTool create() {
+ i(BlogClientActions.class);
+ return new BlogClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
+ i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
+ }
+ });
+
+ register(ToolGroup.class, new Factory<BlogClientActions>(BlogClientActions.class) {
+ @Override
+ public BlogClientActions create() {
+ return new BlogClientActions(i(I18nUITranslationService.class), i(ContextNavigator.class),
+ i(Session.class), i(StateManager.class), i(SchedulerManager.class),
+ p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
+ i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
+ i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(BlogViewer.class),
+ p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
+ }
+ });
+
+ register(ToolGroup.class, new Factory<BlogContext>(BlogContext.class) {
+ @Override
+ public BlogContext create() {
+ final BlogContextPresenter presenter = new BlogContextPresenter(i(StateManager.class),
+ p(ContextNavigator.class), p(ContextPropEditor.class));
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<BlogViewer>(BlogViewer.class) {
+ @Override
+ public BlogViewer create() {
+ final BlogViewerPresenter presenter = new BlogViewerPresenter(i(StateManager.class), i(Session.class),
+ i(I18nUITranslationService.class), i(ActionContentToolbar.class),
+ i(ContentActionRegistry.class), p(FileDownloadUtils.class), p(MediaUtils.class));
+ final BlogViewerView view = new BlogViewerPanel(i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(ToolGroup.class, new Factory<BlogFolderContent>(BlogFolderContent.class) {
+ @Override
+ public BlogFolderContent create() {
+ final BlogFolderContentPresenter presenter = new BlogFolderContentPresenter(i(StateManager.class),
+ i(Session.class), i(ActionContentToolbar.class), i(ContentActionRegistry.class),
+ i(I18nTranslationService.class), p(FileDownloadUtils.class), p(MediaUtils.class));
+ final BlogFolderContentView view = new BlogFolderContentPanel(i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,117 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.docs.client;
-
-import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_DOCUMENT;
-import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_FOLDER;
-import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_ROOT;
-import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_UPLOADEDFILE;
-
-import org.ourproject.kune.docs.client.cnt.DocumentViewer;
-import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
-import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-
-import com.calclab.suco.client.ioc.Provider;
-
-public class DocumentClientActions extends AbstractFoldableContentActions {
- public DocumentClientActions(final I18nUITranslationService i18n, final ContextNavigator contextNavigator,
- final Session session, final StateManager stateManager, final SchedulerManager deferredCommandWrapper,
- final Provider<ContentServiceAsync> contentServiceProvider,
- final Provider<GroupServiceAsync> groupServiceProvider, final Provider<FileUploader> fileUploaderProvider,
- final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
- final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
- final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
- final DocumentViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
- final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
- super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
- contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
- contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
- documentViewer, entityLogo, publicLink, wsBackManager);
- }
-
- @Override
- protected void createActions() {
- final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
- final String[] containers = { TYPE_ROOT, TYPE_FOLDER, };
- final String[] contentsModerated = { TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
- final String[] containersNoRoot = { TYPE_FOLDER };
- final String[] contents = { TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
-
- final String parentMenuTitle = i18n.t("File");
- final String parentMenuTitleCtx = i18n.t("Folder");
-
- createNewContainerAction(TYPE_FOLDER, "images/nav/folder_add.png", i18n.t("New folder"), parentMenuTitleCtx,
- i18n.t("New"), i18n.t("New folder"), Position.ctx, TYPE_ROOT, TYPE_FOLDER);
-
- createNewContentAction(TYPE_DOCUMENT, "images/nav/page_add.png", i18n.t("New document"), parentMenuTitleCtx,
- Position.ctx, TYPE_ROOT, TYPE_FOLDER);
-
- createTranslateAction(parentMenuTitle, TYPE_DOCUMENT, TYPE_FOLDER);
- createContentRenameAction(parentMenuTitle, i18n.t("Rename"), contents);
- createEditAction(parentMenuTitle, TYPE_DOCUMENT);
- createContentModeratedActions(parentMenuTitle, contentsModerated);
- createRenameContentInCtxAction(parentMenuTitleCtx, i18n.t("Rename"), containersNoRoot);
-
- // final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupCxt =
- // createSetAsDefContent(parentMenuTitleCtx);
-
- createRefreshCntAction(parentMenuTitle, contents);
- createRefreshCxtAction(parentMenuTitleCtx, containers);
-
- createSetAsDefContent(parentMenuTitle, contents);
-
- createSetGroupBackImageAction(parentMenuTitle, TYPE_UPLOADEDFILE);
-
- createUploadAction(i18n.t("Upload file"), "images/nav/upload.png", i18n.t("Upload files (images, PDFs...)"),
- null, containers);
-
- createDownloadActions(TYPE_UPLOADEDFILE);
-
- createGoAction(all);
-
- createGoHomeAction(containers);
-
- createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot);
- createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
- createShowDeletedItems(parentMenuTitleCtx, all);
- }
-
- @Override
- protected void createPostSessionInitActions() {
- // super.createUploadMediaAction(TYPE_GALLERY);
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientActions.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,117 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.docs.client;
+
+import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_DOCUMENT;
+import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_FOLDER;
+import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_ROOT;
+import static org.ourproject.kune.docs.client.DocumentClientTool.TYPE_UPLOADEDFILE;
+
+import org.ourproject.kune.docs.client.cnt.DocumentViewer;
+import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
+import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
+import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
+import org.ourproject.kune.workspace.client.editor.ContentEditor;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
+import org.ourproject.kune.workspace.client.themes.WsBackManager;
+import org.ourproject.kune.workspace.client.upload.FileUploader;
+
+import cc.kune.common.client.utils.SchedulerManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+
+import com.calclab.suco.client.ioc.Provider;
+
+public class DocumentClientActions extends AbstractFoldableContentActions {
+ public DocumentClientActions(final I18nUITranslationService i18n, final ContextNavigator contextNavigator,
+ final Session session, final StateManager stateManager, final SchedulerManager deferredCommandWrapper,
+ final Provider<ContentServiceAsync> contentServiceProvider,
+ final Provider<GroupServiceAsync> groupServiceProvider, final Provider<FileUploader> fileUploaderProvider,
+ final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
+ final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
+ final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
+ final DocumentViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
+ final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
+ super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
+ contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
+ contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
+ documentViewer, entityLogo, publicLink, wsBackManager);
+ }
+
+ @Override
+ protected void createActions() {
+ final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
+ final String[] containers = { TYPE_ROOT, TYPE_FOLDER, };
+ final String[] contentsModerated = { TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
+ final String[] containersNoRoot = { TYPE_FOLDER };
+ final String[] contents = { TYPE_DOCUMENT, TYPE_UPLOADEDFILE };
+
+ final String parentMenuTitle = i18n.t("File");
+ final String parentMenuTitleCtx = i18n.t("Folder");
+
+ createNewContainerAction(TYPE_FOLDER, "images/nav/folder_add.png", i18n.t("New folder"), parentMenuTitleCtx,
+ i18n.t("New"), i18n.t("New folder"), Position.ctx, TYPE_ROOT, TYPE_FOLDER);
+
+ createNewContentAction(TYPE_DOCUMENT, "images/nav/page_add.png", i18n.t("New document"), parentMenuTitleCtx,
+ Position.ctx, TYPE_ROOT, TYPE_FOLDER);
+
+ createTranslateAction(parentMenuTitle, TYPE_DOCUMENT, TYPE_FOLDER);
+ createContentRenameAction(parentMenuTitle, i18n.t("Rename"), contents);
+ createEditAction(parentMenuTitle, TYPE_DOCUMENT);
+ createContentModeratedActions(parentMenuTitle, contentsModerated);
+ createRenameContentInCtxAction(parentMenuTitleCtx, i18n.t("Rename"), containersNoRoot);
+
+ // final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupCxt =
+ // createSetAsDefContent(parentMenuTitleCtx);
+
+ createRefreshCntAction(parentMenuTitle, contents);
+ createRefreshCxtAction(parentMenuTitleCtx, containers);
+
+ createSetAsDefContent(parentMenuTitle, contents);
+
+ createSetGroupBackImageAction(parentMenuTitle, TYPE_UPLOADEDFILE);
+
+ createUploadAction(i18n.t("Upload file"), "images/nav/upload.png", i18n.t("Upload files (images, PDFs...)"),
+ null, containers);
+
+ createDownloadActions(TYPE_UPLOADEDFILE);
+
+ createGoAction(all);
+
+ createGoHomeAction(containers);
+
+ createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot);
+ createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
+ createShowDeletedItems(parentMenuTitleCtx, all);
+ }
+
+ @Override
+ protected void createPostSessionInitActions() {
+ // super.createUploadMediaAction(TYPE_GALLERY);
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,124 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.docs.client;
-
-import org.ourproject.kune.docs.client.cnt.DocFolderContent;
-import org.ourproject.kune.docs.client.cnt.DocFolderContentPanel;
-import org.ourproject.kune.docs.client.cnt.DocFolderContentPresenter;
-import org.ourproject.kune.docs.client.cnt.DocFolderContentView;
-import org.ourproject.kune.docs.client.cnt.DocumentViewer;
-import org.ourproject.kune.docs.client.cnt.DocumentViewerPanel;
-import org.ourproject.kune.docs.client.cnt.DocumentViewerPresenter;
-import org.ourproject.kune.docs.client.cnt.DocumentViewerView;
-import org.ourproject.kune.docs.client.ctx.DocumentContext;
-import org.ourproject.kune.docs.client.ctx.DocumentContextPresenter;
-import org.ourproject.kune.platf.client.app.ToolGroup;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
-import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
-import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
-import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.ioc.decorator.Singleton;
-import com.calclab.suco.client.ioc.module.Factory;
-
-public class DocumentClientModule extends AbstractExtendedModule {
-
- @Override
- public void onInstall() {
-
- register(ToolGroup.class, new Factory<DocumentClientTool>(DocumentClientTool.class) {
- @Override
- public DocumentClientTool create() {
- i(DocumentClientActions.class);
- return new DocumentClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
- i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
- }
- });
-
- register(ToolGroup.class, new Factory<DocumentClientActions>(DocumentClientActions.class) {
- @Override
- public DocumentClientActions create() {
- return new DocumentClientActions(i(I18nUITranslationService.class), i(ContextNavigator.class),
- i(Session.class), i(StateManager.class), i(SchedulerManager.class),
- p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
- i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
- i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(DocumentViewer.class),
- p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
- }
- });
-
- register(ToolGroup.class, new Factory<DocumentContext>(DocumentContext.class) {
- @Override
- public DocumentContext create() {
- final DocumentContextPresenter presenter = new DocumentContextPresenter(i(StateManager.class),
- p(ContextNavigator.class), p(ContextPropEditor.class));
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<DocumentViewer>(DocumentViewer.class) {
- @Override
- public DocumentViewer create() {
- final DocumentViewerPresenter presenter = new DocumentViewerPresenter(i(StateManager.class),
- i(Session.class), i(I18nUITranslationService.class), i(ActionContentToolbar.class),
- i(ContentActionRegistry.class), p(FileDownloadUtils.class), p(MediaUtils.class));
- final DocumentViewerView view = new DocumentViewerPanel(i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- register(ToolGroup.class, new Factory<DocFolderContent>(DocFolderContent.class) {
- @Override
- public DocFolderContent create() {
- final DocFolderContentPresenter presenter = new DocFolderContentPresenter(i(StateManager.class),
- i(Session.class), i(ActionContentToolbar.class), i(ContentActionRegistry.class),
- p(FileDownloadUtils.class), i(I18nTranslationService.class), p(MediaUtils.class));
- final DocFolderContentView view = new DocFolderContentPanel(i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(view);
- return presenter;
- }
- });
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/docs/client/DocumentClientModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,124 @@
+/*
+ *
+ * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.docs.client;
+
+import org.ourproject.kune.docs.client.cnt.DocFolderContent;
+import org.ourproject.kune.docs.client.cnt.DocFolderContentPanel;
+import org.ourproject.kune.docs.client.cnt.DocFolderContentPresenter;
+import org.ourproject.kune.docs.client.cnt.DocFolderContentView;
+import org.ourproject.kune.docs.client.cnt.DocumentViewer;
+import org.ourproject.kune.docs.client.cnt.DocumentViewerPanel;
+import org.ourproject.kune.docs.client.cnt.DocumentViewerPresenter;
+import org.ourproject.kune.docs.client.cnt.DocumentViewerView;
+import org.ourproject.kune.docs.client.ctx.DocumentContext;
+import org.ourproject.kune.docs.client.ctx.DocumentContextPresenter;
+import org.ourproject.kune.platf.client.app.ToolGroup;
+import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
+import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
+import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
+import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
+import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
+import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
+import org.ourproject.kune.workspace.client.editor.ContentEditor;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.themes.WsBackManager;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+import org.ourproject.kune.workspace.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.upload.FileUploader;
+
+import cc.kune.common.client.utils.SchedulerManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.ioc.decorator.Singleton;
+import com.calclab.suco.client.ioc.module.Factory;
+
+public class DocumentClientModule extends AbstractExtendedModule {
+
+ @Override
+ public void onInstall() {
+
+ register(ToolGroup.class, new Factory<DocumentClientTool>(DocumentClientTool.class) {
+ @Override
+ public DocumentClientTool create() {
+ i(DocumentClientActions.class);
+ return new DocumentClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
+ i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
+ }
+ });
+
+ register(ToolGroup.class, new Factory<DocumentClientActions>(DocumentClientActions.class) {
+ @Override
+ public DocumentClientActions create() {
+ return new DocumentClientActions(i(I18nUITranslationService.class), i(ContextNavigator.class),
+ i(Session.class), i(StateManager.class), i(SchedulerManager.class),
+ p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
+ i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
+ i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(DocumentViewer.class),
+ p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
+ }
+ });
+
+ register(ToolGroup.class, new Factory<DocumentContext>(DocumentContext.class) {
+ @Override
+ public DocumentContext create() {
+ final DocumentContextPresenter presenter = new DocumentContextPresenter(i(StateManager.class),
+ p(ContextNavigator.class), p(ContextPropEditor.class));
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<DocumentViewer>(DocumentViewer.class) {
+ @Override
+ public DocumentViewer create() {
+ final DocumentViewerPresenter presenter = new DocumentViewerPresenter(i(StateManager.class),
+ i(Session.class), i(I18nUITranslationService.class), i(ActionContentToolbar.class),
+ i(ContentActionRegistry.class), p(FileDownloadUtils.class), p(MediaUtils.class));
+ final DocumentViewerView view = new DocumentViewerPanel(i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(ToolGroup.class, new Factory<DocFolderContent>(DocFolderContent.class) {
+ @Override
+ public DocFolderContent create() {
+ final DocFolderContentPresenter presenter = new DocFolderContentPresenter(i(StateManager.class),
+ i(Session.class), i(ActionContentToolbar.class), i(ContentActionRegistry.class),
+ p(FileDownloadUtils.class), i(I18nTranslationService.class), p(MediaUtils.class));
+ final DocFolderContentView view = new DocFolderContentPanel(i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,114 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.gallery.client;
-
-import static org.ourproject.kune.gallery.client.GalleryClientTool.TYPE_ALBUM;
-import static org.ourproject.kune.gallery.client.GalleryClientTool.TYPE_ROOT;
-import static org.ourproject.kune.gallery.client.GalleryClientTool.TYPE_UPLOADEDFILE;
-
-import org.ourproject.kune.gallery.client.cnt.GalleryViewer;
-import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
-import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-
-import com.calclab.suco.client.ioc.Provider;
-
-public class GalleryClientActions extends AbstractFoldableContentActions {
- public GalleryClientActions(final I18nUITranslationService i18n, final ContextNavigator contextNavigator,
- final Session session, final StateManager stateManager, final SchedulerManager deferredCommandWrapper,
- final Provider<ContentServiceAsync> contentServiceProvider,
- final Provider<GroupServiceAsync> groupServiceProvider, final Provider<FileUploader> fileUploaderProvider,
- final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
- final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
- final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
- final GalleryViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
- final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
- super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
- contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
- contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
- documentViewer, entityLogo, publicLink, wsBackManager);
- }
-
- @Override
- protected void createActions() {
- final String[] all = { TYPE_ROOT, TYPE_ALBUM, TYPE_UPLOADEDFILE };
- final String[] containers = { TYPE_ROOT, TYPE_ALBUM };
- final String[] contentsModerated = { TYPE_UPLOADEDFILE };
- final String[] containersNoRoot = { TYPE_ALBUM };
- final String[] contents = { TYPE_UPLOADEDFILE };
-
- final String parentMenuTitle = i18n.t("File");
- final String parentMenuTitleCtx = i18n.t("Album");
-
- createNewContainerAction(TYPE_ALBUM, "images/nav/gallery_add.png", i18n.t("New sub-album"), parentMenuTitleCtx,
- i18n.t("New"), i18n.t("New sub-album"), Position.ctx, TYPE_ALBUM);
- createNewContainerAction(TYPE_ALBUM, "images/nav/gallery_add.png", i18n.t("New album"), parentMenuTitleCtx,
- i18n.t("New"), i18n.t("New album"), Position.ctx, TYPE_ROOT);
-
- createContentRenameAction(parentMenuTitle, i18n.t("Rename"), contents);
- createContentModeratedActions(parentMenuTitle, contentsModerated);
- createRenameContentInCtxAction(parentMenuTitleCtx, i18n.t("Rename"), containersNoRoot);
-
- // final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupCxt =
- // createSetAsDefContent(parentMenuTitleCtx);
-
- createRefreshCntAction(parentMenuTitle, contents);
- createRefreshCxtAction(parentMenuTitleCtx, containers);
-
- createSetAsDefContent(parentMenuTitle, contents);
- createSetGroupBackImageAction(parentMenuTitle, TYPE_UPLOADEDFILE);
-
- // createUploadAction(i18n.t("Upload file"), "images/nav/upload.png",
- // i18n.t("Upload some files (images, PDFs, ...)"), null, containers);
-
- createDownloadActions(TYPE_UPLOADEDFILE);
-
- createGoAction(all);
-
- createGoHomeAction(containers);
-
- // createTranslateAction(TYPE_ALBUM, TYPE_UPLOADEDFILE);
-
- createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot);
- createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
- createShowDeletedItems(parentMenuTitleCtx, all);
- }
-
- @Override
- protected void createPostSessionInitActions() {
- super.createUploadMediaAction(TYPE_ALBUM);
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientActions.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,114 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.gallery.client;
+
+import static org.ourproject.kune.gallery.client.GalleryClientTool.TYPE_ALBUM;
+import static org.ourproject.kune.gallery.client.GalleryClientTool.TYPE_ROOT;
+import static org.ourproject.kune.gallery.client.GalleryClientTool.TYPE_UPLOADEDFILE;
+
+import org.ourproject.kune.gallery.client.cnt.GalleryViewer;
+import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
+import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
+import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
+import org.ourproject.kune.workspace.client.editor.ContentEditor;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
+import org.ourproject.kune.workspace.client.themes.WsBackManager;
+import org.ourproject.kune.workspace.client.upload.FileUploader;
+
+import cc.kune.common.client.utils.SchedulerManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+
+import com.calclab.suco.client.ioc.Provider;
+
+public class GalleryClientActions extends AbstractFoldableContentActions {
+ public GalleryClientActions(final I18nUITranslationService i18n, final ContextNavigator contextNavigator,
+ final Session session, final StateManager stateManager, final SchedulerManager deferredCommandWrapper,
+ final Provider<ContentServiceAsync> contentServiceProvider,
+ final Provider<GroupServiceAsync> groupServiceProvider, final Provider<FileUploader> fileUploaderProvider,
+ final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
+ final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
+ final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
+ final GalleryViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
+ final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
+ super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
+ contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
+ contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
+ documentViewer, entityLogo, publicLink, wsBackManager);
+ }
+
+ @Override
+ protected void createActions() {
+ final String[] all = { TYPE_ROOT, TYPE_ALBUM, TYPE_UPLOADEDFILE };
+ final String[] containers = { TYPE_ROOT, TYPE_ALBUM };
+ final String[] contentsModerated = { TYPE_UPLOADEDFILE };
+ final String[] containersNoRoot = { TYPE_ALBUM };
+ final String[] contents = { TYPE_UPLOADEDFILE };
+
+ final String parentMenuTitle = i18n.t("File");
+ final String parentMenuTitleCtx = i18n.t("Album");
+
+ createNewContainerAction(TYPE_ALBUM, "images/nav/gallery_add.png", i18n.t("New sub-album"), parentMenuTitleCtx,
+ i18n.t("New"), i18n.t("New sub-album"), Position.ctx, TYPE_ALBUM);
+ createNewContainerAction(TYPE_ALBUM, "images/nav/gallery_add.png", i18n.t("New album"), parentMenuTitleCtx,
+ i18n.t("New"), i18n.t("New album"), Position.ctx, TYPE_ROOT);
+
+ createContentRenameAction(parentMenuTitle, i18n.t("Rename"), contents);
+ createContentModeratedActions(parentMenuTitle, contentsModerated);
+ createRenameContentInCtxAction(parentMenuTitleCtx, i18n.t("Rename"), containersNoRoot);
+
+ // final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupCxt =
+ // createSetAsDefContent(parentMenuTitleCtx);
+
+ createRefreshCntAction(parentMenuTitle, contents);
+ createRefreshCxtAction(parentMenuTitleCtx, containers);
+
+ createSetAsDefContent(parentMenuTitle, contents);
+ createSetGroupBackImageAction(parentMenuTitle, TYPE_UPLOADEDFILE);
+
+ // createUploadAction(i18n.t("Upload file"), "images/nav/upload.png",
+ // i18n.t("Upload some files (images, PDFs, ...)"), null, containers);
+
+ createDownloadActions(TYPE_UPLOADEDFILE);
+
+ createGoAction(all);
+
+ createGoHomeAction(containers);
+
+ // createTranslateAction(TYPE_ALBUM, TYPE_UPLOADEDFILE);
+
+ createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot);
+ createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
+ createShowDeletedItems(parentMenuTitleCtx, all);
+ }
+
+ @Override
+ protected void createPostSessionInitActions() {
+ super.createUploadMediaAction(TYPE_ALBUM);
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,125 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.gallery.client;
-
-import org.ourproject.kune.gallery.client.cnt.GalleryFolderContent;
-import org.ourproject.kune.gallery.client.cnt.GalleryFolderContentPanel;
-import org.ourproject.kune.gallery.client.cnt.GalleryFolderContentPresenter;
-import org.ourproject.kune.gallery.client.cnt.GalleryFolderContentView;
-import org.ourproject.kune.gallery.client.cnt.GalleryViewer;
-import org.ourproject.kune.gallery.client.cnt.GalleryViewerPanel;
-import org.ourproject.kune.gallery.client.cnt.GalleryViewerPresenter;
-import org.ourproject.kune.gallery.client.cnt.GalleryViewerView;
-import org.ourproject.kune.gallery.client.ctx.GalleryContext;
-import org.ourproject.kune.gallery.client.ctx.GalleryContextPresenter;
-import org.ourproject.kune.platf.client.app.ToolGroup;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
-import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
-import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
-import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.ioc.decorator.Singleton;
-import com.calclab.suco.client.ioc.module.Factory;
-
-public class GalleryClientModule extends AbstractExtendedModule {
-
- @Override
- public void onInstall() {
-
- register(ToolGroup.class, new Factory<GalleryClientTool>(GalleryClientTool.class) {
- @Override
- public GalleryClientTool create() {
- i(GalleryClientActions.class);
- return new GalleryClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
- i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
- }
- });
-
- register(ToolGroup.class, new Factory<GalleryClientActions>(GalleryClientActions.class) {
- @Override
- public GalleryClientActions create() {
- return new GalleryClientActions(i(I18nUITranslationService.class), i(ContextNavigator.class),
- i(Session.class), i(StateManager.class), i(SchedulerManager.class),
- p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
- i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
- i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(GalleryViewer.class),
- p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
- }
- });
-
- register(ToolGroup.class, new Factory<GalleryContext>(GalleryContext.class) {
- @Override
- public GalleryContext create() {
- final GalleryContextPresenter presenter = new GalleryContextPresenter(i(StateManager.class),
- p(ContextNavigator.class), p(ContextPropEditor.class));
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<GalleryViewer>(GalleryViewer.class) {
- @Override
- public GalleryViewer create() {
- final GalleryViewerPresenter presenter = new GalleryViewerPresenter(i(StateManager.class),
- i(Session.class), i(I18nUITranslationService.class), i(ActionContentToolbar.class),
- i(ContentActionRegistry.class), p(FileDownloadUtils.class), p(MediaUtils.class));
- final GalleryViewerView view = new GalleryViewerPanel(i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- register(ToolGroup.class, new Factory<GalleryFolderContent>(GalleryFolderContent.class) {
- @Override
- public GalleryFolderContent create() {
- final GalleryFolderContentPresenter presenter = new GalleryFolderContentPresenter(
- i(StateManager.class), i(Session.class), i(ActionContentToolbar.class),
- i(ContentActionRegistry.class), i(I18nTranslationService.class), p(FileDownloadUtils.class),
- p(FileDownloadUtils.class), p(MediaUtils.class));
- final GalleryFolderContentView view = new GalleryFolderContentPanel(i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class), i(StateManager.class), i(Session.class));
- presenter.init(view);
- return presenter;
- }
- });
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/gallery/client/GalleryClientModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,125 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.gallery.client;
+
+import org.ourproject.kune.gallery.client.cnt.GalleryFolderContent;
+import org.ourproject.kune.gallery.client.cnt.GalleryFolderContentPanel;
+import org.ourproject.kune.gallery.client.cnt.GalleryFolderContentPresenter;
+import org.ourproject.kune.gallery.client.cnt.GalleryFolderContentView;
+import org.ourproject.kune.gallery.client.cnt.GalleryViewer;
+import org.ourproject.kune.gallery.client.cnt.GalleryViewerPanel;
+import org.ourproject.kune.gallery.client.cnt.GalleryViewerPresenter;
+import org.ourproject.kune.gallery.client.cnt.GalleryViewerView;
+import org.ourproject.kune.gallery.client.ctx.GalleryContext;
+import org.ourproject.kune.gallery.client.ctx.GalleryContextPresenter;
+import org.ourproject.kune.platf.client.app.ToolGroup;
+import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
+import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
+import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
+import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
+import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
+import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
+import org.ourproject.kune.workspace.client.editor.ContentEditor;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.themes.WsBackManager;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+import org.ourproject.kune.workspace.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.upload.FileUploader;
+
+import cc.kune.common.client.utils.SchedulerManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.ioc.decorator.Singleton;
+import com.calclab.suco.client.ioc.module.Factory;
+
+public class GalleryClientModule extends AbstractExtendedModule {
+
+ @Override
+ public void onInstall() {
+
+ register(ToolGroup.class, new Factory<GalleryClientTool>(GalleryClientTool.class) {
+ @Override
+ public GalleryClientTool create() {
+ i(GalleryClientActions.class);
+ return new GalleryClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
+ i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
+ }
+ });
+
+ register(ToolGroup.class, new Factory<GalleryClientActions>(GalleryClientActions.class) {
+ @Override
+ public GalleryClientActions create() {
+ return new GalleryClientActions(i(I18nUITranslationService.class), i(ContextNavigator.class),
+ i(Session.class), i(StateManager.class), i(SchedulerManager.class),
+ p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
+ i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
+ i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(GalleryViewer.class),
+ p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
+ }
+ });
+
+ register(ToolGroup.class, new Factory<GalleryContext>(GalleryContext.class) {
+ @Override
+ public GalleryContext create() {
+ final GalleryContextPresenter presenter = new GalleryContextPresenter(i(StateManager.class),
+ p(ContextNavigator.class), p(ContextPropEditor.class));
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<GalleryViewer>(GalleryViewer.class) {
+ @Override
+ public GalleryViewer create() {
+ final GalleryViewerPresenter presenter = new GalleryViewerPresenter(i(StateManager.class),
+ i(Session.class), i(I18nUITranslationService.class), i(ActionContentToolbar.class),
+ i(ContentActionRegistry.class), p(FileDownloadUtils.class), p(MediaUtils.class));
+ final GalleryViewerView view = new GalleryViewerPanel(i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(ToolGroup.class, new Factory<GalleryFolderContent>(GalleryFolderContent.class) {
+ @Override
+ public GalleryFolderContent create() {
+ final GalleryFolderContentPresenter presenter = new GalleryFolderContentPresenter(
+ i(StateManager.class), i(Session.class), i(ActionContentToolbar.class),
+ i(ContentActionRegistry.class), i(I18nTranslationService.class), p(FileDownloadUtils.class),
+ p(FileDownloadUtils.class), p(MediaUtils.class));
+ final GalleryFolderContentView view = new GalleryFolderContentPanel(i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class), i(StateManager.class), i(Session.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+ }
+}
Modified: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/rack/RackServletFilter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/rack/RackServletFilter.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/rack/RackServletFilter.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -36,8 +36,6 @@
import org.ourproject.kune.rack.dock.Dock;
import org.ourproject.kune.rack.dock.RequestMatcher;
-import cc.kune.wave.server.WaveStarter;
-
import com.google.inject.Injector;
public class RackServletFilter implements Filter {
@@ -72,6 +70,7 @@
}
public static final String INJECTOR_ATTRIBUTE = Injector.class.getName();
+ public static final String INJECTOR_PARENT_ATTRIBUTE = Injector.class.getName() + "Parent";
private static final Log LOG = LogFactory.getLog(RackServletFilter.class);
private static final String MODULE_PARAMETER = RackModule.class.getName();
private List<Dock> docks;
@@ -128,8 +127,11 @@
final RackBuilder builder = new RackBuilder();
module.configure(builder);
final Rack rack = builder.getRack();
- final WaveStarter waveStarter = new WaveStarter();
- final Injector waveChildInjector = waveStarter.runMain();
+ // final WaveStarter waveStarter = new WaveStarter();
+ // final Injector waveChildInjector = waveStarter.runMain();
+ final Injector waveChildInjector = (Injector) filterConfig.getServletContext().getAttribute(
+ INJECTOR_PARENT_ATTRIBUTE);
+ // final Injector waveChildInjector = Guice.createInjector();
final Injector kuneChildInjector = installInjector(filterConfig, rack, waveChildInjector);
startContainerListeners(rack.getListeners(), kuneChildInjector);
docks = rack.getDocks();
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,116 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.wiki.client;
-
-import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_FOLDER;
-import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_ROOT;
-import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_UPLOADEDFILE;
-import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_WIKIPAGE;
-
-import org.ourproject.kune.wiki.client.cnt.WikiViewer;
-import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
-import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-
-import com.calclab.suco.client.ioc.Provider;
-
-public class WikiClientActions extends AbstractFoldableContentActions {
- public WikiClientActions(final I18nUITranslationService i18n, final ContextNavigator contextNavigator,
- final Session session, final StateManager stateManager, final SchedulerManager deferredCommandWrapper,
- final Provider<ContentServiceAsync> contentServiceProvider,
- final Provider<GroupServiceAsync> groupServiceProvider, final Provider<FileUploader> fileUploaderProvider,
- final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
- final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
- final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
- final WikiViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
- final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
- super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
- contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
- contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
- documentViewer, entityLogo, publicLink, wsBackManager);
- }
-
- @Override
- protected void createActions() {
- final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_WIKIPAGE, TYPE_UPLOADEDFILE };
- final String[] containers = { TYPE_ROOT, TYPE_FOLDER };
- // final String[] contentsModerated = { };
- final String[] containersNoRoot = { TYPE_FOLDER };
- final String[] contents = { TYPE_WIKIPAGE, TYPE_UPLOADEDFILE };
-
- final String parentMenuTitle = i18n.t("Wikipage");
- final String parentMenuTitleCtx = i18n.t("Wiki");
-
- createNewContainerAction(TYPE_FOLDER, "images/nav/folder_add.png", i18n.t("New folder"), parentMenuTitleCtx,
- i18n.t("New"), i18n.t("New folder"), Position.ctx, TYPE_ROOT, TYPE_FOLDER);
-
- createNewContentAction(TYPE_WIKIPAGE, "images/nav/wikipage_add.png", i18n.t("New wikipage"),
- parentMenuTitleCtx, Position.ctx, TYPE_ROOT, TYPE_FOLDER);
-
- // createContentModeratedActions(parentMenuTitle, contentsModerated);
- createTranslateAction(parentMenuTitle, TYPE_FOLDER, TYPE_WIKIPAGE);
- createContentRenameAction(parentMenuTitle, i18n.t("Rename"), contents);
- createRenameContentInCtxAction(parentMenuTitleCtx, i18n.t("Rename"), containersNoRoot);
- createEditAction(parentMenuTitle, TYPE_WIKIPAGE);
-
- // final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupCxt =
- // createSetAsDefContent(parentMenuTitleCtx);
-
- createRefreshCntAction(parentMenuTitle, contents);
- createRefreshCxtAction(parentMenuTitleCtx, containers);
-
- createSetAsDefContent(parentMenuTitle, contents);
- createSetGroupBackImageAction(parentMenuTitle, TYPE_UPLOADEDFILE);
-
- createUploadAction(i18n.t("Upload file"), "images/nav/upload.png",
- i18n.t("Upload some files (images, PDFs, ...)"), null, containers);
-
- createDownloadActions(TYPE_UPLOADEDFILE);
-
- createGoAction(all);
-
- createGoHomeAction(containers);
-
- createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot);
- createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
- createShowDeletedItems(parentMenuTitleCtx, all);
- }
-
- @Override
- protected void createPostSessionInitActions() {
- // super.createUploadMediaAction();
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientActions.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,116 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.wiki.client;
+
+import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_FOLDER;
+import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_ROOT;
+import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_UPLOADEDFILE;
+import static org.ourproject.kune.wiki.client.WikiClientTool.TYPE_WIKIPAGE;
+
+import org.ourproject.kune.wiki.client.cnt.WikiViewer;
+import org.ourproject.kune.workspace.client.AbstractFoldableContentActions;
+import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
+import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
+import org.ourproject.kune.workspace.client.editor.ContentEditor;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
+import org.ourproject.kune.workspace.client.themes.WsBackManager;
+import org.ourproject.kune.workspace.client.upload.FileUploader;
+
+import cc.kune.common.client.utils.SchedulerManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+
+import com.calclab.suco.client.ioc.Provider;
+
+public class WikiClientActions extends AbstractFoldableContentActions {
+ public WikiClientActions(final I18nUITranslationService i18n, final ContextNavigator contextNavigator,
+ final Session session, final StateManager stateManager, final SchedulerManager deferredCommandWrapper,
+ final Provider<ContentServiceAsync> contentServiceProvider,
+ final Provider<GroupServiceAsync> groupServiceProvider, final Provider<FileUploader> fileUploaderProvider,
+ final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
+ final Provider<FileDownloadUtils> fileDownloadProvider, final EntityHeader entityLogo,
+ final Provider<ContentEditor> textEditorProvider, final ErrorHandler errorHandler,
+ final WikiViewer documentViewer, final Provider<ContextPropEditor> contextProvEditorProvider,
+ final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
+ super(session, stateManager, i18n, errorHandler, deferredCommandWrapper, groupServiceProvider,
+ contentServiceProvider, fileUploaderProvider, contextNavigator, contentActionRegistry,
+ contextActionRegistry, fileDownloadProvider, textEditorProvider, contextProvEditorProvider,
+ documentViewer, entityLogo, publicLink, wsBackManager);
+ }
+
+ @Override
+ protected void createActions() {
+ final String[] all = { TYPE_ROOT, TYPE_FOLDER, TYPE_WIKIPAGE, TYPE_UPLOADEDFILE };
+ final String[] containers = { TYPE_ROOT, TYPE_FOLDER };
+ // final String[] contentsModerated = { };
+ final String[] containersNoRoot = { TYPE_FOLDER };
+ final String[] contents = { TYPE_WIKIPAGE, TYPE_UPLOADEDFILE };
+
+ final String parentMenuTitle = i18n.t("Wikipage");
+ final String parentMenuTitleCtx = i18n.t("Wiki");
+
+ createNewContainerAction(TYPE_FOLDER, "images/nav/folder_add.png", i18n.t("New folder"), parentMenuTitleCtx,
+ i18n.t("New"), i18n.t("New folder"), Position.ctx, TYPE_ROOT, TYPE_FOLDER);
+
+ createNewContentAction(TYPE_WIKIPAGE, "images/nav/wikipage_add.png", i18n.t("New wikipage"),
+ parentMenuTitleCtx, Position.ctx, TYPE_ROOT, TYPE_FOLDER);
+
+ // createContentModeratedActions(parentMenuTitle, contentsModerated);
+ createTranslateAction(parentMenuTitle, TYPE_FOLDER, TYPE_WIKIPAGE);
+ createContentRenameAction(parentMenuTitle, i18n.t("Rename"), contents);
+ createRenameContentInCtxAction(parentMenuTitleCtx, i18n.t("Rename"), containersNoRoot);
+ createEditAction(parentMenuTitle, TYPE_WIKIPAGE);
+
+ // final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupCxt =
+ // createSetAsDefContent(parentMenuTitleCtx);
+
+ createRefreshCntAction(parentMenuTitle, contents);
+ createRefreshCxtAction(parentMenuTitleCtx, containers);
+
+ createSetAsDefContent(parentMenuTitle, contents);
+ createSetGroupBackImageAction(parentMenuTitle, TYPE_UPLOADEDFILE);
+
+ createUploadAction(i18n.t("Upload file"), "images/nav/upload.png",
+ i18n.t("Upload some files (images, PDFs, ...)"), null, containers);
+
+ createDownloadActions(TYPE_UPLOADEDFILE);
+
+ createGoAction(all);
+
+ createGoHomeAction(containers);
+
+ createDelContainerAction("Delete folder", parentMenuTitleCtx, containersNoRoot);
+ createDelContentAction(parentMenuTitle, i18n.t("Delete"), contents);
+ createShowDeletedItems(parentMenuTitleCtx, all);
+ }
+
+ @Override
+ protected void createPostSessionInitActions() {
+ // super.createUploadMediaAction();
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,124 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.wiki.client;
-
-import org.ourproject.kune.platf.client.app.ToolGroup;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
-import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
-import org.ourproject.kune.wiki.client.cnt.WikiFolderContent;
-import org.ourproject.kune.wiki.client.cnt.WikiFolderContentPanel;
-import org.ourproject.kune.wiki.client.cnt.WikiFolderContentPresenter;
-import org.ourproject.kune.wiki.client.cnt.WikiFolderContentView;
-import org.ourproject.kune.wiki.client.cnt.WikiViewer;
-import org.ourproject.kune.wiki.client.cnt.WikiViewerPanel;
-import org.ourproject.kune.wiki.client.cnt.WikiViewerPresenter;
-import org.ourproject.kune.wiki.client.cnt.WikiViewerView;
-import org.ourproject.kune.wiki.client.ctx.WikiContext;
-import org.ourproject.kune.wiki.client.ctx.WikiContextPresenter;
-import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
-import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.ioc.decorator.Singleton;
-import com.calclab.suco.client.ioc.module.Factory;
-
-public class WikiClientModule extends AbstractExtendedModule {
-
- @Override
- public void onInstall() {
-
- register(ToolGroup.class, new Factory<WikiClientTool>(WikiClientTool.class) {
- @Override
- public WikiClientTool create() {
- i(WikiClientActions.class);
- return new WikiClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
- i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
- }
- });
-
- register(ToolGroup.class, new Factory<WikiClientActions>(WikiClientActions.class) {
- @Override
- public WikiClientActions create() {
- return new WikiClientActions(i(I18nUITranslationService.class), i(ContextNavigator.class),
- i(Session.class), i(StateManager.class), i(SchedulerManager.class),
- p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
- i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
- i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(WikiViewer.class),
- p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
- }
- });
-
- register(ToolGroup.class, new Factory<WikiContext>(WikiContext.class) {
- @Override
- public WikiContext create() {
- final WikiContextPresenter presenter = new WikiContextPresenter(i(StateManager.class),
- p(ContextNavigator.class), p(ContextPropEditor.class));
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<WikiViewer>(WikiViewer.class) {
- @Override
- public WikiViewer create() {
- final WikiViewerPresenter presenter = new WikiViewerPresenter(i(StateManager.class), i(Session.class),
- i(I18nUITranslationService.class), i(ActionContentToolbar.class),
- i(ContentActionRegistry.class), p(FileDownloadUtils.class), p(MediaUtils.class));
- final WikiViewerView view = new WikiViewerPanel(i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- register(ToolGroup.class, new Factory<WikiFolderContent>(WikiFolderContent.class) {
- @Override
- public WikiFolderContent create() {
- final WikiFolderContentPresenter presenter = new WikiFolderContentPresenter(i(StateManager.class),
- i(Session.class), i(ActionContentToolbar.class), i(ContentActionRegistry.class),
- i(I18nTranslationService.class), p(FileDownloadUtils.class), p(MediaUtils.class));
- final WikiFolderContentView view = new WikiFolderContentPanel(i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(view);
- return presenter;
- }
- });
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/wiki/client/WikiClientModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,124 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.wiki.client;
+
+import org.ourproject.kune.platf.client.app.ToolGroup;
+import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
+import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
+import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
+import org.ourproject.kune.wiki.client.cnt.WikiFolderContent;
+import org.ourproject.kune.wiki.client.cnt.WikiFolderContentPanel;
+import org.ourproject.kune.wiki.client.cnt.WikiFolderContentPresenter;
+import org.ourproject.kune.wiki.client.cnt.WikiFolderContentView;
+import org.ourproject.kune.wiki.client.cnt.WikiViewer;
+import org.ourproject.kune.wiki.client.cnt.WikiViewerPanel;
+import org.ourproject.kune.wiki.client.cnt.WikiViewerPresenter;
+import org.ourproject.kune.wiki.client.cnt.WikiViewerView;
+import org.ourproject.kune.wiki.client.ctx.WikiContext;
+import org.ourproject.kune.wiki.client.ctx.WikiContextPresenter;
+import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
+import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
+import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
+import org.ourproject.kune.workspace.client.editor.ContentEditor;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.themes.WsBackManager;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+import org.ourproject.kune.workspace.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.upload.FileUploader;
+
+import cc.kune.common.client.utils.SchedulerManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.ioc.decorator.Singleton;
+import com.calclab.suco.client.ioc.module.Factory;
+
+public class WikiClientModule extends AbstractExtendedModule {
+
+ @Override
+ public void onInstall() {
+
+ register(ToolGroup.class, new Factory<WikiClientTool>(WikiClientTool.class) {
+ @Override
+ public WikiClientTool create() {
+ i(WikiClientActions.class);
+ return new WikiClientTool(i(I18nUITranslationService.class), i(ToolSelector.class),
+ i(WsThemeManager.class), i(WorkspaceSkeleton.class), i(ContentCapabilitiesRegistry.class));
+ }
+ });
+
+ register(ToolGroup.class, new Factory<WikiClientActions>(WikiClientActions.class) {
+ @Override
+ public WikiClientActions create() {
+ return new WikiClientActions(i(I18nUITranslationService.class), i(ContextNavigator.class),
+ i(Session.class), i(StateManager.class), i(SchedulerManager.class),
+ p(ContentServiceAsync.class), p(GroupServiceAsync.class), p(FileUploader.class),
+ i(ContentActionRegistry.class), i(ContextActionRegistry.class), p(FileDownloadUtils.class),
+ i(EntityHeader.class), p(ContentEditor.class), i(ErrorHandler.class), i(WikiViewer.class),
+ p(ContextPropEditor.class), i(SitePublicSpaceLink.class), i(WsBackManager.class));
+ }
+ });
+
+ register(ToolGroup.class, new Factory<WikiContext>(WikiContext.class) {
+ @Override
+ public WikiContext create() {
+ final WikiContextPresenter presenter = new WikiContextPresenter(i(StateManager.class),
+ p(ContextNavigator.class), p(ContextPropEditor.class));
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<WikiViewer>(WikiViewer.class) {
+ @Override
+ public WikiViewer create() {
+ final WikiViewerPresenter presenter = new WikiViewerPresenter(i(StateManager.class), i(Session.class),
+ i(I18nUITranslationService.class), i(ActionContentToolbar.class),
+ i(ContentActionRegistry.class), p(FileDownloadUtils.class), p(MediaUtils.class));
+ final WikiViewerView view = new WikiViewerPanel(i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(ToolGroup.class, new Factory<WikiFolderContent>(WikiFolderContent.class) {
+ @Override
+ public WikiFolderContent create() {
+ final WikiFolderContentPresenter presenter = new WikiFolderContentPresenter(i(StateManager.class),
+ i(Session.class), i(ActionContentToolbar.class), i(ContentActionRegistry.class),
+ i(I18nTranslationService.class), p(FileDownloadUtils.class), p(MediaUtils.class));
+ final WikiFolderContentView view = new WikiFolderContentPanel(i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,674 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client;
-
-import org.ourproject.kune.platf.client.actions.ActionCheckedCondition;
-import org.ourproject.kune.platf.client.actions.ActionEnableCondition;
-import org.ourproject.kune.platf.client.actions.ActionMenuItemDescriptor;
-import org.ourproject.kune.platf.client.actions.ActionToolbarButtonAndItemDescriptor;
-import org.ourproject.kune.platf.client.actions.ActionToolbarButtonDescriptor;
-import org.ourproject.kune.platf.client.actions.ActionToolbarButtonSeparator;
-import org.ourproject.kune.platf.client.actions.ActionToolbarMenuAndItemDescriptor;
-import org.ourproject.kune.platf.client.actions.ActionToolbarMenuCheckItemDescriptor;
-import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
-import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
-import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
-import org.ourproject.kune.platf.client.actions.RadioMustBeChecked;
-import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
-import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
-import org.ourproject.kune.workspace.client.cnt.FoldableContent;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.errors.SessionExpiredException;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.ContentStatus;
-import cc.kune.core.shared.domain.utils.StateToken;
-import cc.kune.core.shared.dto.AccessRolDTO;
-import cc.kune.core.shared.dto.ContentSimpleDTO;
-import cc.kune.core.shared.dto.GroupDTO;
-import cc.kune.core.shared.dto.InitDataDTO;
-import cc.kune.core.shared.dto.StateAbstractDTO;
-import cc.kune.core.shared.dto.StateContainerDTO;
-import cc.kune.core.shared.dto.StateContentDTO;
-
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener0;
-import com.calclab.suco.client.ioc.Provider;
-import com.google.gwt.core.client.Scheduler.ScheduledCommand;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-public abstract class AbstractFoldableContentActions {
-
- protected enum Position {
- cnt, ctx
- }
-
- public static final ActionToolbarPosition CONTENT_BOTTOMBAR = new ActionToolbarPosition("afca-ctn-bottom");
-
- public static final ActionToolbarPosition CONTENT_TOPBAR = new ActionToolbarPosition("afca-ctn-top");
- public static final ActionToolbarPosition CONTEXT_BOTTOMBAR = new ActionToolbarPosition("afca-ctx-bottom");
- public static final ActionToolbarPosition CONTEXT_TOPBAR = new ActionToolbarPosition("afca-ctx-top");
- private static final String PUBLICATION_MENU = "Publication";
-
- protected final ContentActionRegistry contentActionRegistry;
- protected final Provider<ContentServiceAsync> contentServiceProvider;
- protected final ContextActionRegistry contextActionRegistry;
- protected final ContextNavigator contextNavigator;
- protected final Provider<ContextPropEditor> contextPropEditorProvider;
- protected final SchedulerManager deferredCommandWrapper;
- protected final EntityHeader entityLogo;
- protected final ErrorHandler errorHandler;
- protected final Provider<FileDownloadUtils> fileDownloadProvider;
- protected final Provider<FileUploader> fileUploaderProvider;
- protected final FoldableContent foldableContent;
- protected final Provider<GroupServiceAsync> groupServiceProvider;
- protected final I18nUITranslationService i18n;
- private final SitePublicSpaceLink publicLink;
- protected final Session session;
- protected final StateManager stateManager;
- protected final Provider<ContentEditor> textEditorProvider;
-
- private final WsBackManager wsBackManager;
-
- public AbstractFoldableContentActions(final Session session, final StateManager stateManager,
- final I18nUITranslationService i18n, final ErrorHandler errorHandler,
- final SchedulerManager deferredCommandWrapper, final Provider<GroupServiceAsync> groupServiceProvider,
- final Provider<ContentServiceAsync> contentServiceProvider,
- final Provider<FileUploader> fileUploaderProvider, final ContextNavigator contextNavigator,
- final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
- final Provider<FileDownloadUtils> fileDownloadProvider, final Provider<ContentEditor> textEditorProvider,
- final Provider<ContextPropEditor> contextPropEditorProvider, final FoldableContent foldableContent,
- final EntityHeader entityLogo, final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
- this.session = session;
- this.stateManager = stateManager;
- this.i18n = i18n;
- this.errorHandler = errorHandler;
- this.deferredCommandWrapper = deferredCommandWrapper;
- this.groupServiceProvider = groupServiceProvider;
- this.contentServiceProvider = contentServiceProvider;
- this.fileUploaderProvider = fileUploaderProvider;
- this.contextNavigator = contextNavigator;
- this.contentActionRegistry = contentActionRegistry;
- this.contextActionRegistry = contextActionRegistry;
- this.fileDownloadProvider = fileDownloadProvider;
- this.textEditorProvider = textEditorProvider;
- this.contextPropEditorProvider = contextPropEditorProvider;
- this.foldableContent = foldableContent;
- this.entityLogo = entityLogo;
- this.publicLink = publicLink;
- this.wsBackManager = wsBackManager;
- createActions();
- session.onInitDataReceived(new Listener<InitDataDTO>() {
- @Override
- public void onEvent(final InitDataDTO parameter) {
- createPostSessionInitActions();
- }
- });
- }
-
- protected abstract void createActions();
-
- protected void createContentModeratedActions(final String parentMenuTitle, final String... contentsModerated) {
- createSetStatusAction(AccessRolDTO.Administrator, i18n.t("Published online"), ContentStatus.publishedOnline,
- contentsModerated);
- createSetStatusAction(AccessRolDTO.Editor, i18n.t("Editing in progress"), ContentStatus.editingInProgress,
- contentsModerated);
- createSetStatusAction(AccessRolDTO.Administrator, i18n.t("Rejected"), ContentStatus.rejected, contentsModerated);
- createSetStatusAction(AccessRolDTO.Editor, i18n.t("Submitted for publish"),
- ContentStatus.submittedForEvaluation, contentsModerated);
- createSetStatusAction(AccessRolDTO.Administrator, i18n.t("In the rubbish bin"), ContentStatus.inTheDustbin,
- contentsModerated);
- }
-
- protected void createContentRenameAction(final String parentMenuTitle, final String textDescription,
- final String... registerInTypes) {
- final ActionToolbarMenuAndItemDescriptor<StateToken> renameCtn = new ActionToolbarMenuAndItemDescriptor<StateToken>(
- AccessRolDTO.Editor, CONTENT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken stateToken) {
- contextNavigator.editItem(stateToken);
- }
- });
- renameCtn.setTextDescription(textDescription);
- renameCtn.setParentMenuTitle(parentMenuTitle);
- renameCtn.setEnableCondition(notDeleted());
- // renameCtn.setShortcut(new ShortcutDescriptor(false, Keyboard.KEY_F2,
- // i18n.tWithNT("F2", "The F2 Function key")));
- contentActionRegistry.addAction(renameCtn, registerInTypes);
- }
-
- protected void createDelContainerAction(final String text, final String parentMenuTitle,
- final String... registerInTypes) {
- final ActionToolbarMenuAndItemDescriptor<StateToken> delContainer = new ActionToolbarMenuAndItemDescriptor<StateToken>(
- AccessRolDTO.Administrator, CONTENT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken token) {
- NotifyUser.info("Sorry, in development");
- }
- });
- delContainer.setParentMenuTitle(parentMenuTitle);
- delContainer.setTextDescription(i18n.t(text));
- delContainer.setMustBeConfirmed(true);
- delContainer.setConfirmationTitle(i18n.t("Please confirm"));
- delContainer.setConfirmationText(i18n.t("You will delete it with all its contents. Are you sure?"));
- contextActionRegistry.addAction(delContainer, registerInTypes);
- }
-
- protected void createDelContentAction(final String parentMenuTitle, final String textDescription,
- final String... registerInTypes) {
- final ActionToolbarMenuAndItemDescriptor<StateToken> delContent = new ActionToolbarMenuAndItemDescriptor<StateToken>(
- AccessRolDTO.Administrator, CONTENT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken token) {
- contentServiceProvider.get().delContent(session.getUserHash(), token,
- new AsyncCallbackSimple<StateContentDTO>() {
- @Override
- public void onSuccess(final StateContentDTO state) {
- session.setCurrentState(state);
- final StateToken parent = token.copy().clearDocument();
- stateManager.gotoToken(parent);
- contextNavigator.clear();
- contextNavigator.refreshState();
- }
- });
- }
- });
- delContent.setParentMenuTitle(parentMenuTitle);
- delContent.setTextDescription(textDescription);
- delContent.setMustBeConfirmed(true);
- delContent.setConfirmationTitle(i18n.t("Please confirm"));
- delContent.setConfirmationText(i18n.t("Are you sure?"));
- delContent.setEnableCondition(notDefAndNotDeleted());
- contentActionRegistry.addAction(delContent, registerInTypes);
- }
-
- protected void createDownloadActions(final String typeUploadedfile) {
- final ActionToolbarButtonDescriptor<StateToken> download = new ActionToolbarButtonDescriptor<StateToken>(
- AccessRolDTO.Viewer, CONTENT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken token) {
- downloadContent(token);
- }
- });
- download.setMustBeAuthenticated(false);
- download.setTextDescription(i18n.t("Download"));
- download.setToolTip(i18n.t("Download this file"));
- download.setIconUrl("images/nav/download.png");
-
- final ActionMenuItemDescriptor<StateToken> downloadCtx = new ActionMenuItemDescriptor<StateToken>(
- AccessRolDTO.Viewer, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken token) {
- downloadContent(token);
- }
- });
- downloadCtx.setMustBeAuthenticated(false);
- downloadCtx.setTextDescription(i18n.t("Download"));
- downloadCtx.setIconUrl("images/nav/download.png");
-
- contentActionRegistry.addAction(download, typeUploadedfile);
- contextActionRegistry.addAction(downloadCtx, typeUploadedfile);
- }
-
- protected ActionToolbarButtonDescriptor<StateToken> createEditAction(final String fileMenuTitle,
- final String... registerInTypes) {
- final ActionToolbarButtonDescriptor<StateToken> editContent = new ActionToolbarButtonDescriptor<StateToken>(
- AccessRolDTO.Editor, CONTENT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken stateToken) {
- NotifyUser.showProgressProcessing();
- session.check(new AsyncCallbackSimple<Void>() {
- @Override
- public void onSuccess(final Void result) {
- final ContentEditor editor = textEditorProvider.get();
- foldableContent.detach();
- contextNavigator.detach();
- contextPropEditorProvider.get().attach();
- editor.edit(session.getContentState().getContent(), new Listener<String>() {
- @Override
- public void onEvent(final String html) {
- NotifyUser.showProgressSaving();
- contentServiceProvider.get().save(session.getUserHash(), stateToken, html,
- new AsyncCallback<Void>() {
- @Override
- public void onFailure(final Throwable caught) {
- NotifyUser.hideProgress();
- if (caught instanceof SessionExpiredException) {
- errorHandler.doSessionExpired();
- } else {
- NotifyUser.error(i18n.t("Error saving document. Retrying..."));
- errorHandler.process(caught);
- editor.onSaveFailed();
- }
- }
-
- @Override
- public void onSuccess(final Void param) {
- NotifyUser.hideProgress();
- session.getContentState().setContent(html);
- editor.onSavedSuccessful();
- }
- });
- }
- }, new Listener0() {
- @Override
- public void onEvent() {
- // onClose
- deferredCommandWrapper.addCommand(new ScheduledCommand() {
- @Override
- public void execute() {
- foldableContent.attach();
- contextPropEditorProvider.get().detach();
- contextNavigator.attach();
- if (session.inSameToken(stateToken)) {
- contextNavigator.refreshState();
- foldableContent.refreshState();
- }
- }
- });
- }
- });
- editor.setFileMenuTitle(fileMenuTitle);
- NotifyUser.hideProgress();
- }
- });
- }
- });
- editContent.setTextDescription(i18n.tWithNT("Edit", "used in button"));
- editContent.setIconUrl("images/content_edit.png");
- editContent.setLeftSeparator(ActionToolbarButtonSeparator.spacer);
- editContent.setEnableCondition(notDeleted());
- contentActionRegistry.addAction(editContent, registerInTypes);
- return editContent;
- }
-
- protected ActionMenuItemDescriptor<StateToken> createGoAction(final String... registerInTypes) {
- final ActionMenuItemDescriptor<StateToken> go = new ActionMenuItemDescriptor<StateToken>(AccessRolDTO.Viewer,
- new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken token) {
- stateManager.gotoToken(token);
- }
- });
- go.setMustBeAuthenticated(false);
- go.setTextDescription(i18n.t("Open"));
- go.setIconUrl("images/nav/go.png");
- contextActionRegistry.addAction(go, registerInTypes);
- return go;
- }
-
- protected ActionToolbarButtonDescriptor<StateToken> createGoHomeAction(final String... registerInTypes) {
- final ActionToolbarButtonDescriptor<StateToken> goGroupHome = new ActionToolbarButtonDescriptor<StateToken>(
- AccessRolDTO.Viewer, CONTEXT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken token) {
- stateManager.gotoToken(token.getGroup());
- }
- });
- goGroupHome.setMustBeAuthenticated(false);
- goGroupHome.setIconUrl("images/group-home.png");
- goGroupHome.setEnableCondition(new ActionEnableCondition<StateToken>() {
- @Override
- public boolean mustBeEnabled(final StateToken token) {
- final StateToken defContentToken = session.getCurrentState().getGroup().getDefaultContent().getStateToken();
- return !session.getCurrentStateToken().equals(defContentToken);
- }
- });
- goGroupHome.setLeftSeparator(ActionToolbarButtonSeparator.fill);
- contextActionRegistry.addAction(goGroupHome, registerInTypes);
- return goGroupHome;
- }
-
- protected void createNewContainerAction(final String contentTypeId, final String iconUrl,
- final String textDescription, final String parentMenuTitle, final String parentMenuSubtitle,
- final String defaultName, final Position position, final String... registerInTypes) {
- final ActionToolbarMenuAndItemDescriptor<StateToken> addFolder;
- addFolder = new ActionToolbarMenuAndItemDescriptor<StateToken>(AccessRolDTO.Editor, CONTEXT_TOPBAR,
- new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken stateToken) {
- NotifyUser.showProgressProcessing();
- contentServiceProvider.get().addFolder(session.getUserHash(), stateToken, defaultName,
- contentTypeId, new AsyncCallbackSimple<StateContainerDTO>() {
- @Override
- public void onSuccess(final StateContainerDTO state) {
- contextNavigator.setEditOnNextStateChange(true);
- stateManager.setRetrievedState(state);
- }
- });
- }
- });
- addFolder.setTextDescription(textDescription);
- addFolder.setParentMenuTitle(parentMenuTitle);
- addFolder.setParentSubMenuTitle(parentMenuSubtitle);
- addFolder.setIconUrl(iconUrl);
- register(addFolder, position, registerInTypes);
- }
-
- protected ActionToolbarMenuAndItemDescriptor<StateToken> createNewContentAction(final String typeId,
- final String iconUrl, final String description, final String parentMenuTitle, final Position position,
- final String... registerInTypes) {
- final ActionToolbarMenuAndItemDescriptor<StateToken> addContent = new ActionToolbarMenuAndItemDescriptor<StateToken>(
- AccessRolDTO.Editor, CONTEXT_TOPBAR, new Listener0() {
- @Override
- public void onEvent() {
- NotifyUser.showProgressProcessing();
- contentServiceProvider.get().addContent(session.getUserHash(),
- session.getCurrentState().getStateToken(), description, typeId,
- new AsyncCallbackSimple<StateContentDTO>() {
- @Override
- public void onSuccess(final StateContentDTO state) {
- contextNavigator.setEditOnNextStateChange(true);
- stateManager.setRetrievedState(state);
- }
- });
- }
- });
- addContent.setTextDescription(description);
- addContent.setParentMenuTitle(parentMenuTitle);
- addContent.setParentSubMenuTitle(i18n.t("New"));
- addContent.setIconUrl(iconUrl);
- register(addContent, position, registerInTypes);
- return addContent;
- }
-
- protected abstract void createPostSessionInitActions();
-
- protected ActionToolbarMenuDescriptor<StateToken> createRefreshCntAction(final String parentMenuTitle,
- final String... registerInTypes) {
- final ActionToolbarMenuDescriptor<StateToken> refreshCnt = new ActionToolbarMenuDescriptor<StateToken>(
- AccessRolDTO.Editor, CONTENT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken stateToken) {
- stateManager.reload();
- contextNavigator.selectItem(stateToken);
- }
- });
- refreshCnt.setMustBeAuthenticated(false);
- refreshCnt.setParentMenuTitle(parentMenuTitle);
- refreshCnt.setTextDescription(i18n.t("Refresh"));
- refreshCnt.setIconUrl("images/nav/refresh.png");
- contentActionRegistry.addAction(refreshCnt, registerInTypes);
- return refreshCnt;
- }
-
- protected ActionToolbarMenuDescriptor<StateToken> createRefreshCxtAction(final String parentMenuTitleCtx,
- final String... registerInTypes) {
- final ActionToolbarMenuDescriptor<StateToken> refreshCtx = new ActionToolbarMenuDescriptor<StateToken>(
- AccessRolDTO.Editor, CONTEXT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken stateToken) {
- stateManager.reload();
- contextNavigator.selectItem(stateToken);
- }
- });
- refreshCtx.setMustBeAuthenticated(false);
- refreshCtx.setParentMenuTitle(parentMenuTitleCtx);
- refreshCtx.setTextDescription(i18n.t("Refresh"));
- refreshCtx.setIconUrl("images/nav/refresh.png");
- contextActionRegistry.addAction(refreshCtx, registerInTypes);
- return refreshCtx;
- }
-
- protected ActionToolbarMenuAndItemDescriptor<StateToken> createRenameContentInCtxAction(
- final String parentMenuTitleCtx, final String textDescription, final String... registerInTypes) {
- final ActionToolbarMenuAndItemDescriptor<StateToken> renameCtx = new ActionToolbarMenuAndItemDescriptor<StateToken>(
- AccessRolDTO.Editor, CONTEXT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken stateToken) {
- contextNavigator.editItem(stateToken);
- }
- });
- renameCtx.setTextDescription(textDescription);
- renameCtx.setParentMenuTitle(parentMenuTitleCtx);
- contextActionRegistry.addAction(renameCtx, registerInTypes);
- return renameCtx;
- }
-
- protected ActionToolbarMenuDescriptor<StateToken> createSetAsDefContent(final String parentMenuTitle,
- final String... registerInTypes) {
- final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupContent;
- setAsDefGroupContent = new ActionToolbarMenuDescriptor<StateToken>(AccessRolDTO.Administrator, CONTENT_TOPBAR,
- new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken token) {
- NotifyUser.showProgressProcessing();
- contentServiceProvider.get().setAsDefaultContent(session.getUserHash(), token,
- new AsyncCallbackSimple<ContentSimpleDTO>() {
- @Override
- public void onSuccess(final ContentSimpleDTO defContent) {
- session.getCurrentState().getGroup().setDefaultContent(defContent);
- NotifyUser.hideProgress();
- NotifyUser.info(i18n.t("Content selected as the group homepage"));
- }
- });
- }
- });
- setAsDefGroupContent.setTextDescription(i18n.t("Set this as the default group page"));
- setAsDefGroupContent.setIconUrl("images/group-home.png");
- setAsDefGroupContent.setEnableCondition(notDefAndNotDeleted());
- setAsDefGroupContent.setParentMenuTitle(parentMenuTitle);
- contentActionRegistry.addAction(setAsDefGroupContent, registerInTypes);
- return setAsDefGroupContent;
- }
-
- protected void createSetGroupBackImageAction(final String parentMenuTitle, final String... registerInTypes) {
- final ActionToolbarMenuAndItemDescriptor<StateToken> setGroupBackImage = new ActionToolbarMenuAndItemDescriptor<StateToken>(
- AccessRolDTO.Administrator, CONTENT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken token) {
- groupServiceProvider.get().setGroupBackImage(session.getUserHash(), token,
- new AsyncCallbackSimple<GroupDTO>() {
- @Override
- public void onSuccess(final GroupDTO newGroup) {
- if (session.getCurrentState().getGroup().getShortName().equals(
- newGroup.getShortName())) {
- session.getCurrentState().setGroup(newGroup);
- wsBackManager.clearBackImage();
- wsBackManager.setBackImage(newGroup.getGroupBackImage().getStateToken());
- }
- }
- });
- }
- });
- setGroupBackImage.setParentMenuTitle(parentMenuTitle);
- setGroupBackImage.setTextDescription(i18n.t("Set this as the group background image"));
- setGroupBackImage.setIconUrl("images/nav/picture.png");
- setGroupBackImage.setEnableCondition(new ActionEnableCondition<StateToken>() {
- @Override
- public boolean mustBeEnabled(final StateToken token) {
- return session.getContentState().getMimeType().isImage();
- }
- });
- contentActionRegistry.addAction(setGroupBackImage, registerInTypes);
- }
-
- protected void createSetStatusAction(final AccessRolDTO rol, final String textDescription,
- final ContentStatus status, final String[] contentsModerated) {
- final ActionToolbarMenuRadioDescriptor<StateToken> action = new ActionToolbarMenuRadioDescriptor<StateToken>(
- rol, CONTENT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken stateToken) {
- setContentStatus(status, stateToken);
- }
- }, "ContentRadioStatus", new RadioMustBeChecked() {
- @Override
- public boolean mustBeChecked() {
- if (session.getContainerState() instanceof StateContentDTO) {
- final ContentStatus currentStatus = session.getContentState().getStatus();
- return status.equals(currentStatus);
- }
- return false;
- }
- });
- action.setTextDescription(textDescription);
- action.setParentMenuTitle(PUBLICATION_MENU);
- action.setParentMenuIconUrl("images/anybody.png");
- contentActionRegistry.addAction(action, contentsModerated);
- }
-
- protected void createShowDeletedItems(final String parentMenuTitle, final String... registerInTypes) {
- final ActionToolbarMenuCheckItemDescriptor<StateToken> showDeletedItems = new ActionToolbarMenuCheckItemDescriptor<StateToken>(
- AccessRolDTO.Editor, CONTEXT_TOPBAR, new Listener0() {
- @Override
- public void onEvent() {
- final boolean mustShow = !session.getCurrentUserInfo().getShowDeletedContent();
- session.getCurrentUserInfo().setShowDeletedContent(mustShow);
- if (!mustShow && session.isCurrentStateAContent()
- && session.getContentState().getStatus().equals(ContentStatus.inTheDustbin)) {
- stateManager.gotoToken(session.getCurrentStateToken().getGroup());
- }
- contextNavigator.clear();
- contextNavigator.refreshState();
- }
- }, new ActionCheckedCondition() {
- @Override
- public boolean mustBeChecked() {
- return session.getShowDeletedContent();
- }
- });
- showDeletedItems.setParentMenuTitle(parentMenuTitle);
- showDeletedItems.setTextDescription("Show deleted items");
- showDeletedItems.setMustBeAuthenticated(true);
- contextActionRegistry.addAction(showDeletedItems, registerInTypes);
- }
-
- protected ActionToolbarMenuDescriptor<StateToken> createTranslateAction(final String fileMenuTitle,
- final String... registerInTypes) {
- final ActionToolbarMenuDescriptor<StateToken> translateContent = new ActionToolbarMenuDescriptor<StateToken>(
- AccessRolDTO.Editor, CONTENT_TOPBAR, new Listener<StateToken>() {
- @Override
- public void onEvent(final StateToken stateToken) {
- NotifyUser.important(i18n.t("Sorry, this functionality is currently in development"));
- }
- });
- translateContent.setParentMenuTitle(fileMenuTitle);
- translateContent.setTextDescription(i18n.tWithNT("Translate", "used in button"));
- translateContent.setToolTip(i18n.t("Translate this document to other languages"));
- translateContent.setIconUrl("images/language.gif");
- translateContent.setEnableCondition(notDeleted());
- contentActionRegistry.addAction(translateContent, registerInTypes);
- return translateContent;
- }
-
- protected ActionToolbarButtonAndItemDescriptor<StateToken> createUploadAction(final String textDescription,
- final String iconUrl, final String toolTip, final String permitedExtensions,
- final String... registerInTypes) {
- final ActionToolbarButtonAndItemDescriptor<StateToken> uploadFile;
- uploadFile = new ActionToolbarButtonAndItemDescriptor<StateToken>(AccessRolDTO.Editor, CONTEXT_BOTTOMBAR,
- new Listener0() {
- @Override
- public void onEvent() {
- if (permitedExtensions != null) {
- // FIXME: can't be reset ...
- // fileUploaderProvider.get().setPermittedExtensions(permitedExtensions);
- } else {
- // FIXME: can't be reset ...
- // fileUploaderProvider.get().resetPermittedExtensions();
- }
- fileUploaderProvider.get().show();
- }
- });
- uploadFile.setTextDescription(textDescription);
- uploadFile.setIconUrl(iconUrl);
- uploadFile.setToolTip(toolTip);
- contextActionRegistry.addAction(uploadFile, registerInTypes);
- return uploadFile;
- }
-
- protected ActionToolbarButtonAndItemDescriptor<StateToken> createUploadMediaAction(final String... registerInTypes) {
- final ActionToolbarButtonAndItemDescriptor<StateToken> uploadMedia = createUploadAction(i18n.t("Upload media"),
- "images/nav/upload.png", i18n.t("Upload some media (images, videos...)"),
- session.getGalleryPermittedExtensions());
- contextActionRegistry.addAction(uploadMedia, registerInTypes);
- return uploadMedia;
- }
-
- protected void downloadContent(final StateToken token) {
- fileDownloadProvider.get().downloadFile(token);
- }
-
- private ActionEnableCondition<StateToken> notDefAndNotDeleted() {
- return new ActionEnableCondition<StateToken>() {
- @Override
- public boolean mustBeEnabled(final StateToken token) {
- final boolean isNotDefContentToken = !session.getCurrentState().getGroup().getDefaultContent().getStateToken().equals(
- session.getCurrentStateToken());
- return isNotDefContentToken && notDeleted().mustBeEnabled(token);
- }
- };
- }
-
- private ActionEnableCondition<StateToken> notDeleted() {
- return new ActionEnableCondition<StateToken>() {
- @Override
- public boolean mustBeEnabled(final StateToken token) {
- final boolean isNotDeleted = !(session.isCurrentStateAContent() && session.getContentState().getStatus().equals(
- ContentStatus.inTheDustbin));
- return isNotDeleted;
- }
- };
- }
-
- private void register(final ActionToolbarMenuAndItemDescriptor<StateToken> action, final Position position,
- final String... registerInTypes) {
- if (position.equals(Position.ctx)) {
- contextActionRegistry.addAction(action, registerInTypes);
- } else if (position.equals(Position.cnt)) {
- contentActionRegistry.addAction(action, registerInTypes);
- }
- }
-
- private void setContentStatus(final ContentStatus status, final StateToken stateToken) {
- final AsyncCallbackSimple<StateAbstractDTO> callback = new AsyncCallbackSimple<StateAbstractDTO>() {
- @Override
- public void onSuccess(final StateAbstractDTO state) {
- if (session.inSameToken(stateToken)) {
- session.setCurrentState(state);
- publicLink.setState(state);
- foldableContent.refreshState();
- }
- contextNavigator.setItemStatus(stateToken, status);
- }
- };
- if (status.equals(ContentStatus.publishedOnline) || status.equals(ContentStatus.rejected)
- || status.equals(ContentStatus.inTheDustbin)) {
- contentServiceProvider.get().setStatusAsAdmin(session.getUserHash(), stateToken, status, callback);
- } else {
- contentServiceProvider.get().setStatus(session.getUserHash(), stateToken, status, callback);
- }
- }
-
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/AbstractFoldableContentActions.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,674 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client;
+
+import org.ourproject.kune.platf.client.actions.ActionCheckedCondition;
+import org.ourproject.kune.platf.client.actions.ActionEnableCondition;
+import org.ourproject.kune.platf.client.actions.ActionMenuItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarButtonAndItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarButtonDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarButtonSeparator;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuAndItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuCheckItemDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarMenuRadioDescriptor;
+import org.ourproject.kune.platf.client.actions.ActionToolbarPosition;
+import org.ourproject.kune.platf.client.actions.RadioMustBeChecked;
+import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
+import org.ourproject.kune.workspace.client.cnt.ContentActionRegistry;
+import org.ourproject.kune.workspace.client.cnt.FoldableContent;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
+import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
+import org.ourproject.kune.workspace.client.editor.ContentEditor;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
+import org.ourproject.kune.workspace.client.themes.WsBackManager;
+import org.ourproject.kune.workspace.client.upload.FileUploader;
+
+import cc.kune.common.client.utils.SchedulerManager;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.errors.SessionExpiredException;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.domain.ContentStatus;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.ContentSimpleDTO;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.InitDataDTO;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.core.shared.dto.StateContainerDTO;
+import cc.kune.core.shared.dto.StateContentDTO;
+
+import com.calclab.suco.client.events.Listener;
+import com.calclab.suco.client.events.Listener0;
+import com.calclab.suco.client.ioc.Provider;
+import com.google.gwt.core.client.Scheduler.ScheduledCommand;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+public abstract class AbstractFoldableContentActions {
+
+ protected enum Position {
+ cnt, ctx
+ }
+
+ public static final ActionToolbarPosition CONTENT_BOTTOMBAR = new ActionToolbarPosition("afca-ctn-bottom");
+
+ public static final ActionToolbarPosition CONTENT_TOPBAR = new ActionToolbarPosition("afca-ctn-top");
+ public static final ActionToolbarPosition CONTEXT_BOTTOMBAR = new ActionToolbarPosition("afca-ctx-bottom");
+ public static final ActionToolbarPosition CONTEXT_TOPBAR = new ActionToolbarPosition("afca-ctx-top");
+ private static final String PUBLICATION_MENU = "Publication";
+
+ protected final ContentActionRegistry contentActionRegistry;
+ protected final Provider<ContentServiceAsync> contentServiceProvider;
+ protected final ContextActionRegistry contextActionRegistry;
+ protected final ContextNavigator contextNavigator;
+ protected final Provider<ContextPropEditor> contextPropEditorProvider;
+ protected final SchedulerManager deferredCommandWrapper;
+ protected final EntityHeader entityLogo;
+ protected final ErrorHandler errorHandler;
+ protected final Provider<FileDownloadUtils> fileDownloadProvider;
+ protected final Provider<FileUploader> fileUploaderProvider;
+ protected final FoldableContent foldableContent;
+ protected final Provider<GroupServiceAsync> groupServiceProvider;
+ protected final I18nUITranslationService i18n;
+ private final SitePublicSpaceLink publicLink;
+ protected final Session session;
+ protected final StateManager stateManager;
+ protected final Provider<ContentEditor> textEditorProvider;
+
+ private final WsBackManager wsBackManager;
+
+ public AbstractFoldableContentActions(final Session session, final StateManager stateManager,
+ final I18nUITranslationService i18n, final ErrorHandler errorHandler,
+ final SchedulerManager deferredCommandWrapper, final Provider<GroupServiceAsync> groupServiceProvider,
+ final Provider<ContentServiceAsync> contentServiceProvider,
+ final Provider<FileUploader> fileUploaderProvider, final ContextNavigator contextNavigator,
+ final ContentActionRegistry contentActionRegistry, final ContextActionRegistry contextActionRegistry,
+ final Provider<FileDownloadUtils> fileDownloadProvider, final Provider<ContentEditor> textEditorProvider,
+ final Provider<ContextPropEditor> contextPropEditorProvider, final FoldableContent foldableContent,
+ final EntityHeader entityLogo, final SitePublicSpaceLink publicLink, final WsBackManager wsBackManager) {
+ this.session = session;
+ this.stateManager = stateManager;
+ this.i18n = i18n;
+ this.errorHandler = errorHandler;
+ this.deferredCommandWrapper = deferredCommandWrapper;
+ this.groupServiceProvider = groupServiceProvider;
+ this.contentServiceProvider = contentServiceProvider;
+ this.fileUploaderProvider = fileUploaderProvider;
+ this.contextNavigator = contextNavigator;
+ this.contentActionRegistry = contentActionRegistry;
+ this.contextActionRegistry = contextActionRegistry;
+ this.fileDownloadProvider = fileDownloadProvider;
+ this.textEditorProvider = textEditorProvider;
+ this.contextPropEditorProvider = contextPropEditorProvider;
+ this.foldableContent = foldableContent;
+ this.entityLogo = entityLogo;
+ this.publicLink = publicLink;
+ this.wsBackManager = wsBackManager;
+ createActions();
+ session.onInitDataReceived(new Listener<InitDataDTO>() {
+ @Override
+ public void onEvent(final InitDataDTO parameter) {
+ createPostSessionInitActions();
+ }
+ });
+ }
+
+ protected abstract void createActions();
+
+ protected void createContentModeratedActions(final String parentMenuTitle, final String... contentsModerated) {
+ createSetStatusAction(AccessRolDTO.Administrator, i18n.t("Published online"), ContentStatus.publishedOnline,
+ contentsModerated);
+ createSetStatusAction(AccessRolDTO.Editor, i18n.t("Editing in progress"), ContentStatus.editingInProgress,
+ contentsModerated);
+ createSetStatusAction(AccessRolDTO.Administrator, i18n.t("Rejected"), ContentStatus.rejected, contentsModerated);
+ createSetStatusAction(AccessRolDTO.Editor, i18n.t("Submitted for publish"),
+ ContentStatus.submittedForEvaluation, contentsModerated);
+ createSetStatusAction(AccessRolDTO.Administrator, i18n.t("In the rubbish bin"), ContentStatus.inTheDustbin,
+ contentsModerated);
+ }
+
+ protected void createContentRenameAction(final String parentMenuTitle, final String textDescription,
+ final String... registerInTypes) {
+ final ActionToolbarMenuAndItemDescriptor<StateToken> renameCtn = new ActionToolbarMenuAndItemDescriptor<StateToken>(
+ AccessRolDTO.Editor, CONTENT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken stateToken) {
+ contextNavigator.editItem(stateToken);
+ }
+ });
+ renameCtn.setTextDescription(textDescription);
+ renameCtn.setParentMenuTitle(parentMenuTitle);
+ renameCtn.setEnableCondition(notDeleted());
+ // renameCtn.setShortcut(new ShortcutDescriptor(false, Keyboard.KEY_F2,
+ // i18n.tWithNT("F2", "The F2 Function key")));
+ contentActionRegistry.addAction(renameCtn, registerInTypes);
+ }
+
+ protected void createDelContainerAction(final String text, final String parentMenuTitle,
+ final String... registerInTypes) {
+ final ActionToolbarMenuAndItemDescriptor<StateToken> delContainer = new ActionToolbarMenuAndItemDescriptor<StateToken>(
+ AccessRolDTO.Administrator, CONTENT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken token) {
+ NotifyUser.info("Sorry, in development");
+ }
+ });
+ delContainer.setParentMenuTitle(parentMenuTitle);
+ delContainer.setTextDescription(i18n.t(text));
+ delContainer.setMustBeConfirmed(true);
+ delContainer.setConfirmationTitle(i18n.t("Please confirm"));
+ delContainer.setConfirmationText(i18n.t("You will delete it with all its contents. Are you sure?"));
+ contextActionRegistry.addAction(delContainer, registerInTypes);
+ }
+
+ protected void createDelContentAction(final String parentMenuTitle, final String textDescription,
+ final String... registerInTypes) {
+ final ActionToolbarMenuAndItemDescriptor<StateToken> delContent = new ActionToolbarMenuAndItemDescriptor<StateToken>(
+ AccessRolDTO.Administrator, CONTENT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken token) {
+ contentServiceProvider.get().delContent(session.getUserHash(), token,
+ new AsyncCallbackSimple<StateContentDTO>() {
+ @Override
+ public void onSuccess(final StateContentDTO state) {
+ session.setCurrentState(state);
+ final StateToken parent = token.copy().clearDocument();
+ stateManager.gotoToken(parent);
+ contextNavigator.clear();
+ contextNavigator.refreshState();
+ }
+ });
+ }
+ });
+ delContent.setParentMenuTitle(parentMenuTitle);
+ delContent.setTextDescription(textDescription);
+ delContent.setMustBeConfirmed(true);
+ delContent.setConfirmationTitle(i18n.t("Please confirm"));
+ delContent.setConfirmationText(i18n.t("Are you sure?"));
+ delContent.setEnableCondition(notDefAndNotDeleted());
+ contentActionRegistry.addAction(delContent, registerInTypes);
+ }
+
+ protected void createDownloadActions(final String typeUploadedfile) {
+ final ActionToolbarButtonDescriptor<StateToken> download = new ActionToolbarButtonDescriptor<StateToken>(
+ AccessRolDTO.Viewer, CONTENT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken token) {
+ downloadContent(token);
+ }
+ });
+ download.setMustBeAuthenticated(false);
+ download.setTextDescription(i18n.t("Download"));
+ download.setToolTip(i18n.t("Download this file"));
+ download.setIconUrl("images/nav/download.png");
+
+ final ActionMenuItemDescriptor<StateToken> downloadCtx = new ActionMenuItemDescriptor<StateToken>(
+ AccessRolDTO.Viewer, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken token) {
+ downloadContent(token);
+ }
+ });
+ downloadCtx.setMustBeAuthenticated(false);
+ downloadCtx.setTextDescription(i18n.t("Download"));
+ downloadCtx.setIconUrl("images/nav/download.png");
+
+ contentActionRegistry.addAction(download, typeUploadedfile);
+ contextActionRegistry.addAction(downloadCtx, typeUploadedfile);
+ }
+
+ protected ActionToolbarButtonDescriptor<StateToken> createEditAction(final String fileMenuTitle,
+ final String... registerInTypes) {
+ final ActionToolbarButtonDescriptor<StateToken> editContent = new ActionToolbarButtonDescriptor<StateToken>(
+ AccessRolDTO.Editor, CONTENT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken stateToken) {
+ NotifyUser.showProgressProcessing();
+ session.check(new AsyncCallbackSimple<Void>() {
+ @Override
+ public void onSuccess(final Void result) {
+ final ContentEditor editor = textEditorProvider.get();
+ foldableContent.detach();
+ contextNavigator.detach();
+ contextPropEditorProvider.get().attach();
+ editor.edit(session.getContentState().getContent(), new Listener<String>() {
+ @Override
+ public void onEvent(final String html) {
+ NotifyUser.showProgressSaving();
+ contentServiceProvider.get().save(session.getUserHash(), stateToken, html,
+ new AsyncCallback<Void>() {
+ @Override
+ public void onFailure(final Throwable caught) {
+ NotifyUser.hideProgress();
+ if (caught instanceof SessionExpiredException) {
+ errorHandler.doSessionExpired();
+ } else {
+ NotifyUser.error(i18n.t("Error saving document. Retrying..."));
+ errorHandler.process(caught);
+ editor.onSaveFailed();
+ }
+ }
+
+ @Override
+ public void onSuccess(final Void param) {
+ NotifyUser.hideProgress();
+ session.getContentState().setContent(html);
+ editor.onSavedSuccessful();
+ }
+ });
+ }
+ }, new Listener0() {
+ @Override
+ public void onEvent() {
+ // onClose
+ deferredCommandWrapper.addCommand(new ScheduledCommand() {
+ @Override
+ public void execute() {
+ foldableContent.attach();
+ contextPropEditorProvider.get().detach();
+ contextNavigator.attach();
+ if (session.inSameToken(stateToken)) {
+ contextNavigator.refreshState();
+ foldableContent.refreshState();
+ }
+ }
+ });
+ }
+ });
+ editor.setFileMenuTitle(fileMenuTitle);
+ NotifyUser.hideProgress();
+ }
+ });
+ }
+ });
+ editContent.setTextDescription(i18n.tWithNT("Edit", "used in button"));
+ editContent.setIconUrl("images/content_edit.png");
+ editContent.setLeftSeparator(ActionToolbarButtonSeparator.spacer);
+ editContent.setEnableCondition(notDeleted());
+ contentActionRegistry.addAction(editContent, registerInTypes);
+ return editContent;
+ }
+
+ protected ActionMenuItemDescriptor<StateToken> createGoAction(final String... registerInTypes) {
+ final ActionMenuItemDescriptor<StateToken> go = new ActionMenuItemDescriptor<StateToken>(AccessRolDTO.Viewer,
+ new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken token) {
+ stateManager.gotoToken(token);
+ }
+ });
+ go.setMustBeAuthenticated(false);
+ go.setTextDescription(i18n.t("Open"));
+ go.setIconUrl("images/nav/go.png");
+ contextActionRegistry.addAction(go, registerInTypes);
+ return go;
+ }
+
+ protected ActionToolbarButtonDescriptor<StateToken> createGoHomeAction(final String... registerInTypes) {
+ final ActionToolbarButtonDescriptor<StateToken> goGroupHome = new ActionToolbarButtonDescriptor<StateToken>(
+ AccessRolDTO.Viewer, CONTEXT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken token) {
+ stateManager.gotoToken(token.getGroup());
+ }
+ });
+ goGroupHome.setMustBeAuthenticated(false);
+ goGroupHome.setIconUrl("images/group-home.png");
+ goGroupHome.setEnableCondition(new ActionEnableCondition<StateToken>() {
+ @Override
+ public boolean mustBeEnabled(final StateToken token) {
+ final StateToken defContentToken = session.getCurrentState().getGroup().getDefaultContent().getStateToken();
+ return !session.getCurrentStateToken().equals(defContentToken);
+ }
+ });
+ goGroupHome.setLeftSeparator(ActionToolbarButtonSeparator.fill);
+ contextActionRegistry.addAction(goGroupHome, registerInTypes);
+ return goGroupHome;
+ }
+
+ protected void createNewContainerAction(final String contentTypeId, final String iconUrl,
+ final String textDescription, final String parentMenuTitle, final String parentMenuSubtitle,
+ final String defaultName, final Position position, final String... registerInTypes) {
+ final ActionToolbarMenuAndItemDescriptor<StateToken> addFolder;
+ addFolder = new ActionToolbarMenuAndItemDescriptor<StateToken>(AccessRolDTO.Editor, CONTEXT_TOPBAR,
+ new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken stateToken) {
+ NotifyUser.showProgressProcessing();
+ contentServiceProvider.get().addFolder(session.getUserHash(), stateToken, defaultName,
+ contentTypeId, new AsyncCallbackSimple<StateContainerDTO>() {
+ @Override
+ public void onSuccess(final StateContainerDTO state) {
+ contextNavigator.setEditOnNextStateChange(true);
+ stateManager.setRetrievedState(state);
+ }
+ });
+ }
+ });
+ addFolder.setTextDescription(textDescription);
+ addFolder.setParentMenuTitle(parentMenuTitle);
+ addFolder.setParentSubMenuTitle(parentMenuSubtitle);
+ addFolder.setIconUrl(iconUrl);
+ register(addFolder, position, registerInTypes);
+ }
+
+ protected ActionToolbarMenuAndItemDescriptor<StateToken> createNewContentAction(final String typeId,
+ final String iconUrl, final String description, final String parentMenuTitle, final Position position,
+ final String... registerInTypes) {
+ final ActionToolbarMenuAndItemDescriptor<StateToken> addContent = new ActionToolbarMenuAndItemDescriptor<StateToken>(
+ AccessRolDTO.Editor, CONTEXT_TOPBAR, new Listener0() {
+ @Override
+ public void onEvent() {
+ NotifyUser.showProgressProcessing();
+ contentServiceProvider.get().addContent(session.getUserHash(),
+ session.getCurrentState().getStateToken(), description, typeId,
+ new AsyncCallbackSimple<StateContentDTO>() {
+ @Override
+ public void onSuccess(final StateContentDTO state) {
+ contextNavigator.setEditOnNextStateChange(true);
+ stateManager.setRetrievedState(state);
+ }
+ });
+ }
+ });
+ addContent.setTextDescription(description);
+ addContent.setParentMenuTitle(parentMenuTitle);
+ addContent.setParentSubMenuTitle(i18n.t("New"));
+ addContent.setIconUrl(iconUrl);
+ register(addContent, position, registerInTypes);
+ return addContent;
+ }
+
+ protected abstract void createPostSessionInitActions();
+
+ protected ActionToolbarMenuDescriptor<StateToken> createRefreshCntAction(final String parentMenuTitle,
+ final String... registerInTypes) {
+ final ActionToolbarMenuDescriptor<StateToken> refreshCnt = new ActionToolbarMenuDescriptor<StateToken>(
+ AccessRolDTO.Editor, CONTENT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken stateToken) {
+ stateManager.reload();
+ contextNavigator.selectItem(stateToken);
+ }
+ });
+ refreshCnt.setMustBeAuthenticated(false);
+ refreshCnt.setParentMenuTitle(parentMenuTitle);
+ refreshCnt.setTextDescription(i18n.t("Refresh"));
+ refreshCnt.setIconUrl("images/nav/refresh.png");
+ contentActionRegistry.addAction(refreshCnt, registerInTypes);
+ return refreshCnt;
+ }
+
+ protected ActionToolbarMenuDescriptor<StateToken> createRefreshCxtAction(final String parentMenuTitleCtx,
+ final String... registerInTypes) {
+ final ActionToolbarMenuDescriptor<StateToken> refreshCtx = new ActionToolbarMenuDescriptor<StateToken>(
+ AccessRolDTO.Editor, CONTEXT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken stateToken) {
+ stateManager.reload();
+ contextNavigator.selectItem(stateToken);
+ }
+ });
+ refreshCtx.setMustBeAuthenticated(false);
+ refreshCtx.setParentMenuTitle(parentMenuTitleCtx);
+ refreshCtx.setTextDescription(i18n.t("Refresh"));
+ refreshCtx.setIconUrl("images/nav/refresh.png");
+ contextActionRegistry.addAction(refreshCtx, registerInTypes);
+ return refreshCtx;
+ }
+
+ protected ActionToolbarMenuAndItemDescriptor<StateToken> createRenameContentInCtxAction(
+ final String parentMenuTitleCtx, final String textDescription, final String... registerInTypes) {
+ final ActionToolbarMenuAndItemDescriptor<StateToken> renameCtx = new ActionToolbarMenuAndItemDescriptor<StateToken>(
+ AccessRolDTO.Editor, CONTEXT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken stateToken) {
+ contextNavigator.editItem(stateToken);
+ }
+ });
+ renameCtx.setTextDescription(textDescription);
+ renameCtx.setParentMenuTitle(parentMenuTitleCtx);
+ contextActionRegistry.addAction(renameCtx, registerInTypes);
+ return renameCtx;
+ }
+
+ protected ActionToolbarMenuDescriptor<StateToken> createSetAsDefContent(final String parentMenuTitle,
+ final String... registerInTypes) {
+ final ActionToolbarMenuDescriptor<StateToken> setAsDefGroupContent;
+ setAsDefGroupContent = new ActionToolbarMenuDescriptor<StateToken>(AccessRolDTO.Administrator, CONTENT_TOPBAR,
+ new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken token) {
+ NotifyUser.showProgressProcessing();
+ contentServiceProvider.get().setAsDefaultContent(session.getUserHash(), token,
+ new AsyncCallbackSimple<ContentSimpleDTO>() {
+ @Override
+ public void onSuccess(final ContentSimpleDTO defContent) {
+ session.getCurrentState().getGroup().setDefaultContent(defContent);
+ NotifyUser.hideProgress();
+ NotifyUser.info(i18n.t("Content selected as the group homepage"));
+ }
+ });
+ }
+ });
+ setAsDefGroupContent.setTextDescription(i18n.t("Set this as the default group page"));
+ setAsDefGroupContent.setIconUrl("images/group-home.png");
+ setAsDefGroupContent.setEnableCondition(notDefAndNotDeleted());
+ setAsDefGroupContent.setParentMenuTitle(parentMenuTitle);
+ contentActionRegistry.addAction(setAsDefGroupContent, registerInTypes);
+ return setAsDefGroupContent;
+ }
+
+ protected void createSetGroupBackImageAction(final String parentMenuTitle, final String... registerInTypes) {
+ final ActionToolbarMenuAndItemDescriptor<StateToken> setGroupBackImage = new ActionToolbarMenuAndItemDescriptor<StateToken>(
+ AccessRolDTO.Administrator, CONTENT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken token) {
+ groupServiceProvider.get().setGroupBackImage(session.getUserHash(), token,
+ new AsyncCallbackSimple<GroupDTO>() {
+ @Override
+ public void onSuccess(final GroupDTO newGroup) {
+ if (session.getCurrentState().getGroup().getShortName().equals(
+ newGroup.getShortName())) {
+ session.getCurrentState().setGroup(newGroup);
+ wsBackManager.clearBackImage();
+ wsBackManager.setBackImage(newGroup.getGroupBackImage().getStateToken());
+ }
+ }
+ });
+ }
+ });
+ setGroupBackImage.setParentMenuTitle(parentMenuTitle);
+ setGroupBackImage.setTextDescription(i18n.t("Set this as the group background image"));
+ setGroupBackImage.setIconUrl("images/nav/picture.png");
+ setGroupBackImage.setEnableCondition(new ActionEnableCondition<StateToken>() {
+ @Override
+ public boolean mustBeEnabled(final StateToken token) {
+ return session.getContentState().getMimeType().isImage();
+ }
+ });
+ contentActionRegistry.addAction(setGroupBackImage, registerInTypes);
+ }
+
+ protected void createSetStatusAction(final AccessRolDTO rol, final String textDescription,
+ final ContentStatus status, final String[] contentsModerated) {
+ final ActionToolbarMenuRadioDescriptor<StateToken> action = new ActionToolbarMenuRadioDescriptor<StateToken>(
+ rol, CONTENT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken stateToken) {
+ setContentStatus(status, stateToken);
+ }
+ }, "ContentRadioStatus", new RadioMustBeChecked() {
+ @Override
+ public boolean mustBeChecked() {
+ if (session.getContainerState() instanceof StateContentDTO) {
+ final ContentStatus currentStatus = session.getContentState().getStatus();
+ return status.equals(currentStatus);
+ }
+ return false;
+ }
+ });
+ action.setTextDescription(textDescription);
+ action.setParentMenuTitle(PUBLICATION_MENU);
+ action.setParentMenuIconUrl("images/anybody.png");
+ contentActionRegistry.addAction(action, contentsModerated);
+ }
+
+ protected void createShowDeletedItems(final String parentMenuTitle, final String... registerInTypes) {
+ final ActionToolbarMenuCheckItemDescriptor<StateToken> showDeletedItems = new ActionToolbarMenuCheckItemDescriptor<StateToken>(
+ AccessRolDTO.Editor, CONTEXT_TOPBAR, new Listener0() {
+ @Override
+ public void onEvent() {
+ final boolean mustShow = !session.getCurrentUserInfo().getShowDeletedContent();
+ session.getCurrentUserInfo().setShowDeletedContent(mustShow);
+ if (!mustShow && session.isCurrentStateAContent()
+ && session.getContentState().getStatus().equals(ContentStatus.inTheDustbin)) {
+ stateManager.gotoToken(session.getCurrentStateToken().getGroup());
+ }
+ contextNavigator.clear();
+ contextNavigator.refreshState();
+ }
+ }, new ActionCheckedCondition() {
+ @Override
+ public boolean mustBeChecked() {
+ return session.getShowDeletedContent();
+ }
+ });
+ showDeletedItems.setParentMenuTitle(parentMenuTitle);
+ showDeletedItems.setTextDescription("Show deleted items");
+ showDeletedItems.setMustBeAuthenticated(true);
+ contextActionRegistry.addAction(showDeletedItems, registerInTypes);
+ }
+
+ protected ActionToolbarMenuDescriptor<StateToken> createTranslateAction(final String fileMenuTitle,
+ final String... registerInTypes) {
+ final ActionToolbarMenuDescriptor<StateToken> translateContent = new ActionToolbarMenuDescriptor<StateToken>(
+ AccessRolDTO.Editor, CONTENT_TOPBAR, new Listener<StateToken>() {
+ @Override
+ public void onEvent(final StateToken stateToken) {
+ NotifyUser.important(i18n.t("Sorry, this functionality is currently in development"));
+ }
+ });
+ translateContent.setParentMenuTitle(fileMenuTitle);
+ translateContent.setTextDescription(i18n.tWithNT("Translate", "used in button"));
+ translateContent.setToolTip(i18n.t("Translate this document to other languages"));
+ translateContent.setIconUrl("images/language.gif");
+ translateContent.setEnableCondition(notDeleted());
+ contentActionRegistry.addAction(translateContent, registerInTypes);
+ return translateContent;
+ }
+
+ protected ActionToolbarButtonAndItemDescriptor<StateToken> createUploadAction(final String textDescription,
+ final String iconUrl, final String toolTip, final String permitedExtensions,
+ final String... registerInTypes) {
+ final ActionToolbarButtonAndItemDescriptor<StateToken> uploadFile;
+ uploadFile = new ActionToolbarButtonAndItemDescriptor<StateToken>(AccessRolDTO.Editor, CONTEXT_BOTTOMBAR,
+ new Listener0() {
+ @Override
+ public void onEvent() {
+ if (permitedExtensions != null) {
+ // FIXME: can't be reset ...
+ // fileUploaderProvider.get().setPermittedExtensions(permitedExtensions);
+ } else {
+ // FIXME: can't be reset ...
+ // fileUploaderProvider.get().resetPermittedExtensions();
+ }
+ fileUploaderProvider.get().show();
+ }
+ });
+ uploadFile.setTextDescription(textDescription);
+ uploadFile.setIconUrl(iconUrl);
+ uploadFile.setToolTip(toolTip);
+ contextActionRegistry.addAction(uploadFile, registerInTypes);
+ return uploadFile;
+ }
+
+ protected ActionToolbarButtonAndItemDescriptor<StateToken> createUploadMediaAction(final String... registerInTypes) {
+ final ActionToolbarButtonAndItemDescriptor<StateToken> uploadMedia = createUploadAction(i18n.t("Upload media"),
+ "images/nav/upload.png", i18n.t("Upload some media (images, videos...)"),
+ session.getGalleryPermittedExtensions());
+ contextActionRegistry.addAction(uploadMedia, registerInTypes);
+ return uploadMedia;
+ }
+
+ protected void downloadContent(final StateToken token) {
+ fileDownloadProvider.get().downloadFile(token);
+ }
+
+ private ActionEnableCondition<StateToken> notDefAndNotDeleted() {
+ return new ActionEnableCondition<StateToken>() {
+ @Override
+ public boolean mustBeEnabled(final StateToken token) {
+ final boolean isNotDefContentToken = !session.getCurrentState().getGroup().getDefaultContent().getStateToken().equals(
+ session.getCurrentStateToken());
+ return isNotDefContentToken && notDeleted().mustBeEnabled(token);
+ }
+ };
+ }
+
+ private ActionEnableCondition<StateToken> notDeleted() {
+ return new ActionEnableCondition<StateToken>() {
+ @Override
+ public boolean mustBeEnabled(final StateToken token) {
+ final boolean isNotDeleted = !(session.isCurrentStateAContent() && session.getContentState().getStatus().equals(
+ ContentStatus.inTheDustbin));
+ return isNotDeleted;
+ }
+ };
+ }
+
+ private void register(final ActionToolbarMenuAndItemDescriptor<StateToken> action, final Position position,
+ final String... registerInTypes) {
+ if (position.equals(Position.ctx)) {
+ contextActionRegistry.addAction(action, registerInTypes);
+ } else if (position.equals(Position.cnt)) {
+ contentActionRegistry.addAction(action, registerInTypes);
+ }
+ }
+
+ private void setContentStatus(final ContentStatus status, final StateToken stateToken) {
+ final AsyncCallbackSimple<StateAbstractDTO> callback = new AsyncCallbackSimple<StateAbstractDTO>() {
+ @Override
+ public void onSuccess(final StateAbstractDTO state) {
+ if (session.inSameToken(stateToken)) {
+ session.setCurrentState(state);
+ publicLink.setState(state);
+ foldableContent.refreshState();
+ }
+ contextNavigator.setItemStatus(stateToken, status);
+ }
+ };
+ if (status.equals(ContentStatus.publishedOnline) || status.equals(ContentStatus.rejected)
+ || status.equals(ContentStatus.inTheDustbin)) {
+ contentServiceProvider.get().setStatusAsAdmin(session.getUserHash(), stateToken, status, callback);
+ } else {
+ contentServiceProvider.get().setStatus(session.getUserHash(), stateToken, status, callback);
+ }
+ }
+
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,1114 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client;
-
-import org.ourproject.kune.chat.client.ChatEngine;
-import org.ourproject.kune.platf.client.actions.ActionManager;
-import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
-import org.ourproject.kune.platf.client.actions.ui.GuiBindingsRegister;
-import org.ourproject.kune.platf.client.actions.ui.SimpleGuiItem;
-import org.ourproject.kune.platf.client.app.ApplicationComponentGroup;
-import org.ourproject.kune.platf.client.app.GroupOptionsCollection;
-import org.ourproject.kune.platf.client.app.UserOptionsCollection;
-import org.ourproject.kune.platf.client.registry.AuthorableRegistry;
-import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
-import org.ourproject.kune.platf.client.registry.RenamableRegistry;
-import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
-import org.ourproject.kune.platf.client.services.Images;
-import org.ourproject.kune.platf.client.shortcuts.GlobalShortcutRegister;
-import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
-import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalette;
-import org.ourproject.kune.platf.client.ui.rte.edithtml.EditHtmlDialog;
-import org.ourproject.kune.platf.client.ui.rte.img.RTEImgResources;
-import org.ourproject.kune.platf.client.ui.rte.insertimg.InsertImageDialog;
-import org.ourproject.kune.platf.client.ui.rte.insertimg.InsertImageGroup;
-import org.ourproject.kune.platf.client.ui.rte.insertlink.InsertLinkDialog;
-import org.ourproject.kune.platf.client.ui.rte.insertlink.InsertLinkGroup;
-import org.ourproject.kune.platf.client.ui.rte.insertmedia.InsertMediaDialog;
-import org.ourproject.kune.platf.client.ui.rte.insertmedia.InsertMediaGroup;
-import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
-import org.ourproject.kune.platf.client.ui.rte.insertspecialchar.InsertSpecialCharDialog;
-import org.ourproject.kune.platf.client.ui.rte.inserttable.InsertTableDialog;
-import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
-import org.ourproject.kune.workspace.client.cnt.ActionContentToolbarPresenter;
-import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigatorPanel;
-import org.ourproject.kune.workspace.client.ctxnav.ContextNavigatorPresenter;
-import org.ourproject.kune.workspace.client.cxt.ActionContextBottomToolbar;
-import org.ourproject.kune.workspace.client.cxt.ActionContextTopToolbar;
-import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditorPanel;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditorPresenter;
-import org.ourproject.kune.workspace.client.cxt.ContextPropEditorView;
-import org.ourproject.kune.workspace.client.editor.ContentEditor;
-import org.ourproject.kune.workspace.client.editor.ContentEditorPanel;
-import org.ourproject.kune.workspace.client.editor.ContentEditorPresenter;
-import org.ourproject.kune.workspace.client.editor.insertlocalimg.InsertImageLocal;
-import org.ourproject.kune.workspace.client.editor.insertlocalimg.InsertImageLocalPanel;
-import org.ourproject.kune.workspace.client.editor.insertlocalimg.InsertImageLocalPresenter;
-import org.ourproject.kune.workspace.client.editor.insertlocallink.InsertLinkLocal;
-import org.ourproject.kune.workspace.client.editor.insertlocallink.InsertLinkLocalPanel;
-import org.ourproject.kune.workspace.client.editor.insertlocallink.InsertLinkLocalPresenter;
-import org.ourproject.kune.workspace.client.editor.insertlocalmedia.InsertMediaLocal;
-import org.ourproject.kune.workspace.client.editor.insertlocalmedia.InsertMediaLocalPanel;
-import org.ourproject.kune.workspace.client.editor.insertlocalmedia.InsertMediaLocalPresenter;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeaderPanel;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeaderPresenter;
-import org.ourproject.kune.workspace.client.i18n.I18nTranslator;
-import org.ourproject.kune.workspace.client.i18n.I18nTranslatorPanel;
-import org.ourproject.kune.workspace.client.i18n.I18nTranslatorPresenter;
-import org.ourproject.kune.workspace.client.i18n.I18nTranslatorView;
-import org.ourproject.kune.workspace.client.i18n.LanguageSelector;
-import org.ourproject.kune.workspace.client.i18n.LanguageSelectorPanel;
-import org.ourproject.kune.workspace.client.i18n.LanguageSelectorPresenter;
-import org.ourproject.kune.workspace.client.i18n.LanguageSelectorView;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseChangeAction;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseWizard;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseWizardPanel;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseWizardPresenter;
-import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardFirstForm;
-import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardFirstFormView;
-import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardFrdForm;
-import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardFrdFormView;
-import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardSndForm;
-import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardSndFormView;
-import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardTrdForm;
-import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardTrdFormView;
-import org.ourproject.kune.workspace.client.nohomepage.NoHomePage;
-import org.ourproject.kune.workspace.client.nohomepage.NoHomePagePanel;
-import org.ourproject.kune.workspace.client.nohomepage.NoHomePagePresenter;
-import org.ourproject.kune.workspace.client.oldsn.other.AddAsBuddieHeaderButton;
-import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionBuddiesSummaryToolbar;
-import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionBuddiesSummaryToolbarPresenter;
-import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionGroupSummaryToolbar;
-import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionGroupSummaryToolbarPresenter;
-import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionParticipationSummaryToolbarPresenter;
-import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionParticipationToolbar;
-import org.ourproject.kune.workspace.client.options.GroupOptions;
-import org.ourproject.kune.workspace.client.options.GroupOptionsPanel;
-import org.ourproject.kune.workspace.client.options.GroupOptionsPresenter;
-import org.ourproject.kune.workspace.client.options.UserOptions;
-import org.ourproject.kune.workspace.client.options.license.EntityOptionsDefLicensePanel;
-import org.ourproject.kune.workspace.client.options.license.GroupOptionsDefLicense;
-import org.ourproject.kune.workspace.client.options.license.GroupOptionsDefLicensePresenter;
-import org.ourproject.kune.workspace.client.options.license.UserOptionsDefLicense;
-import org.ourproject.kune.workspace.client.options.license.UserOptionsDefLicensePresenter;
-import org.ourproject.kune.workspace.client.options.logo.EntityOptionsLogoPresenter;
-import org.ourproject.kune.workspace.client.options.logo.GroupOptionsLogo;
-import org.ourproject.kune.workspace.client.options.logo.GroupOptionsLogoPanel;
-import org.ourproject.kune.workspace.client.options.logo.GroupOptionsLogoPresenter;
-import org.ourproject.kune.workspace.client.options.logo.UserOptionsLogo;
-import org.ourproject.kune.workspace.client.options.logo.UserOptionsLogoPanel;
-import org.ourproject.kune.workspace.client.options.logo.UserOptionsLogoPresenter;
-import org.ourproject.kune.workspace.client.options.pscape.EntityOptionsPublicSpaceConfPanel;
-import org.ourproject.kune.workspace.client.options.pscape.GroupOptionsPublicSpaceConf;
-import org.ourproject.kune.workspace.client.options.pscape.GroupOptionsPublicSpaceConfPresenter;
-import org.ourproject.kune.workspace.client.options.pscape.UserOptionsPublicSpaceConf;
-import org.ourproject.kune.workspace.client.options.pscape.UserOptionsPublicSpaceConfPresenter;
-import org.ourproject.kune.workspace.client.options.tools.EntityOptionsToolsConf;
-import org.ourproject.kune.workspace.client.options.tools.EntityOptionsToolsConfPanel;
-import org.ourproject.kune.workspace.client.options.tools.GroupOptionsToolsConfPresenter;
-import org.ourproject.kune.workspace.client.options.tools.UserOptionsToolsConf;
-import org.ourproject.kune.workspace.client.options.tools.UserOptionsToolsConfPresenter;
-import org.ourproject.kune.workspace.client.rate.RateIt;
-import org.ourproject.kune.workspace.client.rate.RateItPanel;
-import org.ourproject.kune.workspace.client.rate.RateItPresenter;
-import org.ourproject.kune.workspace.client.rate.RatePanel;
-import org.ourproject.kune.workspace.client.rate.RatePresenter;
-import org.ourproject.kune.workspace.client.search.EntityLiveSearcherView;
-import org.ourproject.kune.workspace.client.search.GroupLiveSearchPanel;
-import org.ourproject.kune.workspace.client.search.GroupLiveSearcher;
-import org.ourproject.kune.workspace.client.search.GroupLiveSearcherPresenter;
-import org.ourproject.kune.workspace.client.search.SiteSearcher;
-import org.ourproject.kune.workspace.client.search.SiteSearcherPanel;
-import org.ourproject.kune.workspace.client.search.SiteSearcherPresenter;
-import org.ourproject.kune.workspace.client.search.SiteSearcherView;
-import org.ourproject.kune.workspace.client.search.UserLiveSearcher;
-import org.ourproject.kune.workspace.client.search.UserLiveSearcherPanel;
-import org.ourproject.kune.workspace.client.search.UserLiveSearcherPresenter;
-import org.ourproject.kune.workspace.client.site.WorkspaceNotifyUser;
-import org.ourproject.kune.workspace.client.site.msg.ToastMessage;
-import org.ourproject.kune.workspace.client.site.msg.ToastMessagePanel;
-import org.ourproject.kune.workspace.client.site.msg.ToastMessagePresenter;
-import org.ourproject.kune.workspace.client.sitebar.sitelogo.SiteLogo;
-import org.ourproject.kune.workspace.client.sitebar.siteprogress.SiteProgress;
-import org.ourproject.kune.workspace.client.sitebar.siteprogress.SiteProgressPanel;
-import org.ourproject.kune.workspace.client.sitebar.siteprogress.SiteProgressPresenter;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLinkPanel;
-import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLinkPresenter;
-import org.ourproject.kune.workspace.client.sitebar.sitesearch.SiteSearch;
-import org.ourproject.kune.workspace.client.sitebar.sitesearch.SiteSearchPanel;
-import org.ourproject.kune.workspace.client.sitebar.sitesearch.SiteSearchPresenter;
-import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignInLink;
-import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignInLinkPanel;
-import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignInLinkPresenter;
-import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignOutLink;
-import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignOutLinkPanel;
-import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignOutLinkPresenter;
-import org.ourproject.kune.workspace.client.skel.ActionCntCtxToolbarPanel;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.tags.TagsSummary;
-import org.ourproject.kune.workspace.client.tags.TagsSummaryPanel;
-import org.ourproject.kune.workspace.client.tags.TagsSummaryPresenter;
-import org.ourproject.kune.workspace.client.themes.WsBackManager;
-import org.ourproject.kune.workspace.client.themes.WsBackManagerImpl;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-import org.ourproject.kune.workspace.client.themes.WsThemeManagerPanel;
-import org.ourproject.kune.workspace.client.themes.WsThemeSelector;
-import org.ourproject.kune.workspace.client.themes.WsThemeSelectorPresenter;
-import org.ourproject.kune.workspace.client.title.EntitySubTitle;
-import org.ourproject.kune.workspace.client.title.EntitySubTitlePanel;
-import org.ourproject.kune.workspace.client.title.EntitySubTitlePresenter;
-import org.ourproject.kune.workspace.client.title.EntityTitle;
-import org.ourproject.kune.workspace.client.title.EntityTitlePanel;
-import org.ourproject.kune.workspace.client.title.EntityTitlePresenter;
-import org.ourproject.kune.workspace.client.title.RenameAction;
-import org.ourproject.kune.workspace.client.tool.ToolSelector;
-import org.ourproject.kune.workspace.client.tool.ToolSelectorPresenter;
-import org.ourproject.kune.workspace.client.upload.FileUploader;
-import org.ourproject.kune.workspace.client.upload.FileUploaderDialog;
-import org.ourproject.kune.workspace.client.upload.FileUploaderPresenter;
-
-import cc.kune.common.client.noti.NotifyLevelImages;
-import cc.kune.common.client.utils.SchedulerManager;
-import cc.kune.common.client.utils.TimerWrapper;
-import cc.kune.core.client.auth.Register;
-import cc.kune.core.client.auth.SignIn;
-import cc.kune.core.client.errors.ErrorHandler;
-import cc.kune.core.client.groups.newgroup.NewGroup;
-import cc.kune.core.client.i18n.I18nUITranslationService;
-import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.rpcservices.ContentService;
-import cc.kune.core.client.rpcservices.ContentServiceAsync;
-import cc.kune.core.client.rpcservices.GroupService;
-import cc.kune.core.client.rpcservices.GroupServiceAsync;
-import cc.kune.core.client.rpcservices.I18nServiceAsync;
-import cc.kune.core.client.rpcservices.SocialNetworkService;
-import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
-import cc.kune.core.client.rpcservices.UserServiceAsync;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.client.state.HistoryTokenCallback;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.SiteCommonTokens;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.domain.utils.StateToken;
-import cc.kune.core.shared.dto.StateTokenUtils;
-import cc.kune.core.shared.dto.UserSimpleDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.ioc.decorator.NoDecoration;
-import com.calclab.suco.client.ioc.decorator.Singleton;
-import com.calclab.suco.client.ioc.module.Factory;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-
-public class WorkspaceModule extends AbstractExtendedModule {
- @Override
- protected void onInstall() {
-
- register(Singleton.class, new Factory<SocialNetworkServiceAsync>(SocialNetworkServiceAsync.class) {
- @Override
- public SocialNetworkServiceAsync create() {
- final SocialNetworkServiceAsync snServiceAsync = (SocialNetworkServiceAsync) GWT.create(SocialNetworkService.class);
- ((ServiceDefTarget) snServiceAsync).setServiceEntryPoint(GWT.getModuleBaseURL()
- + "SocialNetworkService");
- return snServiceAsync;
- }
- }, new Factory<GroupServiceAsync>(GroupServiceAsync.class) {
- @Override
- public GroupServiceAsync create() {
- final GroupServiceAsync groupServiceAsync = (GroupServiceAsync) GWT.create(GroupService.class);
- ((ServiceDefTarget) groupServiceAsync).setServiceEntryPoint(GWT.getModuleBaseURL() + "GroupService");
- return groupServiceAsync;
- }
- }, new Factory<ContentServiceAsync>(ContentServiceAsync.class) {
- @Override
- public ContentServiceAsync create() {
- final ContentServiceAsync contentServiceAsync = (ContentServiceAsync) GWT.create(ContentService.class);
- ((ServiceDefTarget) contentServiceAsync).setServiceEntryPoint(GWT.getModuleBaseURL() + "ContentService");
- return contentServiceAsync;
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<WorkspaceSkeleton>(WorkspaceSkeleton.class) {
- @Override
- public WorkspaceSkeleton create() {
- return new WorkspaceSkeleton();
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<SiteProgress>(SiteProgress.class) {
- @Override
- public SiteProgress create() {
- final SiteProgressPresenter presenter = new SiteProgressPresenter();
- final SiteProgressPanel panel = new SiteProgressPanel(presenter, p(SitePublicSpaceLink.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<WorkspaceNotifyUser>(WorkspaceNotifyUser.class) {
- @Override
- public WorkspaceNotifyUser create() {
- return new WorkspaceNotifyUser(i(NotifyUser.class), i(I18nUITranslationService.class),
- i(SiteProgress.class), p(ToastMessage.class), p(WorkspaceSkeleton.class));
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<SitePublicSpaceLink>(SitePublicSpaceLink.class) {
- @Override
- public SitePublicSpaceLink create() {
- final SitePublicSpaceLinkPresenter presenter = new SitePublicSpaceLinkPresenter(i(StateManager.class),
- i(StateTokenUtils.class));
- final SitePublicSpaceLinkPanel panel = new SitePublicSpaceLinkPanel(presenter,
- i(WorkspaceSkeleton.class), i(I18nUITranslationService.class), i(Images.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<StateTokenUtils>(StateTokenUtils.class) {
- @Override
- public StateTokenUtils create() {
- return new StateTokenUtils(i(Session.class));
- }
- });
-
- register(NoDecoration.class, new Factory<ToastMessage>(ToastMessage.class) {
- @Override
- public ToastMessage create() {
- final ToastMessagePresenter presenter = new ToastMessagePresenter();
- final ToastMessagePanel panel = new ToastMessagePanel();
- presenter.init(panel);
- return presenter;
- }
- });
-
- // register(ApplicationComponentGroup.class, new
- // Factory<SiteUserOptions>(SiteUserOptions.class) {
- // @Override
- // public SiteUserOptions create() {
- // final SiteUserOptionsPresenter presenter = new
- // SiteUserOptionsPresenter(i(Session.class),
- // i(StateManager.class), p(FileDownloadUtils.class),
- // $(I18nTranslationService.class),
- // $(IconResources.class));
- // final SiteUserOptionsPanel panel = new
- // SiteUserOptionsPanel(presenter, i(WorkspaceSkeleton.class),
- // $(GuiBindingsRegister.class));
- // presenter.init(panel);
- // return presenter;
- // }
- // });
-
- register(ApplicationComponentGroup.class, new Factory<SiteSignInLink>(SiteSignInLink.class) {
- @Override
- public SiteSignInLink create() {
- final SiteSignInLinkPresenter presenter = new SiteSignInLinkPresenter(i(Session.class));
- final SiteSignInLinkPanel panel = new SiteSignInLinkPanel(presenter, i(I18nUITranslationService.class),
- i(WorkspaceSkeleton.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<SiteSignOutLink>(SiteSignOutLink.class) {
- @Override
- public SiteSignOutLink create() {
- final SiteSignOutLinkPresenter presenter = new SiteSignOutLinkPresenter(i(Session.class),
- p(UserServiceAsync.class), p(ErrorHandler.class));
- final SiteSignOutLinkPanel panel = new SiteSignOutLinkPanel(presenter,
- i(I18nUITranslationService.class), i(WorkspaceSkeleton.class));
- presenter.init(panel);
- return presenter;
- }
- });
- //
- // register(ApplicationComponentGroup.class, new
- // Factory<SiteOptions>(SiteOptions.class) {
- // @Override
- // public SiteOptions create() {
- // final SiteOptionsPresenter presenter = new
- // SiteOptionsPresenter(i(I18nUITranslationService.class),
- // i(IconResources.class));
- // final SiteOptionsPanel panel = new
- // SiteOptionsPanel(i(WorkspaceSkeleton.class),
- // i(I18nUITranslationService.class), i(GuiBindingsRegister.class));
- // presenter.init(panel);
- // return presenter;
- // }
- // });
-
- register(ApplicationComponentGroup.class, new Factory<SiteSearch>(SiteSearch.class) {
- @Override
- public SiteSearch create() {
- final SiteSearchPresenter presenter = new SiteSearchPresenter(p(SiteSearcher.class),
- i(I18nTranslationService.class));
- final SiteSearchPanel panel = new SiteSearchPanel(presenter, i(WorkspaceSkeleton.class),
- i(Images.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<SiteLogo>(SiteLogo.class) {
- @Override
- public SiteLogo create() {
- // final SiteLogoPresenter presenter = new
- // SiteLogoPresenter(i(Session.class));
- // final SiteLogoPanel panel = new SiteLogoPanel(presenter,
- // i(WorkspaceSkeleton.class));
- // presenter.init(panel);
- return null;
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<EntityHeader>(EntityHeader.class) {
- @Override
- public EntityHeader create() {
- final EntityHeaderPresenter presenter = new EntityHeaderPresenter(i(StateManager.class),
- i(WsThemeManager.class), i(Session.class));
- final EntityHeaderPanel panel = new EntityHeaderPanel(i(WorkspaceSkeleton.class),
- p(FileDownloadUtils.class), i(Images.class), i(GuiBindingsRegister.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<WsBackManager>(WsBackManager.class) {
- @Override
- public WsBackManager create() {
- return new WsBackManagerImpl(i(FileDownloadUtils.class));
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<WsThemeManager>(WsThemeManager.class) {
- @Override
- public WsThemeManager create() {
- final WsThemeManager presenter = new WsThemeManager(i(Session.class), p(GroupServiceAsync.class),
- i(StateManager.class), i(WsBackManager.class));
- new WsThemeManagerPanel(presenter, i(WorkspaceSkeleton.class));
- return presenter;
- }
- });
-
- register(NoDecoration.class, new Factory<WsThemeSelector>(WsThemeSelector.class) {
- @Override
- public WsThemeSelector create() {
- final WsThemeSelectorPresenter presenter = new WsThemeSelectorPresenter(i(Session.class),
- i(I18nTranslationService.class));
- presenter.init(new SimpleGuiItem(i(GuiBindingsRegister.class)));
- return presenter;
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<EntityTitle>(EntityTitle.class) {
- @Override
- public EntityTitle create() {
- final EntityTitlePresenter presenter = new EntityTitlePresenter(i(StateManager.class),
- i(Session.class), i(ContentIconsRegistry.class), i(RenamableRegistry.class),
- i(RenameAction.class));
- final EntityTitlePanel panel = new EntityTitlePanel(i(WorkspaceSkeleton.class), presenter);
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<EntitySubTitle>(EntitySubTitle.class) {
- @Override
- public EntitySubTitle create() {
- final EntitySubTitlePresenter presenter = new EntitySubTitlePresenter(
- i(I18nUITranslationService.class), i(StateManager.class), false, i(AuthorableRegistry.class));
- final EntitySubTitlePanel panel = new EntitySubTitlePanel(presenter, i(WorkspaceSkeleton.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- // register(ApplicationComponentGroup.class, new
- // Factory<EntityLicensePresenter>(EntityLicensePresenter.class) {
- // @Override
- // public EntityLicensePresenter create() {
- // final EntityLicensePresenter presenter = new
- // EntityLicensePresenter(i(StateManager.class));
- // final EntityLicensePanel panel = new EntityLicensePanel(presenter,
- // i(I18nUITranslationService.class),
- // i(WorkspaceSkeleton.class));
- // presenter.init(panel);
- // return presenter;
- // }
- // });
-
- register(ApplicationComponentGroup.class, new Factory<RateIt>(RateIt.class) {
- @Override
- public RateIt create() {
- final RateItPresenter presenter = new RateItPresenter(i(I18nUITranslationService.class),
- i(Session.class), p(ContentServiceAsync.class), i(StateManager.class), p(RatePresenter.class),
- i(ContentCapabilitiesRegistry.class));
- final RateItPanel panel = new RateItPanel(presenter, i(I18nUITranslationService.class),
- i(WorkspaceSkeleton.class), i(Images.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<RatePresenter>(RatePresenter.class) {
- @Override
- public RatePresenter create() {
- final RatePresenter presenter = new RatePresenter(i(StateManager.class),
- i(ContentCapabilitiesRegistry.class));
- final RatePanel panel = new RatePanel(null, null, i(I18nUITranslationService.class),
- i(WorkspaceSkeleton.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<ActionManager>(ActionManager.class) {
- @Override
- public ActionManager create() {
- return new ActionManager();
- }
- });
-
- register(Singleton.class, new Factory<ActionGroupSummaryToolbar>(ActionGroupSummaryToolbar.class) {
- @Override
- public ActionGroupSummaryToolbar create() {
- final ActionToolbarPanel<StateToken> panel = new ActionToolbarPanel<StateToken>(p(ActionManager.class));
- final ActionGroupSummaryToolbarPresenter toolbar = new ActionGroupSummaryToolbarPresenter(panel);
- return toolbar;
- }
- }, new Factory<ActionParticipationToolbar>(ActionParticipationToolbar.class) {
- @Override
- public ActionParticipationToolbar create() {
- final ActionToolbarPanel<StateToken> panel = new ActionToolbarPanel<StateToken>(p(ActionManager.class));
- final ActionParticipationSummaryToolbarPresenter toolbar = new ActionParticipationSummaryToolbarPresenter(
- panel);
- return toolbar;
- }
- }, new Factory<ActionBuddiesSummaryToolbar>(ActionBuddiesSummaryToolbar.class) {
- @Override
- public ActionBuddiesSummaryToolbar create() {
- final ActionToolbarPanel<UserSimpleDTO> panel = new ActionToolbarPanel<UserSimpleDTO>(
- p(ActionManager.class));
- final ActionBuddiesSummaryToolbarPresenter toolbar = new ActionBuddiesSummaryToolbarPresenter(panel);
- return toolbar;
- }
- });
-
- // register(ApplicationComponentGroup.class, new
- // Factory<GroupMembersSummary>(GroupMembersSummary.class) {
- // @Override
- // public GroupMembersSummary create() {
- // final GroupMembersSummaryPresenter presenter = new
- // GroupMembersSummaryPresenter(
- // i(I18nUITranslationService.class), i(StateManager.class),
- // i(ImageUtils.class),
- // i(Session.class), p(SocialNetworkServiceAsync.class),
- // p(GroupServiceAsync.class),
- // p(GroupLiveSearcher.class), p(ChatEngine.class),
- // i(GroupActionRegistry.class),
- // i(ActionGroupSummaryToolbar.class), p(FileDownloadUtils.class),
- // i(AccessRightsClientManager.class), i(IconResources.class));
- // final GroupMembersSummaryView view = new
- // GroupMembersSummaryPanel(presenter,
- // i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
- // ActionGroupSummaryToolbar.class).getView());
- // presenter.init(view);
- // return presenter;
- // }
- // });
-
- register(ApplicationComponentGroup.class, new Factory<AddAsBuddieHeaderButton>(AddAsBuddieHeaderButton.class) {
- @Override
- public AddAsBuddieHeaderButton create() {
- return new AddAsBuddieHeaderButton(p(ChatEngine.class), i(Session.class), i(StateManager.class),
- i(I18nTranslationService.class), i(IconResources.class), i(EntityHeader.class));
- }
- });
-
- // register(ApplicationComponentGroup.class, new
- // Factory<BuddiesSummary>(BuddiesSummary.class) {
- // @Override
- // public BuddiesSummary create() {
- // final BuddiesSummaryPresenter presenter = new
- // BuddiesSummaryPresenter(i(StateManager.class),
- // i(Session.class), p(UserServiceAsync.class),
- // i(UserActionRegistry.class),
- // i(I18nTranslationService.class), p(ChatEngine.class),
- // i(ActionBuddiesSummaryToolbar.class),
- // p(FileDownloadUtils.class), i(ImageUtils.class),
- // p(SocialNetworkServiceAsync.class),
- // i(GroupActionRegistry.class), i(AccessRightsClientManager.class),
- // i(IconResources.class));
- // final BuddiesSummaryPanel panel = new BuddiesSummaryPanel(presenter,
- // i(WorkspaceSkeleton.class),
- // i(I18nTranslationService.class), i(ActionManager.class),
- // i(ActionBuddiesSummaryToolbar.class).getView());
- // presenter.init(panel);
- // return presenter;
- // }
- // });
-
- // register(ApplicationComponentGroup.class, new
- // Factory<ParticipationSummary>(ParticipationSummary.class) {
- // @Override
- // public ParticipationSummary create() {
- // final ParticipationSummaryPresenter presenter = new
- // ParticipationSummaryPresenter(
- // i(I18nUITranslationService.class), i(StateManager.class),
- // i(ImageUtils.class),
- // i(Session.class), p(SocialNetworkServiceAsync.class),
- // i(GroupActionRegistry.class),
- // i(ActionParticipationToolbar.class), p(FileDownloadUtils.class),
- // i(AccessRightsClientManager.class), i(IconResources.class));
- // final ParticipationSummaryView view = new
- // ParticipationSummaryPanel(presenter,
- // i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
- // ActionParticipationToolbar.class).getView());
- // presenter.init(view);
- // return presenter;
- // }
- // });
-
- register(ApplicationComponentGroup.class, new Factory<TagsSummary>(TagsSummary.class) {
- @Override
- public TagsSummary create() {
- final TagsSummaryPresenter presenter = new TagsSummaryPresenter(i(Session.class),
- p(SiteSearcher.class), i(StateManager.class));
- final TagsSummaryPanel panel = new TagsSummaryPanel(presenter, i(I18nUITranslationService.class),
- i(WorkspaceSkeleton.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<NoHomePage>(NoHomePage.class) {
- @Override
- public NoHomePage create() {
- final NoHomePagePresenter presenter = new NoHomePagePresenter(i(StateManager.class),
- p(EntityHeader.class));
- final NoHomePagePanel panel = new NoHomePagePanel(presenter, i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(ApplicationComponentGroup.class, new Factory<GroupOptions>(GroupOptions.class) {
- @Override
- public GroupOptions create() {
- final GroupOptionsPresenter presenter = new GroupOptionsPresenter(i(StateManager.class),
- i(I18nTranslationService.class), i(IconResources.class));
- final GroupOptionsPanel panel = new GroupOptionsPanel(presenter, i(EntityHeader.class),
- i(I18nTranslationService.class), i(NotifyLevelImages.class), i(GroupOptionsCollection.class));
- presenter.init(panel);
- return presenter;
- }
- });
- //
- // register(ApplicationComponentGroup.class, new
- // Factory<UserOptions>(UserOptions.class) {
- // @Override
- // public UserOptions create() {
- // final UserOptionsPresenter presenter = new
- // UserOptionsPresenter(i(Session.class),
- // i(StateManager.class), i(I18nTranslationService.class),
- // i(IconResources.class),
- // i(SiteUserOptions.class));
- // final UserOptionsPanel panel = new UserOptionsPanel(presenter,
- // i(EntityHeader.class),
- // i(I18nTranslationService.class), i(NotifyLevelImages.class),
- // i(UserOptionsCollection.class));
- // presenter.init(panel);
- // return presenter;
- // }
- // });
-
- register(GroupOptionsCollection.class, new Factory<EntityOptionsToolsConf>(EntityOptionsToolsConf.class) {
- @Override
- public EntityOptionsToolsConf create() {
- final GroupOptionsToolsConfPresenter presenter = new GroupOptionsToolsConfPresenter(
- i(StateManager.class), i(Session.class), i(I18nTranslationService.class),
- i(GroupOptions.class), p(GroupServiceAsync.class));
- final EntityOptionsToolsConfPanel panel = new EntityOptionsToolsConfPanel(presenter,
- i(WorkspaceSkeleton.class), i(I18nTranslationService.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(UserOptionsCollection.class, new Factory<UserOptionsToolsConf>(UserOptionsToolsConf.class) {
- @Override
- public UserOptionsToolsConf create() {
- final UserOptionsToolsConfPresenter presenter = new UserOptionsToolsConfPresenter(i(Session.class),
- i(StateManager.class), i(I18nTranslationService.class), i(UserOptions.class),
- p(GroupServiceAsync.class));
- final EntityOptionsToolsConfPanel panel = new EntityOptionsToolsConfPanel(presenter,
- i(WorkspaceSkeleton.class), i(I18nTranslationService.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(GroupOptionsCollection.class, new Factory<GroupOptionsLogo>(GroupOptionsLogo.class) {
- @Override
- public GroupOptionsLogo create() {
- final EntityOptionsLogoPresenter presenter = new GroupOptionsLogoPresenter(i(Session.class),
- i(EntityHeader.class), i(GroupOptions.class), i(StateManager.class), p(UserServiceAsync.class),
- p(ChatEngine.class));
- final GroupOptionsLogoPanel panel = new GroupOptionsLogoPanel(presenter, i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(UserOptionsCollection.class, new Factory<UserOptionsLogo>(UserOptionsLogo.class) {
- @Override
- public UserOptionsLogo create() {
- final EntityOptionsLogoPresenter presenter = new UserOptionsLogoPresenter(i(Session.class),
- i(EntityHeader.class), i(UserOptions.class), i(StateManager.class), p(UserServiceAsync.class),
- p(ChatEngine.class));
- final UserOptionsLogoPanel panel = new UserOptionsLogoPanel(presenter, i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(GroupOptionsCollection.class, new Factory<GroupOptionsDefLicense>(GroupOptionsDefLicense.class) {
- @Override
- public GroupOptionsDefLicense create() {
- final GroupOptionsDefLicensePresenter presenter = new GroupOptionsDefLicensePresenter(
- i(GroupOptions.class), i(StateManager.class), i(Session.class), p(LicenseWizard.class),
- p(LicenseChangeAction.class));
- final EntityOptionsDefLicensePanel panel = new EntityOptionsDefLicensePanel(presenter,
- i(WorkspaceSkeleton.class), i(I18nTranslationService.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(UserOptionsCollection.class, new Factory<UserOptionsDefLicense>(UserOptionsDefLicense.class) {
- @Override
- public UserOptionsDefLicense create() {
- final UserOptionsDefLicensePresenter presenter = new UserOptionsDefLicensePresenter(
- i(UserOptions.class), i(Session.class), p(LicenseWizard.class), p(LicenseChangeAction.class));
- final EntityOptionsDefLicensePanel panel = new EntityOptionsDefLicensePanel(presenter,
- i(WorkspaceSkeleton.class), i(I18nTranslationService.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(GroupOptionsCollection.class, new Factory<GroupOptionsPublicSpaceConf>(
- GroupOptionsPublicSpaceConf.class) {
- @Override
- public GroupOptionsPublicSpaceConf create() {
- final WsThemeSelector themeSelector = i(WsThemeSelector.class);
- final GroupOptionsPublicSpaceConfPresenter presenter = new GroupOptionsPublicSpaceConfPresenter(
- i(Session.class), i(StateManager.class), i(GroupOptions.class), i(WsThemeManager.class),
- themeSelector, p(GroupServiceAsync.class), i(WsBackManager.class));
- final EntityOptionsPublicSpaceConfPanel panel = new EntityOptionsPublicSpaceConfPanel(presenter,
- i(WorkspaceSkeleton.class), i(I18nTranslationService.class), themeSelector,
- i(FileDownloadUtils.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(UserOptionsCollection.class,
- new Factory<UserOptionsPublicSpaceConf>(UserOptionsPublicSpaceConf.class) {
- @Override
- public UserOptionsPublicSpaceConf create() {
- final WsThemeSelector themeSelector = i(WsThemeSelector.class);
- final UserOptionsPublicSpaceConfPresenter presenter = new UserOptionsPublicSpaceConfPresenter(
- i(Session.class), i(StateManager.class), i(UserOptions.class), i(WsThemeManager.class),
- themeSelector, p(GroupServiceAsync.class), i(WsBackManager.class));
- final EntityOptionsPublicSpaceConfPanel panel = new EntityOptionsPublicSpaceConfPanel(
- presenter, i(WorkspaceSkeleton.class), i(I18nTranslationService.class), themeSelector,
- i(FileDownloadUtils.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<LicenseChangeAction>(LicenseChangeAction.class) {
- @Override
- public LicenseChangeAction create() {
- return new LicenseChangeAction(p(GroupServiceAsync.class), i(Session.class),
- i(I18nTranslationService.class), i(StateManager.class));
- }
- });
-
- register(Singleton.class, new Factory<RenameAction>(RenameAction.class) {
- @Override
- public RenameAction create() {
- return new RenameAction(i(I18nTranslationService.class), i(Session.class), p(ContentServiceAsync.class));
- }
- });
-
- register(Singleton.class, new Factory<LicenseWizard>(LicenseWizard.class) {
- @Override
- public LicenseWizard create() {
- final LicenseWizardPresenter presenter = new LicenseWizardPresenter(
- i(LicenseWizardFirstFormView.class), i(LicenseWizardSndFormView.class),
- i(LicenseWizardTrdFormView.class), i(LicenseWizardFrdFormView.class), i(Session.class));
- final LicenseWizardPanel panel = new LicenseWizardPanel(presenter, i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<LicenseWizardFirstFormView>(LicenseWizardFirstFormView.class) {
- @Override
- public LicenseWizardFirstFormView create() {
- return new LicenseWizardFirstForm(i(I18nTranslationService.class));
- }
- });
-
- register(Singleton.class, new Factory<LicenseWizardSndFormView>(LicenseWizardSndFormView.class) {
- @Override
- public LicenseWizardSndFormView create() {
- return new LicenseWizardSndForm(i(I18nTranslationService.class));
- }
- });
-
- register(Singleton.class, new Factory<LicenseWizardTrdFormView>(LicenseWizardTrdFormView.class) {
- @Override
- public LicenseWizardTrdFormView create() {
- return new LicenseWizardTrdForm(i(Images.class), i(I18nTranslationService.class));
- }
- });
-
- register(Singleton.class, new Factory<LicenseWizardFrdFormView>(LicenseWizardFrdFormView.class) {
- @Override
- public LicenseWizardFrdFormView create() {
- return new LicenseWizardFrdForm(i(I18nTranslationService.class), i(Session.class));
- }
- });
-
- register(Singleton.class, new Factory<FileUploader>(FileUploader.class) {
- @Override
- public FileUploader create() {
- final FileUploaderPresenter presenter = new FileUploaderPresenter(i(Session.class));
- final FileUploaderDialog panel = new FileUploaderDialog(presenter, i(I18nUITranslationService.class),
- i(WorkspaceSkeleton.class));
- presenter.init(panel);
- return presenter;
- }
-
- @Override
- public void onAfterCreated(final FileUploader uploader) {
- i(ContextNavigator.class).addFileUploaderListener(uploader);
- }
- });
-
- register(Singleton.class, new Factory<SiteSearcher>(SiteSearcher.class) {
- @Override
- public SiteSearcher create() {
- final SiteSearcherPresenter presenter = new SiteSearcherPresenter(p(StateManager.class));
- final SiteSearcherView view = new SiteSearcherPanel(presenter, i(I18nTranslationService.class),
- i(WorkspaceSkeleton.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<I18nTranslator>(I18nTranslator.class) {
- @Override
- public I18nTranslator create() {
- final I18nTranslatorPresenter presenter = new I18nTranslatorPresenter(i(Session.class),
- i(I18nServiceAsync.class), i(I18nUITranslationService.class));
- final I18nTranslatorView view = new I18nTranslatorPanel(presenter, i(I18nTranslationService.class),
- i(LanguageSelector.class), i(WorkspaceSkeleton.class), i(Images.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- // register(ApplicationComponentGroup.class, new
- // Factory<SiteOptionsI18nTranslatorAction>(
- // SiteOptionsI18nTranslatorAction.class) {
- // @Override
- // public SiteOptionsI18nTranslatorAction create() {
- // return new SiteOptionsI18nTranslatorAction(i(SiteOptions.class),
- // i(I18nTranslationService.class),
- // i(IconResources.class), p(I18nTranslator.class));
- // }
- // });
-
- // register(Singleton.class, new Factory<SignIn>(SignIn.class) {
- // @Override
- // public SignIn create() {
- // final SignInPresenter presenter = new
- // SignInPresenter(i(Session.class), i(StateManager.class),
- // i(I18nUITranslationService.class), p(UserServiceAsync.class),
- // p(Register.class));
- // final SignInView panel = new SignInPanel(presenter,
- // i(I18nTranslationService.class),
- // i(WorkspaceSkeleton.class), i(NotifyLevelImages.class));
- // presenter.init(panel);
- // return presenter;
- // }
- // });
- //
- // register(Singleton.class, new Factory<Register>(Register.class) {
- // @Override
- // public Register create() {
- // final RegisterPresenter presenter = new
- // RegisterPresenter(i(Session.class), i(StateManager.class),
- // i(I18nUITranslationService.class), p(UserServiceAsync.class),
- // p(SignIn.class));
- // final RegisterView panel = new RegisterPanel(presenter,
- // i(I18nTranslationService.class),
- // i(WorkspaceSkeleton.class), i(Session.class),
- // i(NotifyLevelImages.class));
- // presenter.init(panel);
- // return presenter;
- // }
- // });
-
- // register(Singleton.class, new Factory<NewGroup>(NewGroup.class) {
- // @Override
- // public NewGroup create() {
- // final NewGroupPresenter presenter = new
- // NewGroupPresenter(i(I18nTranslationService.class),
- // i(Session.class), i(StateManager.class),
- // p(GroupServiceAsync.class));
- // final NewGroupPanel view = new NewGroupPanel(presenter,
- // i(I18nTranslationService.class),
- // p(LicenseWizard.class), i(NotifyLevelImages.class));
- // presenter.init(view);
- // return presenter;
- // }
- // });
-
- register(Singleton.class, new Factory<UserLiveSearcher>(UserLiveSearcher.class) {
- @Override
- public UserLiveSearcher create() {
- final UserLiveSearcherPresenter presenter = new UserLiveSearcherPresenter();
- final EntityLiveSearcherView view = new UserLiveSearcherPanel(presenter,
- i(I18nTranslationService.class), i(FileDownloadUtils.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<GroupLiveSearcher>(GroupLiveSearcher.class) {
- @Override
- public GroupLiveSearcher create() {
- final GroupLiveSearcherPresenter presenter = new GroupLiveSearcherPresenter();
- final EntityLiveSearcherView view = new GroupLiveSearchPanel(presenter,
- i(I18nTranslationService.class), i(FileDownloadUtils.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<ToolSelector>(ToolSelector.class) {
- @Override
- public ToolSelector create() {
- final ToolSelectorPresenter presenter = new ToolSelectorPresenter(i(StateManager.class),
- i(WsThemeManager.class));
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<LanguageSelector>(LanguageSelector.class) {
- @Override
- public LanguageSelector create() {
- final LanguageSelectorPresenter presenter = new LanguageSelectorPresenter(i(Session.class));
- final LanguageSelectorView view = new LanguageSelectorPanel(presenter, i(I18nTranslationService.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- // Register of tokens like "signin", "newgroup", "translate" etcetera
- i(StateManager.class).addSiteToken(SiteCommonTokens.SIGNIN, new HistoryTokenCallback() {
-
- @Override
- public void onHistoryToken() {
- i(SignIn.class).doSignIn();
- }
- });
-
- i(StateManager.class).addSiteToken(SiteCommonTokens.REGISTER, new HistoryTokenCallback() {
-
- @Override
- public void onHistoryToken() {
- i(Register.class).doRegister();
- }
- });
-
- i(StateManager.class).addSiteToken(SiteCommonTokens.NEWGROUP, new HistoryTokenCallback() {
-
- @Override
- public void onHistoryToken() {
- i(NewGroup.class).doNewGroup();
- }
- });
-
- i(StateManager.class).addSiteToken(SiteCommonTokens.TRANSLATE, new HistoryTokenCallback() {
-
- @Override
- public void onHistoryToken() {
- i(I18nTranslator.class).doShowTranslator();
- }
- });
-
- register(NoDecoration.class, new Factory<ActionContentToolbar>(ActionContentToolbar.class) {
- @Override
- public ActionContentToolbar create() {
- final ActionCntCtxToolbarPanel<StateToken> tbar = new ActionCntCtxToolbarPanel<StateToken>(
- AbstractFoldableContentActions.CONTENT_TOPBAR, p(ActionManager.class),
- i(WorkspaceSkeleton.class));
- final ActionContentToolbar toolbar = new ActionContentToolbarPresenter(tbar);
- return toolbar;
- }
- });
-
- register(Singleton.class, new Factory<ContentEditor>(ContentEditor.class) {
- @Override
- public ContentEditor create() {
- final ContentEditorPresenter presenter = new ContentEditorPresenter(i(I18nTranslationService.class),
- i(Session.class), i(RTEImgResources.class), p(InsertLinkDialog.class),
- p(ColorWebSafePalette.class), p(EditHtmlDialog.class), p(InsertImageDialog.class),
- p(InsertMediaDialog.class), p(InsertTableDialog.class), p(InsertSpecialCharDialog.class),
- i(SchedulerManager.class), true, i(StateManager.class), i(SiteSignOutLink.class),
- i(WorkspaceSkeleton.class), i(TimerWrapper.class), i(EntityTitle.class));
- final ContentEditorPanel panel = new ContentEditorPanel(presenter, i(I18nUITranslationService.class),
- i(GlobalShortcutRegister.class), i(GuiBindingsRegister.class));
- presenter.init(panel);
- return presenter;
- }
- });
- register(NoDecoration.class, new Factory<ActionContextTopToolbar>(ActionContextTopToolbar.class) {
- @Override
- public ActionContextTopToolbar create() {
- final ActionCntCtxToolbarPanel<StateToken> panel = new ActionCntCtxToolbarPanel<StateToken>(
- AbstractFoldableContentActions.CONTEXT_TOPBAR, p(ActionManager.class),
- i(WorkspaceSkeleton.class));
- final ActionContextTopToolbar toolbar = new ActionContextTopToolbar(panel);
- return toolbar;
- }
- });
-
- register(NoDecoration.class, new Factory<ActionContextBottomToolbar>(ActionContextBottomToolbar.class) {
- @Override
- public ActionContextBottomToolbar create() {
- final ActionCntCtxToolbarPanel<StateToken> panel = new ActionCntCtxToolbarPanel<StateToken>(
- AbstractFoldableContentActions.CONTEXT_BOTTOMBAR, p(ActionManager.class),
- i(WorkspaceSkeleton.class));
- final ActionContextBottomToolbar toolbar = new ActionContextBottomToolbar(panel);
- return toolbar;
- }
- });
-
- register(Singleton.class, new Factory<ContextNavigator>(ContextNavigator.class) {
- @Override
- public ContextNavigator create() {
- final ContextNavigatorPresenter presenter = new ContextNavigatorPresenter(i(StateManager.class),
- i(Session.class), i(I18nTranslationService.class), i(ContentIconsRegistry.class),
- i(ContentCapabilitiesRegistry.class), i(ActionContextTopToolbar.class),
- i(ActionContextBottomToolbar.class), i(ContextActionRegistry.class),
- p(FileDownloadUtils.class), true, i(RenameAction.class));
- final ContextNavigatorPanel panel = new ContextNavigatorPanel(presenter,
- i(I18nTranslationService.class), i(WorkspaceSkeleton.class), i(ActionManager.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(Singleton.class, new Factory<ContextPropEditor>(ContextPropEditor.class) {
- @Override
- public ContextPropEditor create() {
- final ContextPropEditorPresenter presenter = new ContextPropEditorPresenter(i(Session.class),
- i(StateManager.class), i(ContentCapabilitiesRegistry.class), p(TagsSummary.class),
- p(ContentServiceAsync.class), i(EntitySubTitle.class));
- final ContextPropEditorView view = new ContextPropEditorPanel(presenter,
- i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), p(LanguageSelector.class),
- i(Images.class));
- presenter.init(view);
- return presenter;
- }
- });
-
- register(InsertImageGroup.class, new Factory<InsertImageLocal>(InsertImageLocal.class) {
- @Override
- public InsertImageLocal create() {
- final InsertImageLocalPresenter presenter = new InsertImageLocalPresenter(i(InsertImageDialog.class),
- i(Session.class));
- final InsertImageLocalPanel panel = new InsertImageLocalPanel(presenter,
- i(I18nTranslationService.class), i(FileDownloadUtils.class), i(Session.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- // register(ApplicationComponentGroup.class, new
- // Factory<MaxMinWorkspace>(MaxMinWorkspace.class) {
- // @Override
- // public MaxMinWorkspace create() {
- // final MaxMinWorkspacePresenter presenter = new
- // MaxMinWorkspacePresenter(
- // i(GlobalShortcutRegister.class), i(IconResources.class),
- // i(I18nTranslationService.class),
- // i(SiteOptions.class));
- // final MaxMinWorkspacePanel panel = new
- // MaxMinWorkspacePanel(i(WorkspaceSkeleton.class));
- // presenter.init(panel);
- // return presenter;
- // }
- // });
-
- register(InsertLinkGroup.class, new Factory<InsertLinkLocal>(InsertLinkLocal.class) {
- @Override
- public InsertLinkLocal create() {
- final InsertLinkLocalPresenter presenter = new InsertLinkLocalPresenter(i(InsertLinkDialog.class));
- final InsertLinkLocalPanel panel = new InsertLinkLocalPanel(presenter, i(WorkspaceSkeleton.class),
- i(I18nTranslationService.class), i(FileDownloadUtils.class), i(StateTokenUtils.class));
- presenter.init(panel);
- return presenter;
- }
- });
-
- register(InsertMediaGroup.class, new Factory<InsertMediaLocal>(InsertMediaLocal.class) {
- @Override
- public InsertMediaLocal create() {
- final InsertMediaLocalPresenter presenter = new InsertMediaLocalPresenter(i(InsertMediaDialog.class),
- i(Session.class), p(MediaUtils.class));
- final InsertMediaLocalPanel panel = new InsertMediaLocalPanel(presenter,
- i(I18nTranslationService.class), i(FileDownloadUtils.class));
- presenter.init(panel);
- return presenter;
- }
- });
- i(GlobalShortcutRegister.class).enable();
- }
-
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,1118 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client;
+
+import org.ourproject.kune.chat.client.ChatEngine;
+import org.ourproject.kune.platf.client.actions.ActionManager;
+import org.ourproject.kune.platf.client.actions.toolbar.ActionToolbarPanel;
+import org.ourproject.kune.platf.client.actions.ui.GuiBindingsRegister;
+import org.ourproject.kune.platf.client.actions.ui.SimpleGuiItem;
+import org.ourproject.kune.platf.client.app.ApplicationComponentGroup;
+import org.ourproject.kune.platf.client.app.GroupOptionsCollection;
+import org.ourproject.kune.platf.client.app.UserOptionsCollection;
+import org.ourproject.kune.platf.client.registry.AuthorableRegistry;
+import org.ourproject.kune.platf.client.registry.ContentCapabilitiesRegistry;
+import org.ourproject.kune.platf.client.registry.RenamableRegistry;
+import org.ourproject.kune.platf.client.services.AbstractExtendedModule;
+import org.ourproject.kune.platf.client.services.Images;
+import org.ourproject.kune.platf.client.shortcuts.GlobalShortcutRegister;
+import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
+import org.ourproject.kune.platf.client.ui.palette.ColorWebSafePalette;
+import org.ourproject.kune.platf.client.ui.rte.edithtml.EditHtmlDialog;
+import org.ourproject.kune.platf.client.ui.rte.img.RTEImgResources;
+import org.ourproject.kune.platf.client.ui.rte.insertimg.InsertImageDialog;
+import org.ourproject.kune.platf.client.ui.rte.insertimg.InsertImageGroup;
+import org.ourproject.kune.platf.client.ui.rte.insertlink.InsertLinkDialog;
+import org.ourproject.kune.platf.client.ui.rte.insertlink.InsertLinkGroup;
+import org.ourproject.kune.platf.client.ui.rte.insertmedia.InsertMediaDialog;
+import org.ourproject.kune.platf.client.ui.rte.insertmedia.InsertMediaGroup;
+import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.MediaUtils;
+import org.ourproject.kune.platf.client.ui.rte.insertspecialchar.InsertSpecialCharDialog;
+import org.ourproject.kune.platf.client.ui.rte.inserttable.InsertTableDialog;
+import org.ourproject.kune.workspace.client.cnt.ActionContentToolbar;
+import org.ourproject.kune.workspace.client.cnt.ActionContentToolbarPresenter;
+import org.ourproject.kune.workspace.client.cnt.ContentIconsRegistry;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigator;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigatorPanel;
+import org.ourproject.kune.workspace.client.ctxnav.ContextNavigatorPresenter;
+import org.ourproject.kune.workspace.client.cxt.ActionContextBottomToolbar;
+import org.ourproject.kune.workspace.client.cxt.ActionContextTopToolbar;
+import org.ourproject.kune.workspace.client.cxt.ContextActionRegistry;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditor;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditorPanel;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditorPresenter;
+import org.ourproject.kune.workspace.client.cxt.ContextPropEditorView;
+import org.ourproject.kune.workspace.client.editor.ContentEditor;
+import org.ourproject.kune.workspace.client.editor.ContentEditorPanel;
+import org.ourproject.kune.workspace.client.editor.ContentEditorPresenter;
+import org.ourproject.kune.workspace.client.editor.insertlocalimg.InsertImageLocal;
+import org.ourproject.kune.workspace.client.editor.insertlocalimg.InsertImageLocalPanel;
+import org.ourproject.kune.workspace.client.editor.insertlocalimg.InsertImageLocalPresenter;
+import org.ourproject.kune.workspace.client.editor.insertlocallink.InsertLinkLocal;
+import org.ourproject.kune.workspace.client.editor.insertlocallink.InsertLinkLocalPanel;
+import org.ourproject.kune.workspace.client.editor.insertlocallink.InsertLinkLocalPresenter;
+import org.ourproject.kune.workspace.client.editor.insertlocalmedia.InsertMediaLocal;
+import org.ourproject.kune.workspace.client.editor.insertlocalmedia.InsertMediaLocalPanel;
+import org.ourproject.kune.workspace.client.editor.insertlocalmedia.InsertMediaLocalPresenter;
+import org.ourproject.kune.workspace.client.i18n.I18nTranslator;
+import org.ourproject.kune.workspace.client.i18n.I18nTranslatorPanel;
+import org.ourproject.kune.workspace.client.i18n.I18nTranslatorPresenter;
+import org.ourproject.kune.workspace.client.i18n.I18nTranslatorView;
+import org.ourproject.kune.workspace.client.i18n.LanguageSelector;
+import org.ourproject.kune.workspace.client.i18n.LanguageSelectorPanel;
+import org.ourproject.kune.workspace.client.i18n.LanguageSelectorPresenter;
+import org.ourproject.kune.workspace.client.i18n.LanguageSelectorView;
+import org.ourproject.kune.workspace.client.licensewizard.LicenseChangeAction;
+import org.ourproject.kune.workspace.client.licensewizard.LicenseWizard;
+import org.ourproject.kune.workspace.client.licensewizard.LicenseWizardPanel;
+import org.ourproject.kune.workspace.client.licensewizard.LicenseWizardPresenter;
+import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardFirstForm;
+import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardFirstFormView;
+import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardFrdForm;
+import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardFrdFormView;
+import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardSndForm;
+import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardSndFormView;
+import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardTrdForm;
+import org.ourproject.kune.workspace.client.licensewizard.pages.LicenseWizardTrdFormView;
+import org.ourproject.kune.workspace.client.nohomepage.NoHomePage;
+import org.ourproject.kune.workspace.client.nohomepage.NoHomePagePanel;
+import org.ourproject.kune.workspace.client.nohomepage.NoHomePagePresenter;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionBuddiesSummaryToolbar;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionBuddiesSummaryToolbarPresenter;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionGroupSummaryToolbar;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionGroupSummaryToolbarPresenter;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionParticipationSummaryToolbarPresenter;
+import org.ourproject.kune.workspace.client.oldsn.toolbar.ActionParticipationToolbar;
+import org.ourproject.kune.workspace.client.options.GroupOptions;
+import org.ourproject.kune.workspace.client.options.GroupOptionsPanel;
+import org.ourproject.kune.workspace.client.options.GroupOptionsPresenter;
+import org.ourproject.kune.workspace.client.options.UserOptions;
+import org.ourproject.kune.workspace.client.options.license.EntityOptionsDefLicensePanel;
+import org.ourproject.kune.workspace.client.options.license.GroupOptionsDefLicense;
+import org.ourproject.kune.workspace.client.options.license.GroupOptionsDefLicensePresenter;
+import org.ourproject.kune.workspace.client.options.license.UserOptionsDefLicense;
+import org.ourproject.kune.workspace.client.options.license.UserOptionsDefLicensePresenter;
+import org.ourproject.kune.workspace.client.options.logo.EntityOptionsLogoPresenter;
+import org.ourproject.kune.workspace.client.options.logo.GroupOptionsLogo;
+import org.ourproject.kune.workspace.client.options.logo.GroupOptionsLogoPanel;
+import org.ourproject.kune.workspace.client.options.logo.GroupOptionsLogoPresenter;
+import org.ourproject.kune.workspace.client.options.logo.UserOptionsLogo;
+import org.ourproject.kune.workspace.client.options.logo.UserOptionsLogoPanel;
+import org.ourproject.kune.workspace.client.options.logo.UserOptionsLogoPresenter;
+import org.ourproject.kune.workspace.client.options.pscape.EntityOptionsPublicSpaceConfPanel;
+import org.ourproject.kune.workspace.client.options.pscape.GroupOptionsPublicSpaceConf;
+import org.ourproject.kune.workspace.client.options.pscape.GroupOptionsPublicSpaceConfPresenter;
+import org.ourproject.kune.workspace.client.options.pscape.UserOptionsPublicSpaceConf;
+import org.ourproject.kune.workspace.client.options.pscape.UserOptionsPublicSpaceConfPresenter;
+import org.ourproject.kune.workspace.client.options.tools.EntityOptionsToolsConf;
+import org.ourproject.kune.workspace.client.options.tools.EntityOptionsToolsConfPanel;
+import org.ourproject.kune.workspace.client.options.tools.GroupOptionsToolsConfPresenter;
+import org.ourproject.kune.workspace.client.options.tools.UserOptionsToolsConf;
+import org.ourproject.kune.workspace.client.options.tools.UserOptionsToolsConfPresenter;
+import org.ourproject.kune.workspace.client.rate.RateIt;
+import org.ourproject.kune.workspace.client.rate.RateItPanel;
+import org.ourproject.kune.workspace.client.rate.RateItPresenter;
+import org.ourproject.kune.workspace.client.rate.RatePanel;
+import org.ourproject.kune.workspace.client.rate.RatePresenter;
+import org.ourproject.kune.workspace.client.search.EntityLiveSearcherView;
+import org.ourproject.kune.workspace.client.search.GroupLiveSearchPanel;
+import org.ourproject.kune.workspace.client.search.GroupLiveSearcher;
+import org.ourproject.kune.workspace.client.search.GroupLiveSearcherPresenter;
+import org.ourproject.kune.workspace.client.search.SiteSearcher;
+import org.ourproject.kune.workspace.client.search.SiteSearcherPanel;
+import org.ourproject.kune.workspace.client.search.SiteSearcherPresenter;
+import org.ourproject.kune.workspace.client.search.SiteSearcherView;
+import org.ourproject.kune.workspace.client.search.UserLiveSearcher;
+import org.ourproject.kune.workspace.client.search.UserLiveSearcherPanel;
+import org.ourproject.kune.workspace.client.search.UserLiveSearcherPresenter;
+import org.ourproject.kune.workspace.client.site.WorkspaceNotifyUser;
+import org.ourproject.kune.workspace.client.site.msg.ToastMessage;
+import org.ourproject.kune.workspace.client.site.msg.ToastMessagePanel;
+import org.ourproject.kune.workspace.client.site.msg.ToastMessagePresenter;
+import org.ourproject.kune.workspace.client.sitebar.sitelogo.SiteLogo;
+import org.ourproject.kune.workspace.client.sitebar.siteprogress.SiteProgress;
+import org.ourproject.kune.workspace.client.sitebar.siteprogress.SiteProgressPanel;
+import org.ourproject.kune.workspace.client.sitebar.siteprogress.SiteProgressPresenter;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLink;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLinkPanel;
+import org.ourproject.kune.workspace.client.sitebar.sitepublic.SitePublicSpaceLinkPresenter;
+import org.ourproject.kune.workspace.client.sitebar.sitesearch.SiteSearch;
+import org.ourproject.kune.workspace.client.sitebar.sitesearch.SiteSearchPanel;
+import org.ourproject.kune.workspace.client.sitebar.sitesearch.SiteSearchPresenter;
+import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignInLink;
+import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignInLinkPanel;
+import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignInLinkPresenter;
+import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignOutLink;
+import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignOutLinkPanel;
+import org.ourproject.kune.workspace.client.sitebar.sitesign.SiteSignOutLinkPresenter;
+import org.ourproject.kune.workspace.client.skel.ActionCntCtxToolbarPanel;
+import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
+import org.ourproject.kune.workspace.client.tags.TagsSummary;
+import org.ourproject.kune.workspace.client.tags.TagsSummaryPanel;
+import org.ourproject.kune.workspace.client.tags.TagsSummaryPresenter;
+import org.ourproject.kune.workspace.client.themes.WsBackManager;
+import org.ourproject.kune.workspace.client.themes.WsBackManagerImpl;
+import org.ourproject.kune.workspace.client.themes.WsThemeManager;
+import org.ourproject.kune.workspace.client.themes.WsThemeManagerPanel;
+import org.ourproject.kune.workspace.client.themes.WsThemeSelector;
+import org.ourproject.kune.workspace.client.themes.WsThemeSelectorPresenter;
+import org.ourproject.kune.workspace.client.title.EntitySubTitle;
+import org.ourproject.kune.workspace.client.title.EntitySubTitlePanel;
+import org.ourproject.kune.workspace.client.title.EntitySubTitlePresenter;
+import org.ourproject.kune.workspace.client.title.EntityTitle;
+import org.ourproject.kune.workspace.client.title.EntityTitlePanel;
+import org.ourproject.kune.workspace.client.title.EntityTitlePresenter;
+import org.ourproject.kune.workspace.client.title.RenameAction;
+import org.ourproject.kune.workspace.client.tool.ToolSelector;
+import org.ourproject.kune.workspace.client.tool.ToolSelectorPresenter;
+import org.ourproject.kune.workspace.client.upload.FileUploader;
+import org.ourproject.kune.workspace.client.upload.FileUploaderDialog;
+import org.ourproject.kune.workspace.client.upload.FileUploaderPresenter;
+
+import cc.kune.common.client.noti.NotifyLevelImages;
+import cc.kune.common.client.utils.SchedulerManager;
+import cc.kune.common.client.utils.TimerWrapper;
+import cc.kune.core.client.auth.Register;
+import cc.kune.core.client.auth.SignIn;
+import cc.kune.core.client.errors.ErrorHandler;
+import cc.kune.core.client.groups.newgroup.NewGroup;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.resources.icons.IconResources;
+import cc.kune.core.client.rpcservices.ContentService;
+import cc.kune.core.client.rpcservices.ContentServiceAsync;
+import cc.kune.core.client.rpcservices.GroupService;
+import cc.kune.core.client.rpcservices.GroupServiceAsync;
+import cc.kune.core.client.rpcservices.I18nServiceAsync;
+import cc.kune.core.client.rpcservices.SocialNetworkService;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.rpcservices.UserServiceAsync;
+import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.HistoryTokenCallback;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.SiteCommonTokens;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.domain.utils.StateToken;
+import cc.kune.core.shared.dto.StateTokenUtils;
+import cc.kune.core.shared.dto.UserSimpleDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.suco.client.ioc.decorator.NoDecoration;
+import com.calclab.suco.client.ioc.decorator.Singleton;
+import com.calclab.suco.client.ioc.module.Factory;
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+
+public class WorkspaceModule extends AbstractExtendedModule {
+ @Override
+ protected void onInstall() {
+
+ register(Singleton.class, new Factory<SocialNetworkServiceAsync>(SocialNetworkServiceAsync.class) {
+ @Override
+ public SocialNetworkServiceAsync create() {
+ final SocialNetworkServiceAsync snServiceAsync = (SocialNetworkServiceAsync) GWT.create(SocialNetworkService.class);
+ ((ServiceDefTarget) snServiceAsync).setServiceEntryPoint(GWT.getModuleBaseURL()
+ + "SocialNetworkService");
+ return snServiceAsync;
+ }
+ }, new Factory<GroupServiceAsync>(GroupServiceAsync.class) {
+ @Override
+ public GroupServiceAsync create() {
+ final GroupServiceAsync groupServiceAsync = (GroupServiceAsync) GWT.create(GroupService.class);
+ ((ServiceDefTarget) groupServiceAsync).setServiceEntryPoint(GWT.getModuleBaseURL() + "GroupService");
+ return groupServiceAsync;
+ }
+ }, new Factory<ContentServiceAsync>(ContentServiceAsync.class) {
+ @Override
+ public ContentServiceAsync create() {
+ final ContentServiceAsync contentServiceAsync = (ContentServiceAsync) GWT.create(ContentService.class);
+ ((ServiceDefTarget) contentServiceAsync).setServiceEntryPoint(GWT.getModuleBaseURL() + "ContentService");
+ return contentServiceAsync;
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<WorkspaceSkeleton>(WorkspaceSkeleton.class) {
+ @Override
+ public WorkspaceSkeleton create() {
+ return new WorkspaceSkeleton();
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<SiteProgress>(SiteProgress.class) {
+ @Override
+ public SiteProgress create() {
+ final SiteProgressPresenter presenter = new SiteProgressPresenter();
+ final SiteProgressPanel panel = new SiteProgressPanel(presenter, p(SitePublicSpaceLink.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<WorkspaceNotifyUser>(WorkspaceNotifyUser.class) {
+ @Override
+ public WorkspaceNotifyUser create() {
+ return new WorkspaceNotifyUser(i(NotifyUser.class), i(I18nUITranslationService.class),
+ i(SiteProgress.class), p(ToastMessage.class), p(WorkspaceSkeleton.class));
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<SitePublicSpaceLink>(SitePublicSpaceLink.class) {
+ @Override
+ public SitePublicSpaceLink create() {
+ final SitePublicSpaceLinkPresenter presenter = new SitePublicSpaceLinkPresenter(i(StateManager.class),
+ i(StateTokenUtils.class));
+ final SitePublicSpaceLinkPanel panel = new SitePublicSpaceLinkPanel(presenter,
+ i(WorkspaceSkeleton.class), i(I18nUITranslationService.class), i(Images.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<StateTokenUtils>(StateTokenUtils.class) {
+ @Override
+ public StateTokenUtils create() {
+ return new StateTokenUtils(i(Session.class));
+ }
+ });
+
+ register(NoDecoration.class, new Factory<ToastMessage>(ToastMessage.class) {
+ @Override
+ public ToastMessage create() {
+ final ToastMessagePresenter presenter = new ToastMessagePresenter();
+ final ToastMessagePanel panel = new ToastMessagePanel();
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ // register(ApplicationComponentGroup.class, new
+ // Factory<SiteUserOptions>(SiteUserOptions.class) {
+ // @Override
+ // public SiteUserOptions create() {
+ // final SiteUserOptionsPresenter presenter = new
+ // SiteUserOptionsPresenter(i(Session.class),
+ // i(StateManager.class), p(FileDownloadUtils.class),
+ // $(I18nTranslationService.class),
+ // $(IconResources.class));
+ // final SiteUserOptionsPanel panel = new
+ // SiteUserOptionsPanel(presenter, i(WorkspaceSkeleton.class),
+ // $(GuiBindingsRegister.class));
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
+
+ register(ApplicationComponentGroup.class, new Factory<SiteSignInLink>(SiteSignInLink.class) {
+ @Override
+ public SiteSignInLink create() {
+ final SiteSignInLinkPresenter presenter = new SiteSignInLinkPresenter(i(Session.class));
+ final SiteSignInLinkPanel panel = new SiteSignInLinkPanel(presenter, i(I18nUITranslationService.class),
+ i(WorkspaceSkeleton.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<SiteSignOutLink>(SiteSignOutLink.class) {
+ @Override
+ public SiteSignOutLink create() {
+ final SiteSignOutLinkPresenter presenter = new SiteSignOutLinkPresenter(i(Session.class),
+ p(UserServiceAsync.class), p(ErrorHandler.class));
+ final SiteSignOutLinkPanel panel = new SiteSignOutLinkPanel(presenter,
+ i(I18nUITranslationService.class), i(WorkspaceSkeleton.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+ //
+ // register(ApplicationComponentGroup.class, new
+ // Factory<SiteOptions>(SiteOptions.class) {
+ // @Override
+ // public SiteOptions create() {
+ // final SiteOptionsPresenter presenter = new
+ // SiteOptionsPresenter(i(I18nUITranslationService.class),
+ // i(IconResources.class));
+ // final SiteOptionsPanel panel = new
+ // SiteOptionsPanel(i(WorkspaceSkeleton.class),
+ // i(I18nUITranslationService.class), i(GuiBindingsRegister.class));
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
+
+ register(ApplicationComponentGroup.class, new Factory<SiteSearch>(SiteSearch.class) {
+ @Override
+ public SiteSearch create() {
+ final SiteSearchPresenter presenter = new SiteSearchPresenter(p(SiteSearcher.class),
+ i(I18nTranslationService.class));
+ final SiteSearchPanel panel = new SiteSearchPanel(presenter, i(WorkspaceSkeleton.class),
+ i(Images.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<SiteLogo>(SiteLogo.class) {
+ @Override
+ public SiteLogo create() {
+ // final SiteLogoPresenter presenter = new
+ // SiteLogoPresenter(i(Session.class));
+ // final SiteLogoPanel panel = new SiteLogoPanel(presenter,
+ // i(WorkspaceSkeleton.class));
+ // presenter.init(panel);
+ return null;
+ }
+ });
+
+ // register(ApplicationComponentGroup.class, new
+ // Factory<EntityHeader>(EntityHeader.class) {
+ // @Override
+ // public EntityHeader create() {
+ // final EntityHeaderPresenter presenter = new
+ // EntityHeaderPresenter(i(StateManager.class),
+ // i(WsThemeManager.class), i(Session.class));
+ // final EntityHeaderPanel panel = new
+ // EntityHeaderPanel(i(WorkspaceSkeleton.class),
+ // p(FileDownloadUtils.class), i(Images.class),
+ // i(GuiBindingsRegister.class));
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
+
+ register(Singleton.class, new Factory<WsBackManager>(WsBackManager.class) {
+ @Override
+ public WsBackManager create() {
+ return new WsBackManagerImpl(i(FileDownloadUtils.class));
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<WsThemeManager>(WsThemeManager.class) {
+ @Override
+ public WsThemeManager create() {
+ final WsThemeManager presenter = new WsThemeManager(i(Session.class), p(GroupServiceAsync.class),
+ i(StateManager.class), i(WsBackManager.class));
+ new WsThemeManagerPanel(presenter, i(WorkspaceSkeleton.class));
+ return presenter;
+ }
+ });
+
+ register(NoDecoration.class, new Factory<WsThemeSelector>(WsThemeSelector.class) {
+ @Override
+ public WsThemeSelector create() {
+ final WsThemeSelectorPresenter presenter = new WsThemeSelectorPresenter(i(Session.class),
+ i(I18nTranslationService.class));
+ presenter.init(new SimpleGuiItem(i(GuiBindingsRegister.class)));
+ return presenter;
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<EntityTitle>(EntityTitle.class) {
+ @Override
+ public EntityTitle create() {
+ final EntityTitlePresenter presenter = new EntityTitlePresenter(i(StateManager.class),
+ i(Session.class), i(ContentIconsRegistry.class), i(RenamableRegistry.class),
+ i(RenameAction.class));
+ final EntityTitlePanel panel = new EntityTitlePanel(i(WorkspaceSkeleton.class), presenter);
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<EntitySubTitle>(EntitySubTitle.class) {
+ @Override
+ public EntitySubTitle create() {
+ final EntitySubTitlePresenter presenter = new EntitySubTitlePresenter(
+ i(I18nUITranslationService.class), i(StateManager.class), false, i(AuthorableRegistry.class));
+ final EntitySubTitlePanel panel = new EntitySubTitlePanel(presenter, i(WorkspaceSkeleton.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ // register(ApplicationComponentGroup.class, new
+ // Factory<EntityLicensePresenter>(EntityLicensePresenter.class) {
+ // @Override
+ // public EntityLicensePresenter create() {
+ // final EntityLicensePresenter presenter = new
+ // EntityLicensePresenter(i(StateManager.class));
+ // final EntityLicensePanel panel = new EntityLicensePanel(presenter,
+ // i(I18nUITranslationService.class),
+ // i(WorkspaceSkeleton.class));
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
+
+ register(ApplicationComponentGroup.class, new Factory<RateIt>(RateIt.class) {
+ @Override
+ public RateIt create() {
+ final RateItPresenter presenter = new RateItPresenter(i(I18nUITranslationService.class),
+ i(Session.class), p(ContentServiceAsync.class), i(StateManager.class), p(RatePresenter.class),
+ i(ContentCapabilitiesRegistry.class));
+ final RateItPanel panel = new RateItPanel(presenter, i(I18nUITranslationService.class),
+ i(WorkspaceSkeleton.class), i(Images.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<RatePresenter>(RatePresenter.class) {
+ @Override
+ public RatePresenter create() {
+ final RatePresenter presenter = new RatePresenter(i(StateManager.class),
+ i(ContentCapabilitiesRegistry.class));
+ final RatePanel panel = new RatePanel(null, null, i(I18nUITranslationService.class),
+ i(WorkspaceSkeleton.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<ActionManager>(ActionManager.class) {
+ @Override
+ public ActionManager create() {
+ return new ActionManager();
+ }
+ });
+
+ register(Singleton.class, new Factory<ActionGroupSummaryToolbar>(ActionGroupSummaryToolbar.class) {
+ @Override
+ public ActionGroupSummaryToolbar create() {
+ final ActionToolbarPanel<StateToken> panel = new ActionToolbarPanel<StateToken>(p(ActionManager.class));
+ final ActionGroupSummaryToolbarPresenter toolbar = new ActionGroupSummaryToolbarPresenter(panel);
+ return toolbar;
+ }
+ }, new Factory<ActionParticipationToolbar>(ActionParticipationToolbar.class) {
+ @Override
+ public ActionParticipationToolbar create() {
+ final ActionToolbarPanel<StateToken> panel = new ActionToolbarPanel<StateToken>(p(ActionManager.class));
+ final ActionParticipationSummaryToolbarPresenter toolbar = new ActionParticipationSummaryToolbarPresenter(
+ panel);
+ return toolbar;
+ }
+ }, new Factory<ActionBuddiesSummaryToolbar>(ActionBuddiesSummaryToolbar.class) {
+ @Override
+ public ActionBuddiesSummaryToolbar create() {
+ final ActionToolbarPanel<UserSimpleDTO> panel = new ActionToolbarPanel<UserSimpleDTO>(
+ p(ActionManager.class));
+ final ActionBuddiesSummaryToolbarPresenter toolbar = new ActionBuddiesSummaryToolbarPresenter(panel);
+ return toolbar;
+ }
+ });
+
+ // register(ApplicationComponentGroup.class, new
+ // Factory<GroupMembersSummary>(GroupMembersSummary.class) {
+ // @Override
+ // public GroupMembersSummary create() {
+ // final GroupMembersSummaryPresenter presenter = new
+ // GroupMembersSummaryPresenter(
+ // i(I18nUITranslationService.class), i(StateManager.class),
+ // i(ImageUtils.class),
+ // i(Session.class), p(SocialNetworkServiceAsync.class),
+ // p(GroupServiceAsync.class),
+ // p(GroupLiveSearcher.class), p(ChatEngine.class),
+ // i(GroupActionRegistry.class),
+ // i(ActionGroupSummaryToolbar.class), p(FileDownloadUtils.class),
+ // i(AccessRightsClientManager.class), i(IconResources.class));
+ // final GroupMembersSummaryView view = new
+ // GroupMembersSummaryPanel(presenter,
+ // i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
+ // ActionGroupSummaryToolbar.class).getView());
+ // presenter.init(view);
+ // return presenter;
+ // }
+ // });
+
+ // register(ApplicationComponentGroup.class, new
+ // Factory<AddAsBuddieHeaderButton>(AddAsBuddieHeaderButton.class) {
+ // @Override
+ // public AddAsBuddieHeaderButton create() {
+ // return new AddAsBuddieHeaderButton(p(ChatEngine.class),
+ // i(Session.class), i(StateManager.class),
+ // i(I18nTranslationService.class), i(IconResources.class),
+ // i(EntityHeader.class));
+ // }
+ // });
+
+ // register(ApplicationComponentGroup.class, new
+ // Factory<BuddiesSummary>(BuddiesSummary.class) {
+ // @Override
+ // public BuddiesSummary create() {
+ // final BuddiesSummaryPresenter presenter = new
+ // BuddiesSummaryPresenter(i(StateManager.class),
+ // i(Session.class), p(UserServiceAsync.class),
+ // i(UserActionRegistry.class),
+ // i(I18nTranslationService.class), p(ChatEngine.class),
+ // i(ActionBuddiesSummaryToolbar.class),
+ // p(FileDownloadUtils.class), i(ImageUtils.class),
+ // p(SocialNetworkServiceAsync.class),
+ // i(GroupActionRegistry.class), i(AccessRightsClientManager.class),
+ // i(IconResources.class));
+ // final BuddiesSummaryPanel panel = new BuddiesSummaryPanel(presenter,
+ // i(WorkspaceSkeleton.class),
+ // i(I18nTranslationService.class), i(ActionManager.class),
+ // i(ActionBuddiesSummaryToolbar.class).getView());
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
+
+ // register(ApplicationComponentGroup.class, new
+ // Factory<ParticipationSummary>(ParticipationSummary.class) {
+ // @Override
+ // public ParticipationSummary create() {
+ // final ParticipationSummaryPresenter presenter = new
+ // ParticipationSummaryPresenter(
+ // i(I18nUITranslationService.class), i(StateManager.class),
+ // i(ImageUtils.class),
+ // i(Session.class), p(SocialNetworkServiceAsync.class),
+ // i(GroupActionRegistry.class),
+ // i(ActionParticipationToolbar.class), p(FileDownloadUtils.class),
+ // i(AccessRightsClientManager.class), i(IconResources.class));
+ // final ParticipationSummaryView view = new
+ // ParticipationSummaryPanel(presenter,
+ // i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), i(
+ // ActionParticipationToolbar.class).getView());
+ // presenter.init(view);
+ // return presenter;
+ // }
+ // });
+
+ register(ApplicationComponentGroup.class, new Factory<TagsSummary>(TagsSummary.class) {
+ @Override
+ public TagsSummary create() {
+ final TagsSummaryPresenter presenter = new TagsSummaryPresenter(i(Session.class),
+ p(SiteSearcher.class), i(StateManager.class));
+ final TagsSummaryPanel panel = new TagsSummaryPanel(presenter, i(I18nUITranslationService.class),
+ i(WorkspaceSkeleton.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<NoHomePage>(NoHomePage.class) {
+ @Override
+ public NoHomePage create() {
+ final NoHomePagePresenter presenter = new NoHomePagePresenter(i(StateManager.class),
+ p(EntityHeader.class));
+ final NoHomePagePanel panel = new NoHomePagePanel(presenter, i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(ApplicationComponentGroup.class, new Factory<GroupOptions>(GroupOptions.class) {
+ @Override
+ public GroupOptions create() {
+ final GroupOptionsPresenter presenter = new GroupOptionsPresenter(i(StateManager.class),
+ i(I18nTranslationService.class), i(IconResources.class));
+ final GroupOptionsPanel panel = new GroupOptionsPanel(presenter, i(EntityHeader.class),
+ i(I18nTranslationService.class), i(NotifyLevelImages.class), i(GroupOptionsCollection.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+ //
+ // register(ApplicationComponentGroup.class, new
+ // Factory<UserOptions>(UserOptions.class) {
+ // @Override
+ // public UserOptions create() {
+ // final UserOptionsPresenter presenter = new
+ // UserOptionsPresenter(i(Session.class),
+ // i(StateManager.class), i(I18nTranslationService.class),
+ // i(IconResources.class),
+ // i(SiteUserOptions.class));
+ // final UserOptionsPanel panel = new UserOptionsPanel(presenter,
+ // i(EntityHeader.class),
+ // i(I18nTranslationService.class), i(NotifyLevelImages.class),
+ // i(UserOptionsCollection.class));
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
+
+ register(GroupOptionsCollection.class, new Factory<EntityOptionsToolsConf>(EntityOptionsToolsConf.class) {
+ @Override
+ public EntityOptionsToolsConf create() {
+ final GroupOptionsToolsConfPresenter presenter = new GroupOptionsToolsConfPresenter(
+ i(StateManager.class), i(Session.class), i(I18nTranslationService.class),
+ i(GroupOptions.class), p(GroupServiceAsync.class));
+ final EntityOptionsToolsConfPanel panel = new EntityOptionsToolsConfPanel(presenter,
+ i(WorkspaceSkeleton.class), i(I18nTranslationService.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(UserOptionsCollection.class, new Factory<UserOptionsToolsConf>(UserOptionsToolsConf.class) {
+ @Override
+ public UserOptionsToolsConf create() {
+ final UserOptionsToolsConfPresenter presenter = new UserOptionsToolsConfPresenter(i(Session.class),
+ i(StateManager.class), i(I18nTranslationService.class), i(UserOptions.class),
+ p(GroupServiceAsync.class));
+ final EntityOptionsToolsConfPanel panel = new EntityOptionsToolsConfPanel(presenter,
+ i(WorkspaceSkeleton.class), i(I18nTranslationService.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(GroupOptionsCollection.class, new Factory<GroupOptionsLogo>(GroupOptionsLogo.class) {
+ @Override
+ public GroupOptionsLogo create() {
+ final EntityOptionsLogoPresenter presenter = new GroupOptionsLogoPresenter(i(Session.class),
+ i(EntityHeader.class), i(GroupOptions.class), i(StateManager.class), p(UserServiceAsync.class),
+ p(ChatEngine.class));
+ final GroupOptionsLogoPanel panel = new GroupOptionsLogoPanel(presenter, i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(UserOptionsCollection.class, new Factory<UserOptionsLogo>(UserOptionsLogo.class) {
+ @Override
+ public UserOptionsLogo create() {
+ final EntityOptionsLogoPresenter presenter = new UserOptionsLogoPresenter(i(Session.class),
+ i(EntityHeader.class), i(UserOptions.class), i(StateManager.class), p(UserServiceAsync.class),
+ p(ChatEngine.class));
+ final UserOptionsLogoPanel panel = new UserOptionsLogoPanel(presenter, i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(GroupOptionsCollection.class, new Factory<GroupOptionsDefLicense>(GroupOptionsDefLicense.class) {
+ @Override
+ public GroupOptionsDefLicense create() {
+ final GroupOptionsDefLicensePresenter presenter = new GroupOptionsDefLicensePresenter(
+ i(GroupOptions.class), i(StateManager.class), i(Session.class), p(LicenseWizard.class),
+ p(LicenseChangeAction.class));
+ final EntityOptionsDefLicensePanel panel = new EntityOptionsDefLicensePanel(presenter,
+ i(WorkspaceSkeleton.class), i(I18nTranslationService.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(UserOptionsCollection.class, new Factory<UserOptionsDefLicense>(UserOptionsDefLicense.class) {
+ @Override
+ public UserOptionsDefLicense create() {
+ final UserOptionsDefLicensePresenter presenter = new UserOptionsDefLicensePresenter(
+ i(UserOptions.class), i(Session.class), p(LicenseWizard.class), p(LicenseChangeAction.class));
+ final EntityOptionsDefLicensePanel panel = new EntityOptionsDefLicensePanel(presenter,
+ i(WorkspaceSkeleton.class), i(I18nTranslationService.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(GroupOptionsCollection.class, new Factory<GroupOptionsPublicSpaceConf>(
+ GroupOptionsPublicSpaceConf.class) {
+ @Override
+ public GroupOptionsPublicSpaceConf create() {
+ final WsThemeSelector themeSelector = i(WsThemeSelector.class);
+ final GroupOptionsPublicSpaceConfPresenter presenter = new GroupOptionsPublicSpaceConfPresenter(
+ i(Session.class), i(StateManager.class), i(GroupOptions.class), i(WsThemeManager.class),
+ themeSelector, p(GroupServiceAsync.class), i(WsBackManager.class));
+ final EntityOptionsPublicSpaceConfPanel panel = new EntityOptionsPublicSpaceConfPanel(presenter,
+ i(WorkspaceSkeleton.class), i(I18nTranslationService.class), themeSelector,
+ i(FileDownloadUtils.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(UserOptionsCollection.class,
+ new Factory<UserOptionsPublicSpaceConf>(UserOptionsPublicSpaceConf.class) {
+ @Override
+ public UserOptionsPublicSpaceConf create() {
+ final WsThemeSelector themeSelector = i(WsThemeSelector.class);
+ final UserOptionsPublicSpaceConfPresenter presenter = new UserOptionsPublicSpaceConfPresenter(
+ i(Session.class), i(StateManager.class), i(UserOptions.class), i(WsThemeManager.class),
+ themeSelector, p(GroupServiceAsync.class), i(WsBackManager.class));
+ final EntityOptionsPublicSpaceConfPanel panel = new EntityOptionsPublicSpaceConfPanel(
+ presenter, i(WorkspaceSkeleton.class), i(I18nTranslationService.class), themeSelector,
+ i(FileDownloadUtils.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<LicenseChangeAction>(LicenseChangeAction.class) {
+ @Override
+ public LicenseChangeAction create() {
+ return new LicenseChangeAction(p(GroupServiceAsync.class), i(Session.class),
+ i(I18nTranslationService.class), i(StateManager.class));
+ }
+ });
+
+ register(Singleton.class, new Factory<RenameAction>(RenameAction.class) {
+ @Override
+ public RenameAction create() {
+ return new RenameAction(i(I18nTranslationService.class), i(Session.class), p(ContentServiceAsync.class));
+ }
+ });
+
+ register(Singleton.class, new Factory<LicenseWizard>(LicenseWizard.class) {
+ @Override
+ public LicenseWizard create() {
+ final LicenseWizardPresenter presenter = new LicenseWizardPresenter(
+ i(LicenseWizardFirstFormView.class), i(LicenseWizardSndFormView.class),
+ i(LicenseWizardTrdFormView.class), i(LicenseWizardFrdFormView.class), i(Session.class));
+ final LicenseWizardPanel panel = new LicenseWizardPanel(presenter, i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<LicenseWizardFirstFormView>(LicenseWizardFirstFormView.class) {
+ @Override
+ public LicenseWizardFirstFormView create() {
+ return new LicenseWizardFirstForm(i(I18nTranslationService.class));
+ }
+ });
+
+ register(Singleton.class, new Factory<LicenseWizardSndFormView>(LicenseWizardSndFormView.class) {
+ @Override
+ public LicenseWizardSndFormView create() {
+ return new LicenseWizardSndForm(i(I18nTranslationService.class));
+ }
+ });
+
+ register(Singleton.class, new Factory<LicenseWizardTrdFormView>(LicenseWizardTrdFormView.class) {
+ @Override
+ public LicenseWizardTrdFormView create() {
+ return new LicenseWizardTrdForm(i(Images.class), i(I18nTranslationService.class));
+ }
+ });
+
+ register(Singleton.class, new Factory<LicenseWizardFrdFormView>(LicenseWizardFrdFormView.class) {
+ @Override
+ public LicenseWizardFrdFormView create() {
+ return new LicenseWizardFrdForm(i(I18nTranslationService.class), i(Session.class));
+ }
+ });
+
+ register(Singleton.class, new Factory<FileUploader>(FileUploader.class) {
+ @Override
+ public FileUploader create() {
+ final FileUploaderPresenter presenter = new FileUploaderPresenter(i(Session.class));
+ final FileUploaderDialog panel = new FileUploaderDialog(presenter, i(I18nUITranslationService.class),
+ i(WorkspaceSkeleton.class));
+ presenter.init(panel);
+ return presenter;
+ }
+
+ @Override
+ public void onAfterCreated(final FileUploader uploader) {
+ i(ContextNavigator.class).addFileUploaderListener(uploader);
+ }
+ });
+
+ register(Singleton.class, new Factory<SiteSearcher>(SiteSearcher.class) {
+ @Override
+ public SiteSearcher create() {
+ final SiteSearcherPresenter presenter = new SiteSearcherPresenter(p(StateManager.class));
+ final SiteSearcherView view = new SiteSearcherPanel(presenter, i(I18nTranslationService.class),
+ i(WorkspaceSkeleton.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<I18nTranslator>(I18nTranslator.class) {
+ @Override
+ public I18nTranslator create() {
+ final I18nTranslatorPresenter presenter = new I18nTranslatorPresenter(i(Session.class),
+ i(I18nServiceAsync.class), i(I18nUITranslationService.class));
+ final I18nTranslatorView view = new I18nTranslatorPanel(presenter, i(I18nTranslationService.class),
+ i(LanguageSelector.class), i(WorkspaceSkeleton.class), i(Images.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ // register(ApplicationComponentGroup.class, new
+ // Factory<SiteOptionsI18nTranslatorAction>(
+ // SiteOptionsI18nTranslatorAction.class) {
+ // @Override
+ // public SiteOptionsI18nTranslatorAction create() {
+ // return new SiteOptionsI18nTranslatorAction(i(SiteOptions.class),
+ // i(I18nTranslationService.class),
+ // i(IconResources.class), p(I18nTranslator.class));
+ // }
+ // });
+
+ // register(Singleton.class, new Factory<SignIn>(SignIn.class) {
+ // @Override
+ // public SignIn create() {
+ // final SignInPresenter presenter = new
+ // SignInPresenter(i(Session.class), i(StateManager.class),
+ // i(I18nUITranslationService.class), p(UserServiceAsync.class),
+ // p(Register.class));
+ // final SignInView panel = new SignInPanel(presenter,
+ // i(I18nTranslationService.class),
+ // i(WorkspaceSkeleton.class), i(NotifyLevelImages.class));
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
+ //
+ // register(Singleton.class, new Factory<Register>(Register.class) {
+ // @Override
+ // public Register create() {
+ // final RegisterPresenter presenter = new
+ // RegisterPresenter(i(Session.class), i(StateManager.class),
+ // i(I18nUITranslationService.class), p(UserServiceAsync.class),
+ // p(SignIn.class));
+ // final RegisterView panel = new RegisterPanel(presenter,
+ // i(I18nTranslationService.class),
+ // i(WorkspaceSkeleton.class), i(Session.class),
+ // i(NotifyLevelImages.class));
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
+
+ // register(Singleton.class, new Factory<NewGroup>(NewGroup.class) {
+ // @Override
+ // public NewGroup create() {
+ // final NewGroupPresenter presenter = new
+ // NewGroupPresenter(i(I18nTranslationService.class),
+ // i(Session.class), i(StateManager.class),
+ // p(GroupServiceAsync.class));
+ // final NewGroupPanel view = new NewGroupPanel(presenter,
+ // i(I18nTranslationService.class),
+ // p(LicenseWizard.class), i(NotifyLevelImages.class));
+ // presenter.init(view);
+ // return presenter;
+ // }
+ // });
+
+ register(Singleton.class, new Factory<UserLiveSearcher>(UserLiveSearcher.class) {
+ @Override
+ public UserLiveSearcher create() {
+ final UserLiveSearcherPresenter presenter = new UserLiveSearcherPresenter();
+ final EntityLiveSearcherView view = new UserLiveSearcherPanel(presenter,
+ i(I18nTranslationService.class), i(FileDownloadUtils.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<GroupLiveSearcher>(GroupLiveSearcher.class) {
+ @Override
+ public GroupLiveSearcher create() {
+ final GroupLiveSearcherPresenter presenter = new GroupLiveSearcherPresenter();
+ final EntityLiveSearcherView view = new GroupLiveSearchPanel(presenter,
+ i(I18nTranslationService.class), i(FileDownloadUtils.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<ToolSelector>(ToolSelector.class) {
+ @Override
+ public ToolSelector create() {
+ final ToolSelectorPresenter presenter = new ToolSelectorPresenter(i(StateManager.class),
+ i(WsThemeManager.class));
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<LanguageSelector>(LanguageSelector.class) {
+ @Override
+ public LanguageSelector create() {
+ final LanguageSelectorPresenter presenter = new LanguageSelectorPresenter(i(Session.class));
+ final LanguageSelectorView view = new LanguageSelectorPanel(presenter, i(I18nTranslationService.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ // Register of tokens like "signin", "newgroup", "translate" etcetera
+ i(StateManager.class).addSiteToken(SiteCommonTokens.SIGNIN, new HistoryTokenCallback() {
+
+ @Override
+ public void onHistoryToken() {
+ i(SignIn.class).doSignIn();
+ }
+ });
+
+ i(StateManager.class).addSiteToken(SiteCommonTokens.REGISTER, new HistoryTokenCallback() {
+
+ @Override
+ public void onHistoryToken() {
+ i(Register.class).doRegister();
+ }
+ });
+
+ i(StateManager.class).addSiteToken(SiteCommonTokens.NEWGROUP, new HistoryTokenCallback() {
+
+ @Override
+ public void onHistoryToken() {
+ i(NewGroup.class).doNewGroup();
+ }
+ });
+
+ i(StateManager.class).addSiteToken(SiteCommonTokens.TRANSLATE, new HistoryTokenCallback() {
+
+ @Override
+ public void onHistoryToken() {
+ i(I18nTranslator.class).doShowTranslator();
+ }
+ });
+
+ register(NoDecoration.class, new Factory<ActionContentToolbar>(ActionContentToolbar.class) {
+ @Override
+ public ActionContentToolbar create() {
+ final ActionCntCtxToolbarPanel<StateToken> tbar = new ActionCntCtxToolbarPanel<StateToken>(
+ AbstractFoldableContentActions.CONTENT_TOPBAR, p(ActionManager.class),
+ i(WorkspaceSkeleton.class));
+ final ActionContentToolbar toolbar = new ActionContentToolbarPresenter(tbar);
+ return toolbar;
+ }
+ });
+
+ register(Singleton.class, new Factory<ContentEditor>(ContentEditor.class) {
+ @Override
+ public ContentEditor create() {
+ final ContentEditorPresenter presenter = new ContentEditorPresenter(i(I18nTranslationService.class),
+ i(Session.class), i(RTEImgResources.class), p(InsertLinkDialog.class),
+ p(ColorWebSafePalette.class), p(EditHtmlDialog.class), p(InsertImageDialog.class),
+ p(InsertMediaDialog.class), p(InsertTableDialog.class), p(InsertSpecialCharDialog.class),
+ i(SchedulerManager.class), true, i(StateManager.class), i(SiteSignOutLink.class),
+ i(WorkspaceSkeleton.class), i(TimerWrapper.class), i(EntityTitle.class));
+ final ContentEditorPanel panel = new ContentEditorPanel(presenter, i(I18nUITranslationService.class),
+ i(GlobalShortcutRegister.class), i(GuiBindingsRegister.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+ register(NoDecoration.class, new Factory<ActionContextTopToolbar>(ActionContextTopToolbar.class) {
+ @Override
+ public ActionContextTopToolbar create() {
+ final ActionCntCtxToolbarPanel<StateToken> panel = new ActionCntCtxToolbarPanel<StateToken>(
+ AbstractFoldableContentActions.CONTEXT_TOPBAR, p(ActionManager.class),
+ i(WorkspaceSkeleton.class));
+ final ActionContextTopToolbar toolbar = new ActionContextTopToolbar(panel);
+ return toolbar;
+ }
+ });
+
+ register(NoDecoration.class, new Factory<ActionContextBottomToolbar>(ActionContextBottomToolbar.class) {
+ @Override
+ public ActionContextBottomToolbar create() {
+ final ActionCntCtxToolbarPanel<StateToken> panel = new ActionCntCtxToolbarPanel<StateToken>(
+ AbstractFoldableContentActions.CONTEXT_BOTTOMBAR, p(ActionManager.class),
+ i(WorkspaceSkeleton.class));
+ final ActionContextBottomToolbar toolbar = new ActionContextBottomToolbar(panel);
+ return toolbar;
+ }
+ });
+
+ register(Singleton.class, new Factory<ContextNavigator>(ContextNavigator.class) {
+ @Override
+ public ContextNavigator create() {
+ final ContextNavigatorPresenter presenter = new ContextNavigatorPresenter(i(StateManager.class),
+ i(Session.class), i(I18nTranslationService.class), i(ContentIconsRegistry.class),
+ i(ContentCapabilitiesRegistry.class), i(ActionContextTopToolbar.class),
+ i(ActionContextBottomToolbar.class), i(ContextActionRegistry.class),
+ p(FileDownloadUtils.class), true, i(RenameAction.class));
+ final ContextNavigatorPanel panel = new ContextNavigatorPanel(presenter,
+ i(I18nTranslationService.class), i(WorkspaceSkeleton.class), i(ActionManager.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(Singleton.class, new Factory<ContextPropEditor>(ContextPropEditor.class) {
+ @Override
+ public ContextPropEditor create() {
+ final ContextPropEditorPresenter presenter = new ContextPropEditorPresenter(i(Session.class),
+ i(StateManager.class), i(ContentCapabilitiesRegistry.class), p(TagsSummary.class),
+ p(ContentServiceAsync.class), i(EntitySubTitle.class));
+ final ContextPropEditorView view = new ContextPropEditorPanel(presenter,
+ i(I18nUITranslationService.class), i(WorkspaceSkeleton.class), p(LanguageSelector.class),
+ i(Images.class));
+ presenter.init(view);
+ return presenter;
+ }
+ });
+
+ register(InsertImageGroup.class, new Factory<InsertImageLocal>(InsertImageLocal.class) {
+ @Override
+ public InsertImageLocal create() {
+ final InsertImageLocalPresenter presenter = new InsertImageLocalPresenter(i(InsertImageDialog.class),
+ i(Session.class));
+ final InsertImageLocalPanel panel = new InsertImageLocalPanel(presenter,
+ i(I18nTranslationService.class), i(FileDownloadUtils.class), i(Session.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ // register(ApplicationComponentGroup.class, new
+ // Factory<MaxMinWorkspace>(MaxMinWorkspace.class) {
+ // @Override
+ // public MaxMinWorkspace create() {
+ // final MaxMinWorkspacePresenter presenter = new
+ // MaxMinWorkspacePresenter(
+ // i(GlobalShortcutRegister.class), i(IconResources.class),
+ // i(I18nTranslationService.class),
+ // i(SiteOptions.class));
+ // final MaxMinWorkspacePanel panel = new
+ // MaxMinWorkspacePanel(i(WorkspaceSkeleton.class));
+ // presenter.init(panel);
+ // return presenter;
+ // }
+ // });
+
+ register(InsertLinkGroup.class, new Factory<InsertLinkLocal>(InsertLinkLocal.class) {
+ @Override
+ public InsertLinkLocal create() {
+ final InsertLinkLocalPresenter presenter = new InsertLinkLocalPresenter(i(InsertLinkDialog.class));
+ final InsertLinkLocalPanel panel = new InsertLinkLocalPanel(presenter, i(WorkspaceSkeleton.class),
+ i(I18nTranslationService.class), i(FileDownloadUtils.class), i(StateTokenUtils.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+
+ register(InsertMediaGroup.class, new Factory<InsertMediaLocal>(InsertMediaLocal.class) {
+ @Override
+ public InsertMediaLocal create() {
+ final InsertMediaLocalPresenter presenter = new InsertMediaLocalPresenter(i(InsertMediaDialog.class),
+ i(Session.class), p(MediaUtils.class));
+ final InsertMediaLocalPanel panel = new InsertMediaLocalPanel(presenter,
+ i(I18nTranslationService.class), i(FileDownloadUtils.class));
+ presenter.init(panel);
+ return presenter;
+ }
+ });
+ i(GlobalShortcutRegister.class).enable();
+ }
+
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeader.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeader.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeader.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,41 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.entityheader;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
-
-public interface EntityHeader {
-
- void addAction(OldGuiActionDescrip descriptor);
-
- void addWidget(View widget);
-
- /**
- * Refresh the logo from the group info in the client session
- */
- void refreshGroupLogo();
-
- /**
- * Reload the logo from the group reloaded from the server
- */
- void reloadGroupLogoImage();
-
-}
\ No newline at end of file
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderButton.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderButton.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderButton.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,44 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.entityheader;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.ui.IconLabel;
-
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-
-public class EntityHeaderButton extends IconLabel implements View {
- public EntityHeaderButton(final AbstractImagePrototype icon, final String text) {
- super(icon, text, false);
- setDefStyle();
- }
-
- public EntityHeaderButton(final String text, final AbstractImagePrototype icon) {
- super(text, icon, false);
- setDefStyle();
- }
-
- private void setDefStyle() {
- addStyleName("kune-Margin-Medium-t");
- addStyleName("kune-pointer");
- addStyleName("kune-floatright");
- }
-
-}
\ No newline at end of file
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPanel.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPanel.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,132 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.entityheader;
-
-import java.util.Date;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.ui.ComplexToolbar;
-import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
-import org.ourproject.kune.platf.client.actions.ui.GuiBindingsRegister;
-import org.ourproject.kune.platf.client.services.Images;
-import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-
-import cc.kune.core.client.services.FileConstants;
-import cc.kune.core.client.services.FileDownloadUtils;
-import cc.kune.core.shared.domain.utils.StateToken;
-import cc.kune.core.shared.dto.GroupDTO;
-
-import com.calclab.suco.client.ioc.Provider;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Widget;
-
-public class EntityHeaderPanel extends HorizontalPanel implements EntityHeaderView {
-
- private final Provider<FileDownloadUtils> downloadProvider;
- private final EntityTextLogo entityTextLogo;
- private final Images images;
- private final VerticalPanel vpanel;
- private final ComplexToolbar toolbar;
-
- public EntityHeaderPanel(final WorkspaceSkeleton wskel, final Provider<FileDownloadUtils> downloadProvider,
- final Images images, final GuiBindingsRegister bindings) {
- super();
- super.setWidth("100%");
- this.downloadProvider = downloadProvider;
- this.images = images;
- vpanel = new VerticalPanel();
- vpanel.setWidth("100%");
- vpanel.setHorizontalAlignment(ALIGN_RIGHT);
- entityTextLogo = new EntityTextLogo();
- add(entityTextLogo);
- toolbar = new ComplexToolbar(bindings);
- toolbar.setTranspStyle();
- vpanel.add(toolbar);
- add(vpanel);
- wskel.addToEntityMainHeader(this);
- }
-
- public void addAction(final OldGuiActionDescrip descriptor) {
- toolbar.add(descriptor);
- }
-
- public void addWidget(final View view) {
- final Widget widget = (Widget) view;
- vpanel.add(widget);
- }
-
- public void reloadImage(final GroupDTO group) {
- entityTextLogo.setLogoImage(downloadProvider.get().getLogoImageUrl(group.getStateToken()) + "&nocache="
- + new Date().getTime());
- }
-
- @Deprecated
- public void setFullLogo(final StateToken stateToken, final boolean clipped) {
- clear();
- final String imageUrl = downloadProvider.get().getImageUrl(stateToken);
- Image logo;
- if (clipped) {
- logo = new Image(imageUrl, 0, 0, FileConstants.LOGO_DEF_WIDTH, FileConstants.LOGO_DEF_HEIGHT);
- } else {
- logo = new Image(imageUrl);
- logo.setWidth(String.valueOf(FileConstants.LOGO_DEF_WIDTH));
- logo.setHeight(String.valueOf(FileConstants.LOGO_DEF_HEIGHT));
- }
- add(logo);
- }
-
- public void setLargeFont() {
- entityTextLogo.setLargeFont();
- }
-
- public void setLogoImage(final StateToken stateToken) {
- entityTextLogo.setLogoImage(downloadProvider.get().getLogoImageUrl(stateToken));
- }
-
- public void setLogoImageVisible(final boolean visible) {
- entityTextLogo.setLogoVisible(visible);
- }
-
- public void setLogoText(final String groupName) {
- entityTextLogo.setLogoText(groupName);
- }
-
- public void setMediumFont() {
- entityTextLogo.setMediumFont();
- }
-
- public void setSmallFont() {
- entityTextLogo.setSmallFont();
- }
-
- public void setTheme(final WsTheme oldTheme, final WsTheme newTheme) {
- if (oldTheme != null) {
- entityTextLogo.removeStyleDependentName(oldTheme.toString());
- }
- entityTextLogo.addStyleDependentName(newTheme.toString());
- }
-
- public void showDefUserLogo() {
- entityTextLogo.setLogoImage(images.personAvatarDef());
- }
-}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderPresenter.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,102 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.entityheader;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-import org.ourproject.kune.workspace.client.themes.WsThemeManager;
-
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.dto.GroupDTO;
-
-import com.calclab.suco.client.events.Listener2;
-
-public class EntityHeaderPresenter implements EntityHeader {
- private static final int MEDIUM_NAME_LIMIT = 90;
- private static final int LARGE_NAME_LIMIT = 20;
-
- private EntityHeaderView view;
- private final Session session;
-
- public EntityHeaderPresenter(final StateManager stateManager, final WsThemeManager theme, final Session session) {
- this.session = session;
-
- stateManager.onGroupChanged(new Listener2<String, String>() {
- public void onEvent(final String oldGroup, final String newGroup) {
- setGroupLogo(session.getCurrentState().getGroup());
- }
- });
- theme.addOnThemeChanged(new Listener2<WsTheme, WsTheme>() {
- public void onEvent(final WsTheme oldTheme, final WsTheme newTheme) {
- view.setTheme(oldTheme, newTheme);
- }
- });
- }
-
- public void addAction(final OldGuiActionDescrip descriptor) {
- view.addAction(descriptor);
- }
-
- public void addWidget(final View widget) {
- view.addWidget(widget);
- }
-
- public void init(final EntityHeaderView view) {
- this.view = view;
- }
-
- public void refreshGroupLogo() {
- setGroupLogo(session.getCurrentState().getGroup());
- }
-
- public void reloadGroupLogoImage() {
- view.reloadImage(session.getCurrentState().getGroup());
- }
-
- void setGroupLogo(final GroupDTO group) {
- if (group.hasLogo()) {
- setLogoText(group.getLongName());
- view.setLogoImage(group.getStateToken());
- view.setLogoImageVisible(true);
- } else {
- setLogoText(group.getLongName());
- if (group.isPersonal()) {
- view.showDefUserLogo();
- view.setLogoImageVisible(true);
- } else {
- view.setLogoImageVisible(false);
- }
- }
- }
-
- void setLogoText(final String name) {
- final int length = name.length();
- if (length <= LARGE_NAME_LIMIT) {
- view.setLargeFont();
- } else if (length <= MEDIUM_NAME_LIMIT) {
- view.setMediumFont();
- } else {
- view.setSmallFont();
- }
- view.setLogoText(name);
- }
-}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderView.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderView.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityHeaderView.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,52 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.entityheader;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
-import org.ourproject.kune.workspace.client.themes.WsTheme;
-
-import cc.kune.core.shared.domain.utils.StateToken;
-import cc.kune.core.shared.dto.GroupDTO;
-
-public interface EntityHeaderView {
-
- void addAction(OldGuiActionDescrip descriptor);
-
- void addWidget(View view);
-
- void reloadImage(GroupDTO group);
-
- void setLargeFont();
-
- void setLogoImage(StateToken stateToken);
-
- void setLogoImageVisible(boolean visible);
-
- void setLogoText(final String groupName);
-
- void setMediumFont();
-
- void setSmallFont();
-
- void setTheme(final WsTheme oldTheme, WsTheme newTheme);
-
- void showDefUserLogo();
-}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityTextLogo.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityTextLogo.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheader/EntityTextLogo.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,117 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.entityheader;
-
-import com.google.gwt.user.client.ui.AbstractImagePrototype;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.VerticalPanel;
-
-public class EntityTextLogo extends VerticalPanel {
-
- public static final String LOGO_NAME = "k-elogop-ln";
- public static final String LOGO_IMAGE = "k-elogop-image";
-
- private static final String _100 = "100%";
- private static final String LOGO_MEDIUM_FONT_STYLE = "k-elogo-l-m";
- private static final String LOGO_SMALL_FONT_STYLE = "k-elogo-l-s";
- private static final String LOGO_LARGE_FONT_STYLE = "k-elogo-l-l";
- private final Label logoLabel;
- private final Image logoImage;
-
- public EntityTextLogo() {
- // Initialize
- super();
- final HorizontalPanel generalHP = new HorizontalPanel();
- final VerticalPanel logoTextVP = new VerticalPanel();
- logoImage = new Image();
- logoLabel = new Label();
- final Label expandCell = new Label("");
-
- logoImage.ensureDebugId(LOGO_IMAGE);
- logoLabel.ensureDebugId(LOGO_NAME);
-
- // Layout
- add(generalHP);
- generalHP.add(logoImage);
- generalHP.add(logoTextVP);
- logoTextVP.add(logoLabel);
-
- // Set properties
-
- expandCell.setStyleName("k-elogop-expand");
- generalHP.setWidth(_100);
- generalHP.setHeight(_100);
- generalHP.setCellWidth(logoTextVP, _100);
- generalHP.setCellHeight(logoTextVP, _100);
- logoTextVP.setWidth(_100);
- logoTextVP.setCellWidth(logoLabel, _100);
- super.setVerticalAlignment(ALIGN_MIDDLE);
- logoTextVP.setVerticalAlignment(ALIGN_MIDDLE);
- generalHP.setVerticalAlignment(ALIGN_MIDDLE);
- setStylePrimaryName("k-entitytextlogo");
- addStyleName("k-entitytextlogo-no-border");
- logoImage.setVisible(false);
- setLogoTextImpl("");
- }
-
- public void setLargeFont() {
- resetFontSize();
- logoLabel.addStyleName(LOGO_LARGE_FONT_STYLE);
- }
-
- public void setLogoImage(final AbstractImagePrototype imageProto) {
- imageProto.applyTo(logoImage);
- }
-
- public void setLogoImage(final String url) {
- Image.prefetch(url);
- logoImage.setUrl(url);
- }
-
- public void setLogoText(final String text) {
- setLogoTextImpl(text);
- }
-
- public void setLogoVisible(final boolean visible) {
- logoImage.setVisible(visible);
- }
-
- public void setMediumFont() {
- resetFontSize();
- logoLabel.addStyleName(LOGO_MEDIUM_FONT_STYLE);
- }
-
- public void setSmallFont() {
- resetFontSize();
- logoLabel.addStyleName(LOGO_SMALL_FONT_STYLE);
- }
-
- private void resetFontSize() {
- logoLabel.removeStyleName(LOGO_LARGE_FONT_STYLE);
- logoLabel.removeStyleName(LOGO_SMALL_FONT_STYLE);
- logoLabel.removeStyleName(LOGO_MEDIUM_FONT_STYLE);
- }
-
- private void setLogoTextImpl(final String text) {
- logoLabel.setText(text);
- }
-}
\ No newline at end of file
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/entityheadermaxmin (from rev 1248, trunk/src/main/java/org/ourproject/kune/workspace/client/entityheadermaxmin)
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePresenter.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePresenter.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,54 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.nohomepage;
-
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.dto.StateAbstractDTO;
-import cc.kune.core.shared.dto.StateNoContentDTO;
-
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
-
-public class NoHomePagePresenter implements NoHomePage {
-
- private NoHomePageView view;
-
- public NoHomePagePresenter(final StateManager stateManager, final Provider<EntityHeader> entityLogoProvider) {
- stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
- public void onEvent(StateAbstractDTO state) {
- if (state instanceof StateNoContentDTO) {
- view.clearWs();
- entityLogoProvider.get().refreshGroupLogo();
- }
- }
- });
- }
-
- public View getView() {
- return view;
- }
-
- public void init(NoHomePageView view) {
- this.view = view;
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePresenter.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePresenter.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePresenter.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/nohomepage/NoHomePagePresenter.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,54 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.nohomepage;
+
+import org.ourproject.kune.platf.client.View;
+
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.dto.StateAbstractDTO;
+import cc.kune.core.shared.dto.StateNoContentDTO;
+
+import com.calclab.suco.client.events.Listener;
+import com.calclab.suco.client.ioc.Provider;
+
+public class NoHomePagePresenter implements NoHomePage {
+
+ private NoHomePageView view;
+
+ public NoHomePagePresenter(final StateManager stateManager, final Provider<EntityHeader> entityLogoProvider) {
+ stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
+ public void onEvent(StateAbstractDTO state) {
+ if (state instanceof StateNoContentDTO) {
+ view.clearWs();
+ entityLogoProvider.get().refreshGroupLogo();
+ }
+ }
+ });
+ }
+
+ public View getView() {
+ return view;
+ }
+
+ public void init(NoHomePageView view) {
+ this.view = view;
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/oldsn/other/AddAsBuddieHeaderButton.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/oldsn/other/AddAsBuddieHeaderButton.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/oldsn/other/AddAsBuddieHeaderButton.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,103 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.oldsn.other;
-
-import org.ourproject.kune.chat.client.ChatEngine;
-import org.ourproject.kune.platf.client.actions.OldAbstractAction;
-import org.ourproject.kune.platf.client.actions.AbstractExtendedAction;
-import org.ourproject.kune.platf.client.actions.Action;
-import org.ourproject.kune.platf.client.actions.ActionEvent;
-import org.ourproject.kune.platf.client.actions.PropertyChangeEvent;
-import org.ourproject.kune.platf.client.actions.PropertyChangeListener;
-import org.ourproject.kune.platf.client.actions.ui.ButtonDescriptor;
-import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-
-import cc.kune.core.client.resources.icons.IconConstants;
-import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.dto.StateAbstractDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.events.Listener0;
-import com.calclab.suco.client.ioc.Provider;
-
-public class AddAsBuddieHeaderButton {
-
- public static class AddAsBuddieAction extends AbstractExtendedAction {
- private final Provider<ChatEngine> chatEngine;
- private final Session session;
-
- public AddAsBuddieAction(final Provider<ChatEngine> chatEngine, final Session session,
- final StateManager stateManager, final I18nTranslationService i18n, final IconResources img) {
- super();
- this.chatEngine = chatEngine;
- this.session = session;
- stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
- public void onEvent(final StateAbstractDTO state) {
- setState(state);
- }
- });
- chatEngine.get().addOnRosterChanged(new Listener0() {
- public void onEvent() {
- setState(session.getCurrentState());
- }
- });
- putValue(Action.NAME, i18n.t("Add as a buddie"));
- putValue(Action.SMALL_ICON, IconConstants.toPath(img.addGreen()));
- }
-
- public void actionPerformed(final ActionEvent event) {
- chatEngine.get().addNewBuddie(session.getCurrentState().getGroup().getShortName());
- NotifyUser.info("Added as buddie. Waiting buddie response");
- setEnabled(false);
- }
-
- private void setState(final StateAbstractDTO state) {
- final String groupName = state.getGroup().getShortName();
- final boolean isPersonal = state.getGroup().isPersonal();
- final boolean isLogged = session.isLogged();
- if (isLogged && isPersonal && (!chatEngine.get().isBuddie(groupName))
- && (!session.getCurrentUser().getShortName().equals(groupName))) {
- setEnabled(true);
- } else {
- setEnabled(false);
- }
- }
- }
-
- public AddAsBuddieHeaderButton(final Provider<ChatEngine> chatEngine, final Session session,
- final StateManager stateManager, final I18nTranslationService i18n, final IconResources img,
- final EntityHeader entityHeader) {
- final AddAsBuddieAction buddieAction = new AddAsBuddieAction(chatEngine, session, stateManager, i18n, img);
- final ButtonDescriptor button = new ButtonDescriptor(buddieAction);
- button.setVisible(false);
- buddieAction.addPropertyChangeListener(new PropertyChangeListener() {
- public void propertyChange(final PropertyChangeEvent event) {
- if (event.getPropertyName().equals(OldAbstractAction.ENABLED)) {
- button.setVisible((Boolean) event.getNewValue());
- }
- }
- });
- entityHeader.addAction(button);
- }
-}
\ No newline at end of file
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,63 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
-import org.ourproject.kune.platf.client.app.GroupOptionsCollection;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-
-import cc.kune.common.client.noti.NotifyLevelImages;
-import cc.kune.core.client.resources.CoreMessages;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-public class GroupOptionsPanel extends AbstractTabbedDialogPanel implements GroupOptionsView {
-
- public static final String GROUP_OP_PANEL_ID = "k-gop-diagpan";
- public static final String GROUP_OPTIONS_ERROR_ID = "k-gop-err-mess";
- private final EntityHeader entityHeader;
-
- private final GroupOptionsCollection entityPreferencesGroup;
-
- public GroupOptionsPanel(final EntityOptions presenter, final EntityHeader entityHeader,
- final I18nTranslationService i18n, final NotifyLevelImages images,
- final GroupOptionsCollection entityOptionsGroup) {
- super(GROUP_OP_PANEL_ID, "", 400, HEIGHT + 80, 400, HEIGHT + 80, false, images, GROUP_OPTIONS_ERROR_ID);
- this.entityHeader = entityHeader;
- this.entityPreferencesGroup = entityOptionsGroup;
- super.setIconCls("k-options-icon");
- super.setTitle(i18n.t(CoreMessages.GROUP_OPTIONS_DIALOG_TITLE));
- }
-
- @Override
- public void addAction(final OldGuiActionDescrip descriptor) {
- entityHeader.addAction(descriptor);
- }
-
- @Override
- public void createAndShow() {
- createAndShowItImpl();
- }
-
- private void createAndShowItImpl() {
- entityPreferencesGroup.createAll();
- super.createAndShow();
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/GroupOptionsPanel.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,63 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.options;
+
+import org.ourproject.kune.platf.client.actions.ui.OldGuiActionDescrip;
+import org.ourproject.kune.platf.client.app.GroupOptionsCollection;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+
+import cc.kune.common.client.noti.NotifyLevelImages;
+import cc.kune.core.client.resources.CoreMessages;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+public class GroupOptionsPanel extends AbstractTabbedDialogPanel implements GroupOptionsView {
+
+ public static final String GROUP_OP_PANEL_ID = "k-gop-diagpan";
+ public static final String GROUP_OPTIONS_ERROR_ID = "k-gop-err-mess";
+ private final EntityHeader entityHeader;
+
+ private final GroupOptionsCollection entityPreferencesGroup;
+
+ public GroupOptionsPanel(final EntityOptions presenter, final EntityHeader entityHeader,
+ final I18nTranslationService i18n, final NotifyLevelImages images,
+ final GroupOptionsCollection entityOptionsGroup) {
+ super(GROUP_OP_PANEL_ID, "", 400, HEIGHT + 80, 400, HEIGHT + 80, false, images, GROUP_OPTIONS_ERROR_ID);
+ this.entityHeader = entityHeader;
+ this.entityPreferencesGroup = entityOptionsGroup;
+ super.setIconCls("k-options-icon");
+ super.setTitle(i18n.t(CoreMessages.GROUP_OPTIONS_DIALOG_TITLE));
+ }
+
+ @Override
+ public void addAction(final OldGuiActionDescrip descriptor) {
+ // entityHeader.addAction(descriptor);
+ }
+
+ @Override
+ public void createAndShow() {
+ createAndShowItImpl();
+ }
+
+ private void createAndShowItImpl() {
+ entityPreferencesGroup.createAll();
+ super.createAndShow();
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,55 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options;
-
-import org.ourproject.kune.platf.client.app.UserOptionsCollection;
-import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-
-import cc.kune.common.client.noti.NotifyLevelImages;
-import cc.kune.core.client.resources.CoreMessages;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-public class UserOptionsPanel extends AbstractTabbedDialogPanel implements UserOptionsView {
-
- public static final String USER_OP_PANEL_ID = "k-uop-diagpan";
- public static final String USER_OPTIONS_ERROR_ID = "k-uop-err-mess";
-
- private final UserOptionsCollection userPreferencesGroup;
-
- public UserOptionsPanel(final EntityOptions presenter, final EntityHeader entityHeader,
- final I18nTranslationService i18n, final NotifyLevelImages images,
- final UserOptionsCollection userOptionsGroup) {
- super(USER_OP_PANEL_ID, "", 400, HEIGHT + 80, 400, HEIGHT + 80, false, images, USER_OPTIONS_ERROR_ID);
- this.userPreferencesGroup = userOptionsGroup;
- super.setIconCls("k-options-icon");
- super.setTitle(i18n.t(CoreMessages.USER_OPTIONS_DIALOG_TITLE));
- }
-
- @Override
- public void createAndShow() {
- createAndShowItImpl();
- }
-
- private void createAndShowItImpl() {
- userPreferencesGroup.createAll();
- super.createAndShow();
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/UserOptionsPanel.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,55 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.options;
+
+import org.ourproject.kune.platf.client.app.UserOptionsCollection;
+import org.ourproject.kune.platf.client.ui.dialogs.tabbed.AbstractTabbedDialogPanel;
+
+import cc.kune.common.client.noti.NotifyLevelImages;
+import cc.kune.core.client.resources.CoreMessages;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+public class UserOptionsPanel extends AbstractTabbedDialogPanel implements UserOptionsView {
+
+ public static final String USER_OP_PANEL_ID = "k-uop-diagpan";
+ public static final String USER_OPTIONS_ERROR_ID = "k-uop-err-mess";
+
+ private final UserOptionsCollection userPreferencesGroup;
+
+ public UserOptionsPanel(final EntityOptions presenter, final EntityHeader entityHeader,
+ final I18nTranslationService i18n, final NotifyLevelImages images,
+ final UserOptionsCollection userOptionsGroup) {
+ super(USER_OP_PANEL_ID, "", 400, HEIGHT + 80, 400, HEIGHT + 80, false, images, USER_OPTIONS_ERROR_ID);
+ this.userPreferencesGroup = userOptionsGroup;
+ super.setIconCls("k-options-icon");
+ super.setTitle(i18n.t(CoreMessages.USER_OPTIONS_DIALOG_TITLE));
+ }
+
+ @Override
+ public void createAndShow() {
+ createAndShowItImpl();
+ }
+
+ private void createAndShowItImpl() {
+ userPreferencesGroup.createAll();
+ super.createAndShow();
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPresenter.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPresenter.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,72 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- \*/
-package org.ourproject.kune.workspace.client.options.logo;
-
-import org.ourproject.kune.chat.client.ChatEngine;
-import org.ourproject.kune.platf.client.View;
-import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
-import cc.kune.core.client.rpcservices.UserServiceAsync;
-import cc.kune.core.client.state.Session;
-
-import com.calclab.suco.client.ioc.Provider;
-
-public abstract class EntityOptionsLogoPresenter implements GroupOptionsLogo, UserOptionsLogo {
-
- protected EntityOptionsLogoView view;
- protected final Session session;
- private final EntityHeader entityLogo;
- private final EntityOptions entityOptions;
- protected final Provider<UserServiceAsync> userService;
- protected final Provider<ChatEngine> chatEngine;
-
- public EntityOptionsLogoPresenter(final Session session, final EntityHeader entityLogo,
- final EntityOptions entityOptions, final Provider<UserServiceAsync> userService,
- final Provider<ChatEngine> chatEngine) {
- this.session = session;
- this.entityLogo = entityLogo;
- this.entityOptions = entityOptions;
- this.userService = userService;
- this.chatEngine = chatEngine;
- }
-
- public View getView() {
- return view;
- }
-
- public void init(final EntityOptionsLogoView view) {
- this.view = view;
- entityOptions.addTab(view);
- setState();
- }
-
- public void onSubmitComplete(final int httpStatus, final String photoBinary) {
- entityLogo.reloadGroupLogoImage();
- }
-
- public void onSubmitFailed(final int httpStatus, final String responseText) {
- NotifyUser.error("Error setting the logo: " + responseText);
- }
-
- protected abstract void setState();
-
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPresenter.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPresenter.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPresenter.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/EntityOptionsLogoPresenter.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,72 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ \*/
+package org.ourproject.kune.workspace.client.options.logo;
+
+import org.ourproject.kune.chat.client.ChatEngine;
+import org.ourproject.kune.platf.client.View;
+import org.ourproject.kune.platf.client.ui.noti.NotifyUser;
+import org.ourproject.kune.workspace.client.options.EntityOptions;
+
+import cc.kune.core.client.rpcservices.UserServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+
+import com.calclab.suco.client.ioc.Provider;
+
+public abstract class EntityOptionsLogoPresenter implements GroupOptionsLogo, UserOptionsLogo {
+
+ protected EntityOptionsLogoView view;
+ protected final Session session;
+ private final EntityHeader entityLogo;
+ private final EntityOptions entityOptions;
+ protected final Provider<UserServiceAsync> userService;
+ protected final Provider<ChatEngine> chatEngine;
+
+ public EntityOptionsLogoPresenter(final Session session, final EntityHeader entityLogo,
+ final EntityOptions entityOptions, final Provider<UserServiceAsync> userService,
+ final Provider<ChatEngine> chatEngine) {
+ this.session = session;
+ this.entityLogo = entityLogo;
+ this.entityOptions = entityOptions;
+ this.userService = userService;
+ this.chatEngine = chatEngine;
+ }
+
+ public View getView() {
+ return view;
+ }
+
+ public void init(final EntityOptionsLogoView view) {
+ this.view = view;
+ entityOptions.addTab(view);
+ setState();
+ }
+
+ public void onSubmitComplete(final int httpStatus, final String photoBinary) {
+ entityLogo.reloadGroupLogoImage();
+ }
+
+ public void onSubmitFailed(final int httpStatus, final String responseText) {
+ NotifyUser.error("Error setting the logo: " + responseText);
+ }
+
+ protected abstract void setState();
+
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPresenter.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPresenter.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,56 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options.logo;
-
-import org.ourproject.kune.chat.client.ChatEngine;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
-import cc.kune.core.client.rpcservices.UserServiceAsync;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-
-import com.calclab.suco.client.events.Listener2;
-import com.calclab.suco.client.ioc.Provider;
-
-public class GroupOptionsLogoPresenter extends EntityOptionsLogoPresenter {
-
- public GroupOptionsLogoPresenter(final Session session, final EntityHeader entityLogo,
- final EntityOptions entityOptions, final StateManager stateManager,
- final Provider<UserServiceAsync> userService, final Provider<ChatEngine> chatEngine) {
- super(session, entityLogo, entityOptions, userService, chatEngine);
- stateManager.onGroupChanged(new Listener2<String, String>() {
- public void onEvent(final String group1, final String group2) {
- setState();
- }
- });
- }
-
- @Override
- public void init(final EntityOptionsLogoView view) {
- super.init(view);
- view.setNormalGroupsLabels();
- }
-
- @Override
- protected void setState() {
- view.setUploadParams(session.getUserHash(), session.getCurrentStateToken().toString());
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPresenter.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPresenter.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPresenter.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/GroupOptionsLogoPresenter.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.options.logo;
+
+import org.ourproject.kune.chat.client.ChatEngine;
+import org.ourproject.kune.workspace.client.options.EntityOptions;
+
+import cc.kune.core.client.rpcservices.UserServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+
+import com.calclab.suco.client.events.Listener2;
+import com.calclab.suco.client.ioc.Provider;
+
+public class GroupOptionsLogoPresenter extends EntityOptionsLogoPresenter {
+
+ public GroupOptionsLogoPresenter(final Session session, final EntityHeader entityLogo,
+ final EntityOptions entityOptions, final StateManager stateManager,
+ final Provider<UserServiceAsync> userService, final Provider<ChatEngine> chatEngine) {
+ super(session, entityLogo, entityOptions, userService, chatEngine);
+ stateManager.onGroupChanged(new Listener2<String, String>() {
+ public void onEvent(final String group1, final String group2) {
+ setState();
+ }
+ });
+ }
+
+ @Override
+ public void init(final EntityOptionsLogoView view) {
+ super.init(view);
+ view.setNormalGroupsLabels();
+ }
+
+ @Override
+ protected void setState() {
+ view.setUploadParams(session.getUserHash(), session.getCurrentStateToken().toString());
+ }
+}
Deleted: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPresenter.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPresenter.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,73 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package org.ourproject.kune.workspace.client.options.logo;
-
-import org.ourproject.kune.chat.client.ChatEngine;
-import org.ourproject.kune.workspace.client.entityheader.EntityHeader;
-import org.ourproject.kune.workspace.client.options.EntityOptions;
-
-import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
-import cc.kune.core.client.rpcservices.UserServiceAsync;
-import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.dto.GroupDTO;
-import cc.kune.core.shared.dto.UserInfoDTO;
-
-import com.calclab.suco.client.events.Listener;
-import com.calclab.suco.client.ioc.Provider;
-
-public class UserOptionsLogoPresenter extends EntityOptionsLogoPresenter {
-
- public UserOptionsLogoPresenter(final Session session, final EntityHeader entityLogo,
- final EntityOptions entityOptions, final StateManager stateManager,
- final Provider<UserServiceAsync> userService, final Provider<ChatEngine> chatEngine) {
- super(session, entityLogo, entityOptions, userService, chatEngine);
- session.onUserSignIn(new Listener<UserInfoDTO>() {
- public void onEvent(final UserInfoDTO parameter) {
- setState();
- }
- });
- }
-
- @Override
- public void init(final EntityOptionsLogoView view) {
- super.init(view);
- view.setPersonalGroupsLabels();
- }
-
- @Override
- public void onSubmitComplete(final int httpStatus, final String photoBinary) {
- super.onSubmitComplete(httpStatus, photoBinary);
- final GroupDTO group = session.getCurrentState().getGroup();
- if (session.getCurrentUser().getShortName().equals(group.getShortName())) {
- userService.get().getUserAvatarBaser64(session.getUserHash(), group.getStateToken(),
- new AsyncCallbackSimple<String>() {
- public void onSuccess(final String photoBinary) {
- chatEngine.get().setAvatar(photoBinary);
- }
- });
- }
- }
-
- @Override
- protected void setState() {
- view.setUploadParams(session.getUserHash(), session.getCurrentUser().getStateToken().toString());
- }
-}
Copied: branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPresenter.java (from rev 1248, trunk/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPresenter.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPresenter.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/main/java/org/ourproject/kune/workspace/client/options/logo/UserOptionsLogoPresenter.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,73 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package org.ourproject.kune.workspace.client.options.logo;
+
+import org.ourproject.kune.chat.client.ChatEngine;
+import org.ourproject.kune.workspace.client.options.EntityOptions;
+
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.UserServiceAsync;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.ws.entheader.EntityHeader;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.dto.UserInfoDTO;
+
+import com.calclab.suco.client.events.Listener;
+import com.calclab.suco.client.ioc.Provider;
+
+public class UserOptionsLogoPresenter extends EntityOptionsLogoPresenter {
+
+ public UserOptionsLogoPresenter(final Session session, final EntityHeader entityLogo,
+ final EntityOptions entityOptions, final StateManager stateManager,
+ final Provider<UserServiceAsync> userService, final Provider<ChatEngine> chatEngine) {
+ super(session, entityLogo, entityOptions, userService, chatEngine);
+ session.onUserSignIn(new Listener<UserInfoDTO>() {
+ public void onEvent(final UserInfoDTO parameter) {
+ setState();
+ }
+ });
+ }
+
+ @Override
+ public void init(final EntityOptionsLogoView view) {
+ super.init(view);
+ view.setPersonalGroupsLabels();
+ }
+
+ @Override
+ public void onSubmitComplete(final int httpStatus, final String photoBinary) {
+ super.onSubmitComplete(httpStatus, photoBinary);
+ final GroupDTO group = session.getCurrentState().getGroup();
+ if (session.getCurrentUser().getShortName().equals(group.getShortName())) {
+ userService.get().getUserAvatarBaser64(session.getUserHash(), group.getStateToken(),
+ new AsyncCallbackSimple<String>() {
+ public void onSuccess(final String photoBinary) {
+ chatEngine.get().setAvatar(photoBinary);
+ }
+ });
+ }
+ }
+
+ @Override
+ protected void setState() {
+ view.setUploadParams(session.getUserHash(), session.getCurrentUser().getStateToken().toString());
+ }
+}
Copied: branches/wave-jetty-embed-guice/src/test/java/cc/kune/core/client/ws (from rev 1248, trunk/src/test/java/cc/kune/core/client/ws)
Deleted: branches/wave-jetty-embed-guice/src/test/java/testsuites/OthersTestSuite.java
===================================================================
--- trunk/src/test/java/testsuites/OthersTestSuite.java 2011-02-11 18:17:57 UTC (rev 1247)
+++ branches/wave-jetty-embed-guice/src/test/java/testsuites/OthersTestSuite.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
- * This file is part of kune.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-package testsuites;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-import org.ourproject.kune.blogs.server.BlogServerToolTest;
-import org.ourproject.kune.chat.ChatToolTest;
-import org.ourproject.kune.chat.server.managers.XmppManagerTest;
-import org.ourproject.kune.docs.DocumentToolTest;
-import org.ourproject.kune.docs.server.DocumentServerToolTest;
-import org.ourproject.kune.gallery.server.GalleryServerToolTest;
-import org.ourproject.kune.rack.filters.rest.TestRESTMethodFinder;
-import org.ourproject.kune.rack.filters.rest.TestRESTServiceDefinition;
-import org.ourproject.kune.wiki.server.WikiServerToolTest;
-import org.ourproject.kune.workspace.client.entityheader.EntityLogoPresenterTest;
-import org.ourproject.kune.workspace.client.licensewizard.LicenseWizardPresenterTest;
-import org.ourproject.kune.workspace.client.socialnet.RolActionTest;
-import org.ourproject.kune.workspace.client.socialnet.RolComparatorTest;
-import org.ourproject.kune.workspace.client.tags.TagsSummaryPresenterTest;
-import org.ourproject.kune.workspace.client.tool.ToolSelectorPresenterTest;
-
-/**
- * Rescan with :
- *
- * <pre>
- * find src/test/java/org/ourproject/kune/{chat,docs,gallery,wiki,workspace,blogs,rack} -name '*.java' -exec basename \{} .java \;| paste -s - - | sed 's/ /.class, /g'
- *
- * </pre>
- *
- */
- at RunWith(Suite.class)
- at SuiteClasses({ ChatToolTest.class, XmppManagerTest.class, DocumentToolTest.class, DocumentServerToolTest.class,
- GalleryServerToolTest.class, WikiServerToolTest.class, EntityLogoPresenterTest.class,
- ToolSelectorPresenterTest.class, TagsSummaryPresenterTest.class, RolActionTest.class, RolComparatorTest.class,
- LicenseWizardPresenterTest.class, BlogServerToolTest.class, TestRESTServiceDefinition.class,
- TestRESTMethodFinder.class })
-public class OthersTestSuite {
-}
Copied: branches/wave-jetty-embed-guice/src/test/java/testsuites/OthersTestSuite.java (from rev 1248, trunk/src/test/java/testsuites/OthersTestSuite.java)
===================================================================
--- branches/wave-jetty-embed-guice/src/test/java/testsuites/OthersTestSuite.java (rev 0)
+++ branches/wave-jetty-embed-guice/src/test/java/testsuites/OthersTestSuite.java 2011-02-12 02:18:52 UTC (rev 1249)
@@ -0,0 +1,58 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package testsuites;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+import org.ourproject.kune.blogs.server.BlogServerToolTest;
+import org.ourproject.kune.chat.ChatToolTest;
+import org.ourproject.kune.chat.server.managers.XmppManagerTest;
+import org.ourproject.kune.docs.DocumentToolTest;
+import org.ourproject.kune.docs.server.DocumentServerToolTest;
+import org.ourproject.kune.gallery.server.GalleryServerToolTest;
+import org.ourproject.kune.rack.filters.rest.TestRESTMethodFinder;
+import org.ourproject.kune.rack.filters.rest.TestRESTServiceDefinition;
+import org.ourproject.kune.wiki.server.WikiServerToolTest;
+import org.ourproject.kune.workspace.client.licensewizard.LicenseWizardPresenterTest;
+import org.ourproject.kune.workspace.client.socialnet.RolActionTest;
+import org.ourproject.kune.workspace.client.socialnet.RolComparatorTest;
+import org.ourproject.kune.workspace.client.tags.TagsSummaryPresenterTest;
+import org.ourproject.kune.workspace.client.tool.ToolSelectorPresenterTest;
+
+import cc.kune.core.client.ws.entheader.EntityLogoPresenterTest;
+
+/**
+ * Rescan with :
+ *
+ * <pre>
+ * find src/test/java/org/ourproject/kune/{chat,docs,gallery,wiki,workspace,blogs,rack} -name '*.java' -exec basename \{} .java \;| paste -s - - | sed 's/ /.class, /g'
+ *
+ * </pre>
+ *
+ */
+ at RunWith(Suite.class)
+ at SuiteClasses({ ChatToolTest.class, XmppManagerTest.class, DocumentToolTest.class, DocumentServerToolTest.class,
+ GalleryServerToolTest.class, WikiServerToolTest.class, EntityLogoPresenterTest.class,
+ ToolSelectorPresenterTest.class, TagsSummaryPresenterTest.class, RolActionTest.class, RolComparatorTest.class,
+ LicenseWizardPresenterTest.class, BlogServerToolTest.class, TestRESTServiceDefinition.class,
+ TestRESTMethodFinder.class })
+public class OthersTestSuite {
+}
More information about the kune-commits
mailing list