[kune-commits] r1598 - in trunk: . src/main/java/cc/kune/chat/client src/main/java/cc/kune/chat/client/actions src/main/java/cc/kune/core/client src/main/java/cc/kune/core/client/i18n src/main/java/cc/kune/core/client/sitebar/search src/main/java/cc/kune/core/client/sn/actions src/main/java/cc/kune/core/client/sn/actions/registry src/main/java/cc/kune/core/server/manager/impl src/main/java/cc/kune/core/shared src/main/java/cc/kune/gspace/client/viewers src/main/java/cc/kune/wiki/client

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Thu Nov 10 02:10:29 CET 2011


Author: vjrj_
Date: 2011-11-10 02:10:27 +0100 (Thu, 10 Nov 2011)
New Revision: 1598

Added:
   trunk/src/main/java/cc/kune/core/client/sitebar/search/EntitySearchPanel.java
   trunk/src/main/java/cc/kune/core/client/sitebar/search/OnEntitySelectedInSearch.java
   trunk/src/main/java/cc/kune/core/client/sitebar/search/OnExactMatch.java
   trunk/src/main/java/cc/kune/core/client/sitebar/search/SearchBoxFactory.java
   trunk/src/main/java/cc/kune/core/client/sn/actions/AddBuddieSearchPanel.java
   trunk/src/main/java/cc/kune/core/client/sn/actions/AddEntityToThisGroupAction.java
   trunk/src/main/java/cc/kune/core/client/sn/actions/AddMemberSearchPanel.java
Modified:
   trunk/
   trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java
   trunk/src/main/java/cc/kune/chat/client/actions/StartAssemblyWithMembersAction.java
   trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
   trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java
   trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties
   trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties
   trunk/src/main/java/cc/kune/core/client/sitebar/search/MultivalueSuggestBox.java
   trunk/src/main/java/cc/kune/core/client/sitebar/search/SitebarSearchPanel.java
   trunk/src/main/java/cc/kune/core/client/sn/actions/AddNewBuddiesAction.java
   trunk/src/main/java/cc/kune/core/client/sn/actions/UnJoinFromThisGroupAction.java
   trunk/src/main/java/cc/kune/core/client/sn/actions/registry/GroupSNConfActions.java
   trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java
   trunk/src/main/java/cc/kune/core/shared/SearcherConstants.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java
   trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java
   trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java
Log:
CLOSED - # 114: Explain properly the tools 
http://kune.ourproject.org/issues/ticket/114
CLOSED - # 89: Include a way to invite/add someone to a group (again) 
http://kune.ourproject.org/issues/ticket/89


Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
   - pmd-eclipse.log
.pmd
www-test
screenlog.0
client
public
target
target-local
Main-compile
.settings
.gwt-cache
repository
derby.log
star-yellow-grey.png
run.sh
tomcat
gwt-out
synccss.sh
.externalToolBuilders
.wtpmodules
www
testRepository
kune-OLD-jcr
KuneApp.launch
KuneApp NOSERVER.launch
old_src
org.ourproject.kune.app.Kune
org.ourproject.kune.iml
org.ourproject.kune.ipr
org.ourproject.kune.iws
nbproject
hibernate.reveng.xml
.gwt-tmp
target-eclipse
.checkstyle
.classpath-bien
pom.xml.*
.gwt
.jdee_sources
.jdee_classpath
prj.el
.factorypath
.apt_generated
target.old
_accounts
_certificates
_deltas
logs
test-output
.recommenders
_sessions
chromedriver.log

   + pmd-eclipse.log
.pmd
www-test
screenlog.0
client
public
target
target-local
Main-compile
.settings
.gwt-cache
repository
derby.log
star-yellow-grey.png
run.sh
tomcat
gwt-out
synccss.sh
.externalToolBuilders
.wtpmodules
www
testRepository
kune-OLD-jcr
KuneApp.launch
KuneApp NOSERVER.launch
old_src
org.ourproject.kune.app.Kune
org.ourproject.kune.iml
org.ourproject.kune.ipr
org.ourproject.kune.iws
nbproject
hibernate.reveng.xml
.gwt-tmp
target-eclipse
.checkstyle
.classpath-bien
pom.xml.*
.gwt
.jdee_sources
.jdee_classpath
prj.el
.factorypath
.apt_generated
target.old
_accounts
_certificates
_deltas
logs
test-output
.recommenders
_sessions
chromedriver.log
kune-screencast*


Modified: trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/chat/client/ChatClientTool.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -23,9 +23,9 @@
 import static cc.kune.chat.shared.ChatConstants.TYPE_ROOM;
 import cc.kune.chat.client.resources.ChatResources;
 import cc.kune.common.client.utils.TextUtils;
+import cc.kune.core.client.i18n.I18nUITranslationService;
 import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
 import cc.kune.core.client.resources.nav.NavResources;
-import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
 import cc.kune.gspace.client.tool.selector.ToolSelector;
 
@@ -36,15 +36,16 @@
   private final ChatResources res;
 
   @Inject
-  public ChatClientTool(final I18nTranslationService i18n, final ToolSelector toolSelector,
+  public ChatClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
       final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources,
       final ChatResources res) {
     // FIXME: change this in ChatConstants and in db via migration
     super(
         NAME,
         i18n.t("chatrooms"),
-        i18n.t("A 'room' where you can have a group-chat with many users at once. Rooms can be public or private. Users can be from this site or other sites (compatible with gmail chat)"),
-        toolSelector, cntCapRegistry, i18n, navResources);
+        i18n.t(
+            "A 'room' where you can have a group-chat with many users at once. Rooms can be public or private. Users can be from [%s] or other sites (compatible with gmail chat)",
+            i18n.getSiteCommonName()), toolSelector, cntCapRegistry, i18n, navResources);
     this.res = res;
     registerIcons();
   }

