[kune-commits] r1257 - in trunk: . src/main/java/cc/kune/chat/client src/main/java/cc/kune/chat/client/resources src/main/java/cc/kune/chat/public src/main/java/cc/kune/client src/main/java/cc/kune/common src/main/java/cc/kune/common/client/actions src/main/java/cc/kune/common/client/actions/gwtui src/main/java/cc/kune/common/client/actions/gxtui src/main/java/cc/kune/common/client/actions/ui src/main/java/cc/kune/common/client/actions/ui/descrip src/main/java/cc/kune/common/client/ui src/main/java/cc/kune/common/public src/main/java/cc/kune/core src/main/java/cc/kune/core/client src/main/java/cc/kune/core/client/resources src/main/java/cc/kune/core/client/resources/icons src/main/java/cc/kune/core/client/sitebar src/main/java/cc/kune/core/client/sn src/main/java/cc/kune/core/client/sn/actions src/main/java/cc/kune/core/client/sn/actions/conditions src/main/java/cc/kune/core/client/sn/actions/registry src/main/java/cc/kune/core/client/state src/main/java/cc/kune/core/client/ui/footer/license src/main/java/cc/kune/core/public src/main/java/cc/kune/core/public/images src/main/java/cc/kune/gspace/client/resources src/main/java/cc/kune/pspace/client src/main/java/cc/kune/wave src/main/java/cc/kune/wave/client
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Mon Feb 21 05:32:15 CET 2011
Author: vjrj_
Date: 2011-02-21 05:32:11 +0100 (Mon, 21 Feb 2011)
New Revision: 1257
Added:
trunk/src/main/java/cc/kune/chat/client/ChatParts.java
trunk/src/main/java/cc/kune/chat/client/ChatSitebarActions.java
trunk/src/main/java/cc/kune/chat/client/StartChatWithMemberAction.java
trunk/src/main/java/cc/kune/chat/client/StartChatWithUserAction.java
trunk/src/main/java/cc/kune/chat/client/resources/
trunk/src/main/java/cc/kune/chat/client/resources/ChatResources.java
trunk/src/main/java/cc/kune/chat/client/resources/add.png
trunk/src/main/java/cc/kune/chat/client/resources/away.png
trunk/src/main/java/cc/kune/chat/client/resources/busy.png
trunk/src/main/java/cc/kune/chat/client/resources/cancel.png
trunk/src/main/java/cc/kune/chat/client/resources/chat-new-message-small.png
trunk/src/main/java/cc/kune/chat/client/resources/chat-small.png
trunk/src/main/java/cc/kune/chat/client/resources/chat.png
trunk/src/main/java/cc/kune/chat/client/resources/del.png
trunk/src/main/java/cc/kune/chat/client/resources/group-chat.png
trunk/src/main/java/cc/kune/chat/client/resources/info-lamp.png
trunk/src/main/java/cc/kune/chat/client/resources/info.png
trunk/src/main/java/cc/kune/chat/client/resources/invisible.png
trunk/src/main/java/cc/kune/chat/client/resources/message.png
trunk/src/main/java/cc/kune/chat/client/resources/new-chat.png
trunk/src/main/java/cc/kune/chat/client/resources/new-email.png
trunk/src/main/java/cc/kune/chat/client/resources/new-message.png
trunk/src/main/java/cc/kune/chat/client/resources/not-authorized.png
trunk/src/main/java/cc/kune/chat/client/resources/offline.png
trunk/src/main/java/cc/kune/chat/client/resources/online.png
trunk/src/main/java/cc/kune/chat/client/resources/question.png
trunk/src/main/java/cc/kune/chat/client/resources/room-new-message-small.png
trunk/src/main/java/cc/kune/chat/client/resources/room-small.png
trunk/src/main/java/cc/kune/chat/client/resources/unavailable.png
trunk/src/main/java/cc/kune/chat/client/resources/user_add.png
trunk/src/main/java/cc/kune/chat/client/resources/xa.png
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuTitleItemGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuTitleItemGui.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuTitleItemDescriptor.java
trunk/src/main/java/cc/kune/core/client/resources/arrowdownsitebar.gif
trunk/src/main/java/cc/kune/core/public/images/clear.gif
trunk/src/main/java/cc/kune/core/public/images/clear.png
Removed:
trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithMemberAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithUserAction.java
Modified:
trunk/.classpath
trunk/pom.xml
trunk/src/main/java/cc/kune/chat/client/ChatClient.java
trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java
trunk/src/main/java/cc/kune/chat/client/KuneHablarSignals.java
trunk/src/main/java/cc/kune/chat/client/KuneUnattendedPresenter.java
trunk/src/main/java/cc/kune/chat/public/kune-chat.css
trunk/src/main/java/cc/kune/chat/public/kune-hablar.css
trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
trunk/src/main/java/cc/kune/client/KuneGinjector.java
trunk/src/main/java/cc/kune/common/KuneCommon.gwt.xml
trunk/src/main/java/cc/kune/common/client/actions/ActionEvent.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtComplexToolbar.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtGuiProvider.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuItemGui.java
trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java
trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java
trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java
trunk/src/main/java/cc/kune/common/client/ui/AbstractFlowToolbar.java
trunk/src/main/java/cc/kune/common/client/ui/FlowToolbar.java
trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
trunk/src/main/java/cc/kune/common/client/ui/IconLabel.ui.xml
trunk/src/main/java/cc/kune/common/client/ui/KuneWindowUtils.java
trunk/src/main/java/cc/kune/common/public/kune-common.css
trunk/src/main/java/cc/kune/core/Core.gwt.xml
trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java
trunk/src/main/java/cc/kune/core/client/resources/icons/IconConstants.java
trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignInLink.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java
trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPresenter.java
trunk/src/main/java/cc/kune/core/client/sn/actions/AcceptJoinGroupAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToAdminAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToCollabAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/DenyJoinGroupAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/GotoGroupAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/RemoveMemberAction.java
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsGroupCondition.java
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsNotMeCondition.java
trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsPersonCondition.java
trunk/src/main/java/cc/kune/core/client/sn/actions/registry/GroupMembersActionsRegistry.java
trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNAdminsMenuItemsRegistry.java
trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNCollabsMenuItemsRegistry.java
trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNPendingsMenuItemsRegistry.java
trunk/src/main/java/cc/kune/core/client/state/Session.java
trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java
trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
trunk/src/main/java/cc/kune/core/client/ui/footer/license/EntityLicensePanel.java
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/cc/kune/core/public/ws.html
trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css
trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java
trunk/src/main/java/cc/kune/wave/KuneWave.gwt.xml
trunk/src/main/java/cc/kune/wave/client/WaveClientTester.java
Log:
Some fixes, SN changes and more emite integration
Modified: trunk/.classpath
===================================================================
--- trunk/.classpath 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/.classpath 2011-02-21 04:32:11 UTC (rev 1257)
@@ -36,7 +36,6 @@
<classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-assisted-inject/2.0/guice-assisted-inject-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-persist/3.0-rc2/guice-persist-3.0-rc2.jar" sourcepath="M2_REPO/com/google/inject/extensions/guice-persist/3.0-rc2/guice-persist-3.0-rc2-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/inject/extensions/guice-servlet/3.0-rc2/guice-servlet-3.0-rc2.jar" sourcepath="M2_REPO/com/google/inject/extensions/guice-servlet/3.0-rc2/guice-servlet-3.0-rc2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/jhickman/web/gwt/gwt-customuibinder/0.1/gwt-customuibinder-0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/adamtacy/gwt-fx/r464/gwt-fx-r464.jar"/>
<classpathentry kind="var" path="M2_REPO/com/google/gwt/gwt-gin/1.0-r137/gwt-gin-1.0-r137.jar"/>
<classpathentry kind="var" path="M2_REPO/com/allen_sauer/gwt/log/gwt-log/gwt-log/3.0.1/gwt-log-3.0.1.jar"/>
@@ -55,9 +54,8 @@
<classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-processors/0.5/gwtp-processors-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-processors/0.5/gwtp-processors-0.5-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/com/gwtplatform/gwtp-tester/0.5/gwtp-tester-0.5.jar" sourcepath="M2_REPO/com/gwtplatform/gwtp-tester/0.5/gwtp-tester-0.5-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/com/extjs/gxt/2.2.1/gxt-2.2.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/jhickman/web/gwt/gxt-uibinder/0.6/gxt-uibinder-0.6.jar"/>
<classpathentry kind="var" path="M2_REPO/com/h2database/h2/1.0.20070617/h2-1.0.20070617.jar"/>
- <classpathentry kind="var" path="M2_REPO/com/calclab/emite/hablar/r1694/hablar-r1694.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/calclab/emite/hablar/r1697/hablar-r1697.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-c3p0/3.3.1.GA/hibernate-c3p0-3.3.1.GA.jar" sourcepath="M2_REPO/org/hibernate/hibernate-c3p0/3.3.1.GA/hibernate-c3p0-3.3.1.GA-sources.jar"/>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/pom.xml 2011-02-21 04:32:11 UTC (rev 1257)
@@ -272,16 +272,18 @@
<artifactId>gwt-fx</artifactId>
<version>r464</version>
</dependency>
+ <!--
<dependency>
<groupId>com.jhickman.web.gwt</groupId>
<artifactId>gwt-customuibinder</artifactId>
<version>0.1</version>
</dependency>
+
<dependency>
<groupId>com.jhickman.web.gwt</groupId>
<artifactId>gxt-uibinder</artifactId>
<version>0.6</version>
- </dependency>
+ </dependency>-->
<!-- cc -->
<dependency>
<groupId>com.gwtext</groupId>
@@ -343,7 +345,7 @@
<dependency>
<groupId>com.calclab.emite</groupId>
<artifactId>hablar</artifactId>
- <version>r1694</version>
+ <version>r1697</version>
</dependency>
<dependency>
<groupId>org.jivesoftware.smack</groupId>
Modified: trunk/src/main/java/cc/kune/chat/client/ChatClient.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClient.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClient.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -29,6 +29,8 @@
void chat(XmppURI jid);
+ void doLogin();
+
boolean isBuddie(String shortName);
boolean isBuddie(XmppURI jid);
@@ -41,6 +43,11 @@
void login(XmppURI uri, String passwd);
+ /**
+ * @return true if loggin is needed
+ */
+ boolean loginIfNecessary();
+
void logout();
void setAvatar(String photoBinary);
Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -41,7 +41,6 @@
import cc.kune.core.client.init.AppStopEvent;
import cc.kune.core.client.logs.Log;
import cc.kune.core.client.resources.icons.IconResources;
-import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
import cc.kune.core.client.sitebar.SitebarActionsPresenter;
import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.UserSignInEvent;
@@ -56,7 +55,6 @@
import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
import com.calclab.emite.im.client.chat.ChatManager;
import com.calclab.emite.im.client.roster.XmppRoster;
-import com.calclab.emite.reconnect.client.SessionReconnect;
import com.calclab.emite.xep.avatar.client.AvatarManager;
import com.calclab.emite.xep.muc.client.Room;
import com.calclab.emite.xep.muc.client.RoomManager;
@@ -90,7 +88,7 @@
this.eventBus = eventBus;
this.res = res;
res.css().ensureInjected();
- putValue(Action.SMALL_ICON, res.chatBlink());
+ putValue(Action.SMALL_ICON, res.chat());
}
@@ -124,17 +122,22 @@
public ChatClientDefault(final EventBus eventBus, final I18nTranslationService i18n, final ChatClientAction action,
final SitebarActionsPresenter siteActions, final Session session,
final GlobalShortcutRegister shorcutRegister, final ChatOptions chatOptions) {
+
+ // , final XmppSession xmppSession,
+ // final XmppRoster roster, final ChatManager chatManager, final
+ // RoomManager roomManager,
+ // final SessionReconnect sessionReconnect, final
+ // Provider<AvatarManager> avatarManager) {
this.i18n = i18n;
this.action = action;
this.siteActions = siteActions;
this.session = session;
this.shorcutRegister = shorcutRegister;
this.chatOptions = chatOptions;
- roster = Suco.get(XmppRoster.class);
- xmppSession = Suco.get(XmppSession.class);
- chatManager = Suco.get(ChatManager.class);
- roomManager = Suco.get(RoomManager.class);
- Suco.get(SessionReconnect.class);
+ this.xmppSession = Suco.get(XmppSession.class);
+ this.roster = Suco.get(XmppRoster.class);
+ this.chatManager = Suco.get(ChatManager.class);
+ this.roomManager = Suco.get(RoomManager.class);
eventBus.addHandler(AppStartEvent.getType(), new AppStartEvent.AppStartHandler() {
@Override
@@ -143,21 +146,21 @@
chatOptions.httpBase = event.getInitData().getChatHttpBase();
chatOptions.roomHost = event.getInitData().getChatRoomHost();
checkChatDomain(chatOptions.domain);
- if (session.isLogged()) {
- session.check(new AsyncCallbackSimple<Void>() {
- @Override
- public void onSuccess(final Void result) {
- doLogin(session.getCurrentUserInfo());
- }
- });
- }
- eventBus.addHandler(UserSignInEvent.getType(), new UserSignInHandler() {
+ // if (session.isLogged()) {
+ // session.check(new AsyncCallbackSimple<Void>() {
+ // @Override
+ // public void onSuccess(final Void result) {
+ // doLogin();
+ // }
+ // });
+ // }
+ session.onUserSignIn(true, new UserSignInHandler() {
@Override
public void onUserSignIn(final UserSignInEvent event) {
- doLogin(session.getCurrentUserInfo());
+ doLogin();
}
});
- eventBus.addHandler(UserSignOutEvent.getType(), new UserSignOutHandler() {
+ session.onUserSignOut(true, new UserSignOutHandler() {
@Override
public void onUserSignOut(final UserSignOutEvent event) {
createActionIfNeeded();
@@ -255,6 +258,12 @@
return popup != null && popup.isShowing();
}
+ @Override
+ public void doLogin() {
+ assert session.getCurrentUserInfo() != null;
+ doLogin(session.getCurrentUserInfo());
+ }
+
private void doLogin(final UserInfoDTO user) {
createActionIfNeeded();
createDialogIfNeeded();
@@ -282,9 +291,8 @@
final HtmlConfig htmlConfig = HtmlConfig.getFromMeta();
final HablarWidget widget = new HablarWidget(config.layout, config.tabHeaderSize);
final Hablar hablar = widget.getHablar();
-
HablarComplete.install(hablar, config);
- new KuneHablarSignals(hablar, action);
+ new KuneHablarSignals(xmppSession, hablar, action);
if (htmlConfig.hasLogger) {
new HablarConsole(hablar);
}
@@ -339,6 +347,15 @@
}
@Override
+ public boolean loginIfNecessary() {
+ if (!isLoggedIn()) {
+ doLogin();
+ return true;
+ }
+ return false;
+ }
+
+ @Override
public void logout() {
if (dialogVisible()) {
popup.hide();
Modified: trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/chat/client/ChatGinModule.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -32,5 +32,7 @@
protected void configure() {
bind(ChatClient.class).to(ChatClientDefault.class).in(Singleton.class);
bind(ChatOptions.class).in(Singleton.class);
+ bind(ChatSitebarActions.class).in(Singleton.class);
+ bind(ChatParts.class).asEagerSingleton();
}
}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/chat/client/ChatParts.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatParts.java (rev 0)
+++ trunk/src/main/java/cc/kune/chat/client/ChatParts.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -0,0 +1,54 @@
+package cc.kune.chat.client;
+
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.core.client.init.AppStartEvent;
+import cc.kune.core.client.init.AppStartEvent.AppStartHandler;
+import cc.kune.core.client.sn.actions.conditions.IsNotMeCondition;
+import cc.kune.core.client.sn.actions.conditions.IsPersonCondition;
+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.Session;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class ChatParts {
+
+ @Inject
+ public ChatParts(final Session session, final Provider<ChatSitebarActions> chatActionsProvider,
+ final Provider<SNAdminsMenuItemsRegistry> snAdminsRegistry,
+ final Provider<SNCollabsMenuItemsRegistry> snCollabsItemsRegistry,
+ final Provider<SNPendingsMenuItemsRegistry> snPendingItemsRegistry, final IsNotMeCondition isNotMe,
+ final IsPersonCondition isPersonCondition,
+ final Provider<StartChatWithMemberAction> startChatWithMemberAction,
+ final Provider<StartChatWithUserAction> startChatWithUserAction) {
+ session.onInitDataReceived(new AppStartHandler() {
+ @Override
+ public void onAppStart(final AppStartEvent event) {
+ chatActionsProvider.get();
+ final Provider<MenuItemDescriptor> startChatWithMemberItem = new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(startChatWithMemberAction.get());
+ item.add(isNotMe);
+ item.add(isPersonCondition);
+ return item;
+ }
+ };
+ final Provider<MenuItemDescriptor> startChatWithUserItem = new Provider<MenuItemDescriptor>() {
+ @Override
+ public MenuItemDescriptor get() {
+ final MenuItemDescriptor item = new MenuItemDescriptor(startChatWithUserAction.get());
+ item.add(isNotMe);
+ item.add(isPersonCondition);
+ return item;
+ }
+ };
+ snAdminsRegistry.get().add(startChatWithMemberItem);
+ snCollabsItemsRegistry.get().add(startChatWithMemberItem);
+ snPendingItemsRegistry.get().add(startChatWithUserItem);
+ }
+ });
+ }
+}
Added: trunk/src/main/java/cc/kune/chat/client/ChatSitebarActions.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatSitebarActions.java (rev 0)
+++ trunk/src/main/java/cc/kune/chat/client/ChatSitebarActions.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -0,0 +1,149 @@
+package cc.kune.chat.client;
+
+import cc.kune.chat.client.resources.ChatResources;
+import cc.kune.common.client.actions.AbstractAction;
+import cc.kune.common.client.actions.AbstractExtendedAction;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.actions.ui.descrip.MenuSeparatorDescriptor;
+import cc.kune.common.client.actions.ui.descrip.MenuTitleItemDescriptor;
+import cc.kune.core.client.sitebar.SiteUserOptions;
+import cc.kune.core.client.sitebar.SiteUserOptionsPresenter;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.UserSignInEvent;
+import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.emite.core.client.events.StateChangedEvent;
+import com.calclab.emite.core.client.events.StateChangedHandler;
+import com.calclab.emite.core.client.xmpp.session.XmppSession;
+import com.calclab.emite.core.client.xmpp.stanzas.Presence;
+import com.calclab.emite.core.client.xmpp.stanzas.Presence.Show;
+import com.calclab.emite.im.client.presence.PresenceManager;
+import com.calclab.emite.im.client.presence.events.OwnPresenceChangedEvent;
+import com.calclab.emite.im.client.presence.events.OwnPresenceChangedHandler;
+import com.calclab.suco.client.Suco;
+import com.google.gwt.resources.client.ImageResource;
+import com.google.inject.Inject;
+
+public class ChatSitebarActions {
+
+ public class ChangeOfflineStatusAction extends AbstractExtendedAction {
+ public ChangeOfflineStatusAction(final ImageResource icon) {
+ xmppSession.addSessionStateChangedHandler(true, new StateChangedHandler() {
+ @Override
+ public void onStateChanged(final StateChangedEvent event) {
+ if (!xmppSession.isReady()) {
+ SiteUserOptionsPresenter.LOGGED_USER_MENU.putValue(AbstractAction.SMALL_ICON, icon);
+ }
+ }
+ });
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ // presenceManager.changeOwnPresence(Presence.build(NO_STATUS,
+ // Show.xa));
+ xmppSession.logout();
+ }
+ }
+ public class ChangeOnlineStatusAction extends AbstractExtendedAction {
+ private final Presence thisPresence;
+
+ public ChangeOnlineStatusAction(final String statusText, final Show show, final ImageResource icon) {
+ thisPresence = Presence.build(statusText, show);
+ presenceManager.addOwnPresenceChangedHandler(new OwnPresenceChangedHandler() {
+
+ @Override
+ public void onOwnPresenceChanged(final OwnPresenceChangedEvent event) {
+ updateStatusIcon(icon, event.getCurrentPresence());
+ }
+
+ });
+ updateStatusIcon(icon, presenceManager.getOwnPresence());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ if (!chatClient.loginIfNecessary()) {
+ presenceManager.changeOwnPresence(thisPresence);
+ }
+ nextPresence = thisPresence;
+ }
+
+ private void updateStatusIcon(final ImageResource icon, final Presence currentPresence) {
+ if (thisPresence.getShow().equals(currentPresence.getShow())
+ && ((currentPresence.getStatus() == null) || currentPresence.getStatus().equals(
+ thisPresence.getStatus()))) {
+ SiteUserOptionsPresenter.LOGGED_USER_MENU.putValue(AbstractAction.SMALL_ICON, icon);
+ }
+ }
+ }
+
+ private static final String CHAT_STATUS = "k-chat-status-group";
+ private static final String NO_STATUS = null;
+ private final ChatClient chatClient;
+ private final I18nTranslationService i18n;
+ private Presence nextPresence = Presence.build(NO_STATUS, Show.notSpecified);
+ private final PresenceManager presenceManager = Suco.get(PresenceManager.class);
+ private final ChatResources res;
+ private final Session session;
+ private final SiteUserOptions userOptions;
+ private final XmppSession xmppSession = Suco.get(XmppSession.class);
+
+ @Inject
+ public ChatSitebarActions(final Session session, final ChatClient chatClient, final SiteUserOptions userOptions,
+ final I18nTranslationService i18n, final ChatResources res) {
+ this.session = session;
+ this.chatClient = chatClient;
+ this.userOptions = userOptions;
+ this.i18n = i18n;
+ this.res = res;
+ createActions();
+ }
+
+ private void createActions() {
+ final MenuTitleItemDescriptor chatActionsTitle = new MenuTitleItemDescriptor(
+ SiteUserOptionsPresenter.LOGGED_USER_MENU, i18n.t("Set your chat status"));
+ userOptions.addAction(new MenuSeparatorDescriptor(SiteUserOptionsPresenter.LOGGED_USER_MENU));
+ userOptions.addAction(chatActionsTitle);
+ userOptions.addAction(createChatStatusAction(res.online(), i18n.t("Available"),
+ onlineAction(NO_STATUS, Show.notSpecified, res.online())));
+ userOptions.addAction(createChatStatusAction(res.xa(), i18n.t("Available for chat"),
+ onlineAction(NO_STATUS, Show.chat, res.xa())));
+ userOptions.addAction(createChatStatusAction(res.away(), i18n.t("Away"),
+ onlineAction(NO_STATUS, Show.away, res.away())));
+ userOptions.addAction(createChatStatusAction(res.busy(), i18n.t("Busy"),
+ onlineAction(NO_STATUS, Show.dnd, res.busy())));
+ userOptions.addAction(createChatStatusAction(res.offline(), i18n.t("Sign out of chat"),
+ new ChangeOfflineStatusAction(res.offline())));
+ xmppSession.addSessionStateChangedHandler(false, new StateChangedHandler() {
+
+ @Override
+ public void onStateChanged(final StateChangedEvent event) {
+ if (xmppSession.isReady()) {
+ presenceManager.changeOwnPresence(nextPresence);
+ }
+ }
+ });
+ session.onUserSignIn(false, new UserSignInHandler() {
+ @Override
+ public void onUserSignIn(final UserSignInEvent event) {
+ //
+ }
+ });
+
+ }
+
+ private MenuItemDescriptor createChatStatusAction(final ImageResource icon, final String text,
+ final AbstractAction action) {
+ final MenuItemDescriptor item = new MenuItemDescriptor(SiteUserOptionsPresenter.LOGGED_USER_MENU, action);
+ item.putValue(AbstractAction.NAME, text);
+ item.putValue(AbstractAction.SMALL_ICON, icon);
+ return item;
+ }
+
+ private AbstractExtendedAction onlineAction(final String statusText, final Show show, final ImageResource icon) {
+ return new ChangeOnlineStatusAction(statusText, show, icon);
+ }
+}
Modified: trunk/src/main/java/cc/kune/chat/client/KuneHablarSignals.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/KuneHablarSignals.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/chat/client/KuneHablarSignals.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -71,9 +71,8 @@
// FIXME: move to gin
@SuppressWarnings("deprecation")
- public KuneHablarSignals(final Hablar hablar, final ChatClientAction action) {
+ public KuneHablarSignals(final XmppSession session, final Hablar hablar, final ChatClientAction action) {
final HablarEventBus eventBus = hablar.getEventBus();
- final XmppSession session = Suco.get(XmppSession.class);
final PrivateStorageManager storageManager = Suco.get(PrivateStorageManager.class);
final HasText titleDisplay = new HasText() {
Modified: trunk/src/main/java/cc/kune/chat/client/KuneUnattendedPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/KuneUnattendedPresenter.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/chat/client/KuneUnattendedPresenter.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -20,8 +20,11 @@
package cc.kune.chat.client;
import cc.kune.chat.client.ChatClientDefault.ChatClientAction;
+import cc.kune.common.client.noti.NotifyUser;
+import com.calclab.hablar.chat.client.ui.PairChatPresenter;
import com.calclab.hablar.core.client.mvp.HablarEventBus;
+import com.calclab.hablar.rooms.client.room.RoomPresenter;
import com.calclab.hablar.signals.client.SignalPreferences;
import com.calclab.hablar.signals.client.unattended.UnattendedChatsChangedEvent;
import com.calclab.hablar.signals.client.unattended.UnattendedChatsChangedHandler;
@@ -42,7 +45,10 @@
final int unattendedChatsCount = unattendedManager.getSize();
if (unattendedChatsCount > 0 && active == false) {
active = true;
- action.setBlink(true);
+ NotifyUser.info("Num: " + unattendedChatsCount, true);
+ if (isChatPage(event.getPage().getType())) {
+ action.setBlink(true);
+ }
} else if (unattendedChatsCount == 0 && active == true) {
action.setBlink(false);
active = false;
@@ -50,5 +56,11 @@
}
});
+
}
+
+ private boolean isChatPage(final String pageType) {
+ return pageType.equals(PairChatPresenter.TYPE) || pageType.equals(RoomPresenter.TYPE);
+ }
+
}
Copied: trunk/src/main/java/cc/kune/chat/client/StartChatWithMemberAction.java (from rev 1254, trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithMemberAction.java)
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/StartChatWithMemberAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/chat/client/StartChatWithMemberAction.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -0,0 +1,38 @@
+package cc.kune.chat.client;
+
+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.noti.NotifyUser;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.dto.GroupDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class StartChatWithMemberAction extends AbstractExtendedAction {
+ private final Provider<ChatClient> chatClient;
+ private final I18nTranslationService i18n;
+
+ @Inject
+ public StartChatWithMemberAction(final I18nTranslationService i18n, final CoreResources res,
+ final Provider<ChatClient> chatClient) {
+ this.i18n = i18n;
+ this.chatClient = chatClient;
+ putValue(NAME, i18n.t("Start a chat with this member"));
+ putValue(Action.SMALL_ICON, res.newChat());
+ }
+
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ chatClient.get().show();
+ if (chatClient.get().isLoggedIn()) {
+ chatClient.get().chat(XmppURI.jid(((GroupDTO) event.getTarget()).getShortName()));
+ } else {
+ NotifyUser.important(i18n.t("To start a chat you need to be 'online'"));
+ }
+ }
+
+}
Copied: trunk/src/main/java/cc/kune/chat/client/StartChatWithUserAction.java (from rev 1254, trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithUserAction.java)
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/StartChatWithUserAction.java (rev 0)
+++ trunk/src/main/java/cc/kune/chat/client/StartChatWithUserAction.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -0,0 +1,16 @@
+package cc.kune.chat.client;
+
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class StartChatWithUserAction extends StartChatWithMemberAction {
+ @Inject
+ public StartChatWithUserAction(final I18nTranslationService i18n, final CoreResources res,
+ final Provider<ChatClient> chatClient) {
+ super(i18n, res, chatClient);
+ putValue(NAME, i18n.t("Start a chat with this person"));
+ }
+}
Added: trunk/src/main/java/cc/kune/chat/client/resources/ChatResources.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/resources/ChatResources.java (rev 0)
+++ trunk/src/main/java/cc/kune/chat/client/resources/ChatResources.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -0,0 +1,82 @@
+package cc.kune.chat.client.resources;
+
+import com.google.gwt.resources.client.ClientBundle;
+import com.google.gwt.resources.client.ImageResource;
+
+public interface ChatResources extends ClientBundle {
+
+ @Source("add.png")
+ ImageResource add();
+
+ @Source("away.png")
+ ImageResource away();
+
+ @Source("busy.png")
+ ImageResource busy();
+
+ @Source("cancel.png")
+ ImageResource cancel();
+
+ @Source("chat.png")
+ ImageResource chat();
+
+ @Source("chat-new-message-small.png")
+ ImageResource chatNewMessageSmall();
+
+ @Source("chat-small.png")
+ ImageResource chatSmall();
+
+ @Source("del.png")
+ ImageResource del();
+
+ @Source("group-chat.png")
+ ImageResource groupChat();
+
+ @Source("info.png")
+ ImageResource info();
+
+ @Source("info-lamp.png")
+ ImageResource infoLamp();
+
+ @Source("invisible.png")
+ ImageResource invisible();
+
+ @Source("message.png")
+ ImageResource message();
+
+ @Source("new-chat.png")
+ ImageResource newChat();
+
+ @Source("new-email.png")
+ ImageResource newEmail();
+
+ @Source("new-message.png")
+ ImageResource newMessage();
+
+ @Source("not-authorized.png")
+ ImageResource notAuthorized();
+
+ @Source("offline.png")
+ ImageResource offline();
+
+ @Source("online.png")
+ ImageResource online();
+
+ @Source("question.png")
+ ImageResource question();
+
+ @Source("room-new-message-small.png")
+ ImageResource roomNewMessageSmall();
+
+ @Source("room-small.png")
+ ImageResource roomSmall();
+
+ @Source("unavailable.png")
+ ImageResource unavailable();
+
+ @Source("user_add.png")
+ ImageResource user_add();
+
+ @Source("xa.png")
+ ImageResource xa();
+}
\ No newline at end of file
Added: trunk/src/main/java/cc/kune/chat/client/resources/add.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/add.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/away.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/away.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/busy.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/busy.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/cancel.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/cancel.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/chat-new-message-small.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/chat-new-message-small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/chat-small.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/chat-small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/chat.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/chat.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/del.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/del.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/group-chat.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/group-chat.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/info-lamp.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/info-lamp.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/info.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/info.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/invisible.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/invisible.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/message.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/message.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/new-chat.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/new-chat.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/new-email.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/new-email.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/new-message.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/new-message.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/not-authorized.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/not-authorized.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/offline.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/offline.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/online.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/online.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/question.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/question.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/room-new-message-small.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/room-new-message-small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/room-small.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/room-small.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/unavailable.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/unavailable.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/user_add.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/user_add.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/chat/client/resources/xa.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/chat/client/resources/xa.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/cc/kune/chat/public/kune-chat.css
===================================================================
--- trunk/src/main/java/cc/kune/chat/public/kune-chat.css 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/chat/public/kune-chat.css 2011-02-21 04:32:11 UTC (rev 1257)
@@ -1,147 +1,144 @@
/* hablar: Examples.css */
-/* html {border: 0; padding: 0; height: 100%; width: 100%; overflow: hidden;} */
-
+ /* html {border: 0; padding: 0; height: 100%; width: 100%; overflow: hidden;} */
#center {
- position: absolute;
- left: 50%;
- top: 50%;
+ position: absolute;
+ left: 50%;
+ top: 50%;
}
#playground {
- position: absolute;
- width: 900px;
- height: 500px;
- left: -450px;
- top: -250px;
- background-color: #e9e9e9;
- border: 1px solid #bbbbbb;
- padding: 5px;
+ position: absolute;
+ width: 900px;
+ height: 500px;
+ left: -450px;
+ top: -250px;
+ background-color: #e9e9e9;
+ border: 1px solid #bbbbbb;
+ padding: 5px;
}
.hablar {
- padding: 1px;
- background-color: #bBBBBB;
+ padding: 1px;
+ background-color: #bBBBBB;
}
#vertical_div {
- position: absolute;
- left: -150px;
- width: 300px;
- top: 5%;
- height: 90%;
+ position: absolute;
+ left: -150px;
+ width: 300px;
+ top: 5%;
+ height: 90%;
}
#hablar_complete {
- position: fixed; overflow: hidden;
- left: 5px;
- top: 5px;
- right: 5px;
- bottom: 5px;
- background-color: #BBBBBB;
+ position: fixed;
+ overflow: hidden;
+ left: 5px;
+ top: 5px;
+ right: 5px;
+ bottom: 5px;
+ background-color: #BBBBBB;
}
#vertical_dock_div {
- position: absolute;
- left: -250px;
- width: 500px;
- top: 5%;
- height: 90%;
+ position: absolute;
+ left: -250px;
+ width: 500px;
+ top: 5%;
+ height: 90%;
}
#horizontal_div {
- position: absolute;
- left: -350px;
- width: 700px;
- top: 15%;
- height: 70%;
+ position: absolute;
+ left: -350px;
+ width: 700px;
+ top: 15%;
+ height: 70%;
}
/* End of hablar: Examples.css */
-
.k-chat-icon {
-
+ margin-top: 3px;
}
.k-chat-window {
- background-color: #FFF;
+ background-color: #FFF;
}
.k-chat-panel {
- margin: 5px;
- background-color: #FFF; /* !important;*/
- /* kfilter: alpha(opacity = 88) !important;*/
- /* -moz-opacity: 0.88 !important;*/
- /* -khtml-opacity: 0.88 !important;*/ /* opacity: 0.88 !important;*/
+ margin: 5px;
+ background-color: #FFF; /* !important;*/
+ /* kfilter: alpha(opacity = 88) !important;*/
+ /* -moz-opacity: 0.88 !important;*/
+ /* -khtml-opacity: 0.88 !important;*/ /* opacity: 0.88 !important;*/
}
.hablar-HablarWidget {
- background-color: #888;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
+ background-color: #888;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
}
.gwt-Button {
- text-shadow: 1px 1px 1px #FFFFFF;
- font-weight: bold;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
+ text-shadow: 1px 1px 1px #FFFFFF;
+ font-weight: bold;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
}
.gwt-TextBox,.gwt-TextArea {
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
}
.hablar-defaultBackground,.hablar-UserWidget,.hablar-defaultBordered {
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
}
-.hablar-Header {
-/* -webkit-border-top-right-radius: 5px;*/
-/* -moz-border-radius-topright: 5px;*/
-/* border-top-right-radius: 5px;*/
-/* -webkit-border-top-left-radius: 5px;*/
-/* -moz-border-radius-topleft: 5px;*/
-/* border-top-left-radius: 5px;*/
+.hablar-Header { /* -webkit-border-top-right-radius: 5px;*/
+ /* -moz-border-radius-topright: 5px;*/
+ /* border-top-right-radius: 5px;*/
+ /* -webkit-border-top-left-radius: 5px;*/
+ /* -moz-border-radius-topleft: 5px;*/
+ /* border-top-left-radius: 5px;*/
+
}
.hablar-errorColor {
- line-height: 2.5em;
+ line-height: 2.5em;
}
.form h2 {
- font-size: 22px;
- font-weight: bold;
+ font-size: 22px;
+ font-weight: bold;
}
.gwt-TabLayoutPanel,.gwt-TabLayoutPanelTab,.hablar-TabsHeaderWidget {
- -webkit-border-top-right-radius: 5px;
- -moz-border-radius-topright: 5px;
- border-top-right-radius: 5px;
- -webkit-border-top-left-radius: 5px;
- -moz-border-radius-topleft: 5px;
- border-top-left-radius: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -moz-border-radius-topright: 5px;
+ border-top-right-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
+ -moz-border-radius-topleft: 5px;
+ border-top-left-radius: 5px;
}
.hablar-ChatWidget {
- -webkit-border-bottom-right-radius: 5px;
- -moz-border-radius-bottomright: 5px;
- border-bottom-right-radius: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -moz-border-radius-bottomright: 5px;
+ border-bottom-right-radius: 5px;
}
.ellipsis {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- -ms-text-overflow: ellipsis;
- -moz-binding: url('/ws/ellipsis.xml#ellipsis');
- width: 100%
-}
-
-
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
+ -ms-text-overflow: ellipsis;
+ -moz-binding: url('/ws/ellipsis.xml#ellipsis');
+ width: 100%
+}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/chat/public/kune-hablar.css
===================================================================
--- trunk/src/main/java/cc/kune/chat/public/kune-hablar.css 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/chat/public/kune-hablar.css 2011-02-21 04:32:11 UTC (rev 1257)
@@ -1,602 +1,602 @@
/** Colors */
.hablar-clearBackground {
- background-color: white;
+ background-color: white;
}
.hablar-lightBackground {
- background-color: #e9e9e9;
+ background-color: #e9e9e9;
}
.hablar-highlightBackground {
- background-color: highlight;
+ background-color: highlight;
}
.hablar-defaultBackground {
- background-color: #bbbbbb;
+ background-color: #bbbbbb;
}
.hablar-darkBackground {
- background-color: #bbbbbb;
+ background-color: #bbbbbb;
}
.hablar-selectedBackground {
- background-color: highlight;
+ background-color: highlight;
}
.hablar-selectedBackground div.hablar-RosterItemWidget:hover {
- background-color: transparent;
+ background-color: transparent;
}
/** Text colors **/
.hablar-clearColor {
- color: black;
+ color: black;
}
.hablar-lightColor {
- color: #BBBBBB;
+ color: #BBBBBB;
}
.hablar-mediumColor {
- color: gray;
+ color: gray;
}
.hablar-darkColor {
- color: black;
+ color: black;
}
.hablar-errorColor {
- color: #c00;
+ color: #c00;
}
/** Non generalizable styles **/
div.hablar-ActionWidget:hover {
- background-color: #BBBBBB;
+ background-color: #BBBBBB;
}
div.hablar-GroupHeaderWidget:hover {
- background-color: #BBBBBB;
- color: black;
+ background-color: #BBBBBB;
+ color: black;
}
div.hablar-RosterItemWidget:hover {
- background-color: #E9E9E9;
+ background-color: #E9E9E9;
}
div.hablar-SearchResultItemWidget:hover {
- background-color: #e9e9e9;
+ background-color: #e9e9e9;
}
.hablar-ChatWidget .actions div.hablar-OccupantsWidget:hover {
- background-color: #BBBBBB;
- color: white;
+ background-color: #BBBBBB;
+ color: white;
}
.hablar-Logger a.gwt-Anchor:hover {
- color: white;
- background-color: #BBBBBB;
+ color: white;
+ background-color: #BBBBBB;
}
.hablar-HablarWidget .gwt-TabLayoutPanel .gwt-TabLayoutPanelTab {
- background-color: #AAAAAA;
- padding: 0px 1px;
- margin: 0 0px 0 0;
- border-left: 1px solid #bbbbbb;
- border-top: 1px solid #e9e9e9;
- border-right: 1px solid e9e9e9;
+ background-color: #AAAAAA;
+ padding: 0px 1px;
+ margin: 0 0px 0 0;
+ border-left: 1px solid #bbbbbb;
+ border-top: 1px solid #e9e9e9;
+ border-right: 1px solid e9e9e9;
}
.hablar-HablarWidget .gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected
- {
- background-color: #e9e9e9;
- border-left: 1px solid white;
- border-top: 1px solid white;
- border-right: 1px solid white;
+ {
+ background-color: #e9e9e9;
+ border-left: 1px solid white;
+ border-top: 1px solid white;
+ border-right: 1px solid white;
}
/*
.gwt-SplitLayoutPanel .gwt-SplitLayoutPanel-HDragger {
- background-color: #bbbbbb;
+ background-color: #bbbbbb;
border-left: 1px solid gray;
border-right: 1px solid #e9e9e9;
}
*/
input[disabled] {
- background-color: #e9e9e9;
- color: black;
+ background-color: #e9e9e9;
+ color: black;
}
.hablar-Header.unattended {
- color: #cc0000;
- font-weight: bold;
+ color: #cc0000;
+ font-weight: bold;
}
.hablar-Header.unattended.blinkOn {
- color: #000000;
- background-color: highlight;
+ color: #000000;
+ background-color: highlight;
}
/** Classes for borders **/
.hablar-lightBordered {
- border: 3px solid #E9E9E9;
+ border: 3px solid #E9E9E9;
}
.hablar-partialLightBordered {
- border-top: 1px solid #E9E9E9;
- border-bottom: 1px solid #E9E9E9;
+ border-top: 1px solid #E9E9E9;
+ border-bottom: 1px solid #E9E9E9;
}
.hablar-bottomLightBordered {
- border-bottom: 1px solid #E9E9E9;
+ border-bottom: 1px solid #E9E9E9;
}
.hablar-defaultBordered {
- border-left: 1px solid #BBBBBB;
- /* This border affects scroll visibility */
- border-top: 1px solid #BBBBBB;
+ border-left: 1px solid #BBBBBB;
+ /* This border affects scroll visibility */
+ border-top: 1px solid #BBBBBB;
}
.hablar-topDefaultBordered {
- border-top: 1px solid #BBBBBB;
+ border-top: 1px solid #BBBBBB;
}
.hablar-bottomDefaultBordered {
- border-bottom: 1px solid #BBBBBB;
+ border-bottom: 1px solid #BBBBBB;
}
.hablar-partialDarkBordered {
- border-left: 1px solid #BBBBBB;
- border-top: 1px solid #BBBBBB;
+ border-left: 1px solid #BBBBBB;
+ border-top: 1px solid #BBBBBB;
}
.hablar-darkBordered {
- border: 1px solid #BBBBBB;
+ border: 1px solid #BBBBBB;
}
.hablar-bottomDarkBordered {
- border-bottom: 1px solid #BBBBBB;
+ border-bottom: 1px solid #BBBBBB;
}
.hablar-disabledBordered {
- border-left: 1px solid #8C8C8C;
- border-top: 1px solid #8C8C8C;
+ border-left: 1px solid #8C8C8C;
+ border-top: 1px solid #8C8C8C;
}
/** Accordion effects **/
.hablar-AccordionHeaderWidget.notFocused {
- border-top: 1px solid #E9E9E9;
- border-bottom: 1px solid #BBB;
+ border-top: 1px solid #E9E9E9;
+ border-bottom: 1px solid #BBB;
}
.hablar-AccordionHeaderWidget.focused {
- border-top: 1px solid white;
- border-bottom: 1px solid #BBB;
+ border-top: 1px solid white;
+ border-bottom: 1px solid #BBB;
}
/** Chat messages **/
.chatMessage .body.incoming {
-
+
}
.chatMessage .body.sent {
- color: #808080;
+ color: #808080;
}
.chatMessage .body.info {
- color: #808080;
- font-style: italic;
+ color: #808080;
+ font-style: italic;
}
.chatMessage .body.alert {
- color: #c00;
+ color: #c00;
}
.hablar-ChatWidget .chatMessage {
- display: block;
- width: 94%;
- overflow: hidden;
- padding: 2px 3% 2px 3%;
+ display: block;
+ width: 94%;
+ overflow: hidden;
+ padding: 2px 3% 2px 3%;
}
.hablar-ChatWidget .chatMessage.odd {
- background-color: #efefef;
+ background-color: #efefef;
}
.chatMessage .author {
- display: inline;
- font-weight: bold;
+ display: inline;
+ font-weight: bold;
}
.chatMessage .metadata {
- display: inline;
- color: #808080;
- font-size: 90%;
+ display: inline;
+ color: #808080;
+ font-size: 90%;
}
.chatMessage .body {
- display: inline;
+ display: inline;
}
.hablar-EmoticonImage {
- vertical-align: text-top;
+ vertical-align: text-top;
}
/** MUC room occupants **/
.gwt-PopupPanel.occupants {
- border-top: 1px solid #E9E9E9;
- border-left: 1px solid #BBBBBB;
- border-right: 1px solid #BBBBBB;
- border-bottom: 1px solid #BBBBBB;
- background-color: #e9e9e9;
- z-index: 10000;
+ border-top: 1px solid #E9E9E9;
+ border-left: 1px solid #BBBBBB;
+ border-right: 1px solid #BBBBBB;
+ border-bottom: 1px solid #BBBBBB;
+ background-color: #e9e9e9;
+ z-index: 10000;
}
/** IE6 ZINDEX BUG **/
.hablar-HablarWidget {
- z-index: 1;
+ /* z-index: 1; */
}
html {
- font-family: Tahoma, sans-serif;
- font-size: 80%;
+ font-family: Tahoma, sans-serif;
+ font-size: 80%;
}
body {
- height: 90%;
+ height: 90%;
}
/** HABLAR HEADER **/
.hablar-Header {
- width: 100%;
- overflow: hidden;
- cursor: pointer;
- padding: 3px 0;
+ width: 100%;
+ overflow: hidden;
+ cursor: pointer;
+ padding: 3px 0;
}
.hablar-Header .icon {
- float: left;
- margin-right: 3px;
- margin-left: 3px;
+ float: left;
+ margin-right: 3px;
+ margin-left: 3px;
}
.hablar-RosterGroupWidget .icon {
- float: left;
- margin-right: 3px;
+ float: left;
+ margin-right: 3px;
}
.hablar-Header .title {
- float: left;
+ float: left;
}
.hablar-AccordionHeaderWidget .icon {
- float: left;
- margin: 0 3px 0 3px;
+ float: left;
+ margin: 0 3px 0 3px;
}
.hablar-AccordionHeaderWidget .title {
- display: block;
- margin: 0 3px;
+ display: block;
+ margin: 0 3px;
}
.hablar-AccordionHeaderWidget .close {
- float: right;
- margin: 0px 3px 0 0;
+ float: right;
+ margin: 0px 3px 0 0;
}
.hablar-TabsHeaderWidget {
- padding: 0;
- margin: 0;
- background-color: transparent;
- border: none;
+ padding: 0;
+ margin: 0;
+ background-color: transparent;
+ border: none;
}
.hablar-TabsHeaderWidget .close {
- margin: 2px 3px;
+ margin: 2px 3px;
}
.hablar-AccordionHeader .close {
- margin: 2px 3px 0 0;
+ margin: 2px 3px 0 0;
}
.hablar-AccordionHeader .icon {
-
+
}
.hablar-AccordionHeader .title {
- display: block;
+ display: block;
}
.hablar-TabsHeaderWidget .title {
- display: inline;
- margin-right: 10px;
+ display: inline;
+ margin-right: 10px;
}
/** DOCKS **/
.hablar-DockContainer-top {
- background-color: transparent;
- z-index: 4000;
+ background-color: transparent;
+ z-index: 4000;
}
.hablar-Header.DockHeaderWidget-top {
- background-color: transparent;
- border: 1px transparent;
+ background-color: transparent;
+ border: 1px transparent;
}
.hablar-Header.DockHeaderWidget-left {
- cursor: default;
- -moz-user-select: none;
+ cursor: default;
+ -moz-user-select: none;
}
.DockHeaderWidget-left .icon {
- margin-left: 3px;
+ margin-left: 3px;
}
/** LIST ITEMS **/
.hablar-ListItem {
- display: block;
- width: 100%;
- overflow: hidden;
- padding: 5px 0px 0 0px;
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ padding: 5px 0px 0 0px;
}
.clickable {
- cursor: pointer;
+ cursor: pointer;
}
/** USER **/
.hablar-UserWidget .container {
- padding: 0px 10px;
- z-index: 3000;
+ padding: 0px 10px;
+ z-index: 3000;
}
.hablar-UserWidget h2 {
- margin: 15px 0 5px 0;
+ margin: 15px 0 5px 0;
}
.hablar-UserWidget .actions {
- padding: 5px 0 0 10px;
+ padding: 5px 0 0 10px;
}
/** ROSTER **/
.hablar-RosterWidget .item {
- width: 100%;
- overflow: hidden;
+ width: 100%;
+ overflow: hidden;
}
.hablar-RosterWidget .actions {
- width: 100%;
- overflow: hidden;
+ width: 100%;
+ overflow: hidden;
}
.hablar-RosterWidget .actions .hablar-ActionWidget {
- float: left;
- margin-right: 1px;
+ float: left;
+ margin-right: 1px;
}
.hablar-GroupHeaderWidget {
- overflow: hidden;
- padding: 3px;
- cursor: pointer;
- border-bottom: 1px solid #BBBBBB;
- border-top: 1px solid white;
+ overflow: hidden;
+ padding: 3px;
+ cursor: pointer;
+ border-bottom: 1px solid #BBBBBB;
+ border-top: 1px solid white;
}
.hablar-GroupHeaderWidget .label {
- display: block;
- margin: 3px;
+ display: block;
+ margin: 3px;
}
.hablar-GroupHeaderWidget .menu {
- float: right;
- margin-right: 3px;
+ float: right;
+ margin-right: 3px;
}
.hablar-RosterItemWidget .user {
- float: left;
+ float: left;
}
.hablar-RosterItemWidget .icon {
- display: block;
- float: left;
- margin: 2px 5px 2px 2px;
+ display: block;
+ float: left;
+ margin: 2px 5px 2px 2px;
}
.hablar-RosterItemWidget .name {
- display: block;
- float: left;
- margin-right: 5px;
+ display: block;
+ float: left;
+ margin-right: 5px;
}
.hablar-RosterItemWidget .menu {
- float: right;
+ float: right;
}
.hablar-RosterGroupWidget .menu {
- float: right;
- cursor: pointer;
+ float: right;
+ cursor: pointer;
}
/** CHAT PAGE **/
.hablar-ChatWidget .actions div {
- float: right;
+ float: right;
}
/** SEARCH PAGE **/
.hablar-SearchWidget .searchBox {
- width: 75%;
- padding: 3px;
- margin-right: 1%;
+ width: 75%;
+ padding: 3px;
+ margin-right: 1%;
}
.hablar-SearchWidget .gwt-Button {
- width: 20%;
+ width: 20%;
}
/** ROOMS **/
.hablar-ChatWidget .actions .hablar-OccupantsWidget {
- display: block;
- float: left;
- padding: 2px 5px;
- margin-left: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- cursor: pointer;
+ display: block;
+ float: left;
+ padding: 2px 5px;
+ margin-left: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ cursor: pointer;
}
.hablar-OccupantWidget {
- width: 100%;
- overflow: hidden;
- margin: 2px 5px;
- cursor: default;
+ width: 100%;
+ overflow: hidden;
+ margin: 2px 5px;
+ cursor: default;
}
.hablar-OccupantWidget .icon {
- display: block;
- float: left;
- margin-right: 5px;
+ display: block;
+ float: left;
+ margin-right: 5px;
}
.hablar-OccupantWidget .name {
- display: block;
- float: left;
+ display: block;
+ float: left;
}
/** ROOM INVITATION **/
.hablar-OpenRoomWidget .list {
- padding: 5px;
+ padding: 5px;
}
/** LOGGER **/
.hablar-Logger .gwt-Label {
- opacity: 0.5;
+ opacity: 0.5;
}
.hablar-Logger .gwt-Label.ready {
- opacity: 1;
+ opacity: 1;
}
.hablar-Logger .output {
- color: blue;
+ color: blue;
}
.hablar-Logger .input {
- color: #0c0;
+ color: #0c0;
}
/** OVERLAY **/
.hablar-Overlay {
- z-index: 7000;
- padding: 20px 10px 10px 10px;
+ z-index: 7000;
+ padding: 20px 10px 10px 10px;
}
/** FORMS **/
.form p {
- width: 100%;
- overflow: hidden;
- margin: 3px 0;
+ width: 100%;
+ overflow: hidden;
+ margin: 3px 0;
}
.form h2 {
- font-size: 200%;
+ font-size: 200%;
}
.form span.option {
- display: block;
- margin: 0 0 15px 30px;
+ display: block;
+ margin: 0 0 15px 30px;
}
.form p label {
- display: block;
- margin-top: 5px;
- margin-right: 10px;
- margin-right: 0.5em;
+ display: block;
+ margin-top: 5px;
+ margin-right: 10px;
+ margin-right: 0.5em;
}
.form p .gwt-Label {
- font-weight: bold;
+ font-weight: bold;
}
.form .actions {
- padding-left: 5px;
- margin-top: 15px;
- padding-top: 5px;
+ padding-left: 5px;
+ margin-top: 15px;
+ padding-top: 5px;
}
.form .gwt-TextBox,.form .gwt-PasswordTextBox {
- padding: 2px;
- width: 98%;
- border: 0;
+ padding: 2px;
+ width: 98%;
+ border: 0;
}
.form p .gwt-RadioButton,.form p .gwt-CheckBox {
- display: block;
- width: 100%;
- overflow: hidden;
+ display: block;
+ width: 100%;
+ overflow: hidden;
}
.form p .gwt-RadioButton input,.form p .gwt-CheckBox input {
- float: left;
- margin-right: 5px;
+ float: left;
+ margin-right: 5px;
}
.form p .gwt-RadioButton label,.form p .gwt-CheckBox label {
- float: left;
- margin: 0;
+ float: left;
+ margin: 0;
}
.hablar-PopupPanel {
- z-index: 5000;
- -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ z-index: 5000;
+ -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}
.hablar-PresenceWidget .controls {
- width: 100%;
- overflow: hidden;
+ width: 100%;
+ overflow: hidden;
}
.hablar-PresenceWidget .menu,.hablar-PresenceWidget .icon {
- float: left;
- margin-top: 4px;
+ float: left;
+ margin-top: 4px;
}
.loading {
- width: 100%;
- overflow: hidden;
+ width: 100%;
+ overflow: hidden;
}
.loading .icon {
- display: block;
- float: left;
- margin-right: 5px;
+ display: block;
+ float: left;
+ margin-right: 5px;
}
/** SEMANTIC CSS PLEASE! **/
.overflowhidden {
- overflow: hidden;
+ overflow: hidden;
}
/** ADD TO GROUP **/
.hablar-ManageGroupsWidget .list {
- padding: 5px;
+ padding: 5px;
}
/** COPY TO CLIPBOARD **/
.hablar-CopyToClipboardWidget .gwt-TextArea {
- width: 100%;
- height: 10em;
- margin-top: 3px;
+ width: 100%;
+ height: 10em;
+ margin-top: 3px;
}
.ellipsis {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- -ms-text-overflow: ellipsis;
- -moz-binding: url('ellipsis.xml#ellipsis');
- width: 100%
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
+ -ms-text-overflow: ellipsis;
+ -moz-binding: url('ellipsis.xml#ellipsis');
+ width: 100%
}
.gwt-TextArea {
- border: 1px solid #bbbbbb;
+ border: 1px solid #bbbbbb;
}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/client/KuneEntryPoint.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/client/KuneEntryPoint.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -69,7 +69,7 @@
ginjector.getCorePresenter().get().forceReveal();
ginjector.getStateManager();
ginjector.getSiteTokenListeners();
- ginjector.getGxtGuiProvider();
+ ginjector.getGwtGuiProvider();
ginjector.getUserNotifierPresenter();
ginjector.getGlobalShortcutRegister();
ginjector.getSpinerPresenter();
Modified: trunk/src/main/java/cc/kune/client/KuneGinjector.java
===================================================================
--- trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/client/KuneGinjector.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -21,6 +21,7 @@
import cc.kune.chat.client.ChatClient;
import cc.kune.chat.client.ChatGinModule;
+import cc.kune.chat.client.ChatParts;
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;
@@ -65,6 +66,8 @@
ChatClient getChatClient();
+ ChatParts getChatParts();
+
AsyncProvider<CookiesManager> getCookiesManager();
CoreParts getCoreParts();
Modified: trunk/src/main/java/cc/kune/common/KuneCommon.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/common/KuneCommon.gwt.xml 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/KuneCommon.gwt.xml 2011-02-21 04:32:11 UTC (rev 1257)
@@ -10,9 +10,11 @@
<!-- <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' />-->
+ <!-- <entry-point class='cc.kune.msgs.client.KuneMessagesSampleEntryPoint'
+ /> -->
<!-- Specify the paths for translatable code -->
- <source path='client' />
+ <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' />
Modified: trunk/src/main/java/cc/kune/common/client/actions/ActionEvent.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ActionEvent.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/ActionEvent.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -51,12 +51,19 @@
*/
public class ActionEvent {
+ public static final Object NO_TARGET = String.valueOf("No target");
private final Event event;
private final Object source;
+ private final Object target;
public ActionEvent(final Object source, final Event event) {
+ this(source, NO_TARGET, event);
+ }
+
+ public ActionEvent(final Object source, final Object target, final Event event) {
this.source = source;
this.event = event;
+ this.target = target;
}
public Event getEvent() {
@@ -66,4 +73,8 @@
public Object getSource() {
return source;
}
+
+ public Object getTarget() {
+ return target;
+ }
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -30,6 +30,7 @@
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ButtonBase;
@@ -56,6 +57,12 @@
}
@Override
+ protected void addStyle(final String style) {
+ iconLabel.addStyleName(style);
+ layout();
+ }
+
+ @Override
public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
iconLabel = new IconLabel("");
@@ -64,7 +71,9 @@
} else {
button = new Button();
}
- button.setStylePrimaryName("oc-button");
+ button.addStyleName("oc-button");
+ button.addStyleName("k-btn");
+ button.addStyleName("k-5corners");
layout();
// button.setEnableToggle(enableTongle);
final String id = descriptor.getId();
@@ -83,7 +92,8 @@
button.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
- descriptor.fire(new ActionEvent(button, Event.as(event.getNativeEvent())));
+ descriptor.fire(new ActionEvent(button, getTargetObjectOfAction(descriptor),
+ Event.as(event.getNativeEvent())));
}
});
super.create(descriptor);
@@ -101,6 +111,12 @@
}
@Override
+ public void setIconResource(final ImageResource icon) {
+ iconLabel.setIconResource(icon);
+ layout();
+ }
+
+ @Override
protected void setIconStyle(final String style) {
iconLabel.setIcon(style);
layout();
@@ -134,16 +150,12 @@
@Override
public void setVisible(final boolean visible) {
- if (!isChild) {
- if (button.isAttached()) {
- super.setVisible(visible);
- }
- }
+ button.setVisible(visible);
}
@Override
- public boolean shouldBeAdded() { // NOPMD by vjrj on 18/01/11 0:48
- return true;
+ public boolean shouldBeAdded() {
+ return !descriptor.isChild();
}
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuGui.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuGui.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -75,6 +75,7 @@
public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.create(descriptor);
menu = new MenuBar(true);
+ menu.setFocusOnHoverEnabled(true);
menu.setAnimationEnabled(true);
descriptor.addPropertyChangeListener(new PropertyChangeListener() {
@Override
@@ -90,8 +91,7 @@
@Override
public void propertyChange(final PropertyChangeEvent event) {
if (event.getPropertyName().equals(MenuDescriptor.MENU_SHOW)) {
- final String id = (String) descriptor.getValue(MenuDescriptor.MENU_SHOW_NEAR_TO);
- show(id);
+ show(descriptor.getValue(MenuDescriptor.MENU_SHOW_NEAR_TO));
}
}
});
@@ -100,7 +100,7 @@
private PopupPanel createPopup() {
popup = new PopupPanel(true);
- popup.addStyleName("oc-menu");
+ popup.setStyleName("oc-menu");
popup.add(menu);
popup.addCloseHandler(new CloseHandler<PopupPanel>() {
@Override
@@ -111,6 +111,10 @@
return popup;
}
+ public void hide() {
+ popup.hide();
+ }
+
@Override
public void insert(final int position, final UIObject item) {
menu.insertItem((MenuItem) item, position);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtMenuItemGui.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -31,9 +31,11 @@
import cc.kune.common.client.actions.ui.descrip.MenuCheckItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuRadioItemDescriptor;
+import cc.kune.common.client.actions.ui.descrip.MenuTitleItemDescriptor;
import cc.kune.common.client.errors.UIException;
import cc.kune.common.client.ui.IconLabel;
+import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
@@ -67,7 +69,6 @@
public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
iconLabel = new IconLabel("");
- iconLabel.addTextStyleName("oc-ico-pad");
if (descriptor instanceof MenuRadioItemDescriptor) {
final GwtCheckItem checkItem = createCheckItem((MenuItemDescriptor) descriptor);
checkItem.setGroup(((MenuRadioItemDescriptor) descriptor).getGroup());
@@ -77,6 +78,9 @@
final GwtCheckItem checkItem = createCheckItem((MenuItemDescriptor) descriptor);
confCheckListener((MenuItemDescriptor) descriptor, checkItem);
item = checkItem;
+ } else if (descriptor instanceof MenuTitleItemDescriptor) {
+ item = new GwtBaseMenuItem("", true);
+ item.setStyleName("k-menuimtem-title");
} else {
item = new GwtBaseMenuItem("", true);
}
@@ -89,16 +93,18 @@
item.setCommand(new Command() {
@Override
public void execute() {
+ getParentMenu(descriptor).hide();
final AbstractAction action = descriptor.getAction();
if (action != null) {
- descriptor.getAction().actionPerformed(new ActionEvent(item, Event.getCurrentEvent()));
+ descriptor.getAction().actionPerformed(
+ new ActionEvent(item, getTargetObjectOfAction(descriptor), Event.getCurrentEvent()));
}
}
});
configureItemFromProperties();
final int position = descriptor.getPosition();
- final AbstractGwtMenuGui menu = ((AbstractGwtMenuGui) descriptor.getParent().getValue(ParentWidget.PARENT_UI));
+ final AbstractGwtMenuGui menu = getParentMenu(descriptor);
if (menu == null) {
throw new UIException("To add a menu item you need to add the menu before. Item: " + descriptor);
}
@@ -128,6 +134,10 @@
return item;
}
+ private AbstractGwtMenuGui getParentMenu(final GuiActionDescrip descriptor) {
+ return ((AbstractGwtMenuGui) descriptor.getParent().getValue(ParentWidget.PARENT_UI));
+ }
+
private void layout() {
item.setHTML(iconLabel.toString());
}
@@ -135,9 +145,18 @@
@Override
protected void setEnabled(final boolean enabled) {
item.setVisible(enabled);
+ item.setEnabled(enabled);
+ iconLabel.setVisible(enabled);
+ layout();
}
@Override
+ public void setIconResource(final ImageResource icon) {
+ iconLabel.setIconResource(icon);
+ layout();
+ }
+
+ @Override
protected void setIconStyle(final String style) {
iconLabel.setIcon(style);
layout();
@@ -167,6 +186,8 @@
@Override
public void setVisible(final boolean visible) {
item.setVisible(visible);
+ iconLabel.setVisible(visible);
+ layout();
}
@Override
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtComplexToolbar.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtComplexToolbar.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtComplexToolbar.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -47,6 +47,7 @@
}
public void add(final UIObject uiObject) {
+ uiObject.addStyleName(getFlow());
toolbar.add((Widget) uiObject);
}
@@ -79,6 +80,7 @@
}
public void insert(final UIObject uiObject, final int position) {
+ uiObject.addStyleName(getFlow());
toolbar.insert((Widget) uiObject, position);
}
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtGuiProvider.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtGuiProvider.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtGuiProvider.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -27,6 +27,7 @@
import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuRadioItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuSeparatorDescriptor;
+import cc.kune.common.client.actions.ui.descrip.MenuTitleItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.PushButtonDescriptor;
import cc.kune.common.client.actions.ui.descrip.SubMenuDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarDescriptor;
@@ -42,12 +43,14 @@
final Provider<GwtMenuGui> gwtMenuGui, final Provider<GwtMenuItemGui> gwtMenuItemGui,
final Provider<GwtMenuSeparatorGui> gwtMenuSeparatorGui, final Provider<GwtPushButtonGui> gwtPushButtonGui,
final Provider<GwtButtonGui> gwtButtonGui, final Provider<GwtIconLabelGui> gwtIconLabelGui,
- final Provider<GwtToolbarGui> gwtToolbarGui, final Provider<GwtToolbarSeparatorGui> gwtToolbarSeparatorGui) {
+ final Provider<GwtToolbarGui> gwtToolbarGui, final Provider<GwtToolbarSeparatorGui> gwtToolbarSeparatorGui,
+ final Provider<GwtMenuTitleItemGui> gwtMenuTitleItemGui) {
guiProvider.register(SubMenuDescriptor.class, gwtSubMenuGui);
guiProvider.register(MenuDescriptor.class, gwtMenuGui);
guiProvider.register(MenuRadioItemDescriptor.class, gwtMenuItemGui);
guiProvider.register(MenuCheckItemDescriptor.class, gwtMenuItemGui);
+ guiProvider.register(MenuTitleItemDescriptor.class, gwtMenuTitleItemGui);
guiProvider.register(MenuItemDescriptor.class, gwtMenuItemGui);
guiProvider.register(MenuSeparatorDescriptor.class, gwtMenuSeparatorGui);
guiProvider.register(PushButtonDescriptor.class, gwtPushButtonGui);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -63,7 +63,8 @@
public void onClick(final ClickEvent event) {
final AbstractAction action = descriptor.getAction();
if (action != null) {
- action.actionPerformed(new ActionEvent(iconLabel, Event.as(event.getNativeEvent())));
+ action.actionPerformed(new ActionEvent(iconLabel, getTargetObjectOfAction(descriptor),
+ Event.as(event.getNativeEvent())));
}
}
});
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuGui.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -27,6 +27,7 @@
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Label;
@@ -44,6 +45,14 @@
}
@Override
+ protected void addStyle(final String style) {
+ if (notStandAlone) {
+ iconLabel.addStyleName(style);
+ layout();
+ }
+ }
+
+ @Override
public AbstractGuiItem create(final GuiActionDescrip descriptor) {
super.descriptor = descriptor;
descriptor.putValue(ParentWidget.PARENT_UI, this);
@@ -89,6 +98,14 @@
}
@Override
+ public void setIconResource(final ImageResource resource) {
+ if (notStandAlone) {
+ iconLabel.setIconResource(resource);
+ layout();
+ }
+ }
+
+ @Override
public void setIconStyle(final String style) {
if (notStandAlone) {
iconLabel.setIcon(style);
Added: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuTitleItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuTitleItemGui.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtMenuTitleItemGui.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -0,0 +1,32 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.common.client.actions.gwtui;
+
+import cc.kune.common.client.actions.ui.descrip.MenuTitleItemDescriptor;
+
+public class GwtMenuTitleItemGui extends AbstractGwtMenuItemGui {
+ public GwtMenuTitleItemGui() {
+ super();
+ }
+
+ public GwtMenuTitleItemGui(final MenuTitleItemDescriptor descriptor) {
+ super(descriptor);
+ }
+}
Modified: trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtSubMenuGui.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -44,7 +44,6 @@
super.descriptor = descriptor;
item = new MenuItem("", menu);
iconLabel = new IconLabel("");
- iconLabel.addTextStyleName("oc-ico-pad");
configureItemFromProperties();
final AbstractGwtMenuGui parentMenu = ((AbstractGwtMenuGui) descriptor.getParent().getValue(PARENT_UI));
final int position = descriptor.getPosition();
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtButtonGui.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -74,7 +74,7 @@
button.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(final ButtonEvent event) {
- descriptor.fire(new ActionEvent(button, Event.as(event.getEvent())));
+ descriptor.fire(new ActionEvent(button, getTargetObjectOfAction(descriptor), Event.as(event.getEvent())));
}
});
if (!descriptor.isChild()) {
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuItemGui.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/AbstractGxtMenuItemGui.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -92,17 +92,10 @@
public void componentSelected(final MenuEvent ce) {
final AbstractAction action = descriptor.getAction();
if (action != null) {
- action.actionPerformed(new ActionEvent(getItemObjectOfAction(descriptor), Event.getCurrentEvent()));
+ action.actionPerformed(new ActionEvent(item, getTargetObjectOfAction(descriptor),
+ Event.getCurrentEvent()));
}
}
-
- private Object getItemObjectOfAction(final GuiActionDescrip descriptor) {
- // If the action is associated with a item (like a Group, a
- // group shortname, a username, etc) we pass this item to
- // the action, if not we only pass the menuitem
- return descriptor.hasItem() ? descriptor.getItem()
- : descriptor.isChild() ? descriptor.getParent().getItem() : item;
- }
});
child = item;
super.create(descriptor);
Modified: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtGuiProvider.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -28,6 +28,7 @@
import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuRadioItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuSeparatorDescriptor;
+import cc.kune.common.client.actions.ui.descrip.MenuTitleItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.PushButtonDescriptor;
import cc.kune.common.client.actions.ui.descrip.SubMenuDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarDescriptor;
@@ -43,12 +44,14 @@
final Provider<GxtMenuGui> gxtMenuGui, final Provider<GxtMenuItemGui> gxtMenuItemGui,
final Provider<GxtMenuSeparatorGui> gxtMenuSeparatorGui, final Provider<GxtPushButtonGui> gxtPushButtonGui,
final Provider<GxtButtonGui> gxtButtonGui, final Provider<GwtIconLabelGui> gwtIconLabelGui,
- final Provider<GxtToolbarGui> gxtToolbarGui, final Provider<GxtToolbarSeparatorGui> gxtToolbarSeparatorGui) {
+ final Provider<GxtToolbarGui> gxtToolbarGui, final Provider<GxtToolbarSeparatorGui> gxtToolbarSeparatorGui,
+ final Provider<GxtMenuTitleItemGui> gxtMenuTitleItemGui) {
guiProvider.register(SubMenuDescriptor.class, gxtSubMenuGui);
guiProvider.register(MenuDescriptor.class, gxtMenuGui);
guiProvider.register(MenuRadioItemDescriptor.class, gxtMenuItemGui);
guiProvider.register(MenuCheckItemDescriptor.class, gxtMenuItemGui);
+ guiProvider.register(MenuTitleItemDescriptor.class, gxtMenuTitleItemGui);
guiProvider.register(MenuItemDescriptor.class, gxtMenuItemGui);
guiProvider.register(MenuSeparatorDescriptor.class, gxtMenuSeparatorGui);
guiProvider.register(PushButtonDescriptor.class, gxtPushButtonGui);
Added: trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuTitleItemGui.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuTitleItemGui.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/actions/gxtui/GxtMenuTitleItemGui.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -0,0 +1,95 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.common.client.actions.gxtui;
+
+import cc.kune.common.client.actions.ui.AbstractChildGuiItem;
+import cc.kune.common.client.actions.ui.AbstractGuiItem;
+import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
+import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
+import cc.kune.common.client.utils.TextUtils;
+
+import com.extjs.gxt.ui.client.widget.menu.HeaderMenuItem;
+
+public class GxtMenuTitleItemGui extends AbstractChildGuiItem {
+
+ private HeaderMenuItem item;
+
+ public GxtMenuTitleItemGui() {
+ super();
+ }
+
+ public GxtMenuTitleItemGui(final MenuItemDescriptor descriptor) {
+ super(descriptor);
+
+ }
+
+ @Override
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+ super.descriptor = descriptor;
+ item = new HeaderMenuItem("");
+
+ final String id = descriptor.getId();
+ if (id != null) {
+ item.ensureDebugId(id);
+ }
+ child = item;
+ super.create(descriptor);
+ configureItemFromProperties();
+ return this;
+ }
+
+ public HeaderMenuItem getItem() {
+ return item;
+ }
+
+ @Override
+ protected void setEnabled(final boolean enabled) {
+ item.setVisible(enabled);
+ }
+
+ @Override
+ protected void setIconStyle(final String style) {
+ item.addStyleName(style);
+ }
+
+ @Override
+ protected void setText(final String text) {
+ if (text != null) {
+ item.setText(text);
+ }
+ }
+
+ @Override
+ protected void setToolTipText(final String tooltip) {
+ if (TextUtils.notEmpty(tooltip)) {
+ item.setToolTip(new GxtDefTooltip(tooltip));
+ }
+ }
+
+ @Override
+ public void setVisible(final boolean visible) {
+ item.setVisible(visible);
+ }
+
+ @Override
+ public boolean shouldBeAdded() { // NOPMD by vjrj on 18/01/11 0:48
+ return false;
+ }
+}
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/AbstractGuiItem.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -21,6 +21,7 @@
import cc.kune.common.client.actions.AbstractAction;
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.bind.GuiBinding;
@@ -103,6 +104,14 @@
};
}
+ protected Object getTargetObjectOfAction(final GuiActionDescrip descriptor) {
+ // If the action is associated with a item (like a Group, a
+ // group shortname, a username, etc) we pass this item to
+ // the action, if not we only pass the menuitem
+ return descriptor.hasTarget() ? descriptor.getTarget()
+ : descriptor.isChild() ? descriptor.getParent().getTarget() : ActionEvent.NO_TARGET;
+ }
+
protected abstract void setEnabled(boolean enabled);
private void setEnabled(final Boolean enabled) {
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/AbstractGuiActionDescrip.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -83,8 +83,8 @@
}
@Override
- public Object getItem() {
- return getValue(ITEM);
+ public Object getTarget() {
+ return getValue(TARGET);
}
/**
@@ -130,8 +130,8 @@
}
@Override
- public boolean hasItem() {
- return getValue(ITEM) != null;
+ public boolean hasTarget() {
+ return getValue(TARGET) != null;
}
@Override
@@ -171,8 +171,8 @@
}
@Override
- public void setItem(final Object object) {
- putValue(ITEM, object);
+ public void setTarget(final Object object) {
+ putValue(TARGET, object);
}
/**
Modified: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/GuiActionDescrip.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -6,13 +6,6 @@
public interface GuiActionDescrip {
- /**
- * {@link #ITEM} is used to associate a {@link #AbstractGuiActionDescrip}
- * with an object like groups, group names, users, and so on, and used to
- * execute actions with this item as parameter
- */
- public static final String ITEM = "item";
-
public static final AbstractGuiActionDescrip NO_PARENT = new NoParentGuiActionDescriptor();
public static final int NO_POSITION = -1;
@@ -22,20 +15,25 @@
*/
public static final String STYLES = "stylesprop";
+ /**
+ * {@link #TARGET} is used to associate a {@link #AbstractGuiActionDescrip}
+ * with an object like groups, group names, users, and so on, and used to
+ * execute actions against these targets
+ */
+ public static final String TARGET = "target";
+
public static final String VISIBLE = "visibleprop";
+ void add(final GuiAddCondition addCondition);
+
void addPropertyChangeListener(final PropertyChangeListener listener);
- void add(final GuiAddCondition addCondition);
-
void fire(final ActionEvent event);
AbstractAction getAction();
String getId();
- Object getItem();
-
Object[] getKeys();
String getLocation();
@@ -46,11 +44,13 @@
PropertyChangeListener[] getPropertyChangeListeners();
+ Object getTarget();
+
Class<?> getType();
Object getValue(final String key);
- boolean hasItem();
+ boolean hasTarget();
boolean isChild();
@@ -68,8 +68,6 @@
void setId(final String id);
- void setItem(final Object object);
-
void setLocation(final String location);
void setParent(final GuiActionDescrip parent);
@@ -78,6 +76,8 @@
void setStyles(final String styles);
+ void setTarget(final Object object);
+
void setVisible(final boolean visible);
}
Added: trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuTitleItemDescriptor.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuTitleItemDescriptor.java (rev 0)
+++ trunk/src/main/java/cc/kune/common/client/actions/ui/descrip/MenuTitleItemDescriptor.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -0,0 +1,41 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.common.client.actions.ui.descrip;
+
+import cc.kune.common.client.actions.AbstractAction;
+import cc.kune.common.client.actions.Action;
+
+public class MenuTitleItemDescriptor extends MenuItemDescriptor {
+
+ public MenuTitleItemDescriptor(final MenuDescriptor parent) {
+ super(AbstractAction.NO_ACTION);
+ setParent(parent);
+ }
+
+ public MenuTitleItemDescriptor(final MenuDescriptor parent, final String title) {
+ this(parent);
+ putValue(Action.NAME, title);
+ }
+
+ @Override
+ public Class<?> getType() {
+ return MenuTitleItemDescriptor.class;
+ }
+}
Modified: trunk/src/main/java/cc/kune/common/client/ui/AbstractFlowToolbar.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/AbstractFlowToolbar.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/ui/AbstractFlowToolbar.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * 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
Modified: trunk/src/main/java/cc/kune/common/client/ui/FlowToolbar.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/FlowToolbar.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/ui/FlowToolbar.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * 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
@@ -22,7 +22,6 @@
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HasVerticalAlignment.VerticalAlignmentConstant;
-import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.Label;
@@ -31,14 +30,11 @@
public class FlowToolbar extends Composite implements AbstractToolbar, ForIsWidget {
private final FlowPanel childPanel;
- private final HorizontalPanel mainPanel;
public FlowToolbar() {
super();
- mainPanel = new HorizontalPanel();
childPanel = new FlowPanel();
- mainPanel.add(childPanel);
- initWidget(mainPanel);
+ initWidget(childPanel);
}
@Override
@@ -63,7 +59,7 @@
@Override
public Widget addSeparator() {
final Label emptyLabel = new Label("");
- emptyLabel.setStyleName("ytb-sep-FIXMEEE");
+ emptyLabel.setStyleName("k-tb-sep");
emptyLabel.addStyleName("oc-tb-sep");
emptyLabel.addStyleName("oc-floatleft");
this.add(emptyLabel);
@@ -139,7 +135,6 @@
@Override
public void setHeight(final String height) {
- mainPanel.setHeight(height);
childPanel.setHeight(height);
}
Modified: trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -24,13 +24,15 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.i18n.client.HasDirection.Direction;
+import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.FocusPanel;
import com.google.gwt.user.client.ui.HasDirectionalText;
import com.google.gwt.user.client.ui.HasWidgets;
-import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.InlineLabel;
import com.google.gwt.user.client.ui.Widget;
@@ -42,9 +44,9 @@
private static IconTitleUiBinder uiBinder = GWT.create(IconTitleUiBinder.class);
@UiField
- HorizontalPanel hp;
+ FlowPanel flow;
@UiField
- InlineLabel icon;
+ Image icon;
@UiField
InlineLabel label;
@UiField
@@ -57,16 +59,18 @@
public IconLabel(final String text) {
initWidget(uiBinder.createAndBindUi(this));
label.setText(text);
+ label.addStyleName("k-space-nowrap");
+ label.addStyleName("k-iconlabel-text");
}
@Override
public void add(final Widget w) {
- hp.add(w);
+ flow.add(w);
}
@Override
public void addStyleName(final String style) {
- hp.addStyleName(style);
+ flow.addStyleName(style);
}
public void addTextStyleName(final String style) {
@@ -75,7 +79,7 @@
@Override
public void clear() {
- hp.clear();
+ flow.clear();
}
public HasClickHandlers getFocus() {
@@ -94,19 +98,24 @@
@Override
public Iterator<Widget> iterator() {
- return hp.iterator();
+ return flow.iterator();
}
@Override
public boolean remove(final Widget w) {
- return hp.remove(w);
+ return flow.remove(w);
}
public void setIcon(final String imgCss) {
+ icon.setUrl("images/clear.gif");
icon.setStyleName(imgCss);
icon.addStyleName("oc-ico-pad");
}
+ public void setIconResource(final ImageResource res) {
+ icon.setResource(res);
+ }
+
public void setLabelText(final String text) {
label.setText(text);
}
Modified: trunk/src/main/java/cc/kune/common/client/ui/IconLabel.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/IconLabel.ui.xml 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/ui/IconLabel.ui.xml 2011-02-21 04:32:11 UTC (rev 1257)
@@ -16,10 +16,10 @@
}
</ui:style>
<g:FocusPanel ui:field="self">
- <g:HorizontalPanel styleName="{style.pad}"
- ui:field="hp">
- <g:InlineLabel ui:field="icon"/>
- <g:InlineLabel ui:field="label" styleName="{style.label}" />
- </g:HorizontalPanel>
+ <g:FlowPanel styleName="{style.pad}"
+ ui:field="flow">
+ <g:Image ui:field="icon"/>
+ <g:InlineLabel ui:field="label" styleName="{style.label}" />
+ </g:FlowPanel>
</g:FocusPanel>
</ui:UiBinder>
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/common/client/ui/KuneWindowUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/KuneWindowUtils.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/client/ui/KuneWindowUtils.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -1,6 +1,6 @@
/*
*
- * Copyright (C) 2007-2009 The kune development team (see CREDITS for details)
+ * 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
Modified: trunk/src/main/java/cc/kune/common/public/kune-common.css
===================================================================
--- trunk/src/main/java/cc/kune/common/public/kune-common.css 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/common/public/kune-common.css 2011-02-21 04:32:11 UTC (rev 1257)
@@ -1,412 +1,439 @@
+/* Here the styles of cc.kune.commom (reused by other projects like gadgets and so on) */
.k-popup-top-centered {
-
+
}
.k-popup-bottom-centered { /* z-index:100000; */
-
+
}
.k-floatleft,.k-fl {
- float: left;
+ float: left;
}
.k-floatright,.k-fr {
- float: right;
+ float: right;
}
.k-pointer {
- cursor: pointer;
- cursor: hand;
+ cursor: pointer;
+ cursor: hand;
}
.k-opacity80 {
- kfilter: alpha(opacity = 80);
- -moz-opacity: 0.80;
- -khtml-opacity: 0.80;
- opacity: 0.80;
+ kfilter: alpha(opacity = 80);
+ -moz-opacity: 0.80;
+ -khtml-opacity: 0.80;
+ opacity: 0.80;
}
.k-opacity90 {
- kfilter: alpha(opacity = 90);
- -moz-opacity: 0.90;
- -khtml-opacity: 0.90;
- opacity: 0.90;
+ kfilter: alpha(opacity = 90);
+ -moz-opacity: 0.90;
+ -khtml-opacity: 0.90;
+ opacity: 0.90;
}
.k-opacity95 {
- kfilter: alpha(opacity = 95);
- -moz-opacity: 0.95;
- -khtml-opacity: 0.95;
- opacity: 0.95;
+ kfilter: alpha(opacity = 95);
+ -moz-opacity: 0.95;
+ -khtml-opacity: 0.95;
+ opacity: 0.95;
}
.gwt-PopupPanelGlass {
- background-color: #f7ebe3 !important;
- kfilter: alpha(opacity = 68) !important;
- -moz-opacity: 0.68 !important;
- -khtml-opacity: 0.68 !important;
- opacity: 0.68 !important;
+ background-color: #f7ebe3 !important;
+ kfilter: alpha(opacity = 68) !important;
+ -moz-opacity: 0.68 !important;
+ -khtml-opacity: 0.68 !important;
+ opacity: 0.68 !important;
}
.k-box-5shadow {
- -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
- -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
- box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
+ -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5);
}
.k-box-10shadow {
- -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
}
.k-bottom-5corners {
- -webkit-border-bottom-right-radius: 5px;
- -moz-border-radius-bottomright: 5px;
- border-bottom-right-radius: 5px;
- -webkit-border-bottom-left-radius: 5px;
- -moz-border-radius-bottomleft: 5px;
- border-bottom-left-radius: 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -moz-border-radius-bottomright: 5px;
+ border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ border-bottom-left-radius: 5px;
}
.k-bottom-10corners {
- -webkit-border-bottom-right-radius: 10px;
- -moz-border-radius-bottomright: 10px;
- border-bottom-right-radius: 10px;
- -webkit-border-bottom-left-radius: 10px;
- -moz-border-radius-bottomleft: 10px;
- border-bottom-left-radius: 10px;
+ -webkit-border-bottom-right-radius: 10px;
+ -moz-border-radius-bottomright: 10px;
+ border-bottom-right-radius: 10px;
+ -webkit-border-bottom-left-radius: 10px;
+ -moz-border-radius-bottomleft: 10px;
+ border-bottom-left-radius: 10px;
}
.k-top-5corners {
- -webkit-border-top-right-radius: 5px;
- -moz-border-radius-topright: 5px;
- border-top-right-radius: 5px;
- -webkit-border-top-left-radius: 5px;
- -moz-border-radius-topleft: 5px;
- border-top-left-radius: 5px;
+ -webkit-border-top-right-radius: 5px;
+ -moz-border-radius-topright: 5px;
+ border-top-right-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
+ -moz-border-radius-topleft: 5px;
+ border-top-left-radius: 5px;
}
.k-top-10corners {
- -webkit-border-top-right-radius: 10px;
- -moz-border-radius-topright: 10px;
- border-top-right-radius: 10px;
- -webkit-border-top-left-radius: 10px;
- -moz-border-radius-topleft: 10px;
- border-top-left-radius: 10px;
+ -webkit-border-top-right-radius: 10px;
+ -moz-border-radius-topright: 10px;
+ border-top-right-radius: 10px;
+ -webkit-border-top-left-radius: 10px;
+ -moz-border-radius-topleft: 10px;
+ border-top-left-radius: 10px;
}
.k-2corners {
- -moz-border-radius: 2px;
- -webkit-border-radius: 2px;
- border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+ border-radius: 2px;
}
.k-3corners {
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
}
.k-5corners {
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
}
.k-10corners {
- -moz-border-radius: 10px;
- -webkit-border-radius: 10px;
- border-radius: 10px;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
}
.k-dialog-outerp {
- background-color: #552200;
- border-top: 4px solid #000;
- padding: 22px 4px 3px 4px;
+ background-color: #552200;
+ border-top: 4px solid #000;
+ padding: 22px 4px 3px 4px;
}
.k-dialog-title span {
- color: #552200;
- font-size: 20px;
- font-weight: bold;
- margin: 0 0 0 6px;
+ color: #552200;
+ font-size: 20px;
+ font-weight: bold;
+ margin: 0 0 0 6px;
}
.k-dialog-innerp {
- background-color: #FFFFFF;
- border: solid 1px #F2F2F2;
- margin: 34px 16px 20px 16px;
+ background-color: #FFFFFF;
+ border: solid 1px #F2F2F2;
+ margin: 34px 16px 20px 16px;
}
.k-dialog-btn-area {
- padding:0 15px 15px 15px;
- margin-bottom:30px;
+ padding: 0 15px 15px 15px;
+ margin-bottom: 30px;
}
.k-dialog-btn-area div {
- margin: 10px
+ margin: 10px
}
.k-dialog-innerp table {
- margin: 5px;
+ margin: 5px;
}
-.k-dialog-btn {
- text-shadow: 1px 1px 1px #FFFFFF;
- font-weight: bold;
+.k-dialog-btn,.k-btn {
+ text-shadow: 1px 1px 1px #FFFFFF;
+ font-weight: bold;
+ -moz-user-select: none;
+ -khtml-user-select: none;
}
.k-dialog-firstBtn {
- float: left;
+ float: left;
}
.k-dialog-secondBtn {
- float: right;
+ float: right;
}
.k-z100000 {
- z-index: 100000;
+ z-index: 100000;
}
.k-z10000 {
- z-index: 10000;
+ z-index: 10000;
}
.k-z1000 {
- z-index: 1000;
+ z-index: 1000;
}
.oc-user-msg {
- background-color: #FFCC00;
- padding: 3px;
+ background-color: #FFCC00;
+ padding: 3px;
}
.oc-user-msg-popup {
- padding: 0px;
- border: 0px;
+ padding: 0px;
+ border: 0px;
}
.oc-floatleft {
- float: left;
+ float: left;
}
.oc-floatright {
- float: right;
+ float: right;
}
.x-toolbar {
- background: none !important;
- border-color: transparent !important;
+ background: none !important;
+ border-color: transparent !important;
}
.oc-testico {
- background-image: url(/common/img/ico.png) !important;
- -moz-background-clip: border;
- -moz-background-inline-policy: continuous;
- -moz-background-origin: padding;
- background-attachment: scroll;
- background-color: transparent;
- background-position: 0 0;
- background-repeat: no-repeat;
- height: 16px;
- widows: 16px;
+ background-image: url(/common/img/ico.png) !important;
+ -moz-background-clip: border;
+ -moz-background-inline-policy: continuous;
+ -moz-background-origin: padding;
+ background-attachment: scroll;
+ background-color: transparent;
+ background-position: 0 0;
+ background-repeat: no-repeat;
+ height: 16px;
+ widows: 16px;
}
-.oc-ico-pad {
- padding-left: 20px;
- white-space: normal;
-}
-
.oc-tb-spacer {
- margin: 2px;
- width: 2px;
+ margin: 2px;
+ width: 2px;
}
.oc-tb-bottom-line {
- border-bottom-color: rgb(208, 208, 208);
- border-bottom-style: solid;
- border-bottom-width: 1px;
+ border-bottom-color: rgb(208, 208, 208);
+ border-bottom-style: solid;
+ border-bottom-width: 1px;
}
.oc-blank-toolbar {
- background: #FFF none repeat scroll 0% 50%;
+ background: #FFF none repeat scroll 0% 50%;
}
.oc-tb-sep {
- padding-top: 4px;
- padding-left: 5px;
+ padding-top: 4px;
+ padding-left: 5px;
}
.oc-transp .x-panel-body {
- background: transparent;
+ background: transparent;
}
.oc-menu {
- cursor: default;
- -moz-user-select: none;
- -khtml-user-select: none;
- -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- border: 1 px solid #BBBBBB;
+ cursor: default;
+ -moz-user-select: none;
+ -khtml-user-select: none;
+ -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
+ border: 1 px solid #BBBBBB;
+ font: 16px 'Ubuntu', arial;
+ font-weight: bold;
+ -webkit-border-bottom-right-radius: 5px;
+ -moz-border-radius-bottomright: 5px;
+ border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ border-bottom-left-radius: 5px;
+ background-color: #280b0b;
}
+.gwt-PopupPanel .oc-menu {
+ border: 2px solid #552200;
+ background-color: #280b0b;
+}
+
+.oc-menu .gwt-MenuBar-vertical {
+ background-color: #280b0b;
+ border: 2px solid #552200;
+ padding: 3px;
+ -webkit-border-bottom-right-radius: 5px;
+ -moz-border-radius-bottomright: 5px;
+ border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+ -moz-border-radius-bottomleft: 5px;
+ border-bottom-left-radius: 5px;
+ kfilter: alpha(opacity = 90);
+ -moz-opacity: 0.90;
+ -khtml-opacity: 0.90;
+ opacity: 0.90;
+}
+
+.gwt-MenuBar .gwt-MenuItem-selected {
+ background-color: #c87137 !important;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+}
+
+.gwt-MenuBar .gwt-MenuItem {
+ padding: 4px 4px 3px !important;
+}
+
.oc-menu .gwt-MenuItem {
- cursor: default;
- -moz-user-select: none;
- -khtml-user-select: none;
+ cursor: default;
+ -moz-user-select: none;
+ -khtml-user-select: none;
+ /* background-color: #c87137; */
+ color: white;
}
.oc-button {
- padding: 2px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- text-decoration: none;
- vertical-align: middle;
- background-color: #F2F2F2;
+ padding: 2px;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ text-decoration: none;
+ vertical-align: middle;
+ background-color: #F2F2F2;
+ white-space: nowrap;
}
.oc-button:hover {
- border: 2px orange solid;
- background: #f0f0f0;
- color: #855585;
+ border: 2px orange solid;
+ background: #f0f0f0;
+ color: #855585;
}
.oc-button:active {
- border-top-color: #ffffff;
- background: #ffffff;
+ border-top-color: #ffffff;
+ background: #ffffff;
}
#oc-mshortcut {
- position: absolute;
- right: 10px;
+ position: absolute;
+ right: 10px;
}
#oc-mshortcut-hidden {
- visibility: hidden;
+ visibility: hidden;
}
#oc-mshortcut a {
- text-decoration: none;
- color: black;
+ text-decoration: none;
+ color: black;
}
.oc-user-msg {
- background-color: #FFCC00;
- padding: 3px;
+ background-color: #FFCC00;
+ padding: 3px;
}
.oc-user-msg-popup {
- padding: 0px;
- border: 0px;
+ padding: 0px;
+ border: 0px;
}
.oc-floatleft {
- float: left;
+ float: left;
}
.oc-floatright {
- float: right;
+ float: right;
}
.x-toolbar {
- background: none !important;
- border-color: transparent !important;
+ background: none !important;
+ border-color: transparent !important;
}
.oc-testico {
- background-image: url(/common/img/ico.png) !important;
- -moz-background-clip: border;
- -moz-background-inline-policy: continuous;
- -moz-background-origin: padding;
- background-attachment: scroll;
- background-color: transparent;
- background-position: 0 0;
- background-repeat: no-repeat;
- height: 16px;
- widows: 16px;
+ background-image: url(/common/img/ico.png) !important;
+ -moz-background-clip: border;
+ -moz-background-inline-policy: continuous;
+ -moz-background-origin: padding;
+ background-attachment: scroll;
+ background-color: transparent;
+ background-position: 0 0;
+ background-repeat: no-repeat;
+ height: 16px;
+ widows: 16px;
}
-.oc-ico-pad {
- padding-left: 20px;
- white-space: normal;
+.oc-ico-pad { /* padding-right: 20px; */
+ white-space: normal;
}
.oc-tb-spacer {
- margin: 2px;
- width: 2px;
+ margin: 2px;
+ width: 2px;
}
.oc-tb-bottom-line {
- border-bottom-color: rgb(208, 208, 208);
- border-bottom-style: solid;
- border-bottom-width: 1px;
+ border-bottom-color: rgb(208, 208, 208);
+ border-bottom-style: solid;
+ border-bottom-width: 1px;
}
.oc-blank-toolbar {
- background: #FFF none repeat scroll 0% 50%;
+ background: #FFF none repeat scroll 0% 50%;
}
.oc-tb-sep {
- padding-top: 4px;
- padding-left: 5px;
+ padding-top: 4px;
+ padding-left: 5px;
}
.oc-transp .x-panel-body {
- background: transparent;
+ background: transparent;
}
-.oc-menu {
- cursor: default;
- -moz-user-select: none;
- -khtml-user-select: none;
- -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
- border: 1 px solid #BBBBBB;
+#oc-mshortcut {
+ position: absolute;
+ right: 10px;
}
-.oc-menu .gwt-MenuItem {
- cursor: default;
- -moz-user-select: none;
- -khtml-user-select: none;
+#oc-mshortcut-hidden {
+ visibility: hidden;
}
-.oc-button {
- padding: 2px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
- text-decoration: none;
- vertical-align: middle;
- background-color: #F2F2F2;
+#oc-mshortcut a {
+ text-decoration: none;
+ color: black;
}
-.oc-button:hover {
- border: 2px orange solid;
- background: #f0f0f0;
- color: #855585;
+.k-no-backimage,.k-no-backimage td {
+ background-image: none;
}
-.oc-button:active {
- border-top-color: #ffffff;
- background: #ffffff;
+.k-space-nowrap {
+ white-space: nowrap;
}
-#oc-mshortcut {
- position: absolute;
- right: 10px;
+.k-iconlabel-text {
+ vertical-align: top;
+ padding-left: 3px;
}
-#oc-mshortcut-hidden {
- visibility: hidden;
+.k-menuimtem-title {
+ color: white;
+ font-size: 15px;
+ font-style: italic;
+ padding: 2px 3px 2px 0;
}
-#oc-mshortcut a {
- text-decoration: none;
- color: black;
-}
-
-.k-no-backimage,.k-no-backimage td {
- background-image: none;
+.k-tb-sep {
+ border-left: 1px solid #B3B3B3;
+ height: 10px;
+ margin-top: 4px;
}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/core/Core.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/core/Core.gwt.xml 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/Core.gwt.xml 2011-02-21 04:32:11 UTC (rev 1257)
@@ -2,7 +2,7 @@
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.1.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.1.0/distro-source/core/src/gwt-module.dtd">
<module rename-to="ws">
<!-- source / public / etc ==================================== -->
- <!-- excluding test sources for this module workaround for open issue 4454
+ <!-- excluding test sources for this module workaround for open issue 4454
see http://code.google.com/p/google-web-toolkit/issues/detail?id=4454 -->
<source path='client'
excludes="**/*Test.java,**/*Tests.java,**/*MockProvider.java" />
@@ -14,7 +14,7 @@
<inherits name="cc.kune.msgs.KuneMsgs" />
<inherits name="cc.kune.common.KuneCommon" />
<inherits name="com.extjs.gxt.ui.GXT" />
- <inherits name="com.jhickman.web.gwt.gxtuibinder.GxtUiBinder" />
+<!-- <inherits name="com.jhickman.web.gwt.gxtuibinder.GxtUiBinder" />-->
<inherits name="com.calclab.suco.Suco" />
<inherits name='com.gwtplatform.mvp.Mvp' />
<!-- Styles =================================================== -->
Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -185,6 +185,7 @@
bind(SNPendingsMenuItemsRegistry.class).in(Singleton.class);
bind(GroupMembersActionsRegistry.class).in(Singleton.class);
+ bind(SiteUserOptionsPresenter.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);
Modified: trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/resources/CoreResources.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -49,6 +49,9 @@
@Source("arrow-down-green.png")
ImageResource arrowDownGreen();
+ @Source("arrowdownsitebar.gif")
+ ImageResource arrowDownSitebar();
+
@Source("arrow-down-white.gif")
ImageResource arrowDownWhite();
Added: trunk/src/main/java/cc/kune/core/client/resources/arrowdownsitebar.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/client/resources/arrowdownsitebar.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/cc/kune/core/client/resources/icons/IconConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/resources/icons/IconConstants.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/resources/icons/IconConstants.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -21,12 +21,15 @@
import com.google.gwt.resources.client.ImageResource;
+ at Deprecated
public final class IconConstants {
+ @Deprecated
public static final String CSS_SUFFIX = "k-icon-";
- public static final String PATH_PREFIX = "images/";
+ private static final String PATH_PREFIX = "images/";
+ @Deprecated
public static String toPath(final ImageResource img) {
return PATH_PREFIX + img.getName() + ".png";
}
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SiteUserOptionsPresenter.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -32,8 +32,8 @@
import cc.kune.core.client.resources.icons.IconResources;
import cc.kune.core.client.services.FileDownloadUtils;
import cc.kune.core.client.sn.actions.GotoGroupAction;
-import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.StateManager;
+import cc.kune.core.client.state.Session;
import cc.kune.core.client.state.UserSignInEvent;
import cc.kune.core.client.state.UserSignInEvent.UserSignInHandler;
import cc.kune.core.client.state.UserSignOutEvent;
@@ -47,12 +47,12 @@
public class SiteUserOptionsPresenter implements SiteUserOptions {
- public static final String LOGGED_USER_MENU = "kune-sump-lum";
+ public static final MenuDescriptor LOGGED_USER_MENU = new MenuDescriptor();
+ public static final String LOGGED_USER_MENU_ID = "kune-sump-lum";
private final Provider<FileDownloadUtils> downloadProvider;
private final GotoGroupAction gotoGroupAction;
private final I18nTranslationService i18n;
private final IconResources img;
- private MenuDescriptor menuDescriptor;
private SubMenuDescriptor partiMenu;
private final Session session;
private final SitebarActionsPresenter siteOptions;
@@ -71,21 +71,17 @@
this.siteOptions = siteOptions;
this.gotoGroupAction = gotoGroupAction;
createActions();
- if (session.isLogged()) {
- onUserSignIn(session.getCurrentUserInfo());
- }
- session.onUserSignIn(new UserSignInHandler() {
+ session.onUserSignIn(true, new UserSignInHandler() {
@Override
public void onUserSignIn(final UserSignInEvent event) {
SiteUserOptionsPresenter.this.onUserSignIn(event.getUserInfo());
}
});
- session.onUserSignOut(new UserSignOutHandler() {
-
+ session.onUserSignOut(true, new UserSignOutHandler() {
@Override
public void onUserSignOut(final UserSignOutEvent event) {
- menuDescriptor.setVisible(false);
- menuDescriptor.setEnabled(false);
+ LOGGED_USER_MENU.setVisible(false);
+ LOGGED_USER_MENU.setEnabled(false);
SiteUserOptionsPresenter.this.setLoggedUserName("");
}
});
@@ -97,7 +93,7 @@
}
private void addActionImpl(final GuiActionDescrip descriptor) {
- descriptor.setParent(menuDescriptor);
+ descriptor.setParent(LOGGED_USER_MENU);
siteOptions.getRightToolbar().addAction(descriptor);
}
@@ -105,7 +101,7 @@
final String logoImageUrl = group.hasLogo() ? downloadProvider.get().getLogoImageUrl(group.getStateToken())
: "images/group-def-icon.gif";
final MenuItemDescriptor participant = new MenuItemDescriptor(gotoGroupAction);
- participant.setItem(group);
+ participant.setTarget(group);
participant.putValue(Action.NAME, group.getLongName());
participant.putValue(Action.SMALL_ICON, logoImageUrl);
participant.setParent(partiMenu);
@@ -113,10 +109,9 @@
}
private void createActions() {
- menuDescriptor = new MenuDescriptor();
- menuDescriptor.setId(LOGGED_USER_MENU);
- menuDescriptor.setStyles("k-no-backimage, k-btn-sitebar");
- siteOptions.getRightToolbar().addAction(menuDescriptor);
+ LOGGED_USER_MENU.setId(LOGGED_USER_MENU_ID);
+ LOGGED_USER_MENU.setStyles("k-no-backimage, k-btn-sitebar");
+ siteOptions.getLeftToolbar().addAction(LOGGED_USER_MENU);
partiMenu = new SubMenuDescriptor(i18n.t("Your groups"));
addActionImpl(partiMenu);
@@ -139,8 +134,8 @@
}
private void onUserSignIn(final UserInfoDTO userInfoDTO) {
- menuDescriptor.setVisible(true);
- menuDescriptor.setEnabled(true);
+ LOGGED_USER_MENU.setVisible(true);
+ LOGGED_USER_MENU.setEnabled(true);
setLoggedUserName(userInfoDTO.getShortName());
partiMenu.clear();
final List<GroupDTO> groupsIsAdmin = userInfoDTO.getGroupsIsAdmin();
@@ -151,11 +146,11 @@
for (final GroupDTO group : groupsIsCollab) {
addPartipation(group);
}
- partiMenu.setVisible(!groupsIsAdmin.isEmpty() || !groupsIsCollab.isEmpty());
+ partiMenu.setEnabled((groupsIsAdmin.size() + groupsIsCollab.size()) > 0);
}
private void setLoggedUserName(final String shortName) {
- menuDescriptor.putValue(Action.NAME, shortName);
+ LOGGED_USER_MENU.putValue(Action.NAME, shortName);
}
}
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -29,6 +29,8 @@
import cc.kune.common.client.actions.ui.descrip.MenuItemDescriptor;
import cc.kune.common.client.actions.ui.descrip.MenuSeparatorDescriptor;
import cc.kune.common.client.actions.ui.descrip.ToolbarDescriptor;
+import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor;
+import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
import cc.kune.common.client.ui.KuneWindowUtils;
import cc.kune.core.client.init.AppStartEvent;
import cc.kune.core.client.resources.CoreResources;
@@ -108,14 +110,12 @@
public void onAppStart(final AppStartEvent event) {
final IsActionExtensible right = getView().getRightBar();
OPTIONS_MENU.putValue(Action.NAME, i18n.t("Options"));
- // OPTIONS_MENU.putValue(Action.SMALL_ICON, res.arrowDownBlack());
- // OPTIONS_MENU.setParent(RIGHT_TOOLBAR);
- OPTIONS_MENU.setStyles("k-no-backimage, k-btn-sitebar");
+ OPTIONS_MENU.putValue(Action.SMALL_ICON, res.arrowDownSitebar());
+ OPTIONS_MENU.setParent(RIGHT_TOOLBAR);
+ OPTIONS_MENU.setStyles("k-no-backimage, k-btn-sitebar, k-fl");
OPTIONS_MENU.putValue(AbstractGxtMenuGui.MENU_POSITION, AbstractGxtMenuGui.MenuPosition.bl);
- // final ToolbarSeparatorDescriptor separator = new
- // ToolbarSeparatorDescriptor(Type.separator, RIGHT_TOOLBAR);
- // final ToolbarSeparatorDescriptor separator2 = new
- // ToolbarSeparatorDescriptor(Type.separator, RIGHT_TOOLBAR);
+ final ToolbarSeparatorDescriptor separator = new ToolbarSeparatorDescriptor(Type.separator, RIGHT_TOOLBAR);
+ final ToolbarSeparatorDescriptor separator2 = new ToolbarSeparatorDescriptor(Type.separator, RIGHT_TOOLBAR);
final MenuSeparatorDescriptor menuSeparator = new MenuSeparatorDescriptor(OPTIONS_MENU);
final AbstractExtendedAction bugsAction = new AbstractExtendedAction() {
@@ -151,12 +151,12 @@
// aboutAction.setShortcut(shortcut);
// shortcutReg.put(shortcut, aboutAction);
- right.addAction(OPTIONS_MENU);
right.addAction(signInLink.get());
right.addAction(signOutLink.get());
- // right.addAction(separator2);
+ right.addAction(separator2);
right.addAction(newGroupLink.get());
- // right.addAction(separator);
+ right.addAction(separator);
+ right.addAction(OPTIONS_MENU);
right.addAction(reportBugs);
right.addAction(gotoKuneDevSite);
right.addAction(menuSeparator);
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -23,8 +23,8 @@
import cc.kune.common.client.actions.Action;
import cc.kune.common.client.actions.ActionEvent;
import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.core.client.state.StateManager;
import cc.kune.core.client.state.SiteCommonTokens;
-import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.i18n.I18nTranslationService;
import com.google.inject.Inject;
@@ -52,7 +52,7 @@
@Inject
public SitebarNewGroupLink(final SitebarNewGroupAction action) {
super(action);
- setStyles("k-no-backimage, k-btn-sitebar");
- // setParent(SitebarActionsPresenter.RIGHT_TOOLBAR);
+ setStyles("k-no-backimage, k-btn-sitebar, k-fl");
+ setParent(SitebarActionsPresenter.RIGHT_TOOLBAR);
}
}
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignInLink.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignInLink.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignInLink.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -64,14 +64,15 @@
// setParent(SitebarActionsPresenter.RIGHT_TOOLBAR);
setId(SITE_SIGN_IN);
setVisible(!session.isLogged());
- setStyles("k-no-backimage, k-btn-sitebar");
- eventBus.addHandler(UserSignInEvent.getType(), new UserSignInHandler() {
+ setStyles("k-no-backimage, k-btn-sitebar, k-fl");
+ setParent(SitebarActionsPresenter.RIGHT_TOOLBAR);
+ session.onUserSignIn(true, new UserSignInHandler() {
@Override
public void onUserSignIn(final UserSignInEvent event) {
SitebarSignInLink.this.setVisible(false);
}
});
- eventBus.addHandler(UserSignOutEvent.getType(), new UserSignOutHandler() {
+ session.onUserSignOut(true, new UserSignOutHandler() {
@Override
public void onUserSignOut(final UserSignOutEvent event) {
SitebarSignInLink.this.setVisible(true);
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarSignOutLink.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -116,16 +116,16 @@
final ErrorHandler errorHandler, final Session session) {
super(action);
setId(SITE_SIGN_OUT);
- // setParent(SitebarActionsPresenter.RIGHT_TOOLBAR);
+ setParent(SitebarActionsPresenter.RIGHT_TOOLBAR);
setVisible(session.isLogged());
- setStyles("k-no-backimage, k-btn-sitebar");
- eventBus.addHandler(UserSignInEvent.getType(), new UserSignInHandler() {
+ setStyles("k-no-backimage, k-btn-sitebar, k-fl");
+ session.onUserSignIn(true, new UserSignInHandler() {
@Override
public void onUserSignIn(final UserSignInEvent event) {
SitebarSignOutLink.this.setVisible(true);
}
});
- eventBus.addHandler(UserSignOutEvent.getType(), new UserSignOutHandler() {
+ session.onUserSignOut(true, new UserSignOutHandler() {
@Override
public void onUserSignOut(final UserSignOutEvent event) {
SitebarSignOutLink.this.setVisible(false);
Modified: trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPresenter.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/GroupMembersPresenter.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -130,7 +130,7 @@
final GuiActionDescCollection items = new GuiActionDescCollection();
for (final Provider<MenuItemDescriptor> provider : registry) {
final MenuItemDescriptor menuItem = provider.get();
- menuItem.setItem(group);
+ menuItem.setTarget(group);
items.add(menuItem);
}
return items;
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/AcceptJoinGroupAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/AcceptJoinGroupAction.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/AcceptJoinGroupAction.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -39,7 +39,7 @@
public void actionPerformed(final ActionEvent event) {
NotifyUser.showProgressProcessing();
snServiceProvider.get().acceptJoinGroup(session.getUserHash(), session.getCurrentState().getStateToken(),
- ((GroupDTO) event.getSource()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ ((GroupDTO) event.getTarget()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
@Override
public void onSuccess(final SocialNetworkDataDTO result) {
NotifyUser.hideProgress();
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToAdminAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToAdminAction.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToAdminAction.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -38,7 +38,7 @@
public void actionPerformed(final ActionEvent event) {
NotifyUser.showProgressProcessing();
snServiceProvider.get().setCollabAsAdmin(session.getUserHash(), session.getCurrentState().getStateToken(),
- ((GroupDTO) event.getSource()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ ((GroupDTO) event.getTarget()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
@Override
public void onSuccess(final SocialNetworkDataDTO result) {
NotifyUser.hideProgress();
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToCollabAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToCollabAction.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/ChangeToCollabAction.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -38,7 +38,7 @@
public void actionPerformed(final ActionEvent event) {
NotifyUser.showProgressProcessing();
snServiceProvider.get().setAdminAsCollab(session.getUserHash(), session.getCurrentState().getStateToken(),
- ((GroupDTO) event.getSource()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ ((GroupDTO) event.getTarget()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
@Override
public void onSuccess(final SocialNetworkDataDTO result) {
NotifyUser.hideProgress();
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/DenyJoinGroupAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/DenyJoinGroupAction.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/DenyJoinGroupAction.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -38,7 +38,7 @@
public void actionPerformed(final ActionEvent event) {
NotifyUser.showProgressProcessing();
snServiceProvider.get().denyJoinGroup(session.getUserHash(), session.getCurrentState().getStateToken(),
- ((GroupDTO) event.getSource()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ ((GroupDTO) event.getTarget()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
@Override
public void onSuccess(final SocialNetworkDataDTO result) {
NotifyUser.hideProgress();
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/GotoGroupAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/GotoGroupAction.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/GotoGroupAction.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -23,7 +23,7 @@
@Override
public void actionPerformed(final ActionEvent event) {
- stateManager.gotoToken(((GroupDTO) event.getSource()).getStateToken());
+ stateManager.gotoToken(((GroupDTO) event.getTarget()).getStateToken());
}
}
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/RemoveMemberAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/RemoveMemberAction.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/RemoveMemberAction.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -38,7 +38,7 @@
public void actionPerformed(final ActionEvent event) {
NotifyUser.showProgressProcessing();
snServiceProvider.get().deleteMember(session.getUserHash(), session.getCurrentState().getStateToken(),
- ((GroupDTO) event.getSource()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+ ((GroupDTO) event.getTarget()).getShortName(), new AsyncCallbackSimple<SocialNetworkDataDTO>() {
@Override
public void onSuccess(final SocialNetworkDataDTO result) {
NotifyUser.hideProgress();
Deleted: trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithMemberAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithMemberAction.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithMemberAction.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -1,40 +0,0 @@
-package cc.kune.core.client.sn.actions;
-
-import cc.kune.chat.client.ChatClient;
-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.noti.NotifyUser;
-import cc.kune.core.client.resources.CoreResources;
-import cc.kune.core.shared.dto.GroupDTO;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.calclab.emite.core.client.xmpp.stanzas.XmppURI;
-import com.google.inject.Inject;
-import com.google.inject.Provider;
-
-public class StartChatWithMemberAction extends AbstractExtendedAction {
- private final Provider<ChatClient> chatClient;
-
- private final I18nTranslationService i18n;
-
- @Inject
- public StartChatWithMemberAction(final I18nTranslationService i18n, final CoreResources res,
- final Provider<ChatClient> chatClient) {
- this.i18n = i18n;
- this.chatClient = chatClient;
- putValue(NAME, i18n.t("Start a chat with this member"));
- putValue(Action.SMALL_ICON, res.newChat());
- }
-
- @Override
- public void actionPerformed(final ActionEvent event) {
- chatClient.get().show();
- if (chatClient.get().isLoggedIn()) {
- chatClient.get().chat(XmppURI.jid(((GroupDTO) event.getSource()).getShortName()));
- } else {
- NotifyUser.important(i18n.t("To start a chat you need to be 'online'"));
- }
- }
-
-}
Deleted: trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithUserAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithUserAction.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/StartChatWithUserAction.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -1,17 +0,0 @@
-package cc.kune.core.client.sn.actions;
-
-import cc.kune.chat.client.ChatClient;
-import cc.kune.core.client.resources.CoreResources;
-import cc.kune.core.shared.i18n.I18nTranslationService;
-
-import com.google.inject.Inject;
-import com.google.inject.Provider;
-
-public class StartChatWithUserAction extends StartChatWithMemberAction {
- @Inject
- public StartChatWithUserAction(final I18nTranslationService i18n, final CoreResources res,
- final Provider<ChatClient> chatClient) {
- super(i18n, res, chatClient);
- putValue(NAME, i18n.t("Start a chat with this person"));
- }
-}
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsGroupCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsGroupCondition.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsGroupCondition.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -16,6 +16,6 @@
@Override
public boolean mustBeAdded(final GuiActionDescrip descr) {
- return (!((GroupDTO) descr.getItem()).isPersonal());
+ return (!((GroupDTO) descr.getTarget()).isPersonal());
}
}
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsNotMeCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsNotMeCondition.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsNotMeCondition.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -21,6 +21,6 @@
@Override
public boolean mustBeAdded(final GuiActionDescrip descr) {
return (session.isLogged() && !session.getCurrentUser().getShortName().equals(
- ((GroupDTO) descr.getItem()).getShortName()));
+ ((GroupDTO) descr.getTarget()).getShortName()));
}
}
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsPersonCondition.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsPersonCondition.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/conditions/IsPersonCondition.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -16,6 +16,6 @@
@Override
public boolean mustBeAdded(final GuiActionDescrip descr) {
- return (((GroupDTO) descr.getItem()).isPersonal());
+ return (((GroupDTO) descr.getTarget()).isPersonal());
}
}
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/GroupMembersActionsRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/registry/GroupMembersActionsRegistry.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/registry/GroupMembersActionsRegistry.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -3,16 +3,19 @@
import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
import cc.kune.core.client.sn.actions.JoinGroupAction;
import cc.kune.core.client.sn.actions.UnJoinGroupAction;
+import cc.kune.core.client.sn.actions.conditions.IsGroupCondition;
import com.google.inject.Inject;
public class GroupMembersActionsRegistry extends AbstractSNActionsRegistry {
@Inject
- public GroupMembersActionsRegistry(final JoinGroupAction joinGroupAction, final UnJoinGroupAction unJoinGroupAction) {
+ public GroupMembersActionsRegistry(final JoinGroupAction joinGroupAction, final IsGroupCondition isGroupCondition,
+ final UnJoinGroupAction unJoinGroupAction) {
final ButtonDescriptor join = new ButtonDescriptor(joinGroupAction);
final ButtonDescriptor unjoin = new ButtonDescriptor(unJoinGroupAction);
// join.setStyles("k-no-backimage");
// unjoin.setStyles("k-no-backimage");
+ // join.add(isGroupCondition);
add(join);
add(unjoin);
}
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNAdminsMenuItemsRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNAdminsMenuItemsRegistry.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNAdminsMenuItemsRegistry.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -8,7 +8,6 @@
import cc.kune.core.client.sn.actions.GotoGroupAction;
import cc.kune.core.client.sn.actions.GotoMemberAction;
import cc.kune.core.client.sn.actions.RemoveMemberAction;
-import cc.kune.core.client.sn.actions.StartChatWithMemberAction;
import cc.kune.core.client.sn.actions.conditions.IsAdministrableCondition;
import cc.kune.core.client.sn.actions.conditions.IsGroupCondition;
import cc.kune.core.client.sn.actions.conditions.IsNotMeCondition;
@@ -26,13 +25,13 @@
final IsNotMeCondition isNotMe, final ChangeToCollabAction changeToCollabAction,
final ChangeToAdminAction changeToAdminAction, final RemoveMemberAction removeMemberAction,
final AcceptJoinGroupAction acceptJoinGroupAction, final DenyJoinGroupAction denyJoinGroupAction,
- final StartChatWithMemberAction startChatWithUserAction, final GotoGroupAction gotoGroupAction,
- final GotoMemberAction gotoMemberAction) {
+ final GotoGroupAction gotoGroupAction, final GotoMemberAction gotoMemberAction) {
add(new Provider<MenuItemDescriptor>() {
@Override
public MenuItemDescriptor get() {
final MenuItemDescriptor item = new MenuItemDescriptor(changeToCollabAction);
item.add(isAdministrableCondition);
+ item.add(isNotMe);
return item;
}
});
@@ -41,6 +40,7 @@
public MenuItemDescriptor get() {
final MenuItemDescriptor item = new MenuItemDescriptor(removeMemberAction);
item.add(isAdministrableCondition);
+ item.add(isNotMe);
return item;
}
});
@@ -60,15 +60,6 @@
return item;
}
});
- add(new Provider<MenuItemDescriptor>() {
- @Override
- public MenuItemDescriptor get() {
- final MenuItemDescriptor item = new MenuItemDescriptor(startChatWithUserAction);
- item.add(isNotMe);
- item.add(isPersonCondition);
- return item;
- }
- });
}
}
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNCollabsMenuItemsRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNCollabsMenuItemsRegistry.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNCollabsMenuItemsRegistry.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -8,7 +8,6 @@
import cc.kune.core.client.sn.actions.GotoGroupAction;
import cc.kune.core.client.sn.actions.GotoMemberAction;
import cc.kune.core.client.sn.actions.RemoveMemberAction;
-import cc.kune.core.client.sn.actions.StartChatWithMemberAction;
import cc.kune.core.client.sn.actions.conditions.IsAdministrableCondition;
import cc.kune.core.client.sn.actions.conditions.IsGroupCondition;
import cc.kune.core.client.sn.actions.conditions.IsNotMeCondition;
@@ -26,8 +25,7 @@
final IsNotMeCondition isNotMe, final ChangeToCollabAction changeToCollabAction,
final ChangeToAdminAction changeToAdminAction, final RemoveMemberAction removeMemberAction,
final AcceptJoinGroupAction acceptJoinGroupAction, final DenyJoinGroupAction denyJoinGroupAction,
- final StartChatWithMemberAction startChatWithUserAction, final GotoGroupAction gotoGroupAction,
- final GotoMemberAction gotoMemberAction) {
+ final GotoGroupAction gotoGroupAction, final GotoMemberAction gotoMemberAction) {
add(new Provider<MenuItemDescriptor>() {
@Override
public MenuItemDescriptor get() {
@@ -60,15 +58,7 @@
return item;
}
});
- add(new Provider<MenuItemDescriptor>() {
- @Override
- public MenuItemDescriptor get() {
- final MenuItemDescriptor item = new MenuItemDescriptor(startChatWithUserAction);
- item.add(isNotMe);
- item.add(isPersonCondition);
- return item;
- }
- });
+
}
}
Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNPendingsMenuItemsRegistry.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNPendingsMenuItemsRegistry.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/registry/SNPendingsMenuItemsRegistry.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -8,7 +8,6 @@
import cc.kune.core.client.sn.actions.GotoGroupAction;
import cc.kune.core.client.sn.actions.GotoPersonAction;
import cc.kune.core.client.sn.actions.RemoveMemberAction;
-import cc.kune.core.client.sn.actions.StartChatWithUserAction;
import cc.kune.core.client.sn.actions.conditions.IsAdministrableCondition;
import cc.kune.core.client.sn.actions.conditions.IsGroupCondition;
import cc.kune.core.client.sn.actions.conditions.IsPersonCondition;
@@ -24,8 +23,8 @@
final IsPersonCondition isPersonCondition, final IsGroupCondition isGroupCondition,
final ChangeToCollabAction changeToCollabAction, final ChangeToAdminAction changeToAdminAction,
final RemoveMemberAction removeMemberAction, final AcceptJoinGroupAction acceptJoinGroupAction,
- final DenyJoinGroupAction denyJoinGroupAction, final StartChatWithUserAction startChatWithUserAction,
- final GotoGroupAction gotoGroupAction, final GotoPersonAction gotoPersonAction) {
+ final DenyJoinGroupAction denyJoinGroupAction, final GotoGroupAction gotoGroupAction,
+ final GotoPersonAction gotoPersonAction) {
add(new Provider<MenuItemDescriptor>() {
@Override
public MenuItemDescriptor get() {
@@ -58,14 +57,6 @@
return item;
}
});
- add(new Provider<MenuItemDescriptor>() {
- @Override
- public MenuItemDescriptor get() {
- final MenuItemDescriptor item = new MenuItemDescriptor(startChatWithUserAction);
- item.add(isPersonCondition);
- return item;
- }
- });
}
}
Modified: trunk/src/main/java/cc/kune/core/client/state/Session.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/Session.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/state/Session.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -66,7 +66,7 @@
*/
int SESSION_DURATION = 1000 * 60 * 60 * 24 * 14;
- String USERHASH = "userHash";
+ String USERHASH = "k007userHash";
void check(AsyncCallbackSimple<Void> callback);
@@ -141,16 +141,28 @@
@Deprecated
void onInitDataReceived(Listener<InitDataDTO> listener);
+ /**
+ * @param fireNow
+ * if @true the handler is fired after added if the user is
+ * loggedin
+ * @param handler
+ */
+ void onUserSignIn(boolean fireNow, UserSignInEvent.UserSignInHandler handler);
+
@Deprecated
void onUserSignIn(Listener<UserInfoDTO> listener);
- void onUserSignIn(UserSignInEvent.UserSignInHandler handler);
+ /**
+ * @param fireNow
+ * if @true the handler is fired after added if the user is
+ * loggedin
+ * @param handler
+ */
+ void onUserSignOut(boolean fireNow, UserSignOutEvent.UserSignOutHandler handler);
@Deprecated
void onUserSignOut(Listener0 listener);
- void onUserSignOut(UserSignOutEvent.UserSignOutHandler handler);
-
void setCurrentLanguage(final I18nLanguageDTO currentLanguage);
void setCurrentState(final StateAbstractDTO currentState);
Modified: trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/state/SessionDefault.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -302,13 +302,24 @@
}
@Override
+ public void onUserSignIn(final boolean fireNow, final UserSignInHandler handler) {
+ eventBus.addHandler(UserSignInEvent.getType(), handler);
+ if (fireNow && isLogged() && currentUserInfo != null) {
+ handler.onUserSignIn(new UserSignInEvent(currentUserInfo));
+ }
+ }
+
+ @Override
public void onUserSignIn(final Listener<UserInfoDTO> listener) {
throw new NotImplementedException();
}
@Override
- public void onUserSignIn(final UserSignInHandler handler) {
- eventBus.addHandler(UserSignInEvent.getType(), handler);
+ public void onUserSignOut(final boolean fireNow, final UserSignOutHandler handler) {
+ eventBus.addHandler(UserSignOutEvent.getType(), handler);
+ if (fireNow && isNotLogged()) {
+ handler.onUserSignOut(new UserSignOutEvent());
+ }
}
@Override
@@ -317,11 +328,6 @@
}
@Override
- public void onUserSignOut(final UserSignOutHandler handler) {
- eventBus.addHandler(UserSignOutEvent.getType(), handler);
- }
-
- @Override
public void setCurrentLanguage(final I18nLanguageDTO currentLanguage) {
this.currentLanguage = currentLanguage;
}
Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -68,7 +68,7 @@
this.resumedToken = null;
siteTokens = new HashMap<String, HistoryTokenCallback>();
beforeStateChangeCollection = new BeforeActionCollection();
- eventBus.addHandler(UserSignInEvent.getType(), new UserSignInEvent.UserSignInHandler() {
+ session.onUserSignIn(true, new UserSignInEvent.UserSignInHandler() {
@Override
public void onUserSignIn(final UserSignInEvent event) {
if (previousToken == null) {
@@ -79,7 +79,7 @@
}
}
});
- eventBus.addHandler(UserSignOutEvent.getType(), new UserSignOutEvent.UserSignOutHandler() {
+ session.onUserSignOut(true, new UserSignOutEvent.UserSignOutHandler() {
@Override
public void onUserSignOut(final UserSignOutEvent event) {
reload();
Modified: trunk/src/main/java/cc/kune/core/client/ui/footer/license/EntityLicensePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/footer/license/EntityLicensePanel.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/client/ui/footer/license/EntityLicensePanel.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -72,8 +72,11 @@
});
licenseImage.addStyleName("k-footer-license-img");
licenseLabel.addStyleName("k-footer-license-label");
+ licenseLabel.setVisible(false);
armor.getEntityFooter().add(licenseBar);
labelElement = licenseLabel.getElement();
+ labelElement.getStyle().setOpacity(0);
+ licenseLabel.setVisible(true);
}
@Override
@@ -92,9 +95,11 @@
}
private void fade() {
- final Fade fade = new Fade(labelElement);
- fade.setDuration(.5);
- fade.play();
+ if ("1".equals(labelElement.getStyle().getOpacity())) {
+ final Fade fade = new Fade(labelElement);
+ fade.setDuration(.5);
+ fade.play();
+ }
}
@Override
Added: trunk/src/main/java/cc/kune/core/public/images/clear.gif
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/public/images/clear.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/src/main/java/cc/kune/core/public/images/clear.png
===================================================================
(Binary files differ)
Property changes on: trunk/src/main/java/cc/kune/core/public/images/clear.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-02-21 04:32:11 UTC (rev 1257)
@@ -370,18 +370,29 @@
margin-top: 2px;
}
-.x-btn button {
- font: 18px/27px 'Ubuntu', arial;
+.x-btn button,button { /* font: 18px/27px 'Ubuntu', arial; */
+
}
-.k-btn-sitebar,.k-btn-sitebar button {
+.k-btn-sitebar span,.k-btn-sitebar button span,.k-sitebar button span {
+ text-decoration: underline;
+}
+
+.k-btn-sitebar,.k-btn-sitebar button,.k-sitebar button {
font: 13px 'Ubuntu', arial;
color: #B3B3B3;
cursor: pointer;
- text-decoration: underline;
white-space: nowrap;
+ background: none;
+ border: 0px;
+ padding: 0 3px 0 0 !important;
}
+.k-sitebar button:hover {
+ border: 0px;
+ background: none;
+}
+
.k-btn-sitebar button {
margin-top: -5px;
}
@@ -800,7 +811,7 @@
white-space: nowrap;
}
*/
-.k-sn-mainpanel .x-btn button {
+.k-sn-mainpanel .x-btn button,.k-sn-mainpanel button {
font: 13px 'Ubuntu', arial;
border: 2px solid #CCCCCC;
cursor: pointer;
@@ -815,6 +826,7 @@
vertical-align: middle;
line-height: 2em !important;
height: 26px !important;
+ font-weight: bold;
/*
font-size:small;
cursor: pointer;
@@ -822,13 +834,13 @@
padding-left: 25px !important; */
}
-.k-sn-mainpanel .x-btn button:hover {
+.k-sn-mainpanel .x-btn button:hover,.k-sn-mainpanel button:hover {
border: 2px orange solid;
background: #f0f0f0;
color: #855585;
}
-.k-sn-mainpanel .x-btn button:active {
+.k-sn-mainpanel .x-btn button:active,.k-sn-mainpanel button:active {
border-top-color: #ffffff;
background: #ffffff;
}
@@ -923,6 +935,7 @@
font-size: 16px;
color: #784421;
}
+
.k-footer-license-label-title {
margin-right: 5px;
color: #280b0b;
Modified: trunk/src/main/java/cc/kune/core/public/ws.html
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.html 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/core/public/ws.html 2011-02-21 04:32:11 UTC (rev 1257)
@@ -8,13 +8,13 @@
<meta name="emite.httpBase" content="/http-bind/" />
<meta name="emite.host" content="localhost" />
<meta name="emite.searchHost" content="search.localhost" />
-<meta name="emite.session" content="login" />
+<!--<meta name="emite.session" content="login" />-->
<meta name="hablar.roomService" content="rooms.localhost" />
<meta name="hablar.login" content="false" />
<meta name="hablar.hasVCard" content="false" />
<meta name="hablar.search" content="false" />
<meta name="hablar.hasCopyToClipboard" content="false" />
-<meta name="hablar.hasLogger" content="true" />
+<!--<meta name="hablar.hasLogger" content="true" />-->
<meta name="hablar.hasSignals" content="false" />
<meta name="hablar.roster" content="true" />
<meta name="hablar.dockRoster" content="left" />
@@ -22,7 +22,7 @@
<meta name="hablar.layout" content="tabs" />
<meta name="hablar.inline" content="vertical_dock_div" />
<meta name="hablar.width" content="550px" />
-<meta name="hablar.height" content="300px" />
+<meta name="hablar.height" content="400px" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css"
href="http://yui.yahooapis.com/2.8.0r4/build/reset/reset-min.css">
Modified: trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/gspace/client/resources/wsArmor.css 2011-02-21 04:32:11 UTC (rev 1257)
@@ -145,8 +145,8 @@
.entityToolsNorth span {
color: #a05a2c;
- font-size: 20px;
- font-weight: bold;
+ /* font-size: 20px;
+ font-weight: bold; */
}
.entityToolsCenter {
Modified: trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/pspace/client/PSpacePanel.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -98,8 +98,8 @@
@Override
public void setContentGotoPublicUrl(final String publicUrl) {
- frame.setUrl("about:blank");
- // frame.setUrl(publicUrl);
+ // frame.setUrl("about:blank");
+ frame.setUrl(publicUrl);
}
}
Modified: trunk/src/main/java/cc/kune/wave/KuneWave.gwt.xml
===================================================================
--- trunk/src/main/java/cc/kune/wave/KuneWave.gwt.xml 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/wave/KuneWave.gwt.xml 2011-02-21 04:32:11 UTC (rev 1257)
@@ -7,8 +7,6 @@
<inherits name='com.google.gwt.user.User' />
<inherits name="com.google.gwt.event.EventBase" />
- <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome' /> -->
-
<inherits name='com.glines.socketio.client.Client' />
<inherits name='com.google.gwt.json.JSON' />
<inherits name='com.google.gwt.websockets.WebSockets' />
Modified: trunk/src/main/java/cc/kune/wave/client/WaveClientTester.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WaveClientTester.java 2011-02-18 01:00:51 UTC (rev 1256)
+++ trunk/src/main/java/cc/kune/wave/client/WaveClientTester.java 2011-02-21 04:32:11 UTC (rev 1257)
@@ -25,17 +25,14 @@
@Inject
public WaveClientTester(final WsArmor wsarmor, final Session session) {
this.wsarmor = wsarmor;
- if (session.isLogged()) {
- doLogin(session.getCurrentUserInfo().getChatName(), session.getCurrentUserInfo().getChatPassword());
- }
- session.onUserSignIn(new UserSignInHandler() {
+ session.onUserSignIn(true, new UserSignInHandler() {
@Override
public void onUserSignIn(final UserSignInEvent event) {
doLogin(event.getUserInfo().getChatName(), event.getUserInfo().getChatPassword());
}
});
- session.onUserSignOut(new UserSignOutHandler() {
+ session.onUserSignOut(true, new UserSignOutHandler() {
@Override
public void onUserSignOut(final UserSignOutEvent event) {
// TODO Auto-generated method stub
More information about the kune-commits
mailing list