[kune-commits] r1577 - in trunk/src/main/java/cc/kune: core/client/auth core/client/errors core/client/sitebar/spaces core/client/state core/public gspace/client gspace/client/resources gspace/client/style

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Wed Nov 2 23:01:45 CET 2011


Author: vjrj_
Date: 2011-11-02 23:01:44 +0100 (Wed, 02 Nov 2011)
New Revision: 1577

Modified:
   trunk/src/main/java/cc/kune/core/client/auth/Register.java
   trunk/src/main/java/cc/kune/core/client/auth/SignIn.java
   trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java
   trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java
   trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java
   trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPanel.java
   trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java
   trunk/src/main/java/cc/kune/core/client/state/SiteTokens.java
   trunk/src/main/java/cc/kune/core/client/state/StateManager.java
   trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
   trunk/src/main/java/cc/kune/core/public/ws.css
   trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java
   trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml
   trunk/src/main/java/cc/kune/gspace/client/resources/gSpaceArmor.css
   trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManagerImpl.java
Log:
CLOSED - # 146: General Home page should now be # instead of #home 
http://kune.ourproject.org/issues/ticket/146

Modified: trunk/src/main/java/cc/kune/core/client/auth/Register.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/Register.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/client/auth/Register.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -27,4 +27,6 @@
 
   void hide();
 
+  void setGotoTokenOnCancel(String gotoTokenOnCancel);
+
 }

Modified: trunk/src/main/java/cc/kune/core/client/auth/SignIn.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignIn.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignIn.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -31,6 +31,8 @@
 
   void setErrorMessage(String message, NotifyLevel level);
 
+  void setGotoTokenOnCancel(String gotoToken);
+
   void showSignInDialog();
 
 }

Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -37,6 +37,7 @@
 
   protected final UserPassAutocompleteManager autocomplete;
   protected final CookiesManager cookiesManager;
+  private String gotoTokenOnCancel;
   protected final I18nUITranslationService i18n;
   protected final Session session;
   protected final StateManager stateManager;
@@ -52,6 +53,10 @@
     this.autocomplete = autocomplete;
   }
 
+  public String getGotoTokenOnCancel() {
+    return gotoTokenOnCancel;
+  }
+
   @Override
   public SignInAbstractView getView() {
     return (SignInAbstractView) super.getView();
@@ -71,7 +76,12 @@
     getView().reset();
     getView().hideMessages();
     if (!session.isLogged()) {
-      stateManager.redirectOrRestorePreviousToken();
+      if (gotoTokenOnCancel != null) {
+        stateManager.gotoHistoryToken(gotoTokenOnCancel);
+        gotoTokenOnCancel = null;
+      } else {
+        stateManager.redirectOrRestorePreviousToken();
+      }
     }
   }
 
@@ -97,4 +107,7 @@
     autocomplete.clickFormLogin();
   }
 