Modified: trunk/src/main/java/cc/kune/chat/client/actions/StartAssemblyWithMembersAction.java
===================================================================
--- trunk/src/main/java/cc/kune/chat/client/actions/StartAssemblyWithMembersAction.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/chat/client/actions/StartAssemblyWithMembersAction.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -36,7 +36,8 @@
   @Override
   public void actionPerformed(final ActionEvent event) {
     NotifyUser.askConfirmation(i18n.t("Please confirm"),
-        i18n.t("Start a collaborative document for the meeting minutes?"), new SimpleResponseCallback() {
+        i18n.t("Do you want to collaboratively edit your meeting minutes in a new document?"),
+        new SimpleResponseCallback() {
           @Override
           public void onCancel() {
           }
@@ -49,7 +50,7 @@
                 false,
                 i18n.t("Meeting minutes of [%s] on [%s]", session.getCurrentGroupShortName(),
                     DateTimeFormat.getFormat(PredefinedFormat.DATE_LONG).format(new Date())),
-                i18n.t("You can collaboratively edit this document with the meeting minutes."),
+                i18n.t("You can collaboratively edit the meeting minutes, shown in this document."),
                 new AsyncCallbackSimple<String>() {
                   @Override
                   public void onSuccess(final String url) {

Modified: trunk/src/main/java/cc/kune/core/client/CoreGinModule.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/CoreGinModule.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/client/CoreGinModule.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -84,6 +84,8 @@
 import cc.kune.core.client.sn.GroupSNPresenter;
 import cc.kune.core.client.sn.UserSNPanel;
 import cc.kune.core.client.sn.UserSNPresenter;
+import cc.kune.core.client.sn.actions.AddBuddieSearchPanel;
+import cc.kune.core.client.sn.actions.AddMemberSearchPanel;
 import cc.kune.core.client.sn.actions.registry.GroupSNAdminsMenuItemsRegistry;
 import cc.kune.core.client.sn.actions.registry.GroupSNCollabsMenuItemsRegistry;
 import cc.kune.core.client.sn.actions.registry.GroupSNConfActions;
@@ -177,8 +179,8 @@
         RegisterPresenter.RegisterProxy.class);
     bindPresenter(UserConfirmPresenter.class, UserConfirmPresenter.UserConfirmView.class,
         UserConfirmPanel.class, UserConfirmPresenter.UserConfirmProxy.class);
-    bindPresenter(SubtitlesManager.class, SubtitlesManager.SubtitlesView.class,
-        SubtitlesWidget.class, SubtitlesManager.SubtitlesProxy.class);
+    bindPresenter(SubtitlesManager.class, SubtitlesManager.SubtitlesView.class, SubtitlesWidget.class,
+        SubtitlesManager.SubtitlesProxy.class);
 
     bind(UserPassAutocompleteManager.class).to(UserPassAutocompleteManagerImpl.class).in(Singleton.class);
     bind(SignIn.class).to(SignInPresenter.class).in(Singleton.class);
@@ -225,6 +227,8 @@
     s(UserSNMenuItemsRegistry.class);
     s(GroupSNConfActions.class);
     s(UserSNConfActions.class);
+    s(AddBuddieSearchPanel.class);
+    s(AddMemberSearchPanel.class);
 
     s(SiteUserOptionsPresenter.class);
     s(SiteUserOptions.class, SiteUserOptionsPresenter.class);

Modified: trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -1,8 +1,5 @@
 package cc.kune.core.client.i18n;
 
-/**
- * Autogenerated by trunk/bin/i18n-db2gwt.sh, please not edit directly
- */
 import com.google.gwt.i18n.client.ConstantsWithLookup;
 
 /**
@@ -15,10 +12,14 @@
 
   String aboutParam();
 
+  String aCalendarToScheduleActivitiesAndEvents();
+
   String acceptThisMember();
 
   String aClosedGroupIsAPrivateProjectWhichContentsAreOnlyAccessibleToItsMembersByDefault();
 
+  String aCollaborativeToDoListForTheGroupAnyGroupMemberCanParticipateInAnyProposedTaskAddOthersToATaskCommen();
+
   String aCommunityIsAGroupOfUsersWithSharedInterestsForInstanceTheEnvironmentalCommunityOrTheLgbtCommunityIt();
 
   String aContentWithTheSameNameAlreadyExistPleaseRenameIt();
@@ -31,6 +32,8 @@
 
   String addGadget();
 
+  String aDecentralizedWayToOfferOrAskForServicesAndGoodsToYourGroupsOrToAnyoneBarteringMeansTheExchangeOfGoo();
+
   String administrators();
 
   String allowAnyUsesOfYourWorkIncludingCommercial();
@@ -57,6 +60,8 @@
 
   String areYouSureYouWantThisItWillBeDeletedWithAllItsContents();
 
+  String aRoomWhereYouCanHaveAGroupChatWithManyUsersAtOnceRoomsCanBePublicOrPrivateUsersCanBeFromParamOrOther();
+
   String aShortTermTaskSample();
 
   String autoAcceptRequestToJoin();
@@ -79,6 +84,8 @@
 
   String blogSample();
 
+  String blogsAreAChronologicalListOfPostsOrderedByDateAboutASpecificTopicEachPostCanBeCommentedByTheVisitors();
+
   String blueAThemeName();
 
   String buddies();
@@ -237,6 +244,8 @@
 
   String error();
 
+  String errorSettingTheLogo();
+
   String errorsInfo();
 
   String eurosurAThemeName();
@@ -275,6 +284,8 @@
 
   String helpWithTheTranslation();
 
+  String hereYouCanCreateOrUploadYourPersonalGroupOrPublicDocumentsTheseDocumentsCanBeEditedAndCommentedColla();
+
   String hereYouCanSelectTheToolsUsed();
 
   String highcontrastAThemeName();
@@ -311,6 +322,8 @@
 
   String lists();
 
+  String listsBehaveLikeAMailingListOrAForumYouCanSubscribeAndDiscussAboutSpecificTopics();
+
   String loading();
 
   String longName();
@@ -323,6 +336,8 @@
 
   String markAsDone();
 
+  String markAsNotDone();
+
   String media();
 
   String meetingMinutesOfParamOnParam();
@@ -345,6 +360,8 @@
 
   String moderateRequestToJoin();
 
+  String more();
+
   String moving();
 
   String name();
@@ -429,6 +446,8 @@
 
   String onlyAdministrators();
 
+  String onlyForAuthorizedTranslators();
+
   String onlyMembers();
 
   String onlyToAuthorizedTranslators();
@@ -683,6 +702,8 @@
 
   String thisUserHasNotWrittenItsBiographyYet();
 
+  String thisUserIsAlreadyAGroupMember();
+
   String thisUserSBuddies();
 
   String thisUserSGroupsAndBuddies();
@@ -761,6 +782,8 @@
 
   String wikiPageSample();
 
+  String wikiPagesAreDocumentsThatCanBeEditedByAnyVisitorInParamInsteadOfOnlyByTheGroupThisAcceleratesUpdatin();
+
   String withACreativeCommonsLicenseYouKeepYourCopyrightButAllowPeopleToCopyAndDistributeYourWorkProvidedThey();
 
   String writeToTheAdministratorsOfThisGroup();
@@ -787,6 +810,8 @@
 
   String youCannotDisableThisToolBecauseItSWhereYourHomePageIsLocatedToDoThatYouHaveToSelectOtherContentAsThe();
 
+  String youDidNotSignInSoYouCanJustSeeSomePublicContentsInParamButNotEditOrCollaborateWithOthersPleaseParamO();
+
   String yourGroups();
 
   String yourHomepage();

Modified: trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants.properties	2011-11-10 01:10:27 UTC (rev 1598)
@@ -396,4 +396,18 @@
 addGadget = Add Gadget
 theSocialNetworkOfThisUserIsNotPublic = The social network of this user is not public
 newDoc = New doc
-clickToGoHereOrDropContentsHereToMoveThem = Click to go here or drop contents here to move them
\ No newline at end of file
+clickToGoHereOrDropContentsHereToMoveThem = Click to go here or drop contents here to move them
+thisUserIsAlreadyAGroupMember = This user is already a group member
+markAsNotDone = Mark as not done
+more = More
+youDidNotSignInSoYouCanJustSeeSomePublicContentsInParamButNotEditOrCollaborateWithOthersPleaseParamO = You did not sign-in, so you can just see some public contents in [%s], but not edit or collaborate with others. Please [%s] or [%s] in order to get full access to [%s] tools and contents
+onlyForAuthorizedTranslators = Only for authorized translators
+hereYouCanCreateOrUploadYourPersonalGroupOrPublicDocumentsTheseDocumentsCanBeEditedAndCommentedColla = Here you can create or upload your personal, group or public documents. These documents can be edited and commented collaboratively and simultaneously. These docs can be static pages in your web page if you publish them
+blogsAreAChronologicalListOfPostsOrderedByDateAboutASpecificTopicEachPostCanBeCommentedByTheVisitors = Blogs are a chronological list of posts (ordered by date) about a specific topic. Each post can be commented by the visitors
+aDecentralizedWayToOfferOrAskForServicesAndGoodsToYourGroupsOrToAnyoneBarteringMeansTheExchangeOfGoo = A decentralized way to offer (or ask for) services and goods to your groups or to anyone. Bartering means the exchange of goods by the agreement of two people
+listsBehaveLikeAMailingListOrAForumYouCanSubscribeAndDiscussAboutSpecificTopics = Lists behave like a mailing list or a forum. You can subscribe and discuss about specific topics
+aCollaborativeToDoListForTheGroupAnyGroupMemberCanParticipateInAnyProposedTaskAddOthersToATaskCommen = A collaborative TO-DO list for the group. Any group-member can participate in any proposed task, add others to a task, comment them, add info, etc
+aCalendarToScheduleActivitiesAndEvents = A calendar to schedule activities and events
+aRoomWhereYouCanHaveAGroupChatWithManyUsersAtOnceRoomsCanBePublicOrPrivateUsersCanBeFromParamOrOther = A 'room' where you can have a group-chat with many users at once. Rooms can be public or private. Users can be from [%s] or other sites (compatible with gmail chat)
+wikiPagesAreDocumentsThatCanBeEditedByAnyVisitorInParamInsteadOfOnlyByTheGroupThisAcceleratesUpdatin = Wiki-pages are Documents that can be edited by any visitor (in [%s]), instead of only by the group. This accelerates updating and construction
+errorSettingTheLogo = Error setting the logo
\ No newline at end of file

Modified: trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties
===================================================================
--- trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/client/i18n/KuneConstants_es.properties	2011-11-10 01:10:27 UTC (rev 1598)
@@ -188,7 +188,7 @@
 thisUserHasNoBuddiesYet = Estæ usuaria/o no tiene todavía colegas
 newTask = Nueva tarea
 createANewTask = Crea una nueva tarea
-doubleClickToOpen = Pulsa dos veces para editar
+doubleClickToOpen = Pulsa dos veces para abrir
 createANewFolder = Crear una nueva carpeta
 newTaskFolder = Nueva carpeta de tareas
 open = Abrir
@@ -392,8 +392,23 @@
 membersJoiningPolicyChanged = Política de adhesión de miembros cambiada
 moving = Moviendo
 aContentWithTheSameNameAlreadyExistPleaseRenameIt = Ya existe un contenido con el mismo nombre. Por favor renómbralo.
+
 removedAsMember = Eliminado como miembro
 addGadget = Añade un Gadget
 theSocialNetworkOfThisUserIsNotPublic = La red social de este/a usuario/a no es público
 newDoc = Nuevo doc
-clickToGoHereOrDropContentsHereToMoveThem = Pulsa para ir aquí o arrastra aquí contenidos para moverlos
\ No newline at end of file
+clickToGoHereOrDropContentsHereToMoveThem = Pulsa para ir aquí o arrastra aquí contenidos para moverlos
+thisUserIsAlreadyAGroupMember = Este usuario ya es miembro del grupo
+markAsNotDone = Marcar como no completada
+more = Más
+youDidNotSignInSoYouCanJustSeeSomePublicContentsInParamButNotEditOrCollaborateWithOthersPleaseParamO = No te has registrado o autenticado, así que solo podrás ver ciertos contenidos públicos de [%s], pero no podrás editar ni colaborar con otras personas. Por favor [%s] o [%s] para tener acceso total a las herramientas y contenidos de [%s]
+onlyForAuthorizedTranslators = Solo para traductores autorizados
+hereYouCanCreateOrUploadYourPersonalGroupOrPublicDocumentsTheseDocumentsCanBeEditedAndCommentedColla = Aquí puedes crear o subir tus documentos personales, grupales o públicos. Esos documentos pueden ser editados y comentados simultáneamente por otras personas. Esos documentos pueden ser páginas estáticas en vuestra web si los publicáis
+blogsAreAChronologicalListOfPostsOrderedByDateAboutASpecificTopicEachPostCanBeCommentedByTheVisitors = Los Blogs son una lista cronológica de mensajes publicados (ordenados por la fecha) sobre un tema específico. Cada mensaje publicado puede ser comentado por los lectores
+aDecentralizedWayToOfferOrAskForServicesAndGoodsToYourGroupsOrToAnyoneBarteringMeansTheExchangeOfGoo = Una forma descentralizada de ofrecer (y solicitar) servicios y bienes a tus grupos o a cualquiera. El trueque es el intercambio de bienes a través del acuerdo de dos personas
+listsBehaveLikeAMailingListOrAForumYouCanSubscribeAndDiscussAboutSpecificTopics = Las listas se comportan como una lista de distribución o un foro. Puedes suscribirte y debatir sobre un tema específico
+aCollaborativeToDoListForTheGroupAnyGroupMemberCanParticipateInAnyProposedTaskAddOthersToATaskCommen = Una lista colaborativa de tareas por hacer por el grupo. Cualquier miembro del grupo puede participar en las tareas propuestas, comentarlas, añadir información, etc
+aCalendarToScheduleActivitiesAndEvents = Un calendario para programar actividades y eventos
+aRoomWhereYouCanHaveAGroupChatWithManyUsersAtOnceRoomsCanBePublicOrPrivateUsersCanBeFromParamOrOther = Una 'sala' donde puedes tener una conversación en grupo con muchos/as usuarios/as al mismo tiempo. Las salas pueden ser privadas o públicas. Los/as usuarios/as pueden ser de [%s] o de otros sitios (es compatible con el chat de gmail).
+wikiPagesAreDocumentsThatCanBeEditedByAnyVisitorInParamInsteadOfOnlyByTheGroupThisAcceleratesUpdatin = Las páginas Wiki son documentos que pueden ser editados por cualquier usuario/a (de [%s]) en vez de solo por el grupo. Este acelera su actualización y construcción
+errorSettingTheLogo = Error configurando el logo
\ No newline at end of file

Added: trunk/src/main/java/cc/kune/core/client/sitebar/search/EntitySearchPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/search/EntitySearchPanel.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/search/EntitySearchPanel.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -0,0 +1,120 @@
+/*
+ *
+ * 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.core.client.sitebar.search;
+
+import cc.kune.common.client.ui.dialogs.BasicTopDialog;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.resources.CoreResources;
+
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.dom.client.HasAllFocusHandlers;
+import com.google.gwt.user.client.ui.HasText;
+import com.google.gwt.user.client.ui.SuggestBox;
+import com.google.gwt.user.client.ui.TextBoxBase;
+
+/**
+ * This panel is used to search for users to add as a buddies or to add to
+ * groups as collaborators
+ * 
+ */
+public abstract class EntitySearchPanel {
+
+  public static final String DIALOG_ID = "entity-search-panel-diag";
+  public static final String ENTITY_SEARCH_TEXTBOX = "kune-ssp-tbox";
+  public static final String OK_ID = "entity-search-panel-ok-id";
+  private static final int SEARCH_TEXT_HEIGHT = 13;
+  private static final int SEARCH_TEXT_WIDTH_BIG = 160;
+  private static final int SEARCH_TEXT_WIDTH_SMALL = 120;
+  private OnEntitySelectedInSearch callback;
+  private final BasicTopDialog dialog;
+  private final I18nUITranslationService i18n;
+  private boolean searchOnlyUsers;
+  private TextBoxBase searchTextBox;
+  private SuggestBox suggestBox;
+
+  public EntitySearchPanel(final CoreResources img, final I18nUITranslationService i18n) {
+    this.i18n = i18n;
+    dialog = new BasicTopDialog.Builder(DIALOG_ID, false, true).autoscroll(false).firstButtonId(OK_ID).tabIndexStart(
+        1).build();
+    dialog.setFirstBtnText(i18n.t("Close"));
+    dialog.setSecondBtnVisible(false);
+    dialog.getFirstBtn().addClickHandler(new ClickHandler() {
+      @Override
+      public void onClick(final ClickEvent event) {
+        dialog.hide();
+      }
+    });
+  }
+
+  public void clearSearchText() {
+    searchTextBox.setValue("");
+  }
+
+  private void create() {
+    dialog.getTitleText().setText(
+        i18n.t(searchOnlyUsers ? "Type the name of the user and select him/her:"
+            : "Type the name of the user or group and select it:"));
+    final MultivalueSuggestBox multivalueSBox = SearchBoxFactory.create(i18n, searchOnlyUsers, callback);
+    suggestBox = multivalueSBox.getSuggestBox();
+    searchTextBox = suggestBox.getTextBox();
+    searchTextBox.ensureDebugId(ENTITY_SEARCH_TEXTBOX);
+    dialog.getInnerPanel().add(multivalueSBox);
+    setTextSearchSmallImpl();
+  }
+
+  public void focus() {
+    searchTextBox.setFocus(true);
+  }
+
+  public HasAllFocusHandlers getFocus() {
+    return searchTextBox;
+  }
+
+  public HasText getTextBox() {
+    return searchTextBox;
+  }
+
+  public void init(final OnEntitySelectedInSearch callback, final boolean searchOnlyUsers) {
+    this.callback = callback;
+    this.searchOnlyUsers = searchOnlyUsers;
+    create();
+  }
+
+  public void selectSearchText() {
+    searchTextBox.selectAll();
+  }
+
+  public void setTextSearch(final String text) {
+    suggestBox.setValue(text, false);
+  }
+
+  public void setTextSearchBig() {
+    searchTextBox.setPixelSize(SEARCH_TEXT_WIDTH_BIG, SEARCH_TEXT_HEIGHT);
+  }
+
+  private void setTextSearchSmallImpl() {
+    searchTextBox.setPixelSize(SEARCH_TEXT_WIDTH_SMALL, SEARCH_TEXT_HEIGHT);
+  }
+
+  public void show() {
+    dialog.showCentered();
+  }
+}

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/search/MultivalueSuggestBox.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/search/MultivalueSuggestBox.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/search/MultivalueSuggestBox.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -42,7 +42,6 @@
 import java.util.Map;
 
 import cc.kune.common.client.log.Log;
-import cc.kune.core.client.sitebar.search.SitebarSearchPanel.OnExactMatch;
 import cc.kune.core.shared.SearcherConstants;
 
 import com.google.gwt.event.dom.client.KeyUpEvent;

Added: trunk/src/main/java/cc/kune/core/client/sitebar/search/OnEntitySelectedInSearch.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/search/OnEntitySelectedInSearch.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/search/OnEntitySelectedInSearch.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -0,0 +1,7 @@
+package cc.kune.core.client.sitebar.search;
+
+public interface OnEntitySelectedInSearch {
+
+  void onSeleted(String shortName);
+
+}

Added: trunk/src/main/java/cc/kune/core/client/sitebar/search/OnExactMatch.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/search/OnExactMatch.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/search/OnExactMatch.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -0,0 +1,5 @@
+package cc.kune.core.client.sitebar.search;
+
+public interface OnExactMatch {
+  void onExactMatch(String march);
+}
\ No newline at end of file

Added: trunk/src/main/java/cc/kune/core/client/sitebar/search/SearchBoxFactory.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/search/SearchBoxFactory.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/search/SearchBoxFactory.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -0,0 +1,49 @@
+package cc.kune.core.client.sitebar.search;
+
+import cc.kune.common.client.tooltip.Tooltip;
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.shared.SearcherConstants;
+
+import com.google.gwt.user.client.ui.SuggestBox;
+import com.google.gwt.user.client.ui.SuggestOracle.Suggestion;
+
+public class SearchBoxFactory {
+
+  public static MultivalueSuggestBox create(final I18nUITranslationService i18n,
+      final boolean searchOnlyUsers, final OnEntitySelectedInSearch callback) {
+    final MultivalueSuggestBox multivalueSBox = new MultivalueSuggestBox(
+        searchOnlyUsers ? SearcherConstants.USER_DATA_PROXY_URL : SearcherConstants.GROUP_DATA_PROXY_URL,
+        false, new OnExactMatch() {
+
+          @Override
+          public void onExactMatch(final String match) {
+            // NotifyUser.info(match);
+          }
+        }) {
+
+      @Override
+      public void onSelection(
+          final com.google.gwt.event.logical.shared.SelectionEvent<com.google.gwt.user.client.ui.SuggestOracle.Suggestion> event) {
+        super.onSelection(event);
+        final Suggestion suggestion = event.getSelectedItem();
+        if (suggestion instanceof OptionSuggestion) {
+          final OptionSuggestion osugg = (OptionSuggestion) suggestion;
+          final String value = osugg.getValue();
+          if (!OptionSuggestion.NEXT_VALUE.equals(value)
+              && !OptionSuggestion.PREVIOUS_VALUE.equals(value)) {
+            callback.onSeleted(value);
+            this.getSuggestBox().setValue("", false);
+          }
+        }
+      };
+    };
+    final String siteCommonName = i18n.getSiteCommonName();
+    final SuggestBox suggestBox = multivalueSBox.getSuggestBox();
+    Tooltip.to(
+        suggestBox,
+        searchOnlyUsers ? i18n.t("Type something to search for users in [%s]", siteCommonName) : i18n.t(
+            "Type something to search for users and groups in [%s]", siteCommonName));
+    return multivalueSBox;
+  }
+
+}

Modified: trunk/src/main/java/cc/kune/core/client/sitebar/search/SitebarSearchPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sitebar/search/SitebarSearchPanel.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/client/sitebar/search/SitebarSearchPanel.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -19,14 +19,11 @@
  \*/
 package cc.kune.core.client.sitebar.search;
 
-import cc.kune.common.client.notify.NotifyUser;
-import cc.kune.common.client.tooltip.Tooltip;
 import cc.kune.core.client.i18n.I18nUITranslationService;
 import cc.kune.core.client.resources.CoreResources;
 import cc.kune.core.client.sitebar.search.SitebarSearchPresenter.SitebarSearchView;
 import cc.kune.core.client.state.Session;
 import cc.kune.core.client.state.StateManager;
-import cc.kune.core.shared.SearcherConstants;
 import cc.kune.gspace.client.GSpaceArmor;
 
 import com.google.gwt.event.dom.client.HasAllFocusHandlers;
@@ -35,16 +32,13 @@
 import com.google.gwt.user.client.ui.Image;
 import com.google.gwt.user.client.ui.PushButton;
 import com.google.gwt.user.client.ui.SuggestBox;
-import com.google.gwt.user.client.ui.SuggestOracle.Suggestion;
 import com.google.gwt.user.client.ui.TextBoxBase;
 import com.google.gwt.user.client.ui.Widget;
 import com.google.inject.Inject;
 import com.gwtplatform.mvp.client.ViewImpl;
 
 public class SitebarSearchPanel extends ViewImpl implements SitebarSearchView {
-  protected interface OnExactMatch {
-    void onExactMatch(String march);
-  }
+
   private static final int SEARCH_TEXT_HEIGHT = 13;
   private static final int SEARCH_TEXT_WIDTH_BIG = 160;
   private static final int SEARCH_TEXT_WIDTH_SMALL = 120;
@@ -60,35 +54,14 @@
       final StateManager stateManager, final I18nUITranslationService i18n) {
     searchButton = new PushButton(new Image(img.kuneSearchIco()), new Image(img.kuneSearchIcoPush()));
     searchButton.ensureDebugId(SITE_SEARCH_BUTTON);
-    final MultivalueSuggestBox multivalueSBox = new MultivalueSuggestBox(
-        SearcherConstants.GROUP_DATA_PROXY_URL, false, new OnExactMatch() {
-
+    final MultivalueSuggestBox multivalueSBox = SearchBoxFactory.create(i18n, false,
+        new OnEntitySelectedInSearch() {
           @Override
-          public void onExactMatch(final String match) {
-            NotifyUser.info(match);
+          public void onSeleted(final String shortName) {
+            stateManager.gotoHistoryToken(shortName);
           }
-        }) {
-
-      @Override
-      public void onSelection(
-          final com.google.gwt.event.logical.shared.SelectionEvent<com.google.gwt.user.client.ui.SuggestOracle.Suggestion> event) {
-        super.onSelection(event);
-        final Suggestion suggestion = event.getSelectedItem();
-        if (suggestion instanceof OptionSuggestion) {
-          final OptionSuggestion osugg = (OptionSuggestion) suggestion;
-          final String value = osugg.getValue();
-          if (!OptionSuggestion.NEXT_VALUE.equals(value)
-              && !OptionSuggestion.PREVIOUS_VALUE.equals(value)) {
-            stateManager.gotoHistoryToken(value);
-            setTextSearch("");
-          }
-        }
-      };
-    };
-    final String siteCommonName = i18n.getSiteCommonName();
+        });
     suggestBox = multivalueSBox.getSuggestBox();
-    Tooltip.to(suggestBox,
-        i18n.t("Type something to search for users and groups in [%s]", siteCommonName));
     searchTextBox = suggestBox.getTextBox();
     searchTextBox.ensureDebugId(SITE_SEARCH_TEXTBOX);
     searchTextBox.addStyleName("k-fr");

Added: trunk/src/main/java/cc/kune/core/client/sn/actions/AddBuddieSearchPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/AddBuddieSearchPanel.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/AddBuddieSearchPanel.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -0,0 +1,18 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.sitebar.search.EntitySearchPanel;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class AddBuddieSearchPanel extends EntitySearchPanel {
+
+  @Inject
+  public AddBuddieSearchPanel(final CoreResources img, final I18nUITranslationService i18n) {
+    super(img, i18n);
+  }
+
+}

Added: trunk/src/main/java/cc/kune/core/client/sn/actions/AddEntityToThisGroupAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/AddEntityToThisGroupAction.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/AddEntityToThisGroupAction.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -0,0 +1,95 @@
+/*
+ *
+ * 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.core.client.sn.actions;
+
+import cc.kune.common.client.actions.Action;
+import cc.kune.common.client.actions.ActionEvent;
+import cc.kune.common.client.notify.NotifyUser;
+import cc.kune.common.client.utils.SimpleResponseCallback;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.rpcservices.AsyncCallbackSimple;
+import cc.kune.core.client.rpcservices.SocialNetworkServiceAsync;
+import cc.kune.core.client.sitebar.search.OnEntitySelectedInSearch;
+import cc.kune.core.client.state.AccessRightsClientManager;
+import cc.kune.core.client.state.Session;
+import cc.kune.core.client.state.StateManager;
+import cc.kune.core.shared.dto.AccessRolDTO;
+import cc.kune.core.shared.dto.SocialNetworkDataDTO;
+import cc.kune.core.shared.i18n.I18nTranslationService;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+
+public class AddEntityToThisGroupAction extends SNRolAction {
+
+  private final AddMemberSearchPanel searchPanel;
+
+  @Inject
+  public AddEntityToThisGroupAction(final StateManager stateManager, final Session session,
+      final I18nTranslationService i18n, final CoreResources res,
+      final Provider<SocialNetworkServiceAsync> snServiceProvider,
+      final AddMemberSearchPanel searchPanel, final AccessRightsClientManager rightsClientManager) {
+    super(stateManager, session, i18n, res, snServiceProvider, rightsClientManager,
+        AccessRolDTO.Administrator, true, false, true);
+    this.searchPanel = searchPanel;
+    putValue(NAME, i18n.t("Add new member"));
+    putValue(Action.SMALL_ICON, res.add());
+    putValue(Action.STYLES, "k-sn-join");
+    searchPanel.init(new OnEntitySelectedInSearch() {
+      @Override
+      public void onSeleted(final String shortName) {
+        NotifyUser.askConfirmation(
+            i18n.t("Are you sure?"),
+            i18n.t("Do you want to add '[%s]' as a member of '[%s]'?", shortName,
+                session.getCurrentGroupShortName()), new SimpleResponseCallback() {
+              @Override
+              public void onCancel() {
+              }
+
+              @Override
+              public void onSuccess() {
+                NotifyUser.showProgress();
+                snServiceProvider.get().addCollabMember(session.getUserHash(),
+                    session.getCurrentStateToken(), shortName,
+                    new AsyncCallbackSimple<SocialNetworkDataDTO>() {
+                      @Override
+                      public void onSuccess(final SocialNetworkDataDTO result) {
+                        NotifyUser.hideProgress();
+                        NotifyUser.info(i18n.t("Member added as collaborator"));
+                        stateManager.setSocialNetwork(result);
+                      }
+                    });
+              }
+            });
+      }
+
+    },
+    // In the future, with this to false, we'll be add groups to groups!
+        true);
+
+  }
+
+  @Override
+  public void actionPerformed(final ActionEvent event) {
+    searchPanel.show();
+    searchPanel.focus();
+  }
+
+}
\ No newline at end of file

Added: trunk/src/main/java/cc/kune/core/client/sn/actions/AddMemberSearchPanel.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/AddMemberSearchPanel.java	                        (rev 0)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/AddMemberSearchPanel.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -0,0 +1,18 @@
+package cc.kune.core.client.sn.actions;
+
+import cc.kune.core.client.i18n.I18nUITranslationService;
+import cc.kune.core.client.resources.CoreResources;
+import cc.kune.core.client.sitebar.search.EntitySearchPanel;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+ at Singleton
+public class AddMemberSearchPanel extends EntitySearchPanel {
+
+  @Inject
+  public AddMemberSearchPanel(final CoreResources img, final I18nUITranslationService i18n) {
+    super(img, i18n);
+  }
+
+}

Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/AddNewBuddiesAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/AddNewBuddiesAction.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/AddNewBuddiesAction.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -19,37 +19,53 @@
  */
 package cc.kune.core.client.sn.actions;
 
+import cc.kune.chat.client.ChatClient;
 import cc.kune.common.client.actions.AbstractExtendedAction;
 import cc.kune.common.client.actions.Action;
 import cc.kune.common.client.actions.ActionEvent;
 import cc.kune.common.client.notify.NotifyUser;
-import cc.kune.core.client.resources.CoreMessages;
+import cc.kune.common.client.utils.SimpleResponseCallback;
 import cc.kune.core.client.resources.CoreResources;
-import cc.kune.core.client.sitebar.search.SitebarSearchPresenter;
+import cc.kune.core.client.sitebar.search.EntitySearchPanel;
+import cc.kune.core.client.sitebar.search.OnEntitySelectedInSearch;
 import cc.kune.core.shared.i18n.I18nTranslationService;
 
 import com.google.inject.Inject;
-import com.google.inject.Provider;
 
 public class AddNewBuddiesAction extends AbstractExtendedAction {
 
-  private final I18nTranslationService i18n;
-  private final Provider<SitebarSearchPresenter> searcher;
+  private final EntitySearchPanel searchPanel;
 
   @Inject
   public AddNewBuddiesAction(final I18nTranslationService i18n, final CoreResources res,
-      final Provider<SitebarSearchPresenter> searcher) {
-    this.i18n = i18n;
-    this.searcher = searcher;
+      final AddBuddieSearchPanel searchPanel, final ChatClient chatClient) {
+    this.searchPanel = searchPanel;
     putValue(Action.NAME, i18n.t("Add a new buddy"));
     putValue(Action.SMALL_ICON, res.addGreen());
+    searchPanel.init(new OnEntitySelectedInSearch() {
+      @Override
+      public void onSeleted(final String shortName) {
+        NotifyUser.askConfirmation(i18n.t("Are you sure?"),
+            i18n.t("Do you want to add '[%s]' to your contacts?", shortName),
+            new SimpleResponseCallback() {
+              @Override
+              public void onCancel() {
+              }
+
+              @Override
+              public void onSuccess() {
+                chatClient.addNewBuddy(shortName);
+                NotifyUser.info("Added as buddy in your contacts. If your buddie adds you also, it will be visible in your network");
+              }
+            });
+      }
+    }, true);
   }
 
   @Override
   public void actionPerformed(final ActionEvent event) {
-    NotifyUser.info(i18n.t("Search the user you want to add and in his/her homepage click '"
-        + CoreMessages.ADD_AS_A_BUDDY + "'"));
-    searcher.get().focus();
+    searchPanel.show();
+    searchPanel.focus();
   }
 
 }

Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/UnJoinFromThisGroupAction.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/UnJoinFromThisGroupAction.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/UnJoinFromThisGroupAction.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -37,6 +37,11 @@
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 
+/**
+ * This action is similar to @link {@link UnJoinFromCurrentGroupAction} but is
+ * used when you are not in this group (for instace you can leave a group from
+ * your home page)
+ */
 public class UnJoinFromThisGroupAction extends RolAction {
 
   private final I18nTranslationService i18n;

Modified: trunk/src/main/java/cc/kune/core/client/sn/actions/registry/GroupSNConfActions.java
===================================================================
--- trunk/src/main/java/cc/kune/core/client/sn/actions/registry/GroupSNConfActions.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/client/sn/actions/registry/GroupSNConfActions.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -22,11 +22,13 @@
 import cc.kune.common.client.actions.ui.descrip.ButtonDescriptor;
 import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
 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.MenuRadioItemDescriptor;
 import cc.kune.common.client.actions.ui.descrip.MenuTitleItemDescriptor;
 import cc.kune.common.client.actions.ui.descrip.SubMenuDescriptor;
 import cc.kune.core.client.resources.CoreResources;
 import cc.kune.core.client.sn.GroupSNPresenter;
+import cc.kune.core.client.sn.actions.AddEntityToThisGroupAction;
 import cc.kune.core.client.sn.actions.JoinGroupAction;
 import cc.kune.core.client.sn.actions.MembersModerationMenuItem;
 import cc.kune.core.client.sn.actions.MembersVisibilityMenuItem;
@@ -69,7 +71,8 @@
       final Provider<MembersModerationMenuItem> membersModeration, final CoreResources res,
       final IsLoggedCondition isLoggedCondition, final JoinGroupAction joinGroupAction,
       final WriteToMembers writeToMembers, final WriteToAdmins writeToAdmins,
-      final IsGroupCondition isGroupCondition, final UnJoinFromCurrentGroupAction unJoinGroupAction) {
+      final IsGroupCondition isGroupCondition, final UnJoinFromCurrentGroupAction unJoinGroupAction,
+      final AddEntityToThisGroupAction addEntityToThisGroupAction) {
     OPTIONS_MENU.withToolTip(i18n.t("Options")).withIcon(res.arrowdownsitebar()).withStyles(
         OPTIONS_STYLES);
     final MenuRadioItemDescriptor anyoneItem = membersVisibility.get().withVisibility(
@@ -86,6 +89,8 @@
 
     addImpl(OPTIONS_MENU);
     new MenuTitleItemDescriptor(i18n.t("Options")).withParent(OPTIONS_MENU);
+    new MenuItemDescriptor(addEntityToThisGroupAction).withParent(OPTIONS_MENU).setPosition(0);
+    new MenuItemDescriptor(unJoinGroupAction).withParent(OPTIONS_MENU).setPosition(1);
 
     VISIBILITY_SUBMENU.withText(i18n.t("Users who can view this member list")).withParent(OPTIONS_MENU);
     MODERATION_SUBMENU.withText(i18n.t("New members policy")).withParent(OPTIONS_MENU);
@@ -97,10 +102,15 @@
     closedItem.withParent(MODERATION_SUBMENU).withText(i18n.t("closed for new members"));
 
     final ButtonDescriptor joinBtn = new ButtonDescriptor(joinGroupAction);
-    final ButtonDescriptor unJoinBtn = new ButtonDescriptor(unJoinGroupAction);
+    // final ButtonDescriptor unJoinBtn = new
+    // ButtonDescriptor(unJoinGroupAction);
+    // final ButtonDescriptor addMemberBtn = new
+    // ButtonDescriptor(addEntityToThisGroupAction);
     // unJoinBtn.add(isLoggedCondition);
     addImpl(joinBtn); // .withStyles("k-no-backimage, k-noborder, k-nobackcolor"));
-    addImpl(unJoinBtn); // .withStyles("k-no-backimage, k-noborder, k-nobackcolor"));
+    // addImpl(unJoinBtn); //
+    // .withStyles("k-no-backimage, k-noborder, k-nobackcolor"));
+    // addImpl(addMemberBtn);
 
     stateManager.onStateChanged(true, new StateChangedHandler() {
       @Override

Modified: trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java
===================================================================
--- trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/server/manager/impl/I18nTranslationManagerDefault.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -176,8 +176,7 @@
       final String escapedTranslation = TextUtils.escapeHtmlLight(translation);
       trans.setText(escapedTranslation);
       persist(trans);
-      // reset cache for this lang
-      langCache.remove(lang);
+      langCache.clear();
       return escapedTranslation;
     } else {
       throw new DefaultException("Trying to translate a unknown item");

Modified: trunk/src/main/java/cc/kune/core/shared/SearcherConstants.java
===================================================================
--- trunk/src/main/java/cc/kune/core/shared/SearcherConstants.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/core/shared/SearcherConstants.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -31,13 +31,14 @@
   // public final static String I18N_JSON_SERVICE =
   // "/ws/json/I18nTranslationJSONService/search";
   public final static String GROUP_PARAM = "group";
+  public final static String LIMIT_PARAM = "limit";
 
-  public final static String LIMIT_PARAM = "limit";
   public final static String MIMETYPE_PARAM = "mimetype";
   public final static String MIMETYPE2_PARAM = "mimetype2";
   public final static String QUERY_PARAM = "query";
+  public final static String START_PARAM = "start";
 
-  public final static String START_PARAM = "start";
+  public final static String USER_DATA_PROXY_URL = "/ws/json/UserJSONService/search";
   // public final static String I18N_JSON_SERVICE_TRANSLATED =
   // "/ws/json/I18nTranslationJSONService/searchtranslated";
   // public final static String USER_DATA_PROXY_URL =

Modified: trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java
===================================================================
--- trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerAsTablePanel.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -26,6 +26,7 @@
 import cc.kune.common.client.actions.ui.descrip.GuiActionDescCollection;
 import cc.kune.common.client.actions.ui.descrip.GuiActionDescrip;
 import cc.kune.common.client.actions.ui.descrip.MenuDescriptor;
+import cc.kune.common.client.tooltip.Tooltip;
 import cc.kune.core.client.dnd.FolderViewerDropController;
 import cc.kune.core.client.dnd.KuneDragController;
 import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
@@ -91,7 +92,7 @@
       itemWidget.setModifiedText(DateUtils.getInstance().formatPastDate(modifiedOn));
     }
     itemWidget.setMenu(toolbar);
-    // Tooltip.to(itemWidget, item.getTooltip());
+    Tooltip.to(itemWidget, item.getTooltip());
     // FIXME make this under demand
     itemWidget.getRowClick().addClickHandler(new ClickHandler() {
       @Override

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-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/gspace/client/viewers/FolderViewerPresenter.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -140,7 +140,7 @@
     final String name = content.getName();
     final Object icon = mimeType != null ? getIcon(stateToken, typeId, mimeType) : getIcon(stateToken,
         typeId, status);
-    final String tooltip = getTooltip(stateToken, mimeType);
+    final String tooltip = getTooltip(stateToken, mimeType, capabilitiesRegistry.isDragable(typeId) && rights.isAdministrable());
     if (status.equals(ContentStatus.inTheDustbin)
         && (!capabilitiesRegistry.showDeleted(typeId) && !session.getShowDeletedContent())) {
       // Don't show
@@ -240,12 +240,14 @@
     return iconsRegistry.getContentTypeIcon(typeId, status);
   }
 
-  private String getTooltip(final StateToken token, final BasicMimeTypeDTO mimeType) {
+  private String getTooltip(final StateToken token, final BasicMimeTypeDTO mimeType,
+      final boolean draggable) {
     if (mimeType != null && (mimeType.isImage() || mimeType.isPdf())) {
       // Used for previews
       return null;
     } else {
-      return i18n.t("Double click to open");
+      return draggable ? i18n.t("Double click to open. Drag and drop to move this to another place")
+          : i18n.t("Double click to open");
     }
   }
 

Modified: trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java
===================================================================
--- trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java	2011-11-09 15:19:34 UTC (rev 1597)
+++ trunk/src/main/java/cc/kune/wiki/client/WikiClientTool.java	2011-11-10 01:10:27 UTC (rev 1598)
@@ -24,9 +24,9 @@
 import static cc.kune.wiki.shared.WikiConstants.TYPE_ROOT;
 import static cc.kune.wiki.shared.WikiConstants.TYPE_UPLOADEDFILE;
 import static cc.kune.wiki.shared.WikiConstants.TYPE_WIKIPAGE;
+import cc.kune.core.client.i18n.I18nUITranslationService;
 import cc.kune.core.client.registry.ContentCapabilitiesRegistry;
 import cc.kune.core.client.resources.nav.NavResources;
-import cc.kune.core.shared.i18n.I18nTranslationService;
 import cc.kune.gspace.client.tool.FoldableAbstractClientTool;
 import cc.kune.gspace.client.tool.selector.ToolSelector;
 
@@ -35,13 +35,14 @@
 public class WikiClientTool extends FoldableAbstractClientTool {
 
   @Inject
-  public WikiClientTool(final I18nTranslationService i18n, final ToolSelector toolSelector,
+  public WikiClientTool(final I18nUITranslationService i18n, final ToolSelector toolSelector,
       final ContentCapabilitiesRegistry cntCapRegistry, final NavResources navResources) {
     super(
         NAME,
         i18n.t("wiki"),
-        i18n.t("Wiki-pages are Documents that can be edited by any visitor (in this site), instead of only by the group. This accelerates updating and construction"),
-        toolSelector, cntCapRegistry, i18n, navResources);
+        i18n.t(
+            "Wiki-pages are Documents that can be edited by any visitor (in [%s]), instead of only by the group. This accelerates updating and construction",
+            i18n.getSiteCommonName()), toolSelector, cntCapRegistry, i18n, navResources);
 
     registerAuthorableTypes(TYPE_WIKIPAGE, TYPE_UPLOADEDFILE);
     registerDragableTypes(TYPE_WIKIPAGE, TYPE_FOLDER, TYPE_UPLOADEDFILE);




More information about the kune-commits mailing list