[kune-commits] r1387 - in trunk/src/main/java/cc/kune: barters/client/actions core/client/auth core/client/state core/server/state gspace/client/options wave/client wiki/client/actions

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Fri May 13 17:23:18 CEST 2011


Author: vjrj_
Date: 2011-05-13 17:23:17 +0200 (Fri, 13 May 2011)
New Revision: 1387

Modified:
   trunk/src/main/java/cc/kune/barters/client/actions/BartersClientActions.java
   trunk/src/main/java/cc/kune/barters/client/actions/NewFolderBtn.java
   trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java
   trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java
   trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
   trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java
   trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java
   trunk/src/main/java/cc/kune/wave/client/WebClient.java
   trunk/src/main/java/cc/kune/wiki/client/actions/WikiClientActions.java
Log:
Some minor fixes

Modified: trunk/src/main/java/cc/kune/barters/client/actions/BartersClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/barters/client/actions/BartersClientActions.java	2011-05-13 10:56:37 UTC (rev 1386)
+++ trunk/src/main/java/cc/kune/barters/client/actions/BartersClientActions.java	2011-05-13 15:23:17 UTC (rev 1387)
@@ -27,8 +27,6 @@
 import cc.kune.core.client.resources.CoreResources;
 import cc.kune.core.client.state.Session;
 import cc.kune.core.client.state.StateManager;
-import cc.kune.docs.client.actions.DelFolderMenuItem;
-import cc.kune.docs.client.actions.NewFolderBtn;
 import cc.kune.gspace.client.actions.AbstractFoldableToolActions;
 import cc.kune.gspace.client.actions.ActionGroups;
 import cc.kune.gspace.client.actions.ContentViewerOptionsMenu;

