[kune-commits] r1587 - in trunk: . src/main/java/cc/kune/blogs/client/actions src/main/java/cc/kune/docs/client/actions src/main/java/cc/kune/gspace/client/actions src/main/java/cc/kune/gspace/client/resources src/main/java/cc/kune/gspace/client/viewers src/main/java/cc/kune/lists/client/actions src/main/java/cc/kune/tasks/client/actions src/main/java/cc/kune/wiki/client/actions

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Mon Nov 7 01:11:06 CET 2011


Author: vjrj_
Date: 2011-11-07 01:11:05 +0100 (Mon, 07 Nov 2011)
New Revision: 1587

Added:
   trunk/src/main/java/cc/kune/docs/client/actions/NewFolderBtn.java
   trunk/src/main/java/cc/kune/wiki/client/actions/NewFolderMenuItem.java
Modified:
   trunk/TODO
   trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java
   trunk/src/main/java/cc/kune/blogs/client/actions/NewPostIconBtn.java
   trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java
   trunk/src/main/java/cc/kune/docs/client/actions/NewDocIconBtn.java
   trunk/src/main/java/cc/kune/gspace/client/actions/AbstractNewMenu.java
   trunk/src/main/java/cc/kune/gspace/client/resources/gSpaceArmor.css
   trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPresenter.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java
   trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java
   trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskIconBtn.java
   trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java
   trunk/src/main/java/cc/kune/wiki/client/actions/NewFolderBtn.java
   trunk/src/main/java/cc/kune/wiki/client/actions/NewWikiIconBtn.java
   trunk/src/main/java/cc/kune/wiki/client/actions/WikiClientActions.java
Log:
NEW - # 137: Adding 'New' Documents, Folders and Gadgets button to all pages 
http://kune.ourproject.org/issues/ticket/137

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/TODO	2011-11-07 00:11:05 UTC (rev 1587)
@@ -12,6 +12,12 @@
    nick == assigned to
 
 * SHORT-TERM (URGENT)
+** TODO multi uploader
+*** Some links
+http://code.google.com/p/gwt-plupload/
+http://www.plupload.com/example_all_runtimes.php
+http://gxt-multiupload-demo.appspot.com/
+http://code.google.com/p/gxt-multi-upload/
 ** TODO workaround websocket issues
 *** compatibilities
 | jetty M2              | new wesocket | socketio  |

Modified: trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/blogs/client/actions/BlogsClientActions.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -64,10 +64,10 @@
       final Provider<SetAsHomePageMenuItem> setAsHomePage) {
     super(session, stateManager, i18n, registry);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, optionsMenuContent, all);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, newPostIconBtn, noRoot);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, blogNewMenu, TYPE_BLOG);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, newPostItem, containersNoRoot);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, newPostIconBtn, noRoot);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, newBlogBtn, TYPE_ROOT);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, containers);

Modified: trunk/src/main/java/cc/kune/blogs/client/actions/NewPostIconBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/blogs/client/actions/NewPostIconBtn.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/blogs/client/actions/NewPostIconBtn.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -33,7 +33,7 @@
   @Inject
   public NewPostIconBtn(final I18nTranslationService i18n, final NewContentAction action,
       final NavResources res, final GlobalShortcutRegister shorcutReg) {
-    super(i18n, action, res.blogAdd(), shorcutReg, "", i18n.t("Create a new blog post"),
+    super(i18n, action, res.blogAdd(), shorcutReg, i18n.t("New post"), i18n.t("Create a new blog post"),
         i18n.t("New post"), BlogsConstants.TYPE_POST);
     withStyles("k-btn-min, k-fl");
   }

Modified: trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/docs/client/actions/DocsClientActions.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -54,7 +54,7 @@
       final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
       final Provider<GoParentFolderBtn> folderGoUp, final Provider<NewDocMenuItem> newDocMenuItem,
       final Provider<NewDocIconBtn> newDocIconBtn, final Provider<NewFolderMenuItem> newFolderMenuItem,
-      final Provider<OpenDocMenuItem> openContentMenuItem,
+      final Provider<OpenDocMenuItem> openContentMenuItem, final Provider<NewFolderBtn> newFolderBtn,
       final Provider<DelDocMenuItem> delContentMenuItem,
       final Provider<ContentViewerOptionsMenu> optionsMenuContent,
       final Provider<ParticipateInContentBtn> participateBtn,
@@ -64,10 +64,11 @@
       final NewMenusForTypeIdsRegistry newMenusRegistry, final DocsFolderNewMenu docsNewMenu) {
     super(session, stateManager, i18n, registry);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, optionsMenuContent, all);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, newDocIconBtn, all);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, newFolderBtn, containers);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, docsNewMenu, containers);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, newDocMenuItem, containers);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, newDocIconBtn, all);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, containers);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, participateBtn, contents);

