[kune-commits] r1864 - in trunk/src/main/java/cc/kune: chat/client core/client/notify/spiner core/client/sitebar core/public core/server/manager/impl gspace/client/armor/resources

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Thu May 3 01:30:11 CEST 2012


Author: vjrj_
Date: 2012-05-03 01:30:11 +0200 (Thu, 03 May 2012)
New Revision: 1864

Modified:
   trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
   trunk/src/main/java/cc/kune/core/client/notify/spiner/SpinerViewImpl.java
   trunk/src/main/java/cc/kune/core/client/sitebar/MyGroupsMenu.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/public/ws.css
   trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java
   trunk/src/main/java/cc/kune/gspace/client/armor/resources/gSpaceArmor.css
   trunk/src/main/java/cc/kune/gspace/client/armor/resources/gSpaceArmorTheme.css
Log:
NEW - # 224: Improve the sitebar (order, elements, etc) 
http://kune.ourproject.org/issues/ticket/224
CLOSED - # 264: Document header reorganization 
http://kune.ourproject.org/issues/ticket/264
SNCache when new group is created

Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java	2012-05-02 12:50:59 UTC (rev 1863)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientDefault.java	2012-05-02 23:30:11 UTC (rev 1864)
@@ -30,6 +30,7 @@
 import cc.kune.common.client.actions.ActionEvent;
 import cc.kune.common.client.actions.KeyStroke;
 import cc.kune.common.client.actions.Shortcut;
+import cc.kune.common.client.actions.ui.ParentWidget;
 import cc.kune.common.client.actions.ui.descrip.IconLabelDescriptor;
 import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor;
 import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
@@ -282,9 +283,7 @@
       dialog.setScrollMode(Scroll.NONE);
       dialog.setHideOnButtonClick(true);
       dialog.setCollapsible(true);
-      // final Widget btn = (Widget)
-      // chatIcon.getValue(ParentWidget.PARENT_UI);
-      dialog.setPosition(118, 1);
+      dialog.setPosition(0, 0);
       dialog.setIcon(AbstractImagePrototype.create(chatResources.chat()));
       // dialog.getItem(0).getFocusSupport().setIgnore(true);
       initEmite();
