[kune-commits] r1444 - in trunk/src/main/java/cc/kune: common/client/tooltip core/client/groups/newgroup core/client/sitebar/spaces core/client/ui core/client/ws/entheader core/public

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Sat Jul 9 23:39:54 CEST 2011


Author: vjrj_
Date: 2011-07-09 23:39:54 +0200 (Sat, 09 Jul 2011)
New Revision: 1444

Modified:
   trunk/src/main/java/cc/kune/common/client/tooltip/Tooltip.java
   trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java
   trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.java
   trunk/src/main/java/cc/kune/core/client/ui/DefaultFormUtils.java
   trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPresenter.java
   trunk/src/main/java/cc/kune/core/public/ws.css
Log:
Some fixes/improvements in tooltips, new group creation...

Modified: trunk/src/main/java/cc/kune/common/client/tooltip/Tooltip.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/tooltip/Tooltip.java	2011-07-09 20:52:00 UTC (rev 1443)
+++ trunk/src/main/java/cc/kune/common/client/tooltip/Tooltip.java	2011-07-09 21:39:54 UTC (rev 1444)
@@ -50,6 +50,8 @@
 
   private static TooltipUiBinder uiBinder = GWT.create(TooltipUiBinder.class);
 
+  private static final int WIDTH_NOT_DEFINED = -1;
+
   public static Tooltip to(final Widget widget, final String text) {
     if (TextUtils.notEmpty(text)) {
       final Tooltip tip = new Tooltip();
@@ -80,6 +82,7 @@
   InlineLabel title;
   @UiField
   HTMLPanel tooltip;
+  private int width = WIDTH_NOT_DEFINED;
 
   public Tooltip() {
     super.add(uiBinder.createAndBindUi(this));
@@ -129,6 +132,10 @@
     content.add(new Label(text));
   }
 
+  public void setWidth(final int width) {
+    this.width = width;
+  }
+
   @Override
   public void show() {
     if (!Tooltip.this.isShowing() && ofWidget.isVisible()) {
@@ -137,7 +144,9 @@
           Window.getClientHeight(), ofWidget.getAbsoluteLeft(), ofWidget.getAbsoluteTop(),
           ofWidget.getOffsetWidth(), ofWidget.getOffsetHeight(), Tooltip.this.getWidth(),
           Tooltip.this.getHeight()));
-      if (tooltip.getOffsetWidth() > 430) {
+      if (width != WIDTH_NOT_DEFINED) {
+        tooltip.getElement().getStyle().setWidth(width, Unit.PX);
+      } else if (tooltip.getOffsetWidth() > 430) {
         tooltip.getElement().getStyle().setWidth(430, Unit.PX);
       } else {
         tooltip.getElement().getStyle().clearWidth();

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-07-09 20:52:00 UTC (rev 1443)
+++ trunk/src/main/java/cc/kune/core/client/groups/newgroup/NewGroupPanel.java	2011-07-09 21:39:54 UTC (rev 1444)
@@ -133,7 +133,7 @@
     shortNameField.setName(SHORTNAME_FIELD);
     shortNameField.setWidth(175);
     shortNameField.setMinLength(3);
-    shortNameField.setMaxLength(15);
+    shortNameField.setMaxLength(15); /* Same in Group.java/shortName */
     shortNameField.setAllowBlank(false);
     shortNameField.setRegex("^[a-z0-9]+$");
     shortNameField.getMessages().setMinLengthText(i18n.t(CoreMessages.FIELD_MUST_BE_BETWEEN_3_AND_15));
@@ -150,7 +150,7 @@
     longNameField.setWidth(BIG_FIELD_WIDTH);
     longNameField.setAllowBlank(false);
     longNameField.setMinLength(3);
-    longNameField.setMaxLength(50);
+    longNameField.setMaxLength(50); /* Same in Group.java/longName */
     longNameField.setValidationDelay(1000);
     form.add(longNameField);
 

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.java	2011-07-09 20:52:00 UTC (rev 1443)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorViewImpl.java	2011-07-09 21:39:54 UTC (rev 1444)
@@ -68,6 +68,10 @@
     publicSpaceTooltip = Tooltip.to(publicButton,
         i18n.t("Public space: In this space you can see a preview of how the Personal o"
             + "r Group Space looks like on the web, outside this site"));
+    // homeSpaceTooltip.setWidth(0);
+    userSpaceTooltip.setWidth(190);
+    groupSpaceTooltip.setWidth(170);
+    publicSpaceTooltip.setWidth(150);
   }
 
   @Override
@@ -115,18 +119,22 @@
     userButton.setDown(down);
   }
 
+  @Override
   public void showGroupSpaceTooltip() {
     groupSpaceTooltip.showTemporally();
   }
 
+  @Override
   public void showHomeSpaceTooltip() {
     homeSpaceTooltip.showTemporally();
   }
 
+  @Override
   public void showPublicSpaceTooltip() {
     publicSpaceTooltip.showTemporally();
   }
 
+  @Override
   public void showUserSpaceTooltip() {
     userSpaceTooltip.showTemporally();
   }

Modified: trunk/src/main/java/cc/kune/core/client/ui/DefaultFormUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ui/DefaultFormUtils.java	2011-07-09 20:52:00 UTC (rev 1443)
+++ trunk/src/main/java/cc/kune/core/client/ui/DefaultFormUtils.java	2011-07-09 21:39:54 UTC (rev 1444)
@@ -43,6 +43,7 @@
       public void handleEvent(final BaseEvent be) {
         if (radioTip != null && tooltip == null) {
           tooltip = Tooltip.to(radio, radioTip);
+          tooltip.setWidth(300);
           tooltip.show();
           tooltip.hide();
         }

Modified: trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPresenter.java	2011-07-09 20:52:00 UTC (rev 1443)
+++ trunk/src/main/java/cc/kune/core/client/ws/entheader/EntityHeaderPresenter.java	2011-07-09 21:39:54 UTC (rev 1444)
@@ -70,7 +70,7 @@
   }
 
   private static final int LARGE_NAME_LIMIT = 17;
-  private static final int MEDIUM_NAME_LIMIT = 90;
+  private static final int MEDIUM_NAME_LIMIT = 80;
   private final Session session;
 
   @Inject

Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css	2011-07-09 20:52:00 UTC (rev 1443)
+++ trunk/src/main/java/cc/kune/core/public/ws.css	2011-07-09 21:39:54 UTC (rev 1444)
@@ -1,4 +1,4 @@
-CHARSET            "UTF-8           "; body {
+CHARSET             "UTF-8            "; body {
   background-color: transparent;
   color: black;
   font-family: 'Ubuntu', Arial;
@@ -1065,13 +1065,17 @@
 
 .k-elogo-l-l {
   font-size: 46px;
+  line-height: 1em;
 }
 
 .k-elogo-l-m {
-  font-size: 167%;
+  /* Right now the limit of size is 50 chars see EntityHeaderPresenter */
+  font-size: 181%;
+  line-height: 1.2em;
 }
 
 .k-elogo-l-s {
+  /* Not used because the limit is 50 chars (see Group.java) */
   font-size: 108%;
 }
 
@@ -1202,7 +1206,7 @@
   -webkit-border-bottom-left-radius: 5px;
   -moz-border-radius-bottomleft: 5px;
   border-bottom-left-radius: 5px;
-  kfilter: alpha(opacity =                                                   90);
+  kfilter: alpha(opacity =                                                     90);
   -moz-opacity: 0.90;
   -khtml-opacity: 0.90;
   opacity: 0.90;




More information about the kune-commits mailing list