Modified: trunk/src/main/java/cc/kune/docs/client/actions/NewDocIconBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/client/actions/NewDocIconBtn.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/docs/client/actions/NewDocIconBtn.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -33,7 +33,7 @@
   @Inject
   public NewDocIconBtn(final I18nTranslationService i18n, final NewContentAction action,
       final NavResources res, final GlobalShortcutRegister shorcutReg) {
-    super(i18n, action, res.pageAdd(), shorcutReg, "", i18n.t("Create a New Document. "
+    super(i18n, action, res.pageAdd(), shorcutReg, i18n.t("New doc"), i18n.t("Create a New Document. "
         + "If you choose to publish it, this document will appear as a new 'Page' in the public web"),
         i18n.t("New document"), DocsConstants.TYPE_DOCUMENT);
     withStyles("k-btn-min, k-fl");

Added: trunk/src/main/java/cc/kune/docs/client/actions/NewFolderBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/docs/client/actions/NewFolderBtn.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/docs/client/actions/NewFolderBtn.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -0,0 +1,38 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.docs.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.docs.shared.DocsConstants;
+import cc.kune.gspace.client.actions.NewContainerBtn;
+
+import com.google.inject.Inject;
+
+public class NewFolderBtn extends NewContainerBtn {
+
+  @Inject
+  public NewFolderBtn(final I18nTranslationService i18n, final NewContainerAction action,
+      final NavResources res) {
+    super(i18n, action, res.folderAdd(), i18n.t("New folder"), i18n.t("Create a new folder"),
+        i18n.t("New folder"), DocsConstants.TYPE_FOLDER);
+  }
+
+}

Modified: trunk/src/main/java/cc/kune/gspace/client/actions/AbstractNewMenu.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/actions/AbstractNewMenu.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/gspace/client/actions/AbstractNewMenu.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -35,7 +35,7 @@
       final AccessRightsClientManager rightsManager) {
     super();
     this.withIcon(res.addGreen()).withStyles("k-button, k-btn, k-5corners, k-def-docbtn, k-fl").withText(
-        "New");
+        "More");
 
     rightsManager.onRightsChanged(true, new AccessRightsChangedHandler() {
       @Override

Modified: trunk/src/main/java/cc/kune/gspace/client/resources/gSpaceArmor.css
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/resources/gSpaceArmor.css	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/gspace/client/resources/gSpaceArmor.css	2011-11-07 00:11:05 UTC (rev 1587)
@@ -184,7 +184,7 @@
   -webkit-border-bottom-right-radius: 7px;
   -moz-border-radius-bottomright: 7px;
   border-bottom-right-radius: 7px;
-  padding: 7px 7px 0 7px;
+  padding: 1px 7px 0 7px;
   overflow: hidden;
   border-collapse: separate;
 }

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/AbstractFolderViewerPanel.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -19,6 +19,7 @@
  */
 package cc.kune.gspace.client.viewers;
 
+import cc.kune.common.client.actions.ui.IsActionExtensible;
 import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
 import cc.kune.common.client.ui.HasEditHandler;
 import cc.kune.common.client.ui.UiUtils;
@@ -106,12 +107,6 @@
   }
 
   @Override
-  public void setActions(final GuiActionDescCollection actions) {
-    gsArmor.getSubheaderToolbar().clear();
-    gsArmor.getSubheaderToolbar().addAll(actions);
-  }
-
-  @Override
   public void setContainer(final StateContainerDTO state) {
     contentTitle.setTitle(state.getTitle(), state.getTypeId(), state.getContainerRights().isEditable()
         && capabilitiesRegistry.isRenamable(state.getTypeId()));
@@ -124,6 +119,21 @@
   }
 
   @Override
+  public void setFooterActions(final GuiActionDescCollection actions) {
+    setToolbarActions(actions, gsArmor.getDocFooterToolbar());
+  }
+
+  @Override
+  public void setSubheaderActions(final GuiActionDescCollection actions) {
+    setToolbarActions(actions, gsArmor.getSubheaderToolbar());
+  }
+
+  private void setToolbarActions(final GuiActionDescCollection actions, final IsActionExtensible toolbar) {
+    toolbar.clear();
+    toolbar.addAll(actions);
+  }
+
+  @Override
   public void showEmptyMsg(final String contentTypeId) {
     gsArmor.getDocContainer().add(emptyPanel);
     final String msg = capabilitiesRegistry.getEmptyMessagesRegistry().getContentTypeIcon(contentTypeId);

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPanel.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -30,6 +30,7 @@
 import org.waveprotocol.wave.model.waveref.WaveRef;
 import org.waveprotocol.wave.util.escapers.GwtWaverefEncoder;
 
+import cc.kune.common.client.actions.ui.IsActionExtensible;
 import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
 import cc.kune.common.client.errors.UIException;
 import cc.kune.common.client.ui.HasEditHandler;
@@ -166,12 +167,6 @@
   }
 
   @Override
-  public void setActions(final GuiActionDescCollection actions) {
-    gsArmor.getSubheaderToolbar().clear();
-    gsArmor.getSubheaderToolbar().addAll(actions);
-  }
-
-  @Override
   public void setContent(final StateContentDTO state) {
     final boolean editable = state.getContentRights().isEditable();
     gsArmor.enableCenterScroll(true);
@@ -223,12 +218,27 @@
     }
   }
 
+  @Override
+  public void setFooterActions(final GuiActionDescCollection actions) {
+    setToolbarActions(actions, gsArmor.getDocFooterToolbar());
+  }
+
+  @Override
+  public void setSubheaderActions(final GuiActionDescCollection actions) {
+    setToolbarActions(actions, gsArmor.getSubheaderToolbar());
+  }
+
   private void setTitle(final StateContentDTO state, final boolean editable) {
     contentTitle.setTitle(state.getTitle(), state.getTypeId(), state.getMimeType(), editable
         && capabilitiesRegistry.isRenamable(state.getTypeId()));
     Window.setTitle(state.getGroup().getLongName() + ": " + state.getTitle());
   }
 
+  private void setToolbarActions(final GuiActionDescCollection actions, final IsActionExtensible toolbar) {
+    toolbar.clear();
+    toolbar.addAll(actions);
+  }
+
   @Override
   public void signIn() {
     // Do nothing (now)

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPresenter.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/ContentViewerPresenter.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -75,14 +75,16 @@
 
     HasEditHandler getEditTitle();
 
-    void setActions(GuiActionDescCollection actions);
-
     void setContent(StateContentDTO state);
 
     void setEditableContent(StateContentDTO state);
 
     void setEditableTitle(String title);
 
+    void setFooterActions(GuiActionDescCollection actions);
+
+    void setSubheaderActions(GuiActionDescCollection actions);
+
     void signIn();
 
     void signOut();
@@ -202,7 +204,9 @@
     }
     final GuiActionDescCollection actions = actionsRegistry.getCurrentActions(stateContent.getGroup(),
         stateContent.getTypeId(), session.isLogged(), rights, ActionGroups.TOOLBAR);
-    pathToolbarUtils.createPath(stateContent.getContainer(), actions, true);
-    getView().setActions(actions);
+    final GuiActionDescCollection pathActions = pathToolbarUtils.createPath(stateContent.getContainer(),
+        true);
+    getView().setFooterActions(pathActions);
+    getView().setSubheaderActions(actions);
   }
 }
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -89,12 +89,14 @@
 
     void highlightTitle();
 