+  public void setGotoTokenOnCancel(final String gotoTokenOnCancel) {
+    this.gotoTokenOnCancel = gotoTokenOnCancel;
+  }
 }

Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInPresenter.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -174,7 +174,6 @@
       }
     });
     getView().getClose().addCloseHandler(new CloseHandler<PopupPanel>() {
-
       @Override
       public void onClose(final CloseEvent<PopupPanel> event) {
         Log.debug("Closing signin presenter");
@@ -182,7 +181,6 @@
       }
     });
     getView().getAccountRegister().addClickHandler(new ClickHandler() {
-
       @Override
       public void onClick(final ClickEvent event) {
         onAccountRegister();
@@ -238,6 +236,7 @@
   @Override
   public void showSignInDialog() {
     registerProvider.get().hide();
+    registerProvider.get().setGotoTokenOnCancel(this.getGotoTokenOnCancel());
     if (session.isLogged()) {
       stateManager.restorePreviousToken();
     } else {

Modified: trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/client/errors/ErrorHandler.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -29,7 +29,6 @@
 import cc.kune.core.client.notify.msgs.UserNotifyEvent;
 import cc.kune.core.client.notify.spiner.ProgressHideEvent;
 import cc.kune.core.client.state.Session;
-import cc.kune.core.client.state.SiteTokens;
 import cc.kune.core.client.state.StateManager;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.wave.client.WaveClientProvider;
@@ -63,7 +62,7 @@
   }
 
   private void goHome() {
-    stateManager.gotoHistoryToken(SiteTokens.GROUP_HOME);
+    stateManager.gotoDefaultHomepage();
   }
 
   private void logException(final Throwable caught) {
@@ -147,12 +146,14 @@
       logException(caught, true);
       eventBus.fireEvent(new UserNotifyEvent(NotifyLevel.error,
           i18n.t("Oops! Something has gone wrong with our servers. Retry later, please.")));
-      final String error = "Other kind of exception in StateManagerDefault/processErrorException";
+      final String error = "Other kind of exception received in ErrorHandler";
       Log.error(error, caught);
       waveClient.get().getStackTraceAsync(caught, new Accessor<SafeHtml>() {
         @Override
         public void use(final SafeHtml stack) {
-          NotifyUser.logError(stack.asString().replace("<br>", "\n"));
+          final String stackAsString = stack.asString().replace("<br>", "\n");
+          NotifyUser.logError(stackAsString);
+          Log.error("Stack: " + stackAsString);
         }
       });
     }

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPanel.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPanel.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -20,6 +20,7 @@
 package cc.kune.core.client.sitebar.spaces;
 
 import cc.kune.common.client.tooltip.Tooltip;
+import cc.kune.common.client.ui.BlinkAnimation;
 import cc.kune.core.client.i18n.I18nUITranslationService;
 import cc.kune.core.client.sitebar.spaces.SpaceSelectorPresenter.SpaceSelectorView;
 import cc.kune.core.client.state.Session;
@@ -32,6 +33,7 @@
 import com.google.gwt.uibinder.client.UiField;
 import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.ToggleButton;
+import com.google.gwt.user.client.ui.UIObject;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.inject.Inject;
 import com.gwtplatform.mvp.client.ViewImpl;
@@ -86,7 +88,32 @@
     return panel;
   }
 
+  private void blink(final UIObject btn) {
+    final BlinkAnimation anim = new BlinkAnimation(btn, 400);
+    anim.animate(3);
+  }
+
   @Override
+  public void blinkGroupBtn() {
+    blink(groupButton);
+  }
+
+  @Override
+  public void blinkHomeBtn() {
+    blink(homeButton);
+  }
+
+  @Override
+  public void blinkPublicBtn() {
+    blink(publicButton);
+  }
+
+  @Override
+  public void blinkUserBtn() {
+    blink(userButton);
+  }
+
+  @Override
   public HasClickHandlers getGroupBtn() {
     return groupButton;
   }

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/spaces/SpaceSelectorPresenter.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -61,6 +61,14 @@
     public static String PUBLIC_SPACE_ID = "k-space-public-id";
     public static String USER_SPACE_ID = "k-space-user-id";
 
+    void blinkGroupBtn();
+
+    void blinkHomeBtn();
+
+    void blinkPublicBtn();
+
+    void blinkUserBtn();
+
     HasClickHandlers getGroupBtn();
 
     HasClickHandlers getHomeBtn();
@@ -84,6 +92,7 @@
     void showPublicSpaceTooltip();
 
     void showUserSpaceTooltip();
+
   }
 
   private final GSpaceArmor armor;
@@ -92,11 +101,11 @@
   private String groupToken;
   private String homeToken;
   private final I18nTranslationService i18n;
+  private String inboxToken;
   private String publicToken;
   private final Session session;
   private final Provider<SignIn> signIn;
   private final StateManager stateManager;
-  private String userToken;
 
   @Inject
   public SpaceSelectorPresenter(final EventBus eventBus, final StateManager stateManager,
@@ -112,7 +121,7 @@
     this.i18n = i18n;
     currentSpace = null;
     homeToken = SiteTokens.HOME;
-    userToken = SiteTokens.WAVEINBOX;
+    inboxToken = SiteTokens.WAVEINBOX;
     groupToken = SiteTokens.GROUP_HOME;
     publicToken = TokenUtils.preview(SiteTokens.GROUP_HOME);
     view.getHomeBtn().addClickHandler(new ClickHandler() {
@@ -125,8 +134,11 @@
     view.getUserBtn().addClickHandler(new ClickHandler() {
       @Override
       public void onClick(final ClickEvent event) {
-        restoreToken(userToken);
-        setDown(Space.userSpace);
+        signIn.get().setGotoTokenOnCancel(stateManager.getCurrentToken());
+        restoreToken(inboxToken);
+        if (session.isLogged()) {
+          setDown(Space.userSpace);
+        }
       }
     });
     view.getGroupBtn().addClickHandler(new ClickHandler() {
@@ -156,7 +168,7 @@
 
   @ProxyEvent
   public void onAppStart(final AppStartEvent event) {
-    // showTooltipWithDelay();
+    showTooltipWithDelay();
   }
 
   private void onGroupSpaceSelect(final boolean shouldRestoreToken) {
@@ -176,7 +188,7 @@
   }
 
   private void onPublicSpaceSelect(final boolean shouldRestoreToken) {
-    restoreToken(shouldRestoreToken, userToken);
+    restoreToken(shouldRestoreToken, inboxToken);
     armor.selectPublicSpace();
     backManager.restoreBackImage();
     setDown(Space.publicSpace);
@@ -192,7 +204,7 @@
       homeToken = token;
       break;
     case userSpace:
-      userToken = token;
+      inboxToken = token;
       break;
     case groupSpace:
       groupToken = token;
@@ -232,12 +244,12 @@
     if (currentSpace == Space.userSpace) {
       restoreToken(homeToken);
     }
-    userToken = SiteTokens.WAVEINBOX;
+    inboxToken = SiteTokens.WAVEINBOX;
   }
 
   private void onUserSpaceSelect(final boolean shouldRestoreToken) {
     if (session.isLogged()) {
-      restoreToken(shouldRestoreToken, userToken);
+      restoreToken(shouldRestoreToken, inboxToken);
       armor.selectUserSpace();
       backManager.clearBackImage();
       setDown(Space.userSpace);
@@ -245,7 +257,7 @@
     } else {
       signIn.get().setErrorMessage(i18n.t("Sign in or create an account to access to your inbox"),
           NotifyLevel.info);
-      stateManager.gotoHistoryToken(TokenUtils.addRedirect(SiteTokens.SIGNIN, userToken));
+      stateManager.gotoHistoryToken(TokenUtils.addRedirect(SiteTokens.SIGNIN, inboxToken));
       getView().setUserBtnDown(false);
     }
   }
@@ -277,15 +289,19 @@
       switch (currentSpace) {
       case homeSpace:
         getView().showHomeSpaceTooltip();
+        getView().blinkHomeBtn();
         break;
       case userSpace:
         getView().showUserSpaceTooltip();
+        getView().blinkUserBtn();
         break;
       case groupSpace:
         getView().showGroupSpaceTooltip();
+        getView().blinkGroupBtn();
         break;
       case publicSpace:
         getView().showPublicSpaceTooltip();
+        getView().blinkPublicBtn();
         break;
       }
     }

Modified: trunk/src/main/java/cc/kune/core/client/state/SiteTokens.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/SiteTokens.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/client/state/SiteTokens.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -30,7 +30,7 @@
 public final class SiteTokens {
   public static final String ABOUTKUNE = "about";
   public final static String GROUP_HOME = "";
-  public final static String HOME = "home";
+  public final static String HOME = "";
   public final static String NEWGROUP = "newgroup";
   public static final String PREVIEW = "preview";
   public final static String REGISTER = "register";

Modified: trunk/src/main/java/cc/kune/core/client/state/StateManager.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManager.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManager.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -30,6 +30,10 @@
 
   void addSiteToken(String token, HistoryTokenCallback historyTokenCallback);
 
+  String getCurrentToken();
+
+  void gotoDefaultHomepage();
+
   void gotoHistoryToken(String newToken);
 
   void gotoHistoryTokenButRedirectToCurrent(String signin);

Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -54,7 +54,8 @@
   private final ContentCache contentCache;
   private final EventBus eventBus;
   private final HistoryWrapper history;
-  private StateToken previousToken;
+  private StateToken previousGroupToken;
+  private final StateToken previousToken;
   /**
    * When a historyChanged is interrupted (for instance because you are editing
    * something), the new history token is stored here
@@ -73,6 +74,7 @@
     this.contentCache = contentProvider;
     this.session = session;
     this.history = history;
+    this.previousGroupToken = null;
     this.previousToken = null;
     this.resumedHistoryToken = null;
     tokenMatcher.init(GwtWaverefEncoder.INSTANCE);
@@ -122,17 +124,50 @@
     }
   }
 
+  private void getContent(final StateToken newState) {
+    getContent(newState, false);
+  }
+
+  private void getContent(final StateToken newState, final boolean setBrowserHistory) {
+    // NotifyUser.info("loading: " + newState + " because current:" +
+    // session.getCurrentStateToken());
+    contentCache.getContent(session.getUserHash(), newState,
+        new AsyncCallbackSimple<StateAbstractDTO>() {
+          @Override
+          public void onSuccess(final StateAbstractDTO newState) {
+            setState(newState);
+            final String currentToken = newState.getStateToken().toString();
+            SpaceConfEvent.fire(eventBus, Space.groupSpace, currentToken);
+            SpaceConfEvent.fire(eventBus, Space.publicSpace, TokenUtils.preview(currentToken));
+            if (setBrowserHistory) {
+              history.newItem(currentToken, false);
+              SpaceSelectEvent.fire(eventBus, Space.groupSpace);
+            }
+          }
+        });
+  }
+
+  @Override
+  public String getCurrentToken() {
+    return history.getToken();
+  }
+
   private String getPreviousGroup() {
-    final String previousGroup = startingUp() ? "" : previousToken.getGroup();
+    final String previousGroup = startingUp() ? "" : previousGroupToken.getGroup();
     return previousGroup;
   }
 
   private String getPreviousTool() {
-    final String previousTool = startingUp() ? "" : previousToken.getTool();
+    final String previousTool = startingUp() ? "" : previousGroupToken.getTool();
     return previousTool;
   }
 
   @Override
+  public void gotoDefaultHomepage() {
+    getContent(new StateToken(SiteTokens.GROUP_HOME), true);
+  }
+
+  @Override
   public void gotoHistoryToken(final String token) {
     Log.debug("StateManager: history goto-string-token: " + token);
     history.newItem(token);
@@ -146,7 +181,7 @@
 
   @Override
   public void gotoStateToken(final StateToken newToken) {
-    Log.debug("StateManager: history goto-token: " + newToken + ", previous: " + previousToken);
+    Log.debug("StateManager: history goto-token: " + newToken + ", previous: " + previousGroupToken);
     history.newItem(newToken.getEncoded());
   }
 
@@ -169,18 +204,6 @@
 
   }
 
-  private void onHistoryChanged(final StateToken newState) {
-    // NotifyUser.info("loading: " + newState + " because current:" +
-    // session.getCurrentStateToken());
-    contentCache.getContent(session.getUserHash(), newState,
-        new AsyncCallbackSimple<StateAbstractDTO>() {
-          @Override
-          public void onSuccess(final StateAbstractDTO newState) {
-            setState(newState);
-          }
-        });
-  }
-
   @Override
   public void onSocialNetworkChanged(final boolean fireNow, final SocialNetworkChangedHandler handler) {
     eventBus.addHandler(SocialNetworkChangedEvent.getType(), handler);
@@ -242,7 +265,7 @@
             SpaceSelectEvent.fire(eventBus, Space.publicSpace);
             SpaceConfEvent.fire(eventBus, Space.groupSpace, sndToken);
             SpaceConfEvent.fire(eventBus, Space.publicSpace, TokenUtils.preview(sndToken));
-            onHistoryChanged(new StateToken(sndToken));
+            getContent(new StateToken(sndToken));
           } else if (firstToken.equals(SiteTokens.SUBTITLES)) {
             siteTokens.get(SiteTokens.SUBTITLES).onHistoryToken(
                 tokenMatcher.getRedirect(newHistoryToken).getRight());
@@ -258,37 +281,37 @@
               siteTokens.get(SiteTokens.SIGNIN).onHistoryToken(newHistoryToken);
             }
           }
-        } else if (tokenMatcher.isWaveToken(newHistoryToken)) {
+        } else
+        // No redirection
+        if (tokenMatcher.isWaveToken(newHistoryToken)) {
           if (session.isLogged()) {
             SpaceConfEvent.fire(eventBus, Space.userSpace, newHistoryToken);
             SpaceSelectEvent.fire(eventBus, Space.userSpace);
             ClientEvents.get().fireEvent(
                 new WaveSelectionEvent(HistorySupport.waveRefFromHistoryToken(newHistoryToken)));
           } else {
+            // Wave, but don't logged
             history.newItem(TokenUtils.addRedirect(SiteTokens.SIGNIN, newHistoryToken));
             if (startingUp()) {
-              // Starting application (with Wave url???)
-              onHistoryChanged(new StateToken(SiteTokens.GROUP_HOME));
+              // Starting application (with Wave)
+              getContent(new StateToken(SiteTokens.GROUP_HOME), false);
             }
           }
         } else if (tokenMatcher.isGroupToken(newHistoryToken)) {
           SpaceConfEvent.fire(eventBus, Space.groupSpace, newHistoryToken);
           SpaceConfEvent.fire(eventBus, Space.publicSpace, TokenUtils.preview(newHistoryToken));
           SpaceSelectEvent.fire(eventBus, Space.groupSpace);
-          onHistoryChanged(new StateToken(newHistoryToken));
+          getContent(new StateToken(newHistoryToken));
         } else {
-          // While we don't redefine token "" as home:
-          SpaceConfEvent.fire(eventBus, Space.groupSpace, SiteTokens.GROUP_HOME);
-          SpaceConfEvent.fire(eventBus, Space.publicSpace, TokenUtils.preview(SiteTokens.GROUP_HOME));
-          SpaceSelectEvent.fire(eventBus, Space.groupSpace);
-          onHistoryChanged(new StateToken(SiteTokens.GROUP_HOME));
+          gotoDefaultHomepage();
         }
       } else {
         // token is one of #newgroup #signin #translate ...
         if (startingUp()) {
           // Starting with some token like "signin": load defContent
           // also
-          processHistoryToken(SiteTokens.GROUP_HOME);
+          getContent(new StateToken(SiteTokens.GROUP_HOME), false);
+          // processHistoryToken(SiteTokens.GROUP_HOME);
           // SpaceSelectEvent.fire(eventBus, Space.groupSpace);
         }
         // Fire the listener of this #hash token
@@ -339,7 +362,7 @@
       processCurrentHistoryToken();
     } else {
       contentCache.removeContent(currentStateToken);
-      onHistoryChanged(currentStateToken);
+      getContent(currentStateToken);
     }
   }
 
@@ -355,8 +378,8 @@
 
   @Override
   public void restorePreviousToken() {
-    if (previousToken != null) {
-      gotoStateToken(previousToken);
+    if (previousGroupToken != null) {
+      gotoStateToken(previousGroupToken);
     }
   }
 
@@ -404,11 +427,11 @@
     // history.newItem(newToken.toString(), false);
     StateChangedEvent.fire(eventBus, newState);
     checkGroupAndToolChange(newState);
-    previousToken = newToken.copy();
+    previousGroupToken = newToken.copy();
     eventBus.fireEvent(new ProgressHideEvent());
   }
 
   private boolean startingUp() {
-    return previousToken == null;
+    return previousGroupToken == null;
   }
 }

Modified: trunk/src/main/java/cc/kune/core/public/ws.css
===================================================================
--- trunk/src/main/java/cc/kune/core/public/ws.css	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/core/public/ws.css	2011-11-02 22:01:44 UTC (rev 1577)
@@ -324,6 +324,15 @@
   float: left;
 }
 
+.k-space-sel-btn-blink {
+/*   kfilter: alpha(opacity = */
+/*             30); */
+/*   -moz-opacity: 0.30; */
+/*   -khtml-opacity: 0.30; */
+/*   opacity: 0.30; */
+  visibility: hidden;
+}
+
 .k-space-sel-inbox-count {
   border: none 5px #000000;
   -moz-border-radius: 5px;

Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -79,6 +79,8 @@
   FlowPanel entityToolsSouth;
   @UiField
   SplitLayoutPanel groupSpace;
+  @UiField
+  SimplePanel groupSpaceWrapper;
   private final ActionFlowPanel headerToolbar;
   @UiField
   SimplePanel homeSpace;
@@ -240,7 +242,7 @@
 
   @Override
   public void selectGroupSpace() {
-    tabs.selectTab(groupSpace);
+    tabs.selectTab(groupSpaceWrapper);
   }
 
   @Override
@@ -261,7 +263,9 @@
   @Override
   public void setBackImage(final String url) {
     final String bodyProp = "#FFFFFF url('" + url + "') fixed no-repeat top left";
-    DOM.setStyleAttribute(mainpanel.getElement(), CSS.A.BACKGROUND, bodyProp);
+    // final String bodyProp = "#FFFFFF url('" + url +
+    // "') fixed no-repeat top left";
+    DOM.setStyleAttribute(groupSpaceWrapper.getElement(), CSS.A.BACKGROUND, bodyProp);
   }
 
   @Override

Modified: trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/gspace/client/GSpaceArmorImpl.ui.xml	2011-11-02 22:01:44 UTC (rev 1577)
@@ -3,7 +3,7 @@
   xmlns:co="urn:import:cc.kune.core.client" xmlns:kp="urn:import:cc.kune.pspace.client"
   xmlns:g="urn:import:com.google.gwt.user.client.ui">
   <ui:with field='res'
-    type='cc.kune.gspace.client.resources.GSpaceArmorResources' />
+    type='cc.kune.gspace.client.resources.GSpaceArmorResources'/>
   <ui:style>
     .frame {
       border: 0px;
@@ -21,94 +21,103 @@
       <g:TabLayoutPanel width="100%" height="100%"
         barUnit='PX' barHeight='0' ui:field="tabs">
         <g:tab>
-          <g:header size='0' />
-          <g:SimplePanel styleName="k-space" ui:field="homeSpace" width="100%"
-            height="100%"></g:SimplePanel>
+          <g:header size='0'/>
+          <g:SimplePanel styleName="k-space" ui:field="homeSpace"
+            width="100%" height="100%"></g:SimplePanel>
         </g:tab>
         <g:tab>
-          <g:header size='0' />
-          <g:FlowPanel ui:field="userSpace" styleName="k-space" width="100%"
-            height="100%">
+          <g:header size='0'/>
+          <g:FlowPanel ui:field="userSpace" styleName="k-space"
+            width="100%" height="100%">
             <!-- <g:Frame url="/" styleName="{style.frame}" -->
             <!-- ui:field="frame" width="100%" height="100%" /> -->
           </g:FlowPanel>
         </g:tab>
         <g:tab>
-          <g:header size='0' />
-          <g:SplitLayoutPanel width="100%" height="100%" styleName="k-space"
-            ui:field="groupSpace">
-            <g:center size="1.0">
-              <g:DockLayoutPanel unit="PX" ui:field="splitCenter" styleName="{res.style.entityCentralContainer}">
-                <g:north size="168">
-                  <g:VerticalPanel width="100%" height="168px">
-                    <g:FlowPanel height="70px" width="100%"
-                      styleName="{res.style.entityHeader}" ui:field="entityHeader">
-                      <!--<g:RichTextArea width="100%" height="70px" /> -->
+          <g:header size='0'/>
+          <g:SimplePanel
+            ui:field="groupSpaceWrapper" styleName="k-group-space">
+            <g:SplitLayoutPanel width="100%" height="100%"
+              styleName="k-space" ui:field="groupSpace">
+              <g:center size="1.0">
+                <g:DockLayoutPanel unit="PX" ui:field="splitCenter"
+                  styleName="{res.style.entityCentralContainer}">
+                  <g:north size="168">
+                    <g:VerticalPanel width="100%"
+                      height="168px">
+                      <g:FlowPanel height="70px" width="100%"
+                        styleName="{res.style.entityHeader}" ui:field="entityHeader">
+                        <!--<g:RichTextArea width="100%" height="70px" /> -->
+                      </g:FlowPanel>
+                      <g:FlowPanel width="100%" height="38px"
+                        styleName="{res.style.docHeader}" ui:field="docHeader">
+                      </g:FlowPanel>
+                      <g:HTMLPanel ui:field="arrow"
+                        styleName="{res.style.docSubheaderArrow}"/>
+                      <g:FlowPanel width="100%" height="60px"
+                        styleName="{res.style.docSubheader}" ui:field="docSubheader">
+                      </g:FlowPanel>
+                    </g:VerticalPanel>
+                  </g:north>
+                  <g:center>
+                    <g:DockLayoutPanel unit="PX"
+                      styleName="{res.style.docEditorMargin}" ui:field="docContainerParent">
+                      <g:west size="10">
+                        <g:SimplePanel/>
+                      </g:west>
+                      <g:east size="10">
+                        <g:SimplePanel/>
+                      </g:east>
+                      <g:center>
+                        <g:ScrollPanel ui:field="centerScroll"
+                          styleName="{res.style.docEditor}">
+                          <g:FlowPanel width="auto" height="auto"
+                            styleName="{res.style.docEditorContainer}"
+                            ui:field="docContainer"/>
+                        </g:ScrollPanel>
+                      </g:center>
+                      <g:south size="33.0">
+                        <g:VerticalPanel height="33px"
+                          width="100%" styleName="{res.style.docFooter}">
+                          <g:FlowPanel width="100%" height="33"
+                            ui:field="docFooter">
+                          </g:FlowPanel>
+                        </g:VerticalPanel>
+                      </g:south>
+                    </g:DockLayoutPanel>
+                  </g:center>
+                  <g:south size="36">
+                    <g:FlowPanel height="36px" width="100%"
+                      styleName="{res.style.entityFooter}" ui:field="entityFooter">
                     </g:FlowPanel>
-                    <g:FlowPanel width="100%" height="38px"
-                      styleName="{res.style.docHeader}" ui:field="docHeader">
+                  </g:south>
+                </g:DockLayoutPanel>
+              </g:center>
+              <g:west size="200.0">
+                <g:DockLayoutPanel unit="PX"
+                  styleName="{res.style.entityTools}" ui:field="splitEast">
+                  <g:center>
+                    <g:FlowPanel ui:field="entityToolsContainer">
+                      <g:FlowPanel width="100%" ui:field="entityToolsNorth"
+                        styleName="{res.style.entityToolsNorth}"></g:FlowPanel>
+                      <g:FlowPanel width="100%" ui:field="entityToolsCenter"
+                        styleName="{res.style.entityToolsCenter}">
+                      </g:FlowPanel>
                     </g:FlowPanel>
-                    <g:HTMLPanel ui:field="arrow"
-                      styleName="{res.style.docSubheaderArrow}" />
-                    <g:FlowPanel width="100%" height="60px"
-                      styleName="{res.style.docSubheader}" ui:field="docSubheader">
-                    </g:FlowPanel>
-                  </g:VerticalPanel>
-                </g:north>
-                <g:center>
-                  <g:DockLayoutPanel unit="PX"
-                    styleName="{res.style.docEditorMargin}" ui:field="docContainerParent">
-                    <g:west size="10">
-                      <g:SimplePanel />
-                    </g:west>
-                    <g:east size="10">
-                      <g:SimplePanel />
-                    </g:east>
-                    <g:center>
-                      <g:ScrollPanel ui:field="centerScroll" styleName="{res.style.docEditor}">
-                        <g:FlowPanel width="auto" height="auto" styleName="{res.style.docEditorContainer}" ui:field="docContainer" />
-                      </g:ScrollPanel>
-                    </g:center>
-                    <g:south size="33.0">
-                      <g:VerticalPanel height="33px"
-                        width="100%" styleName="{res.style.docFooter}">
-                        <g:FlowPanel width="100%" height="33"
-                          ui:field="docFooter">
-                        </g:FlowPanel>
-                      </g:VerticalPanel>
-                    </g:south>
-                  </g:DockLayoutPanel>
-                </g:center>
-                <g:south size="36">
-                  <g:FlowPanel height="36px" width="100%"
-                    styleName="{res.style.entityFooter}" ui:field="entityFooter">
-                  </g:FlowPanel>
-                </g:south>
-              </g:DockLayoutPanel>
-            </g:center>
-            <g:west size="200.0">
-              <g:DockLayoutPanel unit="PX"
-                styleName="{res.style.entityTools}" ui:field="splitEast">
-                <g:center>
-                <g:FlowPanel ui:field="entityToolsContainer">
-                  <g:FlowPanel width="100%" ui:field="entityToolsNorth"
-                    styleName="{res.style.entityToolsNorth}"></g:FlowPanel>
-                  <g:FlowPanel width="100%"
-                    ui:field="entityToolsCenter" styleName="{res.style.entityToolsCenter}">
-                  </g:FlowPanel>
-                </g:FlowPanel>
-                </g:center>
-                <g:south size="98">
-                  <g:FlowPanel styleName="{res.style.entityToolsSouth}" ui:field="entityToolsSouth" width="100%" />
-                </g:south>
-              </g:DockLayoutPanel>
-            </g:west>
-          </g:SplitLayoutPanel>
+                  </g:center>
+                  <g:south size="98">
+                    <g:FlowPanel styleName="{res.style.entityToolsSouth}"
+                      ui:field="entityToolsSouth" width="100%"/>
+                  </g:south>
+                </g:DockLayoutPanel>
+              </g:west>
+            </g:SplitLayoutPanel>
+          </g:SimplePanel>
         </g:tab>
         <g:tab>
-          <g:header size='0' />
-          <g:SimplePanel ui:field="publicSpace" width="100%" styleName="k-space"
-            height="100%"></g:SimplePanel>
+          <g:header size='0'/>
+          <g:SimplePanel ui:field="publicSpace" width="100%"
+            styleName="k-space" height="100%"></g:SimplePanel>
         </g:tab>
       </g:TabLayoutPanel>
     </g:center>

Modified: trunk/src/main/java/cc/kune/gspace/client/resources/gSpaceArmor.css
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/resources/gSpaceArmor.css	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/gspace/client/resources/gSpaceArmor.css	2011-11-02 22:01:44 UTC (rev 1577)
@@ -13,10 +13,15 @@
 }
 
 .k-spaces {
-  margin: 5px 17px 7px 17px;
-  border-collapse: separate;
 }
 
+.k-group-space {
+  border-top: 7px solid transparent;
+  border-right: 20px solid transparent;
+  border-bottom: 7px solid transparent;
+  border-left: 20px solid transparent;
+}
+
 .k-space {
 
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManagerImpl.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManagerImpl.java	2011-10-26 22:18:14 UTC (rev 1576)
+++ trunk/src/main/java/cc/kune/gspace/client/style/GSpaceBackManagerImpl.java	2011-11-02 22:01:44 UTC (rev 1577)
@@ -22,6 +22,7 @@
 import javax.annotation.Nonnull;
 
 import cc.kune.core.client.services.FileDownloadUtils;
+import cc.kune.core.client.state.StateManager;
 import cc.kune.core.shared.domain.utils.StateToken;
 import cc.kune.gspace.client.GSpaceArmor;
 
@@ -33,11 +34,14 @@
   private final FileDownloadUtils downloadUtils;
   private final GSpaceArmor gSpaceArmor;
   private StateToken lastToken;
+  private final StateManager stateManager;
 
   @Inject
-  public GSpaceBackManagerImpl(final FileDownloadUtils downloadUtils, final GSpaceArmor gSpaceArmor) {
+  public GSpaceBackManagerImpl(final FileDownloadUtils downloadUtils, final GSpaceArmor gSpaceArmor,
+      final StateManager stateManager) {
     this.downloadUtils = downloadUtils;
     this.gSpaceArmor = gSpaceArmor;
+    this.stateManager = stateManager;
     lastToken = NO_TOKEN;
   }
 




More information about the kune-commits mailing list