@@ -463,7 +462,6 @@
   }
 
   private void setSize(final Widget widget, final HtmlConfig htmlConfig) {
-
     if (htmlConfig.width != null) {
       widget.setWidth("98%");
       dialog.setWidth(htmlConfig.width);
@@ -483,6 +481,10 @@
     Log.info("Show dialog: " + show);
     if (session.isLogged()) {
       createDialogIfNeeded();
+      if (dialog.getAbsoluteTop() == 0 && dialog.getAbsoluteLeft() == 0) {
+        dialog.setPosition(((Widget) chatIcon.getValue(ParentWidget.PARENT_UI)).getAbsoluteLeft() + 20,
+            20);
+      }
       if (show) {
         dialog.show();
         dialog.setZIndex(0);

Modified: trunk/src/main/java/cc/kune/core/client/notify/spiner/SpinerViewImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/notify/spiner/SpinerViewImpl.java	2012-05-02 12:50:59 UTC (rev 1863)
+++ trunk/src/main/java/cc/kune/core/client/notify/spiner/SpinerViewImpl.java	2012-05-02 23:30:11 UTC (rev 1864)
@@ -25,6 +25,7 @@
 import com.google.gwt.event.shared.EventBus;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
+import com.google.gwt.user.client.Window;
 import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Image;
 import com.google.gwt.user.client.ui.InlineLabel;
@@ -36,50 +37,63 @@
 
 public class SpinerViewImpl extends PopupViewWithUiHandlers<UiHandlers> implements SpinerView {
 
-    interface SpinerViewImplUiBinder extends UiBinder<Widget, SpinerViewImpl> {
-    }
+  interface SpinerViewImplUiBinder extends UiBinder<Widget, SpinerViewImpl> {
+  }
 
-    private static SpinerViewImplUiBinder uiBinder = GWT.create(SpinerViewImplUiBinder.class);
+  private static SpinerViewImplUiBinder uiBinder = GWT.create(SpinerViewImplUiBinder.class);
 
-    @UiField
-    Image img;
+  @UiField
+  Image img;
 
-    @UiField
-    InlineLabel label;
+  @UiField
+  InlineLabel label;
 
-    @UiField
-    HorizontalPanel panel;
-    private final PopupPanel popup;
-    Widget widget;
+  @UiField
+  HorizontalPanel panel;
+  private final PopupPanel popup;
+  Widget widget;
 
-    @Inject
-    public SpinerViewImpl(final EventBus eventBus) {
-        super(eventBus);
-        widget = uiBinder.createAndBindUi(this);
-        popup = new PopupPanel(false, false);
-        popup.add(widget);
-        popup.setPopupPosition(190, 0);
-        popup.setStyleName("k-spiner-popup");
-        popup.show();
-    }
+  @Inject
+  public SpinerViewImpl(final EventBus eventBus) {
+    super(eventBus);
+    widget = uiBinder.createAndBindUi(this);
+    popup = new PopupPanel(false, false);
+    popup.add(widget);
+    // popup.setPopupPosition(190, 0);
+    popup.setStyleName("k-spiner-popup");
+    show("");
+  }
 
-    @Override
-    public Widget asWidget() {
-        return popup;
-    }
+  @Override
+  public Widget asWidget() {
+    return popup;
+  }
 
-    @Override
-    public void fade() {
-        popup.hide();
+  @Override
+  public void fade() {
+    popup.hide();
+  }
+
+  protected void setCenterPositionAndShow() {
+    popup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {
+      @Override
+      public void setPosition(final int offsetWidth, final int offsetHeight) {
+        final int x = (Window.getClientWidth() - (label != null ? label.getOffsetWidth() : 0)) / 2;
+        final int y = 0;
+        popup.setPopupPosition(x, y);
+      }
+    });
+  }
+
+  @Override
+  public void show(final String message) {
+    if (message == null || message.isEmpty()) {
+      label.setText("");
+    } else {
+      label.setText(message);
     }
+    setCenterPositionAndShow();
+    // popup.show();
+  }
 
-    @Override
-    public void show(final String message) {
-        if (message == null || message.isEmpty()) {
-            label.setText("");
-        } else {
-            label.setText(message);
-        }
-        popup.show();
-    }
 }

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/MyGroupsMenu.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/MyGroupsMenu.java	2012-05-02 12:50:59 UTC (rev 1863)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/MyGroupsMenu.java	2012-05-02 23:30:11 UTC (rev 1864)
@@ -64,7 +64,8 @@
     this.siteOptions = siteOptions;
     menuShowAction.setMenu(this);
     setId(MENU_ID);
-    setParent(SitebarActions.RIGHT_TOOLBAR);
+    setParent(SitebarActions.LEFT_TOOLBAR);
+    setPosition(0);
     setStyles("k-no-backimage, k-btn-sitebar");
     this.downloadProvider = downloadProvider;
     this.gotoGroupAction = gotoGroupAction;

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java	2012-05-02 12:50:59 UTC (rev 1863)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarActionsPresenter.java	2012-05-02 23:30:11 UTC (rev 1864)
@@ -27,8 +27,6 @@
 import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
 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.ToolbarSeparatorDescriptor;
-import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
 import cc.kune.common.client.resources.CommonResources;
 import cc.kune.common.client.ui.KuneWindowUtils;
 import cc.kune.common.shared.i18n.I18nTranslationService;
@@ -160,7 +158,6 @@
     signInLink.get();
     myGroupsMenu.get();
     newGroupLink.get();
-    new ToolbarSeparatorDescriptor(Type.separator, RIGHT_TOOLBAR);
     createGotoKune();
     MenuItemDescriptor.build(MORE_MENU, bugsAction);
     MenuItemDescriptor.build(MORE_MENU, errorAction);

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java	2012-05-02 12:50:59 UTC (rev 1863)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/SitebarNewGroupLink.java	2012-05-02 23:30:11 UTC (rev 1864)
@@ -22,6 +22,8 @@
 import cc.kune.common.client.actions.AbstractExtendedAction;
 import cc.kune.common.client.actions.ActionEvent;
 import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
+import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor;
+import cc.kune.common.client.actions.ui.descrip.ToolbarSeparatorDescriptor.Type;
 import cc.kune.common.shared.i18n.I18nTranslationService;
 import cc.kune.core.client.events.MyGroupsChangedEvent;
 import cc.kune.core.client.events.UserSignInOrSignOutEvent;
@@ -66,6 +68,8 @@
     this.session = session;
     withId(NEW_GROUP_BTN_ID).withStyles("k-no-backimage, k-btn-sitebar, k-fl, k-noborder, k-nobackcolor");
     withParent(SitebarActions.RIGHT_TOOLBAR);
+    final ToolbarSeparatorDescriptor separator = new ToolbarSeparatorDescriptor(Type.separator,
+        SitebarActions.RIGHT_TOOLBAR);
     eventBus.addHandler(MyGroupsChangedEvent.getType(),
         new MyGroupsChangedEvent.MyGroupsChangedHandler() {
           @Override
@@ -78,6 +82,7 @@
       public void onUserSignInOrSignOut(final UserSignInOrSignOutEvent event) {
         final boolean notLogged = !event.isLogged();
         recalculate(notLogged);
+        separator.setVisible(notLogged);
       }
     });
 

Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css	2012-05-02 12:50:59 UTC (rev 1863)
+++ trunk/src/main/java/cc/kune/core/public/ws.css	2012-05-02 23:30:11 UTC (rev 1864)
@@ -317,7 +317,6 @@
 }
 
 .k-space-sel {
-  margin-right: 10px;
   background-color: #F2F2F2;
 }
 

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java	2012-05-02 12:50:59 UTC (rev 1863)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/GroupManagerDefault.java	2012-05-02 23:30:11 UTC (rev 1864)
@@ -169,6 +169,7 @@
           getDefSNVisibility(isClosed));
       final String title = i18n.t("About [%s]", group.getLongName());
       initGroup(user, group, serverToolRegistry.getToolsRegisEnabledForGroups(), title, publicDescrip);
+      snCache.expire(user.getUserGroup());
       return group;
     } else {
       throw new UserMustBeLoggedException();

Modified: trunk/src/main/java/cc/kune/gspace/client/armor/resources/gSpaceArmor.css
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/armor/resources/gSpaceArmor.css	2012-05-02 12:50:59 UTC (rev 1863)
+++ trunk/src/main/java/cc/kune/gspace/client/armor/resources/gSpaceArmor.css	2012-05-02 23:30:11 UTC (rev 1864)
@@ -10,6 +10,7 @@
 }
 
 .k-spaces {
+  
 }
 
 .k-group-space {
@@ -20,7 +21,7 @@
 }
 
 .k-space {
-
+  
 }
 
 .floatRight {
@@ -34,7 +35,12 @@
 }
 
 .entityCentralContainer {
-
+  -webkit-border-top-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  border-top-right-radius: 4px;
+  -webkit-border-bottom-right-radius: 4px;
+  -moz-border-radius-bottomright: 4px;
+  border-bottom-right-radius: 4px;
 }
 
 .entityHeader {
@@ -123,7 +129,7 @@
 }
 
 .docEditorMargin {
-
+  
 }
 
 .docEditor {
@@ -187,10 +193,11 @@
 }
 
 .entityToolsNorth {
-
+  
 }
 
 .entityToolsNorth span {
+  
 }
 
 .entityToolsCenter {
@@ -224,9 +231,7 @@
   border-width: 7px;
   height: 0;
   width: 0;
-  position: relative;  
-  bottom: 1px;
-  left: 36px;
+  margin-left: 13px;
 }
 
 .k-tool-item-selected-arrow {

Modified: trunk/src/main/java/cc/kune/gspace/client/armor/resources/gSpaceArmorTheme.css
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/armor/resources/gSpaceArmorTheme.css	2012-05-02 12:50:59 UTC (rev 1863)
+++ trunk/src/main/java/cc/kune/gspace/client/armor/resources/gSpaceArmorTheme.css	2012-05-02 23:30:11 UTC (rev 1864)
@@ -104,7 +104,10 @@
 }
 
 .entityCentralContainer {
-  border-left: 2px solid bc1;
+  border-top: 1px solid bc1;
+  border-right: 1px solid bc2;
+  border-bottom: 1px solid bc2;
+  border-left: 2px solid bc2;
 }
 
 .entityHeader {
@@ -134,6 +137,7 @@
 
 .docSubheader {
   background-color: bc8;
+  border-top: 1px solid #FFF;
 }
 
 .docSubheader span {




More information about the kune-commits mailing list