-    void setActions(GuiActionDescCollection actions);
-
     void setContainer(StateContainerDTO state);
 
     void setEditableTitle(String title);
 
+    void setFooterActions(GuiActionDescCollection actions);
+
+    void setSubheaderActions(GuiActionDescCollection actions);
+
     void showEmptyMsg(String contentTypeId);
   }
 
@@ -270,8 +272,9 @@
     final GuiActionDescCollection actions = actionsRegistry.getCurrentActions(stateContainer.getGroup(),
         stateContainer.getTypeId(), session.isLogged(), rights, ActionGroups.TOOLBAR);
     final ContainerDTO container = stateContainer.getContainer();
-    pathToolbarUtils.createPath(container, actions, true);
-    getView().setActions(actions);
+    final GuiActionDescCollection pathActions = pathToolbarUtils.createPath(container, true);
+    getView().setSubheaderActions(actions);
+    getView().setFooterActions(pathActions);
     createChildItems(container, stateContainer.getContainerRights());
   }
 }
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/PathToolbarUtils.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -18,10 +18,10 @@
 
 public class PathToolbarUtils {
 
-  protected static final String CSSBTN = "k-button, k-fr";
-  protected static final String CSSBTNC = "k-button, k-button-center, k-fr";
-  protected static final String CSSBTNL = "k-button, k-button-left, k-fr";
-  protected static final String CSSBTNR = "k-button, k-button-right, k-fr";
+  protected static final String CSSBTN = "k-button, k-fl";
+  protected static final String CSSBTNC = "k-button, k-button-center, k-fl";
+  protected static final String CSSBTNL = "k-button, k-button-left, k-fl";
+  protected static final String CSSBTNR = "k-button, k-button-right, k-fl";
 
   private final Provider<FolderViewerDropController> dropController;
   private final EventBus eventBus;
@@ -53,12 +53,14 @@
     return CSSBTNC;
   }
 
-  public void createPath(final ContainerDTO container, final GuiActionDescCollection actions,
-      final boolean withDrop) {
+  public GuiActionDescCollection createPath(final ContainerDTO container, final boolean withDrop) {
+    final GuiActionDescCollection actions = new GuiActionDescCollection();
     final ContainerSimpleDTO[] path = container.getAbsolutePath();
     final int pathLength = path.length;
     if (pathLength > 0) {
-      for (int i = pathLength - 1; i >= 0; i--) {
+      // This is we want to align to the right
+      // for (int i = pathLength - 1; i >= 0; i--) {
+      for (int i = 0; i < pathLength; i++) {
         final ButtonDescriptor btn = createPathButton(path[i], pathLength, i);
         if (withDrop) {
           if (i != pathLength - 1) {
@@ -70,6 +72,7 @@
         actions.add(btn);
       }
     }
+    return actions;
   }
 
   private ButtonDescriptor createPathButton(final ContainerSimpleDTO container, final int length,

Modified: trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/lists/client/actions/ListsClientActions.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -62,14 +62,15 @@
       final Provider<SetAsHomePageMenuItem> setAsHomePage) {
     super(session, stateManager, i18n, registry);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, optionsMenuContent, all);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, listNewMenu, containers);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, newPostIconBtn, noRoot);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, newListBtn, TYPE_ROOT);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, listNewMenu, containersNoRoot);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, subscribeBtn, containersNoRoot);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, listOpenessMenuItem, containersNoRoot);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, newPostItem, containersNoRoot);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, newPostIconBtn, noRoot);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, subscribeBtn, containersNoRoot);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, newListMenuItem, TYPE_ROOT);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, newListBtn, TYPE_ROOT);
+    // actionsRegistry.addAction(ActionGroups.TOOLBAR, newListMenuItem,
+    // TYPE_ROOT);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, containers);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, participateBtn, contents);

Modified: trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskIconBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskIconBtn.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/NewTaskIconBtn.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -33,8 +33,8 @@
   @Inject
   public NewTaskIconBtn(final I18nTranslationService i18n, final NewContentAction action,
       final NavResources res, final GlobalShortcutRegister shorcutReg) {
-    super(i18n, action, res.taskadd(), shorcutReg, "", i18n.t("Create a new task"), i18n.t("New task"),
-        TasksConstants.TYPE_TASK);
+    super(i18n, action, res.taskadd(), shorcutReg, i18n.t("New task"), i18n.t("Create a new task"),
+        i18n.t("New task"), TasksConstants.TYPE_TASK);
     withStyles("k-btn-min, k-fl");
   }
 

Modified: trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/tasks/client/actions/TasksClientActions.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -65,10 +65,10 @@
       final Provider<SetAsHomePageMenuItem> setAsHomePage) {
     super(session, stateManager, i18n, registry);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, optionsMenuContent, all);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, newTaskIconBtn, all);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, taskNewMenu, containers);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, newTaskItem, containers);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, newTaskIconBtn, all);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, newFolderMenuItem, containers);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, containers);

Modified: trunk/src/main/java/cc/kune/wiki/client/actions/NewFolderBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/wiki/client/actions/NewFolderBtn.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/wiki/client/actions/NewFolderBtn.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -21,19 +21,18 @@
 
 import cc.kune.core.client.resources.nav.NavResources;
 import cc.kune.core.shared.i18n.I18nTranslationService;
-import cc.kune.gspace.client.actions.NewContainerMenuItem;
+import cc.kune.gspace.client.actions.NewContainerBtn;
 import cc.kune.wiki.shared.WikiConstants;
 
 import com.google.inject.Inject;
 
-public class NewFolderBtn extends NewContainerMenuItem {
+public class NewFolderBtn extends NewContainerBtn {
 
   @Inject
   public NewFolderBtn(final I18nTranslationService i18n, final NewContainerAction action,
-      final NavResources res, final WikiFolderNewMenu wikiFolderNewMenu) {
+      final NavResources res) {
     super(i18n, action, res.wikiAdd(), i18n.t("New folder"),
         i18n.t("Create a new folder. A folder will be a 'section' in the public web"),
-        i18n.t("New folder"), WikiConstants.TYPE_FOLDER, wikiFolderNewMenu.get());
+        i18n.t("New folder"), WikiConstants.TYPE_FOLDER);
   }
-
 }

Copied: trunk/src/main/java/cc/kune/wiki/client/actions/NewFolderMenuItem.java (from rev 1556, trunk/src/main/java/cc/kune/wiki/client/actions/NewFolderBtn.java)
===================================================================
--- trunk/src/main/java/cc/kune/wiki/client/actions/NewFolderMenuItem.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/wiki/client/actions/NewFolderMenuItem.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -0,0 +1,39 @@
+/*
+ *
+ * Copyright (C) 2007-2011 The kune development team (see CREDITS for details)
+ * This file is part of kune.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+package cc.kune.wiki.client.actions;
+
+import cc.kune.core.client.resources.nav.NavResources;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+import cc.kune.gspace.client.actions.NewContainerMenuItem;
+import cc.kune.wiki.shared.WikiConstants;
+
+import com.google.inject.Inject;
+
+public class NewFolderMenuItem extends NewContainerMenuItem {
+
+  @Inject
+  public NewFolderMenuItem(final I18nTranslationService i18n, final NewContainerAction action,
+      final NavResources res, final WikiFolderNewMenu wikiFolderNewMenu) {
+    super(i18n, action, res.wikiAdd(), i18n.t("New folder"),
+        i18n.t("Create a new folder. A folder will be a 'section' in the public web"),
+        i18n.t("New folder"), WikiConstants.TYPE_FOLDER, wikiFolderNewMenu.get());
+  }
+
+}

Modified: trunk/src/main/java/cc/kune/wiki/client/actions/NewWikiIconBtn.java
===================================================================
--- trunk/src/main/java/cc/kune/wiki/client/actions/NewWikiIconBtn.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/wiki/client/actions/NewWikiIconBtn.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -33,8 +33,14 @@
   @Inject
   public NewWikiIconBtn(final I18nTranslationService i18n, final NewContentAction action,
       final NavResources res, final GlobalShortcutRegister shorcutReg) {
-    super(i18n, action, res.wikipageAdd(), shorcutReg, "", i18n.t("Create a New Wikipage here. "
-        + "If you choose to publish it, this document will appear as a new 'Page' in the public web"),
+    super(
+        i18n,
+        action,
+        res.wikipageAdd(),
+        shorcutReg,
+        i18n.t("New wikipage"),
+        i18n.t("Create a New Wikipage here. "
+            + "If you choose to publish it, this document will appear as a new 'Page' in the public web"),
         i18n.t("New wikipage"), WikiConstants.TYPE_WIKIPAGE);
     withStyles("k-btn-min, k-fl");
   }

Modified: trunk/src/main/java/cc/kune/wiki/client/actions/WikiClientActions.java
===================================================================
--- trunk/src/main/java/cc/kune/wiki/client/actions/WikiClientActions.java	2011-11-05 22:01:51 UTC (rev 1586)
+++ trunk/src/main/java/cc/kune/wiki/client/actions/WikiClientActions.java	2011-11-07 00:11:05 UTC (rev 1587)
@@ -51,22 +51,24 @@
   public WikiClientActions(final I18nUITranslationService i18n, final Session session,
       final StateManager stateManager, final ActionRegistryByType registry, final CoreResources res,
       final Provider<GoParentFolderBtn> folderGoUp, final Provider<NewWikiMenuItem> newWikiMenuItem,
-      final Provider<NewWikiIconBtn> newWikiIconBtn, final Provider<NewFolderBtn> newFolderBtn,
+      final Provider<NewWikiIconBtn> newWikiIconBtn,
+      final Provider<NewFolderMenuItem> newFolderMenuItem,
       final Provider<OpenWikiMenuItem> openContentMenuItem,
       final Provider<DelWikiMenuItem> delContentMenuItem,
       final Provider<ContentViewerOptionsMenu> optionsMenuContent,
       final Provider<ParticipateInContentBtn> participateBtn,
-      final Provider<DelFolderMenuItem> delFolderMenuItem,
+      final Provider<DelFolderMenuItem> delFolderMenuItem, final Provider<NewFolderBtn> newFolderBtn,
       final Provider<ChatAboutContentBtn> chatAbout, final Provider<RefreshContentMenuItem> refresh,
       final Provider<SetAsHomePageMenuItem> setAsHomePage,
       final NewMenusForTypeIdsRegistry newMenusRegistry, final WikiFolderNewMenu folderNewMenu) {
     super(session, stateManager, i18n, registry);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, optionsMenuContent, all);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, folderNewMenu, containers);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, refresh, all);
-    actionsRegistry.addAction(ActionGroups.TOOLBAR, newWikiMenuItem, containers);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, newWikiIconBtn, all);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, newFolderBtn, containers);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, folderNewMenu, containers);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, newWikiMenuItem, containers);
+    actionsRegistry.addAction(ActionGroups.TOOLBAR, newFolderMenuItem, containers);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, contents);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, folderGoUp, containers);
     actionsRegistry.addAction(ActionGroups.TOOLBAR, participateBtn, contents);




More information about the kune-commits mailing list