Modified: trunk/src/main/java/cc/kune/barters/client/actions/NewFolderBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/barters/client/actions/NewFolderBtn.java	2011-05-13 10:56:37 UTC (rev 1386)
+++ trunk/src/main/java/cc/kune/barters/client/actions/NewFolderBtn.java	2011-05-13 15:23:17 UTC (rev 1387)
@@ -31,7 +31,7 @@
   @Inject
   public NewFolderBtn(final I18nTranslationService i18n, final NewContainerAction action,
       final NavResources res) {
-    super(i18n, action, res.barterAdd(), i18n.t("New folder"), i18n.t("Create a new folder here"),
+    super(i18n, action, res.folderAdd(), i18n.t("New folder"), i18n.t("Create a new folder here"),
         i18n.t("New folder"), BartersConstants.TYPE_FOLDER);
   }
 

Modified: trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java	2011-05-13 10:56:37 UTC (rev 1386)
+++ trunk/src/main/java/cc/kune/core/client/auth/SignInAbstractPresenter.java	2011-05-13 15:23:17 UTC (rev 1387)
@@ -32,64 +32,64 @@
 import com.gwtplatform.mvp.client.proxy.Proxy;
 
 public abstract class SignInAbstractPresenter<V extends View, Proxy_ extends Proxy<?>> extends
-        Presenter<View, Proxy<?>> {
+    Presenter<View, Proxy<?>> {
 
-    protected final UserPassAutocompleteManager autocomplete;
-    protected final CookiesManager cookiesManager;
-    protected final I18nUITranslationService i18n;
-    protected final Session session;
-    protected final StateManager stateManager;
+  protected final UserPassAutocompleteManager autocomplete;
+  protected final CookiesManager cookiesManager;
+  protected final I18nUITranslationService i18n;
+  protected final Session session;
+  protected final StateManager stateManager;
 
-    public SignInAbstractPresenter(final EventBus eventBus, final View view, final Proxy<?> proxy,
-            final Session session, final StateManager stateManager, final I18nUITranslationService i18n,
-            final CookiesManager cookiesManager, final UserPassAutocompleteManager autocomplete) {
-        super(eventBus, view, proxy);
-        this.session = session;
-        this.stateManager = stateManager;
-        this.i18n = i18n;
-        this.cookiesManager = cookiesManager;
-        this.autocomplete = autocomplete;
-    }
+  public SignInAbstractPresenter(final EventBus eventBus, final View view, final Proxy<?> proxy,
+      final Session session, final StateManager stateManager, final I18nUITranslationService i18n,
+      final CookiesManager cookiesManager, final UserPassAutocompleteManager autocomplete) {
+    super(eventBus, view, proxy);
+    this.session = session;
+    this.stateManager = stateManager;
+    this.i18n = i18n;
+    this.cookiesManager = cookiesManager;
+    this.autocomplete = autocomplete;
+  }
 
-    @Override
-    public SignInAbstractView getView() {
-        return (SignInAbstractView) super.getView();
-    }
+  @Override
+  public SignInAbstractView getView() {
+    return (SignInAbstractView) super.getView();
+  }
 
-    public void hide() {
-        getView().hide();
-    }
+  public void hide() {
+    getView().hide();
+  }
 
-    public void onCancel() {
-        getView().reset();
-        getView().hideMessages();
-        getView().hide();
-    }
+  public void onCancel() {
+    getView().reset();
+    getView().hideMessages();
+    getView().hide();
+  }
 
-    public void onClose() {
-        getView().reset();
-        getView().hideMessages();
-        if (!session.isLogged()) {
-            stateManager.redirectOrRestorePreviousToken();
-        }
+  public void onClose() {
+    getView().reset();
+    getView().hideMessages();
+    if (!session.isLogged()) {
+      stateManager.redirectOrRestorePreviousToken();
     }
+  }
 
-    protected void onSignIn(final UserInfoDTO userInfoDTO) {
-        final String userHash = userInfoDTO.getUserHash();
-        cookiesManager.setCookie(userHash);
-        getView().reset();
-        session.setUserHash(userHash);
-        session.setCurrentUserInfo(userInfoDTO);
-        final I18nLanguageDTO language = userInfoDTO.getLanguage();
-        i18n.changeCurrentLanguage(language.getCode());
-        session.setCurrentLanguage(language);
-        stateManager.redirectOrRestorePreviousToken();
-    }
+  protected void onSignIn(final UserInfoDTO userInfoDTO) {
+    final String userHash = userInfoDTO.getUserHash();
+    cookiesManager.setCookie(userHash);
+    getView().reset();
+    session.setUserHash(userHash);
+    session.setCurrentUserInfo(userInfoDTO);
+    final I18nLanguageDTO language = userInfoDTO.getLanguage();
+    i18n.changeCurrentLanguage(language.getCode());
+    session.setCurrentLanguage(language);
+    stateManager.redirectOrRestorePreviousToken();
+  }
 
-    protected void saveAutocompleteLoginData(final String nickOrEmail, final String password) {
-        autocomplete.setNickOrEmail(nickOrEmail);
-        autocomplete.setPassword(password);
-        autocomplete.clickFormLogin();
-    }
+  protected void saveAutocompleteLoginData(final String nickOrEmail, final String password) {
+    autocomplete.setNickOrEmail(nickOrEmail);
+    autocomplete.setPassword(password);
+    autocomplete.clickFormLogin();
+  }
 
 }

Modified: trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java	2011-05-13 10:56:37 UTC (rev 1386)
+++ trunk/src/main/java/cc/kune/core/client/state/ContentCacheDefault.java	2011-05-13 15:23:17 UTC (rev 1387)
@@ -32,48 +32,50 @@
 import com.google.inject.Inject;
 
 public class ContentCacheDefault implements ContentCache {
-    private final Map<StateToken, StateAbstractDTO> cacheMap;
-    private final EventBus eventBus;
-    private final ContentServiceAsync server;
-    private final boolean useCache;
+  private final Map<StateToken, StateAbstractDTO> cacheMap;
+  private final EventBus eventBus;
+  private final ContentServiceAsync server;
+  private final boolean useCache;
 
-    @Inject
-    public ContentCacheDefault(final ContentServiceAsync server, final EventBus eventBus) {
-        this.server = server;
-        this.eventBus = eventBus;
-        this.cacheMap = new HashMap<StateToken, StateAbstractDTO>();
-        // Don't use while we don't check changes in the server
-        useCache = false;
-    }
+  @Inject
+  public ContentCacheDefault(final ContentServiceAsync server, final EventBus eventBus) {
+    this.server = server;
+    this.eventBus = eventBus;
+    this.cacheMap = new HashMap<StateToken, StateAbstractDTO>();
+    // Don't use while we don't check changes in the server
+    useCache = false;
+  }
 
-    @Override
-    public void cache(final StateToken encodeState, final StateAbstractDTO content) {
-        assert encodeState != null;
-        if (useCache) {
-            cacheMap.put(encodeState, content);
-        }
+  @Override
+  public void cache(final StateToken encodeState, final StateAbstractDTO content) {
+    assert encodeState != null;
+    if (useCache) {
+      cacheMap.put(encodeState, content);
     }
+  }
 
-    private StateAbstractDTO getCached(final StateToken newState) {
-        assert newState != null;
-        return useCache ? cacheMap.get(newState) : null;
-    }
+  private StateAbstractDTO getCached(final StateToken newState) {
+    assert newState != null;
+    return useCache ? cacheMap.get(newState) : null;
+  }
 
-    @Override
-    public void getContent(final String user, final StateToken newState, final AsyncCallback<StateAbstractDTO> callback) {
-        assert newState != null;
-        eventBus.fireEvent(new ProgressShowEvent(""));
-        final StateAbstractDTO catched = getCached(newState);
-        if (catched != null) {
-            callback.onSuccess(catched);
-        } else {
-            server.getContent(user, newState, callback);
-        }
+  @Override
+  public void getContent(final String user, final StateToken newState,
+      final AsyncCallback<StateAbstractDTO> callback) {
+    assert newState != null;
+    eventBus.fireEvent(new ProgressShowEvent(""));
+    final StateAbstractDTO catched = getCached(newState);
+    if (catched != null) {
+      callback.onSuccess(catched);
+    } else {
+      // NotifyUser.info("Getting state of: " + newState, true);
+      server.getContent(user, newState, callback);
     }
+  }
 
-    @Override
-    public void removeContent(final StateToken token) {
-        cacheMap.remove(token);
-    }
+  @Override
+  public void removeContent(final StateToken token) {
+    cacheMap.remove(token);
+  }
 
 }

Modified: trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java	2011-05-13 10:56:37 UTC (rev 1386)
+++ trunk/src/main/java/cc/kune/core/client/state/StateManagerDefault.java	2011-05-13 15:23:17 UTC (rev 1387)
@@ -84,7 +84,7 @@
         session.onUserSignIn(false, new UserSignInEvent.UserSignInHandler() {
           @Override
           public void onUserSignIn(final UserSignInEvent event) {
-            refreshCurrentGroupState();
+            // refreshCurrentGroupState();
           }
         });
         session.onUserSignOut(false, new UserSignOutEvent.UserSignOutHandler() {
@@ -323,7 +323,7 @@
         // signin(inbox) && cancel
         restorePreviousToken();
       } else {
-        history.newItem(previousToken);
+        history.newItem(previousToken); // FIXMEKK
       }
     } else {
       // No redirect then restore previous token

Modified: trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java	2011-05-13 10:56:37 UTC (rev 1386)
+++ trunk/src/main/java/cc/kune/core/server/state/StateServiceDefault.java	2011-05-13 15:23:17 UTC (rev 1387)
@@ -165,7 +165,7 @@
     state.setContainer(container);
     state.setContainerRights(rightsService.get(userLogged, container.getAccessLists()));
     state.setEnabledTools(groupManager.findEnabledTools(group.getId()));
-    state.setTagCloudResult(tagManager.getTagCloudResultByGroup(group));
+    // state.setTagCloudResult(tagManager.getTagCloudResultByGroup(group));
     setSocialNetwork(state, userLogged, group);
   }
 

Modified: trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java	2011-05-13 10:56:37 UTC (rev 1386)
+++ trunk/src/main/java/cc/kune/gspace/client/options/GroupOptionsPresenter.java	2011-05-13 15:23:17 UTC (rev 1387)
@@ -60,7 +60,9 @@
     // groupPrefsAction.putValue(Action.NAME, i18n.t("Group options"));
     groupPrefsAction.putValue(Action.SMALL_ICON, img.prefs());
     prefsItem = new ButtonDescriptor(groupPrefsAction);
-    prefsItem.withStyles("k-ent-header-btn, k-noborder, k-nobackcolor, k-btn-min");
+    prefsItem.withStyles("k-ent-header-btn, k-btn-min"); // , k-noborder,
+                                                         // k-nobackcolor,
+                                                         // k-btn-min");
     prefsItem.setId(GROUP_OPTIONS_ICON);
     prefsItem.setVisible(false);
     view.addAction(prefsItem);

Modified: trunk/src/main/java/cc/kune/wave/client/WebClient.java
===================================================================
--- trunk/src/main/java/cc/kune/wave/client/WebClient.java	2011-05-13 10:56:37 UTC (rev 1386)
+++ trunk/src/main/java/cc/kune/wave/client/WebClient.java	2011-05-13 15:23:17 UTC (rev 1387)
@@ -285,7 +285,7 @@
 
     setupUi();
 
-    History.fireCurrentHistoryState();
+   //  History.fireCurrentHistoryState();
     LOG.info("SimpleWebClient.onModuleLoad() done");
   }
 

Modified: trunk/src/main/java/cc/kune/wiki/client/actions/WikiClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/wiki/client/actions/WikiClientActions.java	2011-05-13 10:56:37 UTC (rev 1386)
+++ trunk/src/main/java/cc/kune/wiki/client/actions/WikiClientActions.java	2011-05-13 15:23:17 UTC (rev 1387)
@@ -28,8 +28,6 @@
 import cc.kune.core.client.resources.CoreResources;
 import cc.kune.core.client.state.Session;
 import cc.kune.core.client.state.StateManager;
-import cc.kune.docs.client.actions.DelFolderMenuItem;
-import cc.kune.docs.client.actions.NewFolderBtn;
 import cc.kune.gspace.client.actions.AbstractFoldableToolActions;
 import cc.kune.gspace.client.actions.ActionGroups;
 import cc.kune.gspace.client.actions.ContentViewerOptionsMenu;




More information about the kune-commits mailing list