[kune-commits] r1342 - in trunk: . src/main/java/cc/kune/common/client/actions/gwtui src/main/java/cc/kune/common/client/ui src/main/java/cc/kune/common/public src/main/java/cc/kune/core/client/auth src/main/java/cc/kune/core/client/groups/newgroup src/main/java/cc/kune/core/client/sitebar src/main/java/cc/kune/core/client/sitebar/search src/main/java/cc/kune/core/client/sn src/main/java/cc/kune/core/public src/main/java/cc/kune/core/server/manager/impl src/main/java/cc/kune/gspace/client/options/license src/main/java/cc/kune/wave/client
Vicente J. Ruiz Jurado
vjrj_ at ourproject.org
Thu May 5 03:45:27 CEST 2011
Author: vjrj_
Date: 2011-05-05 03:45:26 +0200 (Thu, 05 May 2011)
New Revision: 1342
Modified:
trunk/pom.xml
trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java
trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.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/public/kune-common.css
trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java
trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
trunk/src/main/java/cc/kune/core/client/sitebar/search/MultivalueSuggestBox.java
trunk/src/main/java/cc/kune/core/client/sitebar/search/SitebarSearchPanel.java
trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java
trunk/src/main/java/cc/kune/core/client/sn/UserSNPresenter.java
trunk/src/main/java/cc/kune/core/public/about.html
trunk/src/main/java/cc/kune/core/public/ws.css
trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java
trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java
trunk/src/main/java/cc/kune/wave/client/WaveStatusIndicator.java
Log:
Minor fixes in icons and search textbox
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/pom.xml 2011-05-05 01:45:26 UTC (rev 1342)
@@ -908,6 +908,8 @@
<module>${project.groupId}.Kune</module>
</modules>
<copyWebapp>true</copyWebapp>
+ <soyc>false</soyc>
+ <extraJvmArgs>-Xmx1024m -Xss1024k</extraJvmArgs>
</configuration>
<executions>
<execution>
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-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/AbstractGwtButtonGui.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -39,121 +39,120 @@
public abstract class AbstractGwtButtonGui extends AbstractChildGuiItem {
- private ButtonBase button;
- protected boolean enableTongle;
- private IconLabel iconLabel;
- private boolean isChild;
+ private ButtonBase button;
+ protected boolean enableTongle;
+ private IconLabel iconLabel;
+ private boolean isChild;
- public AbstractGwtButtonGui() {
- this(null, false);
- }
+ public AbstractGwtButtonGui() {
+ this(null, false);
+ }
- public AbstractGwtButtonGui(final ButtonDescriptor buttonDescriptor) {
- this(buttonDescriptor, false);
- }
+ public AbstractGwtButtonGui(final ButtonDescriptor buttonDescriptor) {
+ this(buttonDescriptor, false);
+ }
- public AbstractGwtButtonGui(final ButtonDescriptor buttonDescriptor, final boolean enableTongle) {
- super(buttonDescriptor);
- this.enableTongle = enableTongle;
- }
+ public AbstractGwtButtonGui(final ButtonDescriptor buttonDescriptor, final boolean enableTongle) {
+ super(buttonDescriptor);
+ this.enableTongle = enableTongle;
+ }
- @Override
- protected void addStyle(final String style) {
- iconLabel.addStyleName(style);
- button.addStyleName(style);
- layout();
- }
+ @Override
+ protected void addStyle(final String style) {
+ button.addStyleName(style);
+ layout();
+ }
- @Override
- public AbstractGuiItem create(final GuiActionDescrip descriptor) {
- super.descriptor = descriptor;
- iconLabel = new IconLabel("");
- if (enableTongle) {
- button = new ToggleButton();
- } else {
- button = new Button();
- }
- button.addStyleName("k-button");
- button.addStyleName("k-btn");
- button.addStyleName("k-5corners");
- layout();
- // button.setEnableToggle(enableTongle);
- final String id = descriptor.getId();
- if (id != null) {
- button.ensureDebugId(id);
- }
- isChild = descriptor.isChild();
- if (isChild) {
- // If button is inside a toolbar don't init...
- if (descriptor.isChild()) {
- child = button;
- }
- } else {
- initWidget(button);
- }
- button.addClickHandler(new ClickHandler() {
- @Override
- public void onClick(final ClickEvent event) {
- descriptor.fire(new ActionEvent(button, getTargetObjectOfAction(descriptor),
- Event.as(event.getNativeEvent())));
- }
- });
- super.create(descriptor);
- configureItemFromProperties();
- return this;
+ @Override
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+ super.descriptor = descriptor;
+ iconLabel = new IconLabel("");
+ if (enableTongle) {
+ button = new ToggleButton();
+ } else {
+ button = new Button();
}
-
- private void layout() {
- button.setHTML(iconLabel.getElement().getInnerHTML());
+ button.addStyleName("k-button");
+ button.addStyleName("k-btn");
+ button.addStyleName("k-5corners");
+ layout();
+ // button.setEnableToggle(enableTongle);
+ final String id = descriptor.getId();
+ if (id != null) {
+ button.ensureDebugId(id);
}
-
- @Override
- public void setEnabled(final boolean enabled) {
- button.setEnabled(enabled);
+ isChild = descriptor.isChild();
+ if (isChild) {
+ // If button is inside a toolbar don't init...
+ if (descriptor.isChild()) {
+ child = button;
+ }
+ } else {
+ initWidget(button);
}
+ button.addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ descriptor.fire(new ActionEvent(button, getTargetObjectOfAction(descriptor),
+ Event.as(event.getNativeEvent())));
+ }
+ });
+ super.create(descriptor);
+ configureItemFromProperties();
+ return this;
+ }
- @Override
- public void setIconResource(final ImageResource icon) {
- iconLabel.setLeftIconResource(icon);
- layout();
- }
+ private void layout() {
+ button.setHTML(iconLabel.getElement().getInnerHTML());
+ }
- @Override
- protected void setIconStyle(final String style) {
- iconLabel.setRightIcon(style);
- layout();
- }
+ @Override
+ public void setEnabled(final boolean enabled) {
+ button.setEnabled(enabled);
+ }
- public void setPressed(final boolean pressed) {
- final ToggleButton toggleButton = (ToggleButton) button;
+ @Override
+ public void setIconResource(final ImageResource icon) {
+ iconLabel.setLeftIconResource(icon);
+ layout();
+ }
- if (toggleButton.isDown() != pressed) {
- toggleButton.setDown(pressed);
- }
- }
+ @Override
+ protected void setIconStyle(final String style) {
+ iconLabel.setRightIcon(style);
+ layout();
+ }
- @Override
- public void setText(final String text) {
- iconLabel.setText(text);
- layout();
- }
+ public void setPressed(final boolean pressed) {
+ final ToggleButton toggleButton = (ToggleButton) button;
- @Override
- public void setToolTipText(final String tooltip) {
- if (tooltip != null && !tooltip.isEmpty()) {
- final KeyStroke key = (KeyStroke) descriptor.getValue(Action.ACCELERATOR_KEY);
- Tooltip.to(button, key == null ? tooltip : tooltip + key.toString());
- }
+ if (toggleButton.isDown() != pressed) {
+ toggleButton.setDown(pressed);
}
+ }
- @Override
- public void setVisible(final boolean visible) {
- button.setVisible(visible);
- }
+ @Override
+ public void setText(final String text) {
+ iconLabel.setText(text);
+ layout();
+ }
- @Override
- public boolean shouldBeAdded() {
- return !descriptor.isChild();
+ @Override
+ public void setToolTipText(final String tooltip) {
+ if (tooltip != null && !tooltip.isEmpty()) {
+ final KeyStroke key = (KeyStroke) descriptor.getValue(Action.ACCELERATOR_KEY);
+ Tooltip.to(button, key == null ? tooltip : tooltip + key.toString());
}
+ }
+ @Override
+ public void setVisible(final boolean visible) {
+ button.setVisible(visible);
+ }
+
+ @Override
+ public boolean shouldBeAdded() {
+ return !descriptor.isChild();
+ }
+
}
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-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/common/client/actions/gwtui/GwtIconLabelGui.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -33,66 +33,67 @@
import com.google.gwt.user.client.Event;
public class GwtIconLabelGui extends AbstractGuiItem {
- private IconLabel iconLabel;
+ private IconLabel iconLabel;
- @Override
- protected void addStyle(final String style) {
- iconLabel.addStyleName(style);
- }
+ @Override
+ protected void addStyle(final String style) {
+ iconLabel.addStyleName(style);
+ }
- @Override
- protected void clearStyles() {
- iconLabel.setStyleName("k-none");
+ @Override
+ protected void clearStyles() {
+ iconLabel.setStyleName("k-none");
+ }
+
+ @Override
+ public AbstractGuiItem create(final GuiActionDescrip descriptor) {
+ super.descriptor = descriptor;
+ iconLabel = new IconLabel("");
+ descriptor.putValue(ParentWidget.PARENT_UI, this);
+ final String id = descriptor.getId();
+ if (id != null) {
+ iconLabel.ensureDebugId(id);
}
-
- @Override
- public AbstractGuiItem create(final GuiActionDescrip descriptor) {
- super.descriptor = descriptor;
- iconLabel = new IconLabel("");
- descriptor.putValue(ParentWidget.PARENT_UI, this);
- final String id = descriptor.getId();
- if (id != null) {
- iconLabel.ensureDebugId(id);
+ initWidget(iconLabel);
+ iconLabel.getFocus().addClickHandler(new ClickHandler() {
+ @Override
+ public void onClick(final ClickEvent event) {
+ final AbstractAction action = descriptor.getAction();
+ if (action != null) {
+ action.actionPerformed(new ActionEvent(iconLabel, getTargetObjectOfAction(descriptor),
+ Event.as(event.getNativeEvent())));
}
- initWidget(iconLabel);
- iconLabel.getFocus().addClickHandler(new ClickHandler() {
- @Override
- public void onClick(final ClickEvent event) {
- final AbstractAction action = descriptor.getAction();
- if (action != null) {
- action.actionPerformed(new ActionEvent(iconLabel, getTargetObjectOfAction(descriptor),
- Event.as(event.getNativeEvent())));
- }
- }
- });
- configureItemFromProperties();
- return this;
- }
+ }
+ });
+ configureItemFromProperties();
+ return this;
+ }
- @Override
- public void setEnabled(final boolean enabled) {
- super.setVisible(enabled);
- }
+ @Override
+ public void setEnabled(final boolean enabled) {
+ super.setVisible(enabled);
+ }
- @Override
- protected void setIconStyle(final String style) {
- iconLabel.setRightIcon(style);
- }
+ @Override
+ protected void setIconStyle(final String style) {
+ iconLabel.setRightIcon(style);
+ iconLabel.addRightIconStyle("k-fl");
+ }
- @Override
- public void setText(final String text) {
- iconLabel.setText(text);
- }
+ @Override
+ public void setText(final String text) {
+ iconLabel.setText(text);
+ }
- @Override
- public void setToolTipText(final String tooltip) {
- final KeyStroke key = (KeyStroke) descriptor.getValue(Action.ACCELERATOR_KEY);
- iconLabel.setTooltip(key == null ? tooltip : tooltip + key.toString());
- }
+ @Override
+ public void setToolTipText(final String tooltip) {
+ final KeyStroke key = (KeyStroke) descriptor.getValue(Action.ACCELERATOR_KEY);
+ iconLabel.setTooltip(key == null ? tooltip : tooltip + key.toString());
+ }
- @Override
- public boolean shouldBeAdded() {
- return true;
- }
+ @Override
+ public boolean shouldBeAdded() {
+ return true;
+ }
}
Modified: trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/common/client/ui/IconLabel.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -35,7 +35,7 @@
import com.google.gwt.user.client.ui.HasDirectionalText;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.InlineLabel;
+import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Widget;
public class IconLabel extends Composite implements HasWidgets, HasDirectionalText {
@@ -52,7 +52,7 @@
@UiField
Image iconRight;
@UiField
- InlineLabel label;
+ Label label;
@UiField
FocusPanel self;
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-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/common/client/ui/IconLabel.ui.xml 2011-05-05 01:45:26 UTC (rev 1342)
@@ -4,6 +4,8 @@
<ui:style>
.label {
text-decoration: none;
+ display: table-cell;
+ float: left;
}
.label a:link {
@@ -11,19 +13,27 @@
color: gray;
}
- .pad { /* white-space: nowrap; */
+ .flow { /* white-space: nowrap; */
outline: 0 none;
+ display: table-row;
}
+ .tcell {
+ display: table-cell;
+ }
+
.self {
outline: 0 none;
+ display: table;
}
</ui:style>
- <g:FocusPanel styleName="{style.self}" ui:field="self" >
- <g:FlowPanel styleName="{style.pad}" ui:field="flow">
- <g:Image ui:field="iconLeft" />
- <g:Image ui:field="iconRight" />
- <g:InlineLabel ui:field="label" styleName="{style.label}" />
+ <g:HTMLPanel>
+ <g:FocusPanel styleName="{style.self}" ui:field="self">
+ <g:FlowPanel styleName="{style.flow}" ui:field="flow">
+ <g:Image ui:field="iconLeft" styleName="{style.tcell}" />
+ <g:Image ui:field="iconRight" styleName="{style.tcell}" />
+ <g:Label ui:field="label" styleName="{style.label}" />
</g:FlowPanel>
</g:FocusPanel>
+ </g:HTMLPanel>
</ui:UiBinder>
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/common/public/kune-common.css
===================================================================
--- trunk/src/main/java/cc/kune/common/public/kune-common.css 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/common/public/kune-common.css 2011-05-05 01:45:26 UTC (rev 1342)
@@ -134,11 +134,11 @@
padding: 22px 4px 3px 4px;
}
-.k-dialog-title span {
+.k-dialog-title div {
color: #552200;
font-size: 20px;
font-weight: bold;
- margin: 0 0 0 0px;
+ margin: 5px 0 5px 10px;
}
.k-dialog-innerp {
@@ -271,7 +271,7 @@
}
.oc-menu .gwt-MenuBar-vertical,.gwt-MenuBar-vertical {
- background-color: #280b0b;
+ background-color: #704f4f;
border: 2px solid #552200;
padding: 3px;
font: 16px 'Ubuntu', arial;
Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPanel.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -36,80 +36,81 @@
public abstract class SignInAbstractPanel extends ViewImpl {
- private final BasicTopDialog dialog;
- protected final String errorLabelId;
- protected final I18nTranslationService i18n;
- protected final NotifyLevelImages images;
- private final MaskWidgetView mask;
- protected MessageToolbar messageErrorBar;
+ private final BasicTopDialog dialog;
+ protected final String errorLabelId;
+ protected final I18nTranslationService i18n;
+ protected final NotifyLevelImages images;
+ private final MaskWidgetView mask;
+ protected MessageToolbar messageErrorBar;
- public SignInAbstractPanel(final String dialogId, final MaskWidgetView mask, final I18nTranslationService i18n,
- final String title, final boolean autohide, final boolean modal, final boolean autoscroll, final int width,
- final int heigth, final String icon, final String firstButtonTitle, final String firstButtonId,
- final String cancelButtonTitle, final String cancelButtonId, final NotifyLevelImages images,
- final String errorLabelId, final int tabIndexStart) {
+ public SignInAbstractPanel(final String dialogId, final MaskWidgetView mask,
+ final I18nTranslationService i18n, final String title, final boolean autohide,
+ final boolean modal, final boolean autoscroll, final int width, final int heigth,
+ final String icon, final String firstButtonTitle, final String firstButtonId,
+ final String cancelButtonTitle, final String cancelButtonId, final NotifyLevelImages images,
+ final String errorLabelId, final int tabIndexStart) {
- final Builder builder = new BasicTopDialog.Builder(dialogId, autohide, modal).autoscroll(autoscroll);
- builder.width(width).height(heigth);
- builder.icon(icon);
- builder.firstButtonTitle(firstButtonTitle).firstButtonId(firstButtonId);
- builder.sndButtonTitle(cancelButtonTitle).sndButtonId(cancelButtonId);
- builder.tabIndexStart(tabIndexStart);
- dialog = builder.build();
- this.i18n = i18n;
- this.images = images;
- this.errorLabelId = errorLabelId;
- this.mask = mask;
- }
+ final Builder builder = new BasicTopDialog.Builder(dialogId, autohide, modal).autoscroll(autoscroll);
+ builder.width(width).height(heigth).title(title);
+ builder.icon(icon);
+ builder.firstButtonTitle(firstButtonTitle).firstButtonId(firstButtonId);
+ builder.sndButtonTitle(cancelButtonTitle).sndButtonId(cancelButtonId);
+ builder.tabIndexStart(tabIndexStart);
+ dialog = builder.build();
+ this.i18n = i18n;
+ this.images = images;
+ this.errorLabelId = errorLabelId;
+ this.mask = mask;
+ }
- @Override
- public Widget asWidget() {
- return dialog;
- }
+ @Override
+ public Widget asWidget() {
+ return dialog;
+ }
- public HasCloseHandlers<PopupPanel> getClose() {
- return dialog.getClose();
- }
+ public HasCloseHandlers<PopupPanel> getClose() {
+ return dialog.getClose();
+ }
- public HasClickHandlers getFirstBtn() {
- return dialog.getFirstBtn();
- }
+ public HasClickHandlers getFirstBtn() {
+ return dialog.getFirstBtn();
+ }
- public ForIsWidget getInnerPanel() {
- return dialog.getInnerPanel();
- }
+ public ForIsWidget getInnerPanel() {
+ return dialog.getInnerPanel();
+ }
- public HasClickHandlers getSecondBtn() {
- return dialog.getSecondBtn();
- }
+ public HasClickHandlers getSecondBtn() {
+ return dialog.getSecondBtn();
+ }
- public void hide() {
- if (dialog.isVisible()) {
- dialog.hide();
- }
+ public void hide() {
+ if (dialog.isVisible()) {
+ dialog.hide();
}
+ }
- public void hideMessages() {
- messageErrorBar.hideErrorMessage();
- }
+ public void hideMessages() {
+ messageErrorBar.hideErrorMessage();
+ }
- public void mask(final String message) {
- mask.mask(dialog);
- }
+ public void mask(final String message) {
+ mask.mask(dialog);
+ }
- public void maskProcessing() {
- mask.mask(dialog, i18n.t("Processing"));
- }
+ public void maskProcessing() {
+ mask.mask(dialog, i18n.t("Processing"));
+ }
- public void setErrorMessage(final String message, final NotifyLevel level) {
- messageErrorBar.setErrorMessage(message, level);
- }
+ public void setErrorMessage(final String message, final NotifyLevel level) {
+ messageErrorBar.setErrorMessage(message, level);
+ }
- public void show() {
- dialog.showCentered();
- }
+ public void show() {
+ dialog.showCentered();
+ }
- public void unMask() {
- mask.unMask();
- }
+ public void unMask() {
+ mask.unMask();
+ }
}
Modified: trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -38,266 +38,266 @@
import com.extjs.gxt.ui.client.widget.form.TextField;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.event.logical.shared.HasCloseHandlers;
-import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.PopupPanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import com.gwtplatform.mvp.client.ViewImpl;
public class NewGroupPanel extends ViewImpl implements NewGroupView {
- private static final int BIG_FIELD_WIDTH = 280;
- public static final String CANCEL_BUTTON = "k-ngp-cancel-bt";
- public static final String COMM_GROUP_TYPE_ID = "k-ngp-type_of_group_comm";
- public static final String ERROR_MSG_BAR = "k-ngp-error-mb";
- private static final int LABEL_WIDTH = 100;
- public static final String LONGNAME_FIELD = "k-ngp-long_name";
- private static final String MARGIN_LEFT_105PX = "margin-left: 105px";
- public static final String NEWGROUP_WIZARD = "k-ngp-wiz";
- public static final String ORG_GROUP_TYPE_ID = "k-ngp-type_of_group_org";
- public static final String PROJ_GROUP_TYPE_ID = "k-ngp-type_of_group_proj";
- public static final String PUBLICDESC_FIELD = "k-ngp-public_desc";
- public static final String REGISTER_BUTTON = "k-ngp-finish-bt";
- public static final String SHORTNAME_FIELD = "k-ngp-short_name";
- public static final String TAGS_FIELD = "k-ngp-tags";
- public static final String TYPEOFGROUP_FIELD = "k-ngp-type_of_group";
+ private static final int BIG_FIELD_WIDTH = 280;
+ public static final String CANCEL_BUTTON = "k-ngp-cancel-bt";
+ public static final String COMM_GROUP_TYPE_ID = "k-ngp-type_of_group_comm";
+ public static final String ERROR_MSG_BAR = "k-ngp-error-mb";
+ private static final int LABEL_WIDTH = 100;
+ public static final String LONGNAME_FIELD = "k-ngp-long_name";
+ private static final String MARGIN_LEFT_105PX = "margin-left: 105px";
+ public static final String NEWGROUP_WIZARD = "k-ngp-wiz";
+ public static final String ORG_GROUP_TYPE_ID = "k-ngp-type_of_group_org";
+ public static final String PROJ_GROUP_TYPE_ID = "k-ngp-type_of_group_proj";
+ public static final String PUBLICDESC_FIELD = "k-ngp-public_desc";
+ public static final String REGISTER_BUTTON = "k-ngp-finish-bt";
+ public static final String SHORTNAME_FIELD = "k-ngp-short_name";
+ public static final String TAGS_FIELD = "k-ngp-tags";
+ public static final String TYPEOFGROUP_FIELD = "k-ngp-type_of_group";
- private Radio communityRadio;
- private final BasicTopDialog dialog;
- private final FormPanel form;
+ private Radio communityRadio;
+ private final BasicTopDialog dialog;
+ private final FormPanel form;
- private final I18nTranslationService i18n;
- private TextField<String> longNameField;
- private final MaskWidgetView mask;
- private final MessageToolbar messageErrorBar;
- private Radio orgRadio;
- private Radio projectRadio;
- private TextArea publicDescField;
- private TextField<String> shortNameField;
+ private final I18nTranslationService i18n;
+ private TextField<String> longNameField;
+ private final MaskWidgetView mask;
+ private final MessageToolbar messageErrorBar;
+ private Radio orgRadio;
+ private Radio projectRadio;
+ private TextArea publicDescField;
+ private TextField<String> shortNameField;
- private TextField<String> tag1;
- private TextField<String> tag2;
- private TextField<String> tag3;
+ private TextField<String> tag1;
+ private TextField<String> tag2;
+ private TextField<String> tag3;
- @Inject
- public NewGroupPanel(final I18nTranslationService i18n, final NotifyLevelImages img, final MaskWidgetView mask) {
- final Builder builder = new BasicTopDialog.Builder(NEWGROUP_WIZARD, false, true).autoscroll(true).height(
- "360px");
- builder.icon("k-newgroup-icon");
- builder.firstButtonTitle(i18n.t("Register")).firstButtonId(REGISTER_BUTTON);
- builder.sndButtonTitle(i18n.t("Cancel")).sndButtonId(CANCEL_BUTTON);
- builder.tabIndexStart(9);
- dialog = builder.build();
- this.i18n = i18n;
- this.mask = mask;
- form = createNewGroupInitialDataForm();
+ @Inject
+ public NewGroupPanel(final I18nTranslationService i18n, final NotifyLevelImages img,
+ final MaskWidgetView mask) {
+ final Builder builder = new BasicTopDialog.Builder(NEWGROUP_WIZARD, false, true).autoscroll(true).height(
+ "300px").title(i18n.t("Register a new group"));
+ builder.icon("k-newgroup-icon");
+ builder.firstButtonTitle(i18n.t("Register")).firstButtonId(REGISTER_BUTTON);
+ builder.sndButtonTitle(i18n.t("Cancel")).sndButtonId(CANCEL_BUTTON);
+ builder.tabIndexStart(9);
+ dialog = builder.build();
+ this.i18n = i18n;
+ this.mask = mask;
+ form = createNewGroupInitialDataForm();
- messageErrorBar = new MessageToolbar(img, ERROR_MSG_BAR);
- form.add(messageErrorBar);
- dialog.getInnerPanel().add(form);
- }
+ messageErrorBar = new MessageToolbar(img, ERROR_MSG_BAR);
+ form.add(messageErrorBar);
+ dialog.getInnerPanel().add(form);
+ }
- @Override
- public Widget asWidget() {
- return null;
- }
+ @Override
+ public Widget asWidget() {
+ return null;
+ }
- @Override
- public void clearData() {
- form.reset();
- shortNameField.focus();
- messageErrorBar.hideErrorMessage();
- }
+ @Override
+ public void clearData() {
+ form.reset();
+ shortNameField.focus();
+ messageErrorBar.hideErrorMessage();
+ }
- private FormPanel createNewGroupInitialDataForm() {
- final FormPanel form = new FormPanel();
- form.setFrame(true);
- form.setPadding(10);
- form.setBorders(false);
- form.setWidth(360);
- form.setLabelWidth(LABEL_WIDTH);
- form.setLabelAlign(LabelAlign.RIGHT);
- form.setButtonAlign(HorizontalAlignment.RIGHT);
- form.setHeaderVisible(false);
+ private FormPanel createNewGroupInitialDataForm() {
+ final FormPanel form = new FormPanel();
+ form.setFrame(true);
+ form.setPadding(10);
+ form.setBorders(false);
+ form.setWidth(360);
+ form.setLabelWidth(LABEL_WIDTH);
+ form.setLabelAlign(LabelAlign.RIGHT);
+ form.setButtonAlign(HorizontalAlignment.RIGHT);
+ form.setHeaderVisible(false);
+ //
+ // final Label intro = new Label();
+ // intro.setText(i18n.t("Please fill this form to register a new group:"));
+ // intro.setStyleName("k-form-intro");
+ // form.add(intro);
- final Label intro = new Label();
- intro.setText(i18n.t("Please fill this form to register a new group:"));
- intro.setStyleName("k-form-intro");
- form.add(intro);
+ shortNameField = new TextField<String>();
+ shortNameField.setValidationDelay(1000);
+ shortNameField.setTabIndex(1);
+ shortNameField.setFieldLabel(i18n.t("Short name"));
+ shortNameField.setName(SHORTNAME_FIELD);
+ shortNameField.setWidth(175);
+ shortNameField.setMinLength(3);
+ shortNameField.setMaxLength(15);
+ shortNameField.setAllowBlank(false);
+ shortNameField.setRegex("^[a-z0-9]+$");
+ shortNameField.getMessages().setMinLengthText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15));
+ shortNameField.getMessages().setMaxLengthText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15));
+ shortNameField.getMessages().setRegexText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15));
+ shortNameField.setValidationDelay(1000);
- shortNameField = new TextField<String>();
- shortNameField.setValidationDelay(1000);
- shortNameField.setTabIndex(1);
- shortNameField.setFieldLabel(i18n.t("Short name"));
- shortNameField.setName(SHORTNAME_FIELD);
- shortNameField.setWidth(175);
- shortNameField.setMinLength(3);
- shortNameField.setMaxLength(15);
- shortNameField.setAllowBlank(false);
- shortNameField.setRegex("^[a-z0-9]+$");
- shortNameField.getMessages().setMinLengthText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15));
- shortNameField.getMessages().setMaxLengthText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15));
- shortNameField.getMessages().setRegexText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15));
- shortNameField.setValidationDelay(1000);
+ form.add(shortNameField);
- form.add(shortNameField);
+ longNameField = new TextField<String>();
+ longNameField.setTabIndex(2);
+ longNameField.setFieldLabel(i18n.t("Long name"));
+ longNameField.setName(LONGNAME_FIELD);
+ longNameField.setWidth(BIG_FIELD_WIDTH);
+ longNameField.setAllowBlank(false);
+ longNameField.setMinLength(3);
+ longNameField.setMaxLength(50);
+ longNameField.setValidationDelay(1000);
+ form.add(longNameField);
- longNameField = new TextField<String>();
- longNameField.setTabIndex(2);
- longNameField.setFieldLabel(i18n.t("Long name"));
- longNameField.setName(LONGNAME_FIELD);
- longNameField.setWidth(BIG_FIELD_WIDTH);
- longNameField.setAllowBlank(false);
- longNameField.setMinLength(3);
- longNameField.setMaxLength(50);
- longNameField.setValidationDelay(1000);
- form.add(longNameField);
+ publicDescField = new TextArea();
+ publicDescField.setTabIndex(3);
+ publicDescField.setFieldLabel(i18n.t("Public description"));
+ publicDescField.setName(PUBLICDESC_FIELD);
+ publicDescField.setWidth(BIG_FIELD_WIDTH);
+ publicDescField.setAllowBlank(false);
+ publicDescField.setMinLength(10);
+ publicDescField.setMaxLength(255);
+ publicDescField.setValidationDelay(1000);
+ form.add(publicDescField);
- publicDescField = new TextArea();
- publicDescField.setTabIndex(3);
- publicDescField.setFieldLabel(i18n.t("Public description"));
- publicDescField.setName(PUBLICDESC_FIELD);
- publicDescField.setWidth(BIG_FIELD_WIDTH);
- publicDescField.setAllowBlank(false);
- publicDescField.setMinLength(10);
- publicDescField.setMaxLength(255);
- publicDescField.setValidationDelay(1000);
- form.add(publicDescField);
+ tag1 = new TextField<String>();
+ tag1.setTabIndex(4);
+ tag1.setFieldLabel(i18n.t("Group tags"));
+ tag1.setName(TAGS_FIELD);
+ tag1.setWidth(BIG_FIELD_WIDTH);
+ tag1.setAllowBlank(false);
+ tag1.setTitle(i18n.t("type some keyword that define your group"));
+ tag1.setValidationDelay(1000);
+ form.add(tag1);
- tag1 = new TextField<String>();
- tag1.setTabIndex(4);
- tag1.setFieldLabel(i18n.t("Group tags"));
- tag1.setName(TAGS_FIELD);
- tag1.setWidth(BIG_FIELD_WIDTH);
- tag1.setAllowBlank(false);
- tag1.setTitle(i18n.t("type some keyword that define your group"));
- tag1.setValidationDelay(1000);
- form.add(tag1);
+ final FieldSet groupTypeFieldSet = new FieldSet();
+ groupTypeFieldSet.setHeading(i18n.t("Group type"));
+ groupTypeFieldSet.addStyleName("k-form-fieldset");
+ groupTypeFieldSet.setCollapsible(true);
+ groupTypeFieldSet.setWidth("210px");
+ groupTypeFieldSet.setAutoHeight(true);
- final FieldSet groupTypeFieldSet = new FieldSet();
- groupTypeFieldSet.setHeading(i18n.t("Group type"));
- groupTypeFieldSet.addStyleName("k-form-fieldset");
- groupTypeFieldSet.setCollapsible(true);
- groupTypeFieldSet.setWidth("210px");
- groupTypeFieldSet.setAutoHeight(true);
+ form.add(groupTypeFieldSet);
- form.add(groupTypeFieldSet);
+ projectRadio = DefaultFormUtils.createRadio(groupTypeFieldSet, i18n.t("Project"), TYPEOFGROUP_FIELD,
+ i18n.t("A project is a kind of group in which new members joining "
+ + "is moderated by the project administrators. "
+ + "An administrator is the person who creates the project "
+ + "and other people she/he chooses to be administrator as well."), PROJ_GROUP_TYPE_ID);
+ projectRadio.setTabIndex(6);
+ projectRadio.setValue(true);
- projectRadio = DefaultFormUtils.createRadio(groupTypeFieldSet, i18n.t("Project"), TYPEOFGROUP_FIELD,
- i18n.t("A project is a kind of group in which new members joining "
- + "is moderated by the project administrators. "
- + "An administrator is the person who creates the project "
- + "and other people she/he chooses to be administrator as well."), PROJ_GROUP_TYPE_ID);
- projectRadio.setTabIndex(6);
- projectRadio.setValue(true);
+ orgRadio = DefaultFormUtils.createRadio(groupTypeFieldSet, i18n.t("Organization"),
+ TYPEOFGROUP_FIELD, i18n.t("An organization works as a project, "
+ + "but organizations must be a legal entity."), ORG_GROUP_TYPE_ID);
+ orgRadio.setTabIndex(7);
- orgRadio = DefaultFormUtils.createRadio(groupTypeFieldSet, i18n.t("Organization"), TYPEOFGROUP_FIELD,
- i18n.t("An organization works as a project, " + "but organizations must be a legal entity."),
- ORG_GROUP_TYPE_ID);
- orgRadio.setTabIndex(7);
+ communityRadio = DefaultFormUtils.createRadio(groupTypeFieldSet, i18n.t("Community"),
+ TYPEOFGROUP_FIELD, i18n.t("Communities are social groups of persons "
+ + "with shared interests, which are open to new members "
+ + "(for instance the environmental community or the LGBT community). "
+ + "They rarely are a legal entity."), COMM_GROUP_TYPE_ID);
+ communityRadio.setTabIndex(8);
- communityRadio = DefaultFormUtils.createRadio(groupTypeFieldSet, i18n.t("Community"), TYPEOFGROUP_FIELD,
- i18n.t("Communities are social groups of persons "
- + "with shared interests, which are open to new members "
- + "(for instance the environmental community or the LGBT community). "
- + "They rarely are a legal entity."), COMM_GROUP_TYPE_ID);
- communityRadio.setTabIndex(8);
+ return form;
+ }
- return form;
- }
+ @Override
+ public void focusOnShorName() {
+ shortNameField.focus();
+ }
- @Override
- public void focusOnShorName() {
- shortNameField.focus();
- }
+ @Override
+ public HasCloseHandlers<PopupPanel> getClose() {
+ return dialog.getClose();
+ }
- @Override
- public HasCloseHandlers<PopupPanel> getClose() {
- return dialog.getClose();
- }
+ @Override
+ public HasClickHandlers getFirstBtn() {
+ return dialog.getFirstBtn();
+ }
- @Override
- public HasClickHandlers getFirstBtn() {
- return dialog.getFirstBtn();
- }
+ @Override
+ public String getLongName() {
+ return longNameField.getValue();
+ }
- @Override
- public String getLongName() {
- return longNameField.getValue();
- }
+ @Override
+ public String getPublicDesc() {
+ return publicDescField.getValue();
+ }
- @Override
- public String getPublicDesc() {
- return publicDescField.getValue();
- }
+ @Override
+ public HasClickHandlers getSecondBtn() {
+ return dialog.getSecondBtn();
+ }
- @Override
- public HasClickHandlers getSecondBtn() {
- return dialog.getSecondBtn();
- }
+ @Override
+ public String getShortName() {
+ return shortNameField.getValue();
+ }
- @Override
- public String getShortName() {
- return shortNameField.getValue();
- }
+ @Override
+ public String getTags() {
+ return tag1.getRawValue();
+ }
- @Override
- public String getTags() {
- return tag1.getRawValue();
- }
+ @Override
+ public void hide() {
+ dialog.hide();
- @Override
- public void hide() {
- dialog.hide();
+ }
- }
+ @Override
+ public void hideMessage() {
+ messageErrorBar.hideErrorMessage();
+ }
- @Override
- public void hideMessage() {
- messageErrorBar.hideErrorMessage();
- }
+ @Override
+ public boolean isCommunity() {
+ return communityRadio.getValue();
+ }
- @Override
- public boolean isCommunity() {
- return communityRadio.getValue();
- }
+ @Override
+ public boolean isFormValid() {
+ return form.isValid();
+ }
- @Override
- public boolean isFormValid() {
- return form.isValid();
- }
+ @Override
+ public boolean isOrganization() {
+ return orgRadio.getValue();
+ }
- @Override
- public boolean isOrganization() {
- return orgRadio.getValue();
- }
+ @Override
+ public boolean isProject() {
+ return projectRadio.getValue();
+ }
- @Override
- public boolean isProject() {
- return projectRadio.getValue();
- }
+ public void mask(final String message) {
+ mask.mask(dialog);
+ }
- public void mask(final String message) {
- mask.mask(dialog);
- }
+ @Override
+ public void maskProcessing() {
+ mask.mask(dialog, i18n.t("Processing"));
+ }
- @Override
- public void maskProcessing() {
- mask.mask(dialog, i18n.t("Processing"));
- }
+ @Override
+ public void setMessage(final String message, final NotifyLevel level) {
+ messageErrorBar.setErrorMessage(message, level);
+ }
- @Override
- public void setMessage(final String message, final NotifyLevel level) {
- messageErrorBar.setErrorMessage(message, level);
- }
+ @Override
+ public void show() {
+ dialog.showCentered();
+ }
- @Override
- public void show() {
- dialog.showCentered();
- }
+ @Override
+ public void unMask() {
+ mask.unMask();
+ }
- @Override
- public void unMask() {
- mask.unMask();
- }
-
}
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -119,7 +119,7 @@
OPTIONS_MENU.putValue(Action.NAME, i18n.t("Options"));
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.setStyles("k-no-backimage, k-btn-sitebar");
OPTIONS_MENU.putValue(AbstractGxtMenuGui.MENU_POSITION, AbstractGxtMenuGui.MenuPosition.bl);
final ToolbarSeparatorDescriptor separator = new ToolbarSeparatorDescriptor(Type.separator,
RIGHT_TOOLBAR);
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/search/MultivalueSuggestBox.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/search/MultivalueSuggestBox.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/search/MultivalueSuggestBox.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -23,6 +23,7 @@
import java.util.Map;
import cc.kune.common.client.log.Log;
+import cc.kune.core.client.sitebar.search.SitebarSearchPanel.OnExactMatch;
import cc.kune.core.shared.SearcherConstants;
import com.google.gwt.event.dom.client.KeyUpEvent;
@@ -291,7 +292,8 @@
// if there were no suggestions, then it's an invalid value
updateFormFeedback(FormFeedback.ERROR, "Invalid: " + m_query);
- } else if (totSize == 1) {
+ } else if (false && totSize == 1) {
+ // Patch to show always the suggestions
// it's an exact match, so do not bother with showing suggestions,
final Option o = optResults.getOptions()[0];
final String displ = o.getName();
@@ -300,7 +302,7 @@
// mfield.setText(getFullReplaceText(displ, m_request.getQuery()));
Log.info("RestSuggestCallback.success! exact match found for displ = " + displ);
-
+ // onExactMatch.onExactMatch(o.getValue());
// it's valid!
updateFormFeedback(FormFeedback.VALID, null);
@@ -472,6 +474,8 @@
private final String mrestEndpointUrl;
private final Map<String, String> mvalueMap;
+ // private final OnExactMatch onExactMatch;
+
/**
* Constructor.
*
@@ -480,10 +484,13 @@
* (for query), indexFrom and indexTo
* @param isMultivalued
* - true for allowing multiple values
+ * @param onExactMatch
*/
- public MultivalueSuggestBox(final String restEndpointUrl, final boolean isMultivalued) {
+ public MultivalueSuggestBox(final String restEndpointUrl, final boolean isMultivalued,
+ final OnExactMatch onExactMatch) {
mrestEndpointUrl = restEndpointUrl;
misMultivalued = isMultivalued;
+ // this.onExactMatch = onExactMatch;
final FlowPanel panel = new FlowPanel();
TextBoxBase textfield;
@@ -550,6 +557,7 @@
putValue(option.getName(), option.getValue());
Log.info("extactMatchFound ! exact match found for displ = " + displayValue);
+ // onExactMatch.onExactMatch(option.getValue());
// and replace the text
final String text = mfield.getText();
final String[] keys = text.split(DISPLAY_SEPARATOR.trim());
@@ -803,9 +811,8 @@
private void queryOptions(final String query, final int from, final int to,
final OptionQueryCallback callback) {
final RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(mrestEndpointUrl
- // Falta limit
+ "?" + SearcherConstants.QUERY_PARAM + "=" + query + "&" + SearcherConstants.START_PARAM + "="
- + from + "&indexTo=" + to));
+ + from + "&" + SearcherConstants.LIMIT_PARAM + "=" + PAGE_SIZE));
// Set our headers
builder.setHeader("Accept", "application/json");
Modified: trunk/src/main/java/cc/kune/core/client/sitebar/search/SitebarSearchPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/search/SitebarSearchPanel.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/search/SitebarSearchPanel.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -19,10 +19,13 @@
\*/
package cc.kune.core.client.sitebar.search;
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.common.client.tooltip.Tooltip;
import cc.kune.core.client.resources.CoreResources;
import cc.kune.core.client.sitebar.search.SitebarSearchPresenter.SitebarSearchView;
import cc.kune.core.client.state.StateManager;
import cc.kune.core.shared.SearcherConstants;
+import cc.kune.core.shared.i18n.I18nTranslationService;
import cc.kune.gspace.client.GSpaceArmor;
import com.google.gwt.event.dom.client.HasAllFocusHandlers;
@@ -38,23 +41,34 @@
import com.gwtplatform.mvp.client.ViewImpl;
public class SitebarSearchPanel extends ViewImpl implements SitebarSearchView {
+ protected interface OnExactMatch {
+ void onExactMatch(String march);
+ }
private static final int SEARCH_TEXT_HEIGHT = 13;
private static final int SEARCH_TEXT_WIDTH_BIG = 160;
private static final int SEARCH_TEXT_WIDTH_SMALL = 120;
public static final String SITE_SEARCH_BUTTON = "kune-ssp-searchbt";
+
public static final String SITE_SEARCH_TEXTBOX = "kune-ssp-tbox";
-
private final PushButton searchButton;
private final TextBoxBase searchTextBox;
private final SuggestBox suggestBox;
@Inject
public SitebarSearchPanel(final GSpaceArmor gs, final CoreResources img,
- final StateManager stateManager) {
+ final StateManager stateManager, final I18nTranslationService i18n) {
searchButton = new PushButton(new Image(img.kuneSearchIco()), new Image(img.kuneSearchIcoPush()));
searchButton.ensureDebugId(SITE_SEARCH_BUTTON);
final MultivalueSuggestBox multivalueSBox = new MultivalueSuggestBox(
- SearcherConstants.GROUP_DATA_PROXY_URL, false) {
+ SearcherConstants.GROUP_DATA_PROXY_URL, false, new OnExactMatch() {
+
+ @Override
+ public void onExactMatch(final String match) {
+ NotifyUser.info(match);
+ NotifyUser.info("kk");
+ }
+ }) {
+
@Override
public void onSelection(
final com.google.gwt.event.logical.shared.SelectionEvent<com.google.gwt.user.client.ui.SuggestOracle.Suggestion> event) {
@@ -72,6 +86,7 @@
};
};
suggestBox = multivalueSBox.getSuggestBox();
+ Tooltip.to(suggestBox, i18n.t("Type something to search users and groups in this site"));
searchTextBox = suggestBox.getTextBox();
searchTextBox.ensureDebugId(SITE_SEARCH_TEXTBOX);
searchTextBox.addStyleName("k-fr");
Modified: trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/core/client/sn/UserSNPanel.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -15,82 +15,92 @@
public class UserSNPanel extends AbstractSNPanel implements UserSNView {
- @Inject
- public UserSNPanel(final I18nTranslationService i18n, final GuiProvider guiProvider, final GSpaceArmor armor) {
- super(i18n, guiProvider, armor);
- setVisibleImpl(false);
- mainTitle.setText(i18n.t("His/her network:"));
- mainTitle.setTitle(i18n.t("This user buddies and groups where participes"));
- firstCategoryLabel.setText(i18n.t("Buddies"));
- setTooltip(firstCategoryLabel, i18n.t("This user buddies"));
- sndCategoryLabel.setText(i18n.t("Participates in"));
- setTooltip(sndCategoryLabel, i18n.t("Groups in which this user participates"));
- firstDeckLabel.setText(i18n.t(CoreMessages.BUDDIES_NOT_PUBLIC));
- trdCategoryLabel.setText("NOT USED");
- setTooltip(trdCategoryLabel, "NOT USED");
- super.setTrdCategoryVisible(false);
- sndDeckLabel.setText("NOT USED");
- bottomActionsToolbar = new ActionFlowPanel(guiProvider);
- bottomPanel.add(bottomActionsToolbar);
- bottomActionsToolbar.setStyleName("k-sn-bottomPanel-actions");
- armor.getEntityToolsNorth().add(widget);
- deck.showWidget(2);
- }
+ private final I18nTranslationService i18n;
- @Override
- public void addBuddie(final UserSimpleDTO user, final String avatarUrl, final String tooltip,
- final String tooltipTitle, final GuiActionDescCollection menu) {
- firstCategoryFlow.add(createThumb(user.getShortName(), avatarUrl, tooltip, tooltipTitle, menu));
- }
+ @Inject
+ public UserSNPanel(final I18nTranslationService i18n, final GuiProvider guiProvider,
+ final GSpaceArmor armor) {
+ super(i18n, guiProvider, armor);
+ this.i18n = i18n;
+ setVisibleImpl(false);
+ mainTitle.setText(i18n.t("His/her network:"));
+ mainTitle.setTitle(i18n.t("This user buddies and groups where participes"));
+ firstCategoryLabel.setText(i18n.t("Buddies"));
+ setTooltip(firstCategoryLabel, i18n.t("This user buddies"));
+ sndCategoryLabel.setText(i18n.t("Participates in"));
+ setTooltip(sndCategoryLabel, i18n.t("Groups in which this user participates"));
+ trdCategoryLabel.setText("NOT USED");
+ setTooltip(trdCategoryLabel, "NOT USED");
+ super.setTrdCategoryVisible(false);
+ sndDeckLabel.setText("NOT USED");
+ bottomActionsToolbar = new ActionFlowPanel(guiProvider);
+ bottomPanel.add(bottomActionsToolbar);
+ bottomActionsToolbar.setStyleName("k-sn-bottomPanel-actions");
+ armor.getEntityToolsNorth().add(widget);
+ deck.showWidget(2);
+ }
- @Override
- public void addParticipation(final GroupDTO group, final String avatarUrl, final String tooltip,
- final String tooltipTitle, final GuiActionDescCollection menu) {
- sndCategoryFlow.add(createThumb(group.getShortName(), avatarUrl, tooltip, tooltipTitle, menu));
- }
+ @Override
+ public void addBuddie(final UserSimpleDTO user, final String avatarUrl, final String tooltip,
+ final String tooltipTitle, final GuiActionDescCollection menu) {
+ firstCategoryFlow.add(createThumb(user.getShortName(), avatarUrl, tooltip, tooltipTitle, menu));
+ }
- @Override
- public void addTextToBuddieList(final String text) {
- firstCategoryFlow.add(new Label(text));
- }
+ @Override
+ public void addParticipation(final GroupDTO group, final String avatarUrl, final String tooltip,
+ final String tooltipTitle, final GuiActionDescCollection menu) {
+ sndCategoryFlow.add(createThumb(group.getShortName(), avatarUrl, tooltip, tooltipTitle, menu));
+ }
- @Override
- public void setBuddiesCount(final int count) {
- firstCategoryCount.setText(new StringBuffer("(").append(count).append(")").toString());
- }
+ @Override
+ public void addTextToBuddieList(final String text) {
+ firstCategoryFlow.add(new Label(text));
+ }
- @Override
- public void setBuddiesVisible(final boolean visible) {
- super.setFirstCategoryVisible(visible);
- }
+ @Override
+ public void setBuddiesCount(final int count) {
+ firstCategoryCount.setText(new StringBuffer("(").append(count).append(")").toString());
+ }
- @Override
- public void setParticipationCount(final int count) {
- sndCategoryCount.setText(new StringBuffer("(").append(count).append(")").toString());
- }
+ @Override
+ public void setBuddiesVisible(final boolean visible) {
+ super.setFirstCategoryVisible(visible);
+ }
- @Override
- public void setParticipationVisible(final boolean visible) {
- super.setSndCategoryVisible(visible);
- }
+ @Override
+ public void setNoBuddies() {
+ firstDeckLabel.setText(i18n.t("This user has no buddies yet"));
+ deck.showWidget(0);
+ }
- @Override
- public void setVisible(final boolean visible) {
- setVisibleImpl(visible);
- }
+ @Override
+ public void setParticipationCount(final int count) {
+ sndCategoryCount.setText(new StringBuffer("(").append(count).append(")").toString());
+ }
- private void setVisibleImpl(final boolean visible) {
- mainPanel.setVisible(visible);
- }
+ @Override
+ public void setParticipationVisible(final boolean visible) {
+ super.setSndCategoryVisible(visible);
+ }
- @Override
- public void showBuddies() {
- deck.showWidget(2);
- }
+ @Override
+ public void setVisible(final boolean visible) {
+ setVisibleImpl(visible);
+ }
- @Override
- public void showBuddiesNotPublic() {
- deck.showWidget(0);
- }
+ private void setVisibleImpl(final boolean visible) {
+ mainPanel.setVisible(visible);
+ }
+ @Override
+ public void showBuddies() {
+ deck.showWidget(2);
+ }
+
+ @Override
+ public void showBuddiesNotPublic() {
+ firstDeckLabel.setText(i18n.t(CoreMessages.BUDDIES_NOT_PUBLIC));
+ deck.showWidget(0);
+ }
+
}
Modified: trunk/src/main/java/cc/kune/core/client/sn/UserSNPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/UserSNPresenter.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/core/client/sn/UserSNPresenter.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -34,161 +34,169 @@
public class UserSNPresenter extends AbstractSNPresenter<UserSNView, UserSNProxy> {
- @ProxyCodeSplit
- public interface UserSNProxy extends Proxy<UserSNPresenter> {
- }
+ @ProxyCodeSplit
+ public interface UserSNProxy extends Proxy<UserSNPresenter> {
+ }
- public interface UserSNView extends View {
+ public interface UserSNView extends View {
- void addBuddie(UserSimpleDTO user, String avatarUrl, String tooltip, String tooltipTitle,
- GuiActionDescCollection menu);
+ void addBuddie(UserSimpleDTO user, String avatarUrl, String tooltip, String tooltipTitle,
+ GuiActionDescCollection menu);
- void addParticipation(GroupDTO group, String avatarUrl, String tooltip, String tooltipTitle,
- GuiActionDescCollection menu);
+ void addParticipation(GroupDTO group, String avatarUrl, String tooltip, String tooltipTitle,
+ GuiActionDescCollection menu);
- void addTextToBuddieList(String text);
+ void addTextToBuddieList(String text);
- void clear();
+ void clear();
- IsActionExtensible getBottomToolbar();
+ IsActionExtensible getBottomToolbar();
- void setBuddiesCount(int count);
+ void setBuddiesCount(int count);
- void setBuddiesVisible(boolean visible);
+ void setBuddiesVisible(boolean visible);
- void setParticipationCount(int count);
+ void setNoBuddies();
- void setParticipationVisible(boolean visible);
+ void setParticipationCount(int count);
- void setVisible(boolean visible);
+ void setParticipationVisible(boolean visible);
- void showBuddies();
+ void setVisible(boolean visible);
- void showBuddiesNotPublic();
- }
+ void showBuddies();
- private final UserSNConfActions confActionsRegistry;
- private final I18nTranslationService i18n;
- private final UserSNMenuItemsRegistry userMenuItemsRegistry;
+ void showBuddiesNotPublic();
+ }
- @Inject
- public UserSNPresenter(final EventBus eventBus, final UserSNView view, final UserSNProxy proxy,
- final I18nTranslationService i18n, final StateManager stateManager, final Session session,
- final Provider<FileDownloadUtils> downloadProvider, final UserSNMenuItemsRegistry userMenuItemsRegistry,
- final UserSNConfActions confActionsRegistry) {
- super(eventBus, view, proxy, downloadProvider);
- this.i18n = i18n;
- this.userMenuItemsRegistry = userMenuItemsRegistry;
- this.confActionsRegistry = confActionsRegistry;
- stateManager.onStateChanged(true, new StateChangedEvent.StateChangedHandler() {
- @Override
- public void onStateChanged(final StateChangedEvent event) {
- UserSNPresenter.this.onStateChanged(event.getState());
- }
+ private final UserSNConfActions confActionsRegistry;
+ private final I18nTranslationService i18n;
+ private final UserSNMenuItemsRegistry userMenuItemsRegistry;
+
+ @Inject
+ public UserSNPresenter(final EventBus eventBus, final UserSNView view, final UserSNProxy proxy,
+ final I18nTranslationService i18n, final StateManager stateManager, final Session session,
+ final Provider<FileDownloadUtils> downloadProvider,
+ final UserSNMenuItemsRegistry userMenuItemsRegistry, final UserSNConfActions confActionsRegistry) {
+ super(eventBus, view, proxy, downloadProvider);
+ this.i18n = i18n;
+ this.userMenuItemsRegistry = userMenuItemsRegistry;
+ this.confActionsRegistry = confActionsRegistry;
+ stateManager.onStateChanged(true, new StateChangedEvent.StateChangedHandler() {
+ @Override
+ public void onStateChanged(final StateChangedEvent event) {
+ UserSNPresenter.this.onStateChanged(event.getState());
+ }
+ });
+ session.onUserSignIn(true, new UserSignInHandler() {
+ @Override
+ public void onUserSignIn(final UserSignInEvent event) {
+ refreshOnSignInSignOut(session);
+ }
+ });
+ session.onUserSignOut(true, new UserSignOutHandler() {
+ @Override
+ public void onUserSignOut(final UserSignOutEvent event) {
+ refreshOnSignInSignOut(session);
+ }
+ });
+ stateManager.onSocialNetworkChanged(true,
+ new SocialNetworkChangedEvent.SocialNetworkChangedHandler() {
+ @Override
+ public void onSocialNetworkChanged(final SocialNetworkChangedEvent event) {
+ UserSNPresenter.this.onStateChanged(event.getState());
+ }
});
- session.onUserSignIn(true, new UserSignInHandler() {
- @Override
- public void onUserSignIn(final UserSignInEvent event) {
- refreshOnSignInSignOut(session);
- }
- });
- session.onUserSignOut(true, new UserSignOutHandler() {
- @Override
- public void onUserSignOut(final UserSignOutEvent event) {
- refreshOnSignInSignOut(session);
- }
- });
- stateManager.onSocialNetworkChanged(true, new SocialNetworkChangedEvent.SocialNetworkChangedHandler() {
- @Override
- public void onSocialNetworkChanged(final SocialNetworkChangedEvent event) {
- UserSNPresenter.this.onStateChanged(event.getState());
- }
- });
- createActions();
- }
+ createActions();
+ }
- private void createActions() {
- getView().getBottomToolbar().addAll(confActionsRegistry);
- }
+ private void createActions() {
+ getView().getBottomToolbar().addAll(confActionsRegistry);
+ }
- @Override
- public UserSNView getView() {
- return (UserSNView) super.getView();
- }
+ @Override
+ public UserSNView getView() {
+ return (UserSNView) super.getView();
+ }
- private void onStateChanged(final StateAbstractDTO state) {
- if (state.getGroup().isNotPersonal()) {
- getView().setVisible(false);
- } else {
- getView().clear();
- if (state.getSocialNetworkData().isBuddiesVisible()) {
- setBuddiesState(state);
- setParticipationState(state);
- } else {
- getView().showBuddiesNotPublic();
- }
- getView().setVisible(true);
- }
+ private void onStateChanged(final StateAbstractDTO state) {
+ if (state.getGroup().isNotPersonal()) {
+ getView().setVisible(false);
+ } else {
+ getView().clear();
+ if (state.getSocialNetworkData().isBuddiesVisible()) {
+ // In fact now we show the user network or not.
+ final int buddies = setBuddiesState(state);
+ final int participeIn = setParticipationState(state);
+ // getView().setVisible(buddies + participeIn > 0);
+ } else {
+ getView().showBuddiesNotPublic();
+ }
+ getView().setVisible(true);
}
+ }
- private void refreshOnSignInSignOut(final Session session) {
- final StateAbstractDTO currentState = session.getCurrentState();
- if (currentState != null) {
- UserSNPresenter.this.onStateChanged(currentState);
- }
+ private void refreshOnSignInSignOut(final Session session) {
+ final StateAbstractDTO currentState = session.getCurrentState();
+ if (currentState != null) {
+ UserSNPresenter.this.onStateChanged(currentState);
}
+ }
- @Override
- protected void revealInParent() {
- RevealRootContentEvent.fire(this, this);
- }
+ @Override
+ protected void revealInParent() {
+ RevealRootContentEvent.fire(this, this);
+ }
- private void setBuddiesState(final StateAbstractDTO state) {
- final UserBuddiesDataDTO userBuddiesData = state.getUserBuddies();
- final List<UserSimpleDTO> buddies = userBuddiesData.getBuddies();
- for (final UserSimpleDTO user : buddies) {
- final String avatarUrl = user.hasLogo() ? downloadProvider.get().getLogoImageUrl(user.getStateToken())
- : PERSON_NO_AVATAR_IMAGE;
- getView().addBuddie(user, avatarUrl, user.getName(), "",
- createMenuItems(user, userMenuItemsRegistry, user.getName()));
- }
- getView().setBuddiesVisible(buddies.size() > 0);
- final boolean hasLocalBuddies = buddies.size() > 0;
- final int numExtBuddies = userBuddiesData.getOtherExtBuddies();
- if (numExtBuddies > 0) {
- if (hasLocalBuddies) {
- // i18n: plural
- getView().addTextToBuddieList(
- i18n.t(numExtBuddies == 1 ? "and [%d] external user" : "and [%d] external users", numExtBuddies));
- } else {
- getView().addTextToBuddieList(
- i18n.t(numExtBuddies == 1 ? "[%d] external user" : "[%d] external users", numExtBuddies));
- }
- } else {
- // if (hasLocalBuddies) {
- // view.clearOtherUsers();
- // } else {
- // view.setNoBuddies();
- // }
- }
+ private int setBuddiesState(final StateAbstractDTO state) {
+ final UserBuddiesDataDTO userBuddiesData = state.getUserBuddies();
+ final List<UserSimpleDTO> buddies = userBuddiesData.getBuddies();
+ for (final UserSimpleDTO user : buddies) {
+ final String avatarUrl = user.hasLogo() ? downloadProvider.get().getLogoImageUrl(
+ user.getStateToken()) : PERSON_NO_AVATAR_IMAGE;
+ getView().addBuddie(user, avatarUrl, user.getName(), "",
+ createMenuItems(user, userMenuItemsRegistry, user.getName()));
}
+ getView().setBuddiesVisible(buddies.size() > 0);
+ final boolean hasLocalBuddies = buddies.size() > 0;
+ final int numExtBuddies = userBuddiesData.getOtherExtBuddies();
+ if (numExtBuddies > 0) {
+ if (hasLocalBuddies) {
+ // i18n: plural
+ getView().addTextToBuddieList(
+ i18n.t(numExtBuddies == 1 ? "and [%d] external user" : "and [%d] external users",
+ numExtBuddies));
+ } else {
+ getView().addTextToBuddieList(
+ i18n.t(numExtBuddies == 1 ? "[%d] external user" : "[%d] external users", numExtBuddies));
+ }
+ } else {
+ if (hasLocalBuddies) {
+ // getView().clearOtherUsers();
+ } else {
+ getView().setNoBuddies();
+ }
+ }
+ return buddies.size() + numExtBuddies;
+ }
- private void setParticipationState(final StateAbstractDTO state) {
- final ParticipationDataDTO participation = state.getParticipation();
- final List<GroupDTO> groupsIsAdmin = participation.getGroupsIsAdmin();
- final List<GroupDTO> groupsIsCollab = participation.getGroupsIsCollab();
- final int numAdmins = groupsIsAdmin.size();
- final int numCollaborators = groupsIsCollab.size();
- for (final GroupDTO group : groupsIsAdmin) {
- getView().addParticipation(group, getAvatar(group), group.getLongName(), "",
- createMenuItems(group, userMenuItemsRegistry, group.getLongName()));
- }
- for (final GroupDTO group : groupsIsCollab) {
- getView().addParticipation(group, getAvatar(group), group.getLongName(), "",
- createMenuItems(group, userMenuItemsRegistry, group.getLongName()));
- }
- final int totalGroups = numAdmins + numCollaborators;
- // getView().setParticipationCount(totalGroups);
- getView().setParticipationVisible(totalGroups > 0);
+ private int setParticipationState(final StateAbstractDTO state) {
+ final ParticipationDataDTO participation = state.getParticipation();
+ final List<GroupDTO> groupsIsAdmin = participation.getGroupsIsAdmin();
+ final List<GroupDTO> groupsIsCollab = participation.getGroupsIsCollab();
+ final int numAdmins = groupsIsAdmin.size();
+ final int numCollaborators = groupsIsCollab.size();
+ for (final GroupDTO group : groupsIsAdmin) {
+ getView().addParticipation(group, getAvatar(group), group.getLongName(), "",
+ createMenuItems(group, userMenuItemsRegistry, group.getLongName()));
}
+ for (final GroupDTO group : groupsIsCollab) {
+ getView().addParticipation(group, getAvatar(group), group.getLongName(), "",
+ createMenuItems(group, userMenuItemsRegistry, group.getLongName()));
+ }
+ final int totalGroups = numAdmins + numCollaborators;
+ // getView().setParticipationCount(totalGroups);
+ getView().setParticipationVisible(totalGroups > 0);
+ return totalGroups;
+ }
}
\ No newline at end of file
Modified: trunk/src/main/java/cc/kune/core/public/about.html
===================================================================
--- trunk/src/main/java/cc/kune/core/public/about.html 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/core/public/about.html 2011-05-05 01:45:26 UTC (rev 1342)
@@ -13,7 +13,7 @@
</img>
</a>
</span>
-<p>Version 0.0.7 (r1274+c5)</p>
+<p>Version 0.0.7 (r1339+c18)</p>
<h1><a name="section_1">CREDITS</a></h1>
<h2><a name="section_1_1">Authors</a></h2>
Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/core/public/ws.css 2011-05-05 01:45:26 UTC (rev 1342)
@@ -381,11 +381,11 @@
font: inherit;
}
-.k-btn-sitebar span,.k-btn-sitebar button span,.k-sitebar button span {
+k-btn-sitebar button spin,.k-sitebar button spin, .k-btn-sitebar div, .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 {
+.k-btn-sitebar,.k-btn-sitebar button,.k-sitebar button, .k-btn-sitebar div,.k-btn-sitebar button div,.k-sitebar button div {
font: 13px 'Ubuntu', arial;
color: #B3B3B3;
cursor: pointer;
@@ -1167,6 +1167,7 @@
.gwt-SuggestBoxPopup .item-selected {
background: #cdcdcd;
+ cursor: pointer;
}
.gwt-SuggestBoxPopup .suggestPopupContent {
Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/UserManagerDefault.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -211,7 +211,8 @@
if (index > 0) {
// local user
try {
- final User buddie = finder.getByShortName(entry.getUser().substring(0, index));
+ String username = entry.getUser().substring(0, index);
+ final User buddie = finder.getByShortName(username);
buddiesData.getBuddies().add(buddie);
} catch (final NoResultException e) {
// No existent buddie, skip
Modified: trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/gspace/client/options/license/EntityOptionsDefLicensePanel.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -37,49 +37,50 @@
public class EntityOptionsDefLicensePanel extends Composite implements EntityOptionsDefLicenseView {
- private final Button change;
- private final Image licenseImage;
- private final IconLabel tabTitle;
+ private final Button change;
+ private final Image licenseImage;
+ private final IconLabel tabTitle;
- public EntityOptionsDefLicensePanel(final I18nTranslationService i18n, final CoreResources res) {
- tabTitle = new IconLabel(res.copyleft(), i18n.t("License"));
- final VerticalPanel vp = new VerticalPanel();
- final Label intro = new Label();
- intro.setWordWrap(true);
- intro.setText(i18n.t("This is the default license for all the contents of this group (you can also select another different license per content):"));
- vp.add(intro);
- licenseImage = new Image();
- vp.add(licenseImage);
- licenseImage.addStyleName("kune-pointer");
- change = new Button(i18n.t("Change"));
- initWidget(vp);
- super.setHeight(String.valueOf(EntityOptionsView.HEIGHT));
- super.setWidth(String.valueOf(EntityOptionsView.WIDTH));
- }
+ public EntityOptionsDefLicensePanel(final I18nTranslationService i18n, final CoreResources res) {
+ tabTitle = new IconLabel(res.copyleft(), i18n.t("License"));
+ tabTitle.setHeight("22px");
+ final VerticalPanel vp = new VerticalPanel();
+ final Label intro = new Label();
+ intro.setWordWrap(true);
+ intro.setText(i18n.t("This is the default license for all the contents of this group (you can also select another different license per content):"));
+ vp.add(intro);
+ licenseImage = new Image();
+ vp.add(licenseImage);
+ licenseImage.addStyleName("kune-pointer");
+ change = new Button(i18n.t("Change"));
+ initWidget(vp);
+ super.setHeight(String.valueOf(EntityOptionsView.HEIGHT));
+ super.setWidth(String.valueOf(EntityOptionsView.WIDTH));
+ }
- @Override
- public HasClickHandlers getChange() {
- return change;
- }
+ @Override
+ public HasClickHandlers getChange() {
+ return change;
+ }
- @Override
- public HasClickHandlers getLicenseImage() {
- return licenseImage;
- }
+ @Override
+ public HasClickHandlers getLicenseImage() {
+ return licenseImage;
+ }
- @Override
- public IsWidget getTabTitle() {
- return tabTitle;
- }
+ @Override
+ public IsWidget getTabTitle() {
+ return tabTitle;
+ }
- @Override
- public void openWindow(final String url) {
- KuneWindowUtils.open(url);
- }
+ @Override
+ public void openWindow(final String url) {
+ KuneWindowUtils.open(url);
+ }
- @Override
- public void setLicense(final LicenseDTO defaultLicense) {
- licenseImage.setUrl(defaultLicense.getImageUrl());
- Tooltip.to(licenseImage, defaultLicense.getLongName());
- }
+ @Override
+ public void setLicense(final LicenseDTO defaultLicense) {
+ licenseImage.setUrl(defaultLicense.getImageUrl());
+ Tooltip.to(licenseImage, defaultLicense.getLongName());
+ }
}
Modified: trunk/src/main/java/cc/kune/wave/client/WaveStatusIndicator.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WaveStatusIndicator.java 2011-05-04 20:47:33 UTC (rev 1341)
+++ trunk/src/main/java/cc/kune/wave/client/WaveStatusIndicator.java 2011-05-05 01:45:26 UTC (rev 1342)
@@ -18,43 +18,43 @@
public class WaveStatusIndicator {
- public static class WaveStatusAction extends SessionAction {
+ public static class WaveStatusAction extends SessionAction {
- @Inject
- public WaveStatusAction(final Session session, final I18nTranslationService i18n) {
- super(session, true);
- ClientEvents.get().addNetworkStatusEventHandler(new NetworkStatusEventHandler() {
- @Override
- public void onNetworkStatus(final NetworkStatusEvent event) {
- switch (event.getStatus()) {
- case CONNECTED:
- case RECONNECTED:
- putValue(Action.NAME, i18n.t("Online"));
- putValue(AbstractAction.STYLES, "k-sitebar-wave-status, k-sitebar-wave-status-online");
- NotifyUser.hideProgress();
- break;
- case DISCONNECTED:
- NotifyUser.showProgress(i18n.t("Connecting"));
- case RECONNECTING:
- putValue(Action.NAME, i18n.t("Offline"));
- putValue(AbstractAction.STYLES, "k-sitebar-wave-status, k-sitebar-wave-status-offline");
- break;
- }
- }
- });
- }
-
+ @Inject
+ public WaveStatusAction(final Session session, final I18nTranslationService i18n) {
+ super(session, true);
+ ClientEvents.get().addNetworkStatusEventHandler(new NetworkStatusEventHandler() {
@Override
- public void actionPerformed(final ActionEvent event) {
- // Do nothing
+ public void onNetworkStatus(final NetworkStatusEvent event) {
+ switch (event.getStatus()) {
+ case CONNECTED:
+ case RECONNECTED:
+ putValue(Action.NAME, i18n.t("Online"));
+ putValue(AbstractAction.STYLES, "k-sitebar-wave-status, k-sitebar-wave-status-online");
+ NotifyUser.hideProgress();
+ break;
+ case DISCONNECTED:
+ NotifyUser.showProgress(i18n.t("Connecting"));
+ case RECONNECTING:
+ putValue(Action.NAME, i18n.t("Offline"));
+ putValue(AbstractAction.STYLES, "k-sitebar-wave-status, k-sitebar-wave-status-offline");
+ break;
+ }
}
+ });
+ }
+ @Override
+ public void actionPerformed(final ActionEvent event) {
+ // Do nothing
}
- @Inject
- public WaveStatusIndicator(final SitebarActionsPresenter sitebar, final WaveStatusAction action) {
- final IconLabelDescriptor status = new IconLabelDescriptor(action);
- status.setPosition(0);
- sitebar.getRightToolbar().add(status);
- }
+ }
+
+ @Inject
+ public WaveStatusIndicator(final SitebarActionsPresenter sitebar, final WaveStatusAction action) {
+ final IconLabelDescriptor status = new IconLabelDescriptor(action);
+ status.setPosition(1);
+ sitebar.getRightToolbar().add(status);
+ }
}
More information about the kune-commits
mailing list