[kune-commits] r1093 - in trunk: . img/icons/ooffice-human src/main/java/org/ourproject/kune/app/public/css src/main/java/org/ourproject/kune/platf/client/dto src/main/java/org/ourproject/kune/platf/client/ui src/main/java/org/ourproject/kune/platf/client/ui/rte src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/ext src/main/java/org/ourproject/kune/platf/server/content src/main/java/org/ourproject/kune/platf/server/domain src/main/java/org/ourproject/kune/platf/server/rest src/main/java/org/ourproject/kune/workspace/client src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia src/main/java/org/ourproject/kune/workspace/client/search src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic

vjrj vjrj at ourproject.org
Sat Apr 18 17:37:24 CEST 2009


Author: vjrj
Date: 2009-04-18 17:37:20 +0200 (Sat, 18 Apr 2009)
New Revision: 1093

Added:
   trunk/img/icons/ooffice-human/sc12203.png
   trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateTokenUtils.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/search/SearcherContants.java
Modified:
   trunk/TODO
   trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
   trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
   trunk/src/main/java/org/ourproject/kune/platf/client/dto/BasicMimeTypeDTO.java
   trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateToken.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/WindowUtils.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplIE6.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplMozilla.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplOpera.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplSafari.java
   trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/ext/InsertLinkExtPanel.java
   trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManager.java
   trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/AccessLists.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/BasicMimeType.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/Comment.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/ContentTranslation.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/CustomProperties.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java
   trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java
   trunk/src/main/java/org/ourproject/kune/platf/server/rest/ContentJSONService.java
   trunk/src/main/java/org/ourproject/kune/platf/server/rest/GroupJSONService.java
   trunk/src/main/java/org/ourproject/kune/platf/server/rest/I18nTranslationJSONService.java
   trunk/src/main/java/org/ourproject/kune/platf/server/rest/UserJSONService.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertLocalMediaPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherField.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java
   trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java
Log:
Incomplete - task Hibernate search improving 

Complete - task LinkInfo and LinkImage reference in Abstra*

Complete - tags style improved

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/TODO	2009-04-18 15:37:20 UTC (rev 1093)
@@ -34,8 +34,10 @@
    http://www.mozilla.org/editor/midas-spec.html
    http://mozilla.org/editor/midasdemo/
 ** vjrj <v> GWT 1.6
+   http://code.google.com/intl/es/webtoolkit/doc/1.6/ReleaseNotes_1_6.html#Upgrading
    http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/3e7e6cc3b35ad98a
    http://code.google.com/p/google-web-toolkit/wiki/WAR_Design_1_6
+   http://www.gwt-ext.com/forum/viewtopic.php?f=5&p=12038
 ** TODO <v> User preferences storing
    (See also variables in 'Styling braimstorming')
    We need a way to store (in db) User preferences (like emite chat configurations) in a extensible way.
@@ -112,6 +114,7 @@
 ** vjrj <v> IconHyperlink.java and IconLabel.java to gwt1.5
 
 * MID-TERM
+** <v> trash icon area d&d
 ** vjrj <v> shortcuts enhacement
 *** Clarify the keycodes vs utf8 chars Shortcut definition (Function keys and so on...)
 *** shortcuts in tool actions no registered in GlobalShorcuts

Added: trunk/img/icons/ooffice-human/sc12203.png
===================================================================
(Binary files differ)


Property changes on: trunk/img/icons/ooffice-human/sc12203.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/all.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/all.css	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/all.css	2009-04-18 15:37:20 UTC (rev 1093)
@@ -41,4 +41,4 @@
     padding: 1px 0px 1px 1px;
     text-decoration:none;
 }
-*/.x-tree-node .k-ctn-status-normal a span{}.x-tree-node .k-ctn-status-deleted a span{text-decoration:line-through;color:gray;}.x-tree-node .k-ctn-status-rejected a span{text-decoration:line-through;/* color: #FF6633; */color:#F30;}.x-tree-node .k-ctn-status-editing a span{font-style:italic;color:gray;}.x-tree-node .k-ctn-status-submitted a span{color:green;}.k-info-links{text-decoration:underline;color:gray;cursor:pointer;}.x-tool-kmenu{background-position:0 -75px;}.x-tool-kmenu-over{background-position:-15px -75px;}.k-border-openbox{border-bottom:1px #D0D0D0 solid;border-right:1px #D0D0D0 solid;border-left:1px #D0D0D0 solid;}/* SiteToastMessages */.k-stm-info-icon{background-image:url(img/info.gif)!important;}.k-stm-imp-icon{background-image:url(img/alert.gif)!important;}.k-stm-verimp-icon{background-image:url(img/important.gif)!important;}.k-stm-error-icon{background-image:url(img/error.gif)!important;}.k-error-tb{background:#FFB380 none repeat scroll 0 50%;color:#250;}.k-infod-head{font-size:108%;margin-bottom:10px;}.gwt-DisclosurePanel{}.gwt-DisclosurePanel-open{}.gwt-DisclosurePanel-closed{}.gwt-DisclosurePanel .header,.gwt-DisclosurePanel .header a,.gwt-DisclosurePanel .header td{text-decoration:none;/* Remove underline from header */color:#000;cursor:pointer;cursor:hand;}.gwt-DisclosurePanel .content{border-left:3px solid #e8eef7;padding:4px 0 4px 8px;margin-left:6px;}.k-basic-thumb{background:#FAFAFA none repeat scroll 0 50%;border:1px solid #EBEBEB;padding:3px;margin:3px;}.k-basic-thumb td{padding:2px 3px;border:none;}.k-text-gray{color:gray;}.k-elp-limg{margin-top:4px;margin-left:5px;cursor:pointer;overflow:hidden;}.k-tsp-tag{float:right;margin-right:5px;cursor:pointer;color:#00F;}.k-tsp-cloud{vertical-align:bottom;}.k-link-icon{background-image:url(img/link.gif)!important;}.k-options-icon{background-image:url(img/emblem-system.gif)!important;}.k-copyleft-icon{background-image:url(img/copyleft.png)!important;}.k-picture-icon{background-image:url(img/picture.png)!important;}.k-film-icon{background-image:url(img/film.png)!important;}.k-specialchars-icon{background-image:url(img/specialchars.png)!important;}.k-info-icon{background-image:url(img/info.gif)!important;}.k-newgroup-icon{background-image:url(img/kune-icon16.png)!important;}.k-colors-icon{background-image:url(img/colors.gif)!important;}.x-toolbar-body table{/* width: 100%; */}.k-preview-msg{background:#FCA;}.k-preview-msg-lab{background:#FCA;padding:0 5px;}.k-eil-edit{border:thin solid #000;}/* duplicated in rte.css */.k-rte-comment{border:1px dashed silver;line-height:1.4;padding:1px;background-color:#D7FFD7;}.k-specialchar-grid{border:1px solid #ACA899;}.k-specialchar-grid table{}.k-specialchar-grid div{line-height:22px;}.k-specialchar-grid td{padding:1px;}.k-specialchar-pb{border:1px solid #EBE8D7;cursor:pointer;font-size:108%!important;text-align:center;vertical-align:middle;width:18px;height:18px;}.k-specialchar-pb-up{}.k-specialchar-big{padding:3px;line-height:22px;font-size:153.899994%!important;}.k-specialchar-adv-label{margin-left:-10px;}.k-specialchar-popup,{border:1px px solid silver;z-index:9999!important;background-color:#FFF;}.k-specialchar-pb-down{color:#161616;}.k-specialchar-pb-up-hovering{border:thin solid #ACA899;}.k-specialchar-pb-down-hovering{color:#161616;}.k-preview-panel{border:dashed 1px gray;}.k-rte-changelink{white-space:nowrap;color:navy;cursor:pointer;text-decoration:underline;margin:5px;}.k-rte-changelink-popup{border:1px solid silver;z-index:9999!important;background-color:#ECECEC;}.e-ui-room{height:27px;line-height:22px;}.e-ui-room input{font-size:100%;margin-left:0;margin-top:0;}
\ No newline at end of file
+*/.x-tree-node .k-ctn-status-normal a span{}.x-tree-node .k-ctn-status-deleted a span{text-decoration:line-through;color:gray;}.x-tree-node .k-ctn-status-rejected a span{text-decoration:line-through;/* color: #FF6633; */color:#F30;}.x-tree-node .k-ctn-status-editing a span{font-style:italic;color:gray;}.x-tree-node .k-ctn-status-submitted a span{color:green;}.k-info-links{text-decoration:underline;color:gray;cursor:pointer;}.x-tool-kmenu{background-position:0 -75px;}.x-tool-kmenu-over{background-position:-15px -75px;}.k-border-openbox{border-bottom:1px #D0D0D0 solid;border-right:1px #D0D0D0 solid;border-left:1px #D0D0D0 solid;}/* SiteToastMessages */.k-stm-info-icon{background-image:url(img/info.gif)!important;}.k-stm-imp-icon{background-image:url(img/alert.gif)!important;}.k-stm-verimp-icon{background-image:url(img/important.gif)!important;}.k-stm-error-icon{background-image:url(img/error.gif)!important;}.k-error-tb{background:#FFB380 none repeat scroll 0 50%;color:#250;}.k-infod-head{font-size:108%;margin-bottom:10px;}.gwt-DisclosurePanel{}.gwt-DisclosurePanel-open{}.gwt-DisclosurePanel-closed{}.gwt-DisclosurePanel .header,.gwt-DisclosurePanel .header a,.gwt-DisclosurePanel .header td{text-decoration:none;/* Remove underline from header */color:#000;cursor:pointer;cursor:hand;}.gwt-DisclosurePanel .content{border-left:3px solid #e8eef7;padding:4px 0 4px 8px;margin-left:6px;}.k-basic-thumb{background:#FAFAFA none repeat scroll 0 50%;border:1px solid #EBEBEB;padding:3px;margin:3px;}.k-basic-thumb td{padding:2px 3px;border:none;}.k-text-gray{color:gray;}.k-elp-limg{margin-top:4px;margin-left:5px;cursor:pointer;overflow:hidden;}.k-tsp-tag{float:left;padding:3px;cursor:pointer;color:#00F;}.k-tsp-cloud{line-height:1.5em;text-align:center;}.k-link-icon{background-image:url(img/link.gif)!important;}.k-options-icon{background-image:url(img/emblem-system.gif)!important;}.k-copyleft-icon{background-image:url(img/copyleft.png)!important;}.k-picture-icon{background-image:url(img/picture.png)!important;}.k-film-icon{background-image:url(img/film.png)!important;}.k-specialchars-icon{background-image:url(img/specialchars.png)!important;}.k-info-icon{background-image:url(img/info.gif)!important;}.k-newgroup-icon{background-image:url(img/kune-icon16.png)!important;}.k-colors-icon{background-image:url(img/colors.gif)!important;}.x-toolbar-body table{/* width: 100%; */}.k-preview-msg{background:#FCA;}.k-preview-msg-lab{background:#FCA;padding:0 5px;}.k-eil-edit{border:thin solid #000;}/* duplicated in rte.css */.k-rte-comment{border:1px dashed silver;line-height:1.4;padding:1px;background-color:#D7FFD7;}.k-specialchar-grid{border:1px solid #ACA899;}.k-specialchar-grid table{}.k-specialchar-grid div{line-height:22px;}.k-specialchar-grid td{padding:1px;}.k-specialchar-pb{border:1px solid #EBE8D7;cursor:pointer;font-size:108%!important;text-align:center;vertical-align:middle;width:18px;height:18px;}.k-specialchar-pb-up{}.k-specialchar-big{padding:3px;line-height:22px;font-size:153.899994%!important;}.k-specialchar-adv-label{margin-left:-10px;}.k-specialchar-popup,{border:1px px solid silver;z-index:9999!important;background-color:#FFF;}.k-specialchar-pb-down{color:#161616;}.k-specialchar-pb-up-hovering{border:thin solid #ACA899;}.k-specialchar-pb-down-hovering{color:#161616;}.k-preview-panel{border:dashed 1px gray;}.k-rte-changelink{white-space:nowrap;color:navy;cursor:pointer;text-decoration:underline;margin:5px;}.k-rte-changelink-popup{border:1px solid silver;z-index:9999!important;background-color:#ECECEC;}.e-ui-room{height:27px;line-height:22px;}.e-ui-room input{font-size:100%;margin-left:0;margin-top:0;}
\ No newline at end of file

Modified: trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css
===================================================================
--- trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/app/public/css/kune-new.css	2009-04-18 15:37:20 UTC (rev 1093)
@@ -815,14 +815,15 @@
 }
 
 .k-tsp-tag {
-  float: right;
-  margin-right: 5px;
+  float: left;
+  padding: 3px;
   cursor: pointer;
   color: #0000FF;
 }
 
 .k-tsp-cloud {
-  vertical-align: bottom;
+  line-height: 1.5em;
+  text-align : center;
 }
 
 .k-link-icon {

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/BasicMimeTypeDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/BasicMimeTypeDTO.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/BasicMimeTypeDTO.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -23,6 +23,10 @@
 
 public class BasicMimeTypeDTO implements IsSerializable {
 
+    public static final String IMAGE = "image";
+    public static final String VIDEO = "video";
+    public static final String AUDIO = "audio";
+
     private String type;
     private String subtype;
 
@@ -59,7 +63,7 @@
      * @return
      */
     public boolean isImage() {
-        return type != null && type.equals("image");
+        return type != null && type.equals(IMAGE);
     }
 
     /**

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateToken.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateToken.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateToken.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -19,8 +19,6 @@
  */
 package org.ourproject.kune.platf.client.dto;
 
-import org.ourproject.kune.platf.client.ui.WindowUtils;
-
 import com.google.gwt.user.client.rpc.IsSerializable;
 
 /**
@@ -55,9 +53,11 @@
         }
         return encoded;
     }
+
     private String group;
     private String tool;
     private String folder;
+
     private String document;
 
     private String encoded;
@@ -140,31 +140,6 @@
         return group;
     }
 
-    public String getPublicUrl() {
-        String publicUrl = "http://";
-
-        String separator = ".";
-
-        // FIXME: Maybe get from InitData the site.domain
-        String port = WindowUtils.getLocation().getPort();
-        publicUrl += WindowUtils.getLocation().getHostName() + (port == null ? "" : ":" + port) + "/public";
-
-        if (group != null) {
-            publicUrl += "/" + group;
-        }
-        if (tool != null) {
-            publicUrl += separator + tool;
-        }
-        if (folder != null) {
-            publicUrl += separator + folder;
-        }
-        if (document != null) {
-            publicUrl += separator + document;
-        }
-
-        return publicUrl;
-    }
-
     public String getTool() {
         return tool;
     }
@@ -194,7 +169,7 @@
         return getGroup() == null && getTool() == null && getFolder() == null && getDocument() == null;
     }
 
-    public boolean hasSameContainer(StateToken currentStateToken) {
+    public boolean hasSameContainer(final StateToken currentStateToken) {
         if (copy().clearDocument().getEncoded().equals(currentStateToken.copy().clearDocument().getEncoded())) {
             return true;
         }

Added: trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateTokenUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateTokenUtils.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateTokenUtils.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -0,0 +1,33 @@
+package org.ourproject.kune.platf.client.dto;
+
+import org.ourproject.kune.platf.client.ui.WindowUtils;
+
+public class StateTokenUtils {
+
+    public String getPublicUrl(final StateToken token) {
+        String publicUrl = "";
+        String separator = ".";
+
+        String group = token.getGroup();
+        String tool = token.getTool();
+        String folder = token.getFolder();
+        String document = token.getDocument();
+
+        publicUrl += WindowUtils.getPublicHost() + "/public";
+
+        if (group != null) {
+            publicUrl += "/" + group;
+        }
+        if (tool != null) {
+            publicUrl += separator + tool;
+        }
+        if (folder != null) {
+            publicUrl += separator + folder;
+        }
+        if (document != null) {
+            publicUrl += separator + document;
+        }
+
+        return publicUrl;
+    }
+}

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/WindowUtils.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/WindowUtils.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/WindowUtils.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -15,7 +15,6 @@
  */
 package org.ourproject.kune.platf.client.ui;
 
-
 public class WindowUtils {
 
     public static Location getLocation() {
@@ -31,36 +30,42 @@
         return result;
     }
 
+    public static String getPublicHost() {
+        // FIXME: Maybe get from InitData the site.domain
+        String port = WindowUtils.getLocation().getPort();
+        return "http://" + WindowUtils.getLocation().getHostName() + (port == null ? "" : ":" + port);
+    }
+
     private static native String getHash() /*-{
-                                               return $wnd.location.hash;
-                                           }-*/;
+        return $wnd.location.hash;
+    }-*/;
 
     private static native String getHost() /*-{
-                                               return $wnd.location.host;
-                                           }-*/;
+        return $wnd.location.host;
+    }-*/;
 
     private static native String getHostName() /*-{
-                                               return $wnd.location.hostname;
-                                           }-*/;
+        return $wnd.location.hostname;
+    }-*/;
 
     private static native String getHref() /*-{
-                                               return $wnd.location.href;
-                                           }-*/;
+        return $wnd.location.href;
+    }-*/;
 
     private static native String getPath() /*-{
-                                               return $wnd.location.pathname;
-                                           }-*/;
+        return $wnd.location.pathname;
+    }-*/;
 
     private static native String getPort() /*-{
-                                               return $wnd.location.port;
-                                           }-*/;
+        return $wnd.location.port;
+    }-*/;
 
     private static native String getProtocol() /*-{
-                                               return $wnd.location.protocol;
-                                           }-*/;
+        return $wnd.location.protocol;
+    }-*/;
 
     private static native String getQueryString() /*-{
-                                               return $wnd.location.search;
-                                           }-*/;
+        return $wnd.location.search;
+    }-*/;
 
 }
\ No newline at end of file

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplIE6.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplIE6.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplIE6.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -35,33 +35,33 @@
 
     @Override
     public native void initElement() /*-{
-          var _this = this;
-          _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::initializing = true;
+        var _this = this;
+        _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::initializing = true;
 
-          setTimeout(function() {
-            if (_this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::initializing == false) {
-              return;
-            }
+        setTimeout(function() {
+          if (_this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::initializing == false) {
+            return;
+          }
 
-            // Attempt to set the iframe document's body to 'contentEditable' mode.
-            // There's no way to know when the body will actually be available, so
-            // keep trying every so often until it is.
-            // Note: The body seems to be missing only rarely, so please don't remove
-            // this retry loop just because it's hard to reproduce.
-            var elem = _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem;
-            var doc = elem.contentWindow.document;
-            if (!doc.body) {
-                // Retry in 50 ms. Faster would run the risk of pegging the CPU. Slower
-                // would increase the probability of a user-visible delay.
-              setTimeout(arguments.callee, 50);
-              return;
-            }
-            var ct = "<html><head><style>@import url('" + $wnd.location.protocol + "//" + $wnd.location.host + $wnd.location.pathname + "css/richtext.css" + "');</style></head><body CONTENTEDITABLE='true'></body></html>" ;
-            doc.write( ct );
-            doc.body.contentEditable = true;
+          // Attempt to set the iframe document's body to 'contentEditable' mode.
+          // There's no way to know when the body will actually be available, so
+          // keep trying every so often until it is.
+          // Note: The body seems to be missing only rarely, so please don't remove
+          // this retry loop just because it's hard to reproduce.
+          var elem = _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem;
+          var doc = elem.contentWindow.document;
+          if (!doc.body) {
+              // Retry in 50 ms. Faster would run the risk of pegging the CPU. Slower
+              // would increase the probability of a user-visible delay.
+            setTimeout(arguments.callee, 50);
+            return;
+          }
+          var ct = "<html><head><style>@import url('" + $wnd.location.protocol + "//" + $wnd.location.host + $wnd.location.pathname + "css/richtext.css" + "');</style></head><body CONTENTEDITABLE='true'></body></html>" ;
+          doc.write( ct );
+          doc.body.contentEditable = true;
 
-            // Send notification that the iframe has reached design mode.
-            _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::onElementInitialized()();
-          }, 1);
-        }-*/;
+          // Send notification that the iframe has reached design mode.
+          _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::onElementInitialized()();
+        }, 1);
+    }-*/;
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplMozilla.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplMozilla.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplMozilla.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -35,42 +35,42 @@
 
     @Override
     public native void initElement() /*-{
-              // Mozilla doesn't allow designMode to be set reliably until the iframe is
-              // fully loaded.
-              var _this = this;
-              var iframe = _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem;
-              _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::initializing = true;
+        // Mozilla doesn't allow designMode to be set reliably until the iframe is
+        // fully loaded.
+        var _this = this;
+        var iframe = _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem;
+        _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::initializing = true;
 
-              iframe.onload = function() {
-                // Some Mozillae have the nasty habit of calling onload again when you set
-                // designMode, so let's avoid doing it more than once.
-                iframe.onload = null;
+        iframe.onload = function() {
+          // Some Mozillae have the nasty habit of calling onload again when you set
+          // designMode, so let's avoid doing it more than once.
+          iframe.onload = null;
 
-                // patch ccs inject:
+          // patch ccs inject:
 
-                var doc = _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem.contentWindow.document;
-                head=doc.getElementsByTagName('head')[0];
-                link=document.createElement('link');
-                link.setAttribute('rel',"stylesheet");
-                link.setAttribute('type',"text/css");
-                link.setAttribute('href',$wnd.location.protocol + "//" + $wnd.location.host + $wnd.location.pathname + "css/richtext.css" );
-                head.appendChild(link);
+          var doc = _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem.contentWindow.document;
+          head=doc.getElementsByTagName('head')[0];
+          link=document.createElement('link');
+          link.setAttribute('rel',"stylesheet");
+          link.setAttribute('type',"text/css");
+          link.setAttribute('href',$wnd.location.protocol + "//" + $wnd.location.host + $wnd.location.pathname + "css/richtext.css" );
+          head.appendChild(link);
 
-                 // -- patch
+           // -- patch
 
-                 // Send notification that the iframe has finished loading.
-                 _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::onElementInitialized()();
+           // Send notification that the iframe has finished loading.
+           _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::onElementInitialized()();
 
-                 // Don't set designMode until the RTA actually gets focused. This is
-                 // necessary because editing won't work on Mozilla if the iframe is
-                 // *hidden, but attached*. Waiting for focus gets around this issue.
-                 //
-                 // Note: This onfocus will not conflict with the addEventListener('focus',
-                 // ...) // in RichTextAreaImplStandard.
-                 iframe.contentWindow.onfocus = function() {
-                   iframe.contentWindow.onfocus = null;
-                   iframe.contentWindow.document.designMode = 'On';
-                 };
-               };
-              }-*/;
+           // Don't set designMode until the RTA actually gets focused. This is
+           // necessary because editing won't work on Mozilla if the iframe is
+           // *hidden, but attached*. Waiting for focus gets around this issue.
+           //
+           // Note: This onfocus will not conflict with the addEventListener('focus',
+           // ...) // in RichTextAreaImplStandard.
+           iframe.contentWindow.onfocus = function() {
+             iframe.contentWindow.onfocus = null;
+             iframe.contentWindow.document.designMode = 'On';
+           };
+         };
+    }-*/;
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplOpera.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplOpera.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplOpera.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -25,24 +25,24 @@
 
     @Override
     public native void initElement() /*-{
-               // Most browsers don't like setting designMode until slightly _after_
-               // the iframe becomes attached to the DOM. Any non-zero timeout will do
-               // just fine.
-               var _this = this;
-               _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::initializing = true;
-               setTimeout(function() {
-                 // Turn on design mode.
-                 _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem.contentWindow.document.designMode = 'On';
-                      // patch css inject:
-                      var elem = _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem;
-                      var doc = elem.contentWindow.document;
-                      var ct = "<html><head><style>@import url('" + $wnd.location.protocol + "//" + $wnd.location.host + $wnd.location.pathname + "css/richtext.css" + "');</style></head><body CONTENTEDITABLE='true'></body></html>" ;
-                      doc.write( ct );
-                      // -- patch
+        // Most browsers don't like setting designMode until slightly _after_
+        // the iframe becomes attached to the DOM. Any non-zero timeout will do
+        // just fine.
+        var _this = this;
+        _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::initializing = true;
+        setTimeout(function() {
+          // Turn on design mode.
+          _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem.contentWindow.document.designMode = 'On';
+               // patch css inject:
+               var elem = _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem;
+               var doc = elem.contentWindow.document;
+               var ct = "<html><head><style>@import url('" + $wnd.location.protocol + "//" + $wnd.location.host + $wnd.location.pathname + "css/richtext.css" + "');</style></head><body CONTENTEDITABLE='true'></body></html>" ;
+               doc.write( ct );
+               // -- patch
 
-                 // Send notification that the iframe has reached design mode.
-                 _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::onElementInitialized()();
-               }, 1);
-             }-*/;
+          // Send notification that the iframe has reached design mode.
+          _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::onElementInitialized()();
+        }, 1);
+    }-*/;
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplSafari.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplSafari.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/WrappedRichTextAreaImplSafari.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -25,25 +25,25 @@
 
     @Override
     public native void initElement() /*-{
-                  // Most browsers don't like setting designMode until slightly _after_
-                  // the iframe becomes attached to the DOM. Any non-zero timeout will do
-                  // just fine.
-                  var _this = this;
-                  _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::initializing = true;
-                  setTimeout(function() {
-                    // Turn on design mode.
-                    _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem.contentWindow.document.designMode = 'On';
+        // Most browsers don't like setting designMode until slightly _after_
+        // the iframe becomes attached to the DOM. Any non-zero timeout will do
+        // just fine.
+        var _this = this;
+        _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::initializing = true;
+        setTimeout(function() {
+          // Turn on design mode.
+          _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem.contentWindow.document.designMode = 'On';
 
-                   // patch css inject:
-                   var elem = _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem;
-                   var doc = elem.contentWindow.document;
-                   var ct = "<html><head><style>@import url('" +$wnd.location.protocol+ "//" + $wnd.location.host + $wnd.location.pathname + "css/richtext.css" + "');</style></head><body CONTENTEDITABLE='true'></body></html>" ;
-                   doc.write( ct );
-                   // -- patch
+         // patch css inject:
+         var elem = _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImpl::elem;
+         var doc = elem.contentWindow.document;
+         var ct = "<html><head><style>@import url('" +$wnd.location.protocol+ "//" + $wnd.location.host + $wnd.location.pathname + "css/richtext.css" + "');</style></head><body CONTENTEDITABLE='true'></body></html>" ;
+         doc.write( ct );
+         // -- patch
 
-                    // Send notification that the iframe has reached design mode.
-                    _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::onElementInitialized()();
-                  }, 1);
-                }-*/;
+          // Send notification that the iframe has reached design mode.
+          _this. at org.ourproject.kune.platf.client.ui.rte.impl.RichTextAreaImplStandard::onElementInitialized()();
+        }, 1);
+    }-*/;
 
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/ext/InsertLinkExtPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/ext/InsertLinkExtPanel.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/ui/rte/insertlink/ext/InsertLinkExtPanel.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -54,7 +54,7 @@
         Button preview = new Button(i18n.t("Preview"));
         preview.addListener(new ButtonListenerAdapter() {
             @Override
-            public void onClick(Button button, EventObject e) {
+            public void onClick(final Button button, final EventObject e) {
                 presenter.onPreview();
             }
         });
@@ -71,19 +71,19 @@
         previewPanel.clear();
     }
 
-    public void setPreviewUrl(String url) {
+    public void setPreviewUrl(final String url) {
         Frame previewFrame = new Frame(url);
         previewPanel.clear();
         previewPanel.add(previewFrame);
         previewPanel.doLayout();
     }
 
-    public void setUrl(String url) {
+    public void setUrl(final String url) {
         hrefField.setValue(url);
     }
 
     @Override
-    protected void updateValues(LinkInfo linkInfo) {
+    protected void updateValues(final LinkInfo linkInfo) {
         super.updateValues(linkInfo);
         String href = linkInfo.getHref();
         if (href != null && !href.equals("")) {

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManager.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManager.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManager.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -40,6 +40,10 @@
             "language.code", "language.englishName", "language.nativeName", "lastRevision.body", "lastRevision.title",
             "mimeType.mimetype" };
 
+    String[] DEF_GLOBAL_SEARCH_FIELDS_WITH_2MIME = new String[] { "authors.name", "authors.shortName",
+            "container.name", "language.code", "language.englishName", "language.nativeName", "lastRevision.body",
+            "lastRevision.title", "mimeType.mimetype", "mimeType.mimetype" };
+
     String[] DEF_GROUP_SEARCH_FIELDS = new String[] { "container.owner.shortName", "authors.name", "authors.shortName",
             "container.name", "language.code", "language.englishName", "language.nativeName", "lastRevision.body",
             "lastRevision.title" };
@@ -74,6 +78,9 @@
 
     SearchResult<Content> searchMime(String search, Integer firstResult, Integer maxResults, String mimetype);
 
+    SearchResult<Content> searchMime(String search, Integer firstResult, Integer maxResults, String mimetype,
+            String mimetype2);
+
     I18nLanguage setLanguage(User user, Long contentId, String languageCode) throws DefaultException;
 
     void setPublishedOn(User user, Long contentId, Date publishedOn) throws DefaultException;

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/content/ContentManagerDefault.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -184,10 +184,16 @@
 
     public SearchResult<Content> searchMime(final String search, final Integer firstResult, final Integer maxResults,
             final String mimetype) {
-        return search(getSearchQueries(search, mimetype), DEF_GLOBAL_SEARCH_FIELDS_WITH_MIME, getConditions(), firstResult,
-                maxResults);
+        return search(getSearchQueries(search, mimetype), DEF_GLOBAL_SEARCH_FIELDS_WITH_MIME, getConditions(),
+                firstResult, maxResults);
     }
 
+    public SearchResult<Content> searchMime(final String search, final Integer firstResult, final Integer maxResults,
+            final String mimetype, final String mimetype2) {
+        return search(getSearchQueries(search, mimetype, mimetype2), DEF_GLOBAL_SEARCH_FIELDS_WITH_2MIME,
+                getConditions2Mimes(), firstResult, maxResults);
+    }
+
     public I18nLanguage setLanguage(final User user, final Long contentId, final String languageCode)
             throws DefaultException {
         final Content content = finder.getContent(contentId);
@@ -227,11 +233,27 @@
         tagManager.setTags(user, content, tags);
     }
 
+    private Occur[] createConditions(final String[] fields) {
+        Occur[] conditions = new Occur[fields.length];
+        for (int i = 0; i < conditions.length; i++) {
+            conditions[i] = Occur.SHOULD;
+        }
+        return conditions;
+    }
+
     private MultiFieldQueryParser createParser() {
         final MultiFieldQueryParser parser = new MultiFieldQueryParser(DEF_GLOBAL_SEARCH_FIELDS, new StandardAnalyzer());
         return parser;
     }
 
+    private String[] createSearchQuery(final String search, final String[] fields) {
+        String[] query = new String[fields.length];
+        for (int i = 0; i < query.length; i++) {
+            query[i] = search;
+        }
+        return query;
+    }
+
     private String findInexistentTitle(final Container container, final String title) {
         String initialTitle = new String(title);
         while (findIfExistsTitle(container, initialTitle)) {
@@ -241,20 +263,33 @@
     }
 
     private Occur[] getConditions() {
-        Occur[] conditions = new Occur[ContentManager.DEF_GLOBAL_SEARCH_FIELDS_WITH_MIME.length];
-        for (int i = 0; i < conditions.length; i++) {
-            conditions[i] = Occur.SHOULD;
-        }
+        String[] fields = ContentManager.DEF_GLOBAL_SEARCH_FIELDS_WITH_MIME;
+        Occur[] conditions = createConditions(fields);
         conditions[conditions.length - 1] = Occur.MUST;
         return conditions;
     }
 
+    private Occur[] getConditions2Mimes() {
+        String[] fields = ContentManager.DEF_GLOBAL_SEARCH_FIELDS_WITH_2MIME;
+        Occur[] conditions = createConditions(fields);
+        conditions[conditions.length - 2] = Occur.SHOULD;
+        conditions[conditions.length - 1] = Occur.SHOULD;
+        return conditions;
+    }
+
     private String[] getSearchQueries(final String search, final String mimetype) {
-        String[] query = new String[ContentManager.DEF_GLOBAL_SEARCH_FIELDS_WITH_MIME.length];
-        for (int i = 0; i < query.length; i++) {
-            query[i] = search;
-        }
+        String[] fields = ContentManager.DEF_GLOBAL_SEARCH_FIELDS_WITH_MIME;
+        String[] query = createSearchQuery(search, fields);
         query[query.length - 1] = mimetype;
         return query;
     }
+
+    private String[] getSearchQueries(final String search, final String mimetype, final String mimetype2) {
+        String[] fields = ContentManager.DEF_GLOBAL_SEARCH_FIELDS_WITH_2MIME;
+        String[] query = createSearchQuery(search, fields);
+        query[query.length - 2] = mimetype;
+        query[query.length - 1] = mimetype2;
+        return query;
+    }
+
 }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/AccessLists.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/AccessLists.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/AccessLists.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -26,6 +26,7 @@
 import javax.persistence.OneToOne;
 import javax.persistence.Table;
 
+import org.hibernate.search.annotations.DocumentId;
 import org.ourproject.kune.platf.server.access.AccessRol;
 
 @Entity
@@ -43,6 +44,7 @@
 
     @Id
     @GeneratedValue
+    @DocumentId
     private Long id;
 
     public AccessLists() {

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/BasicMimeType.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/BasicMimeType.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/BasicMimeType.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -28,9 +28,9 @@
 @Embeddable
 public class BasicMimeType {
 
-    @Field(index = Index.TOKENIZED, store = Store.NO)
+    @Field(index = Index.UN_TOKENIZED, store = Store.NO)
     private String mimetype;
-    @Field(index = Index.TOKENIZED, store = Store.NO)
+    @Field(index = Index.UN_TOKENIZED, store = Store.NO)
     private String mimesubtype;
 
     public BasicMimeType() {

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/Comment.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/Comment.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/Comment.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -38,6 +38,7 @@
 import javax.persistence.Table;
 import javax.persistence.Transient;
 
+import org.hibernate.search.annotations.DocumentId;
 import org.hibernate.search.annotations.Field;
 import org.hibernate.search.annotations.Index;
 import org.hibernate.search.annotations.IndexedEmbedded;
@@ -49,6 +50,7 @@
 
     @Id
     @GeneratedValue
+    @DocumentId
     private Long id;
 
     @ManyToOne

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/ContentTranslation.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/ContentTranslation.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/ContentTranslation.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -29,6 +29,7 @@
 @Entity
 @Table(name = "content_translations")
 public class ContentTranslation implements HasId {
+
     @Id
     @GeneratedValue
     private Long id;
@@ -38,24 +39,24 @@
 
     private Long contentId;
 
+    public Long getContentId() {
+        return contentId;
+    }
+
     public Long getId() {
         return id;
     }
 
-    public void setId(final Long id) {
-        this.id = id;
+    public I18nLanguage getLanguage() {
+        return language;
     }
 
-    public Long getContentId() {
-        return contentId;
-    }
-
     public void setContentId(final Long contentId) {
         this.contentId = contentId;
     }
 
-    public I18nLanguage getLanguage() {
-        return language;
+    public void setId(final Long id) {
+        this.id = id;
     }
 
     public void setLanguage(final I18nLanguage language) {

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/CustomProperties.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/CustomProperties.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/CustomProperties.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -27,16 +27,11 @@
 import javax.persistence.Lob;
 import javax.persistence.Table;
 
-import org.hibernate.search.annotations.DocumentId;
-import org.hibernate.search.annotations.Indexed;
-
 @Entity
- at Indexed
 @Table(name = "customproperties")
 public class CustomProperties implements HasId {
 
     @Id
-    @DocumentId
     @GeneratedValue
     private Long id;
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/Group.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -60,6 +60,11 @@
     // Never expect or return null
     public static Group NO_GROUP = null;
 
+    @Id
+    @DocumentId
+    @GeneratedValue
+    private Long id;
+
     @Enumerated(EnumType.STRING)
     @Column(nullable = false)
     AdmissionType admissionType;
@@ -68,12 +73,7 @@
     @Column(nullable = false)
     GroupType groupType;
 
-    @Id
-    @DocumentId
-    @GeneratedValue
-    private Long id;
-
-    @Field(index = Index.TOKENIZED, store = Store.NO)
+    @Field(index = Index.UN_TOKENIZED, store = Store.NO)
     @Column(unique = true)
     @Length(min = 3, max = 15, message = "The shortname must be between 3 and 15 characters of length")
     @Pattern(regex = "^[a-z0-9_\\-]+$", message = "The name must be between 3 and 15 lowercase characters. It can only contain Western characters, numbers, and dashes")
@@ -299,11 +299,11 @@
         this.id = id;
     }
 
-    public void setLogo(byte[] logo) {
+    public void setLogo(final byte[] logo) {
         this.logo = logo;
     }
 
-    public void setLogoMime(BasicMimeType logoMime) {
+    public void setLogoMime(final BasicMimeType logoMime) {
         this.logoMime = logoMime;
     }
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/domain/User.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -82,7 +82,7 @@
     @Length(min = 3, max = 50)
     private String name;
 
-    @Field(index = Index.TOKENIZED, store = Store.NO)
+    @Field(index = Index.UN_TOKENIZED, store = Store.NO)
     @Column(unique = true)
     // http://www.hibernate.org/hib_docs/validator/reference/en/html/validator-defineconstraints.html
     @Length(min = 3, max = 15)
@@ -204,7 +204,7 @@
         return getUserGroup().hasLogo();
     }
 
-    public void setBuddiesVisibility(UserBuddiesVisibility buddiesVisibility) {
+    public void setBuddiesVisibility(final UserBuddiesVisibility buddiesVisibility) {
         this.buddiesVisibility = buddiesVisibility;
     }
 

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/rest/ContentJSONService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rest/ContentJSONService.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/rest/ContentJSONService.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -28,6 +28,7 @@
 import org.ourproject.kune.platf.server.manager.impl.SearchResult;
 import org.ourproject.kune.platf.server.mapper.Mapper;
 import org.ourproject.kune.rack.filters.rest.REST;
+import org.ourproject.kune.workspace.client.search.SearcherContants;
 
 import com.google.inject.Inject;
 
@@ -44,12 +45,12 @@
         this.mapper = mapper;
     }
 
-    @REST(params = { "query" })
+    @REST(params = { SearcherContants.QUERY_PARAM })
     public SearchResultDTO<LinkDTO> search(final String search) {
         return search(search, null, null);
     }
 
-    @REST(params = { "query", "start", "limit" })
+    @REST(params = { SearcherContants.QUERY_PARAM, SearcherContants.START_PARAM, SearcherContants.LIMIT_PARAM })
     public SearchResultDTO<LinkDTO> search(final String search, final Integer firstResult, final Integer maxResults) {
         SearchResult<Content> results = contentManager.search(search, firstResult, maxResults);
         SearchResult<Container> resultsContainer = containerManager.search(search, firstResult, maxResults);
@@ -58,13 +59,22 @@
         return map(results);
     }
 
-    @REST(params = { "query", "start", "limit", "mimetype" })
+    @REST(params = { SearcherContants.QUERY_PARAM, SearcherContants.START_PARAM, SearcherContants.LIMIT_PARAM,
+            SearcherContants.MIMETYPE_PARAM })
     public SearchResultDTO<LinkDTO> search(final String search, final Integer firstResult, final Integer maxResults,
             final String mimetype) {
         SearchResult<Content> results = contentManager.searchMime(search, firstResult, maxResults, mimetype);
         return map(results);
     }
 
+    @REST(params = { SearcherContants.QUERY_PARAM, SearcherContants.START_PARAM, SearcherContants.LIMIT_PARAM,
+            SearcherContants.MIMETYPE_PARAM, SearcherContants.MIMETYPE_PARAM2 })
+    public SearchResultDTO<LinkDTO> search(final String search, final Integer firstResult, final Integer maxResults,
+            final String mimetype, final String mimetype2) {
+        SearchResult<Content> results = contentManager.searchMime(search, firstResult, maxResults, mimetype, mimetype2);
+        return map(results);
+    }
+
     private SearchResultDTO<LinkDTO> map(final SearchResult<Content> results) {
         return mapper.mapSearchResult(results, LinkDTO.class);
     }

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/rest/GroupJSONService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rest/GroupJSONService.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/rest/GroupJSONService.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -26,6 +26,7 @@
 import org.ourproject.kune.platf.server.manager.impl.SearchResult;
 import org.ourproject.kune.platf.server.mapper.Mapper;
 import org.ourproject.kune.rack.filters.rest.REST;
+import org.ourproject.kune.workspace.client.search.SearcherContants;
 
 import com.google.inject.Inject;
 
@@ -39,12 +40,12 @@
         this.mapper = mapper;
     }
 
-    @REST(params = { "query" })
+    @REST(params = { SearcherContants.QUERY_PARAM })
     public SearchResultDTO<LinkDTO> search(final String search) {
         return search(search, null, null);
     }
 
-    @REST(params = { "query", "start", "limit" })
+    @REST(params = { SearcherContants.QUERY_PARAM, SearcherContants.START_PARAM, SearcherContants.LIMIT_PARAM })
     public SearchResultDTO<LinkDTO> search(final String search, final Integer firstResult, final Integer maxResults) {
         SearchResult<Group> results = manager.search(search, firstResult, maxResults);
         return mapper.mapSearchResult(results, LinkDTO.class);

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/rest/I18nTranslationJSONService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rest/I18nTranslationJSONService.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/rest/I18nTranslationJSONService.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -28,6 +28,7 @@
 import org.ourproject.kune.platf.server.manager.impl.SearchResult;
 import org.ourproject.kune.platf.server.mapper.Mapper;
 import org.ourproject.kune.rack.filters.rest.REST;
+import org.ourproject.kune.workspace.client.search.SearcherContants;
 
 import com.google.inject.Inject;
 
@@ -41,26 +42,26 @@
         this.mapper = mapper;
     }
 
-    @REST(params = { "query" })
+    @REST(params = { SearcherContants.QUERY_PARAM })
     public List<I18nTranslationDTO> search(final String language) {
         List<I18nTranslation> results = manager.getUntranslatedLexicon(language);
         return mapper.mapList(results, I18nTranslationDTO.class);
     }
 
-    @REST(params = { "query" })
-    public List<I18nTranslationDTO> searchtranslated(final String language) {
-        List<I18nTranslation> results = manager.getTranslatedLexicon(language);
-        return mapper.mapList(results, I18nTranslationDTO.class);
-    }
-
-    @REST(params = { "query", "start", "limit" })
+    @REST(params = { SearcherContants.QUERY_PARAM, SearcherContants.START_PARAM, SearcherContants.LIMIT_PARAM })
     public SearchResultDTO<I18nTranslationDTO> search(final String language, final Integer firstResult,
             final Integer maxResults) {
         SearchResult<I18nTranslation> results = manager.getUntranslatedLexicon(language, firstResult, maxResults);
         return mapper.mapSearchResult(results, I18nTranslationDTO.class);
     }
 
-    @REST(params = { "query", "start", "limit" })
+    @REST(params = { SearcherContants.QUERY_PARAM })
+    public List<I18nTranslationDTO> searchtranslated(final String language) {
+        List<I18nTranslation> results = manager.getTranslatedLexicon(language);
+        return mapper.mapList(results, I18nTranslationDTO.class);
+    }
+
+    @REST(params = { SearcherContants.QUERY_PARAM, SearcherContants.START_PARAM, SearcherContants.LIMIT_PARAM })
     public SearchResultDTO<I18nTranslationDTO> searchtranslated(final String language, final Integer firstResult,
             final Integer maxResults) {
         SearchResult<I18nTranslation> results = manager.getTranslatedLexicon(language, firstResult, maxResults);

Modified: trunk/src/main/java/org/ourproject/kune/platf/server/rest/UserJSONService.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/rest/UserJSONService.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/rest/UserJSONService.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -26,6 +26,7 @@
 import org.ourproject.kune.platf.server.manager.impl.SearchResult;
 import org.ourproject.kune.platf.server.mapper.Mapper;
 import org.ourproject.kune.rack.filters.rest.REST;
+import org.ourproject.kune.workspace.client.search.SearcherContants;
 
 import com.google.inject.Inject;
 
@@ -39,12 +40,12 @@
         this.mapper = mapper;
     }
 
-    @REST(params = { "query" })
+    @REST(params = { SearcherContants.QUERY_PARAM })
     public SearchResultDTO<LinkDTO> search(final String search) {
         return search(search, null, null);
     }
 
-    @REST(params = { "query", "start", "limit" })
+    @REST(params = { SearcherContants.QUERY_PARAM, SearcherContants.START_PARAM, SearcherContants.LIMIT_PARAM })
     public SearchResultDTO<LinkDTO> search(final String search, final Integer firstResult, final Integer maxResults) {
         SearchResult<User> results = manager.search(search, firstResult, maxResults);
         return mapper.mapSearchResult(results, LinkDTO.class);

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/WorkspaceModule.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -25,6 +25,7 @@
 import org.ourproject.kune.platf.client.app.ApplicationComponentGroup;
 import org.ourproject.kune.platf.client.app.EntityOptionsGroup;
 import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.dto.StateTokenUtils;
 import org.ourproject.kune.platf.client.dto.UserSimpleDTO;
 import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
 import org.ourproject.kune.platf.client.i18n.I18nUITranslationService;
@@ -293,7 +294,8 @@
         register(ApplicationComponentGroup.class, new Factory<SitePublicSpaceLink>(SitePublicSpaceLink.class) {
             @Override
             public SitePublicSpaceLink create() {
-                final SitePublicSpaceLinkPresenter presenter = new SitePublicSpaceLinkPresenter($(StateManager.class));
+                final SitePublicSpaceLinkPresenter presenter = new SitePublicSpaceLinkPresenter($(StateManager.class),
+                        $(StateTokenUtils.class));
                 final SitePublicSpaceLinkPanel panel = new SitePublicSpaceLinkPanel(presenter,
                         $(WorkspaceSkeleton.class), $(I18nUITranslationService.class), $(Images.class));
                 presenter.init(panel);
@@ -301,6 +303,13 @@
             }
         });
 
+        register(Singleton.class, new Factory<StateTokenUtils>(StateTokenUtils.class) {
+            @Override
+            public StateTokenUtils create() {
+                return new StateTokenUtils();
+            }
+        });
+
         register(NoDecoration.class, new Factory<ToastMessage>(ToastMessage.class) {
             @Override
             public ToastMessage create() {
@@ -720,7 +729,7 @@
             }
 
             @Override
-            public void onAfterCreated(FileUploader uploader) {
+            public void onAfterCreated(final FileUploader uploader) {
                 $(ContextNavigator.class).addFileUploaderListener(uploader);
             }
         });
@@ -926,7 +935,7 @@
             public InsertImageLocal create() {
                 final InsertImageLocalPresenter presenter = new InsertImageLocalPresenter($(InsertImageDialog.class));
                 final InsertImageLocalPanel panel = new InsertImageLocalPanel(presenter,
-                        $(I18nTranslationService.class));
+                        $(I18nTranslationService.class), $(FileDownloadUtils.class));
                 presenter.init(panel);
                 return presenter;
             }
@@ -955,7 +964,7 @@
             public InsertLinkLocal create() {
                 final InsertLinkLocalPresenter presenter = new InsertLinkLocalPresenter($(InsertLinkDialog.class));
                 final InsertLinkLocalPanel panel = new InsertLinkLocalPanel(presenter, $(WorkspaceSkeleton.class),
-                        $(I18nTranslationService.class), $(FileDownloadUtils.class));
+                        $(I18nTranslationService.class), $(FileDownloadUtils.class), $(StateTokenUtils.class));
                 presenter.init(panel);
                 return presenter;
             }
@@ -966,7 +975,7 @@
             public InsertLocalMedia create() {
                 final InsertLocalMediaPresenter presenter = new InsertLocalMediaPresenter($(InsertMediaDialog.class));
                 final InsertLocalMediaPanel panel = new InsertLocalMediaPanel(presenter,
-                        $(I18nTranslationService.class));
+                        $(I18nTranslationService.class), $(FileDownloadUtils.class));
                 presenter.init(panel);
                 return presenter;
             }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalimg/InsertImageLocalPanel.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -1,17 +1,46 @@
 package org.ourproject.kune.workspace.client.editor.insertlocalimg;
 
+import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO;
+import org.ourproject.kune.platf.client.dto.LinkDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
-import org.ourproject.kune.platf.client.ui.TextUtils;
+import org.ourproject.kune.platf.client.ui.WindowUtils;
+import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
 import org.ourproject.kune.platf.client.ui.rte.insertimg.abstractimg.InsertImageAbstractPanel;
+import org.ourproject.kune.workspace.client.search.AbstractLiveSearcherField;
+import org.ourproject.kune.workspace.client.search.SearcherContants;
 
-import com.gwtext.client.widgets.form.Label;
+import com.calclab.suco.client.events.Listener;
+import com.gwtext.client.core.UrlParam;
 
 public class InsertImageLocalPanel extends InsertImageAbstractPanel implements InsertImageLocalView {
 
-    public InsertImageLocalPanel(final InsertImageLocalPresenter presenter, final I18nTranslationService i18n) {
+    protected String src;
+
+    public InsertImageLocalPanel(final InsertImageLocalPresenter presenter, final I18nTranslationService i18n,
+            final FileDownloadUtils downloadUtils) {
         super(i18n.t("Local"), presenter);
-        Label label = new Label();
-        label.setHtml(TextUtils.IN_DEVELOPMENT + "<br/><br/>");
-        insert(0, label);
+
+        AbstractLiveSearcherField cb = new AbstractLiveSearcherField(i18n,
+                SearcherContants.CONTENT_TEMPLATE_TEXT_PREFIX
+                        + downloadUtils.getLogoImageUrl(new StateToken("{shortName}"))
+                        + SearcherContants.CONTENT_TEMPLATE_TEXT_SUFFIX, SearcherContants.CONTENT_DATA_PROXY_URL,
+                new Listener<LinkDTO>() {
+                    public void onEvent(final LinkDTO link) {
+                        src = WindowUtils.getPublicHost() + downloadUtils.getImageUrl(new StateToken(link.getLink()));
+                    }
+                });
+        cb.setLabel(i18n.t("Local images"));
+        cb.setHideLabel(false);
+        cb.setAllowBlank(false);
+        cb.setWidth(220);
+        cb.setStoreBaseParams(new UrlParam[] { new UrlParam(SearcherContants.MIMETYPE_PARAM, BasicMimeTypeDTO.IMAGE) });
+
+        super.insert(0, cb);
     }
+
+    @Override
+    public String getSrc() {
+        return src;
+    }
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocallink/InsertLinkLocalPanel.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -21,31 +21,32 @@
 
 import org.ourproject.kune.platf.client.dto.LinkDTO;
 import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.dto.StateTokenUtils;
 import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
 import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
 import org.ourproject.kune.platf.client.ui.rte.insertlink.abstractlink.InsertLinkAbstractPanel;
 import org.ourproject.kune.workspace.client.search.AbstractLiveSearcherField;
-import org.ourproject.kune.workspace.client.search.AbstractLiveSearcherPanel;
+import org.ourproject.kune.workspace.client.search.SearcherContants;
 import org.ourproject.kune.workspace.client.skel.WorkspaceSkeleton;
 
 import com.calclab.suco.client.events.Listener;
 
 public class InsertLinkLocalPanel extends InsertLinkAbstractPanel implements InsertLinkLocalView {
 
-    private static final String DATA_PROXY_URL = "/kune/json/ContentJSONService/search";
-
     private String href;
 
     public InsertLinkLocalPanel(final InsertLinkLocalPresenter presenter, final WorkspaceSkeleton ws,
-            I18nTranslationService i18n, FileDownloadUtils downloadUtils) {
+            final I18nTranslationService i18n, final FileDownloadUtils downloadUtils,
+            final StateTokenUtils stateTokenUtils) {
         super(i18n.t("Local link"), presenter);
 
         AbstractLiveSearcherField cb = new AbstractLiveSearcherField(i18n,
-                AbstractLiveSearcherPanel.TEMPLATE_TEXT_PREFIX
+                SearcherContants.CONTENT_TEMPLATE_TEXT_PREFIX
                         + downloadUtils.getLogoImageUrl(new StateToken("{shortName}"))
-                        + AbstractLiveSearcherPanel.TEMPLATE_TEXT_SUFFIX, DATA_PROXY_URL, new Listener<LinkDTO>() {
-                    public void onEvent(LinkDTO link) {
-                        href = (new StateToken(link.getLink())).getPublicUrl();
+                        + SearcherContants.CONTENT_TEMPLATE_TEXT_SUFFIX, SearcherContants.CONTENT_DATA_PROXY_URL,
+                new Listener<LinkDTO>() {
+                    public void onEvent(final LinkDTO link) {
+                        href = stateTokenUtils.getPublicUrl(new StateToken(link.getLink()));
                     }
                 });
         cb.setLabel(i18n.t("Local content"));

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertLocalMediaPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertLocalMediaPanel.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/editor/insertlocalmedia/InsertLocalMediaPanel.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -1,14 +1,50 @@
 package org.ourproject.kune.workspace.client.editor.insertlocalmedia;
 
+import org.ourproject.kune.platf.client.dto.BasicMimeTypeDTO;
+import org.ourproject.kune.platf.client.dto.LinkDTO;
+import org.ourproject.kune.platf.client.dto.StateToken;
 import org.ourproject.kune.platf.client.i18n.I18nTranslationService;
-import org.ourproject.kune.platf.client.ui.TextUtils;
+import org.ourproject.kune.platf.client.ui.WindowUtils;
+import org.ourproject.kune.platf.client.ui.download.FileDownloadUtils;
 import org.ourproject.kune.platf.client.ui.rte.insertmedia.abstractmedia.InsertMediaAbstractPanel;
+import org.ourproject.kune.workspace.client.search.AbstractLiveSearcherField;
+import org.ourproject.kune.workspace.client.search.SearcherContants;
 
+import com.calclab.suco.client.events.Listener;
+import com.gwtext.client.core.UrlParam;
+
 public class InsertLocalMediaPanel extends InsertMediaAbstractPanel implements InsertLocalMediaView {
 
-    public InsertLocalMediaPanel(final InsertLocalMediaPresenter presenter, final I18nTranslationService i18n) {
+    protected String src;
+
+    public InsertLocalMediaPanel(final InsertLocalMediaPresenter presenter, final I18nTranslationService i18n,
+            final FileDownloadUtils downloadUtils) {
         super(i18n.t("Local"), presenter);
-        setIntro(TextUtils.IN_DEVELOPMENT + "<br/><br/>");
+
+        AbstractLiveSearcherField cb = new AbstractLiveSearcherField(i18n,
+                SearcherContants.CONTENT_TEMPLATE_TEXT_PREFIX
+                        + downloadUtils.getLogoImageUrl(new StateToken("{shortName}"))
+                        + SearcherContants.CONTENT_TEMPLATE_TEXT_SUFFIX, SearcherContants.CONTENT_DATA_PROXY_URL,
+                new Listener<LinkDTO>() {
+                    public void onEvent(final LinkDTO link) {
+                        src = WindowUtils.getPublicHost() + downloadUtils.getImageUrl(new StateToken(link.getLink()));
+                    }
+                });
+        cb.setLabel(i18n.t("Local media"));
+        cb.setHideLabel(false);
+        cb.setAllowBlank(false);
+        cb.setWidth(220);
+        cb.setStoreBaseParams(new UrlParam[] { new UrlParam(SearcherContants.MIMETYPE_PARAM, BasicMimeTypeDTO.AUDIO),
+                new UrlParam(SearcherContants.MIMETYPE_PARAM, BasicMimeTypeDTO.VIDEO) });
+
+        hrefField.setVisible(false);
+        hrefField.disable();
+
+        super.insert(0, cb);
     }
 
+    @Override
+    public String getSrc() {
+        return src;
+    }
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherField.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherField.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherField.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -26,9 +26,10 @@
     private static final String ICON_URL_FIELD = "iconUrl";
     private static final String LINK_FIELD = "link";
     public static final int PAGINATION_SIZE = 10;
+    private final Store store;
 
-    public AbstractLiveSearcherField(I18nTranslationService i18n, String templateText, String dataProxyUrl,
-            final Listener<LinkDTO> listener) {
+    public AbstractLiveSearcherField(final I18nTranslationService i18n, final String templateText,
+            final String dataProxyUrl, final Listener<LinkDTO> listener) {
         DataProxy dataProxy = new HttpProxy(dataProxyUrl, Connection.POST);
 
         final JsonReader reader = new JsonReader(new RecordDef(
@@ -38,7 +39,7 @@
         reader.setTotalProperty("size");
         reader.setId(SHORT_NAME_FIELD);
 
-        final Store store = new Store(dataProxy, reader);
+        store = new Store(dataProxy, reader);
 
         store.load(new UrlParam[] { new UrlParam("query", "."), new UrlParam("first", 1),
                 new UrlParam("max", PAGINATION_SIZE) });
@@ -75,4 +76,8 @@
         });
 
     }
+
+    public void setStoreBaseParams(final UrlParam[] baseParams) {
+        store.setBaseParams(baseParams);
+    }
 }

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherPanel.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/AbstractLiveSearcherPanel.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -27,11 +27,8 @@
 
 public class AbstractLiveSearcherPanel extends FormPanel {
 
-    public static final String TEMPLATE_TEXT_PREFIX = "<div class=\"search-item\"><span class=\"kune-IconHyperlink\"><img src=\"";
-    public static final String TEMPLATE_TEXT_SUFFIX = "\" style=\"height: 16px; width: 16px;\" />{shortName}:&nbsp;{longName}</span></div>";
-
-    public AbstractLiveSearcherPanel(I18nTranslationService i18n, String templateText, String dataProxyUrl,
-            final Listener<LinkDTO> listener) {
+    public AbstractLiveSearcherPanel(final I18nTranslationService i18n, final String templateText,
+            final String dataProxyUrl, final Listener<LinkDTO> listener) {
         super.setBorder(false);
         super.setWidth(275);
         super.setHideLabels(true);

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/EntityLiveSearcherPanel.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -38,7 +38,8 @@
     private final FileDownloadUtils downloadUtils;
 
     public EntityLiveSearcherPanel(final EntityLiveSearcherPresenter presenter,
-            final EntityLiveSearcherType searchType, final I18nTranslationService i18n, FileDownloadUtils downloadUtils) {
+            final EntityLiveSearcherType searchType, final I18nTranslationService i18n,
+            final FileDownloadUtils downloadUtils) {
         this.presenter = presenter;
         this.searchType = searchType;
         this.i18n = i18n;
@@ -85,12 +86,12 @@
             break;
         }
 
-        String templateText = AbstractLiveSearcherPanel.TEMPLATE_TEXT_PREFIX
+        String templateText = SearcherContants.CONTENT_TEMPLATE_TEXT_PREFIX
                 + downloadUtils.getLogoImageUrl(new StateToken("{shortName}"))
-                + AbstractLiveSearcherPanel.TEMPLATE_TEXT_SUFFIX;
+                + SearcherContants.CONTENT_TEMPLATE_TEXT_SUFFIX;
 
         liveSearcher = new AbstractLiveSearcherPanel(i18n, templateText, dataProxyUrl, new Listener<LinkDTO>() {
-            public void onEvent(LinkDTO link) {
+            public void onEvent(final LinkDTO link) {
                 presenter.onSelection(link);
             }
         });

Added: trunk/src/main/java/org/ourproject/kune/workspace/client/search/SearcherContants.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/search/SearcherContants.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/search/SearcherContants.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -0,0 +1,15 @@
+package org.ourproject.kune.workspace.client.search;
+
+public interface SearcherContants {
+
+    String START_PARAM = "start";
+    String LIMIT_PARAM = "limit";
+    String QUERY_PARAM = "query";
+    String MIMETYPE_PARAM = "mimetype";
+    String MIMETYPE_PARAM2 = "mimetype2";
+
+    String CONTENT_DATA_PROXY_URL = "/kune/json/ContentJSONService/search";
+    String CONTENT_TEMPLATE_TEXT_PREFIX = "<div class=\"search-item\"><span class=\"kune-IconHyperlink\"><img src=\"";
+    String CONTENT_TEMPLATE_TEXT_SUFFIX = "\" style=\"height: 16px; width: 16px;\" />{shortName}:&nbsp;{longName}</span></div>";
+
+}

Modified: trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java	2009-04-06 22:51:40 UTC (rev 1092)
+++ trunk/src/main/java/org/ourproject/kune/workspace/client/sitebar/sitepublic/SitePublicSpaceLinkPresenter.java	2009-04-18 15:37:20 UTC (rev 1093)
@@ -26,6 +26,7 @@
 import org.ourproject.kune.platf.client.dto.StateContainerDTO;
 import org.ourproject.kune.platf.client.dto.StateContentDTO;
 import org.ourproject.kune.platf.client.dto.StateToken;
+import org.ourproject.kune.platf.client.dto.StateTokenUtils;
 import org.ourproject.kune.platf.client.state.StateManager;
 
 import com.calclab.suco.client.events.Listener;
@@ -33,8 +34,10 @@
 public class SitePublicSpaceLinkPresenter implements SitePublicSpaceLink {
 
     private SitePublicSpaceLinkView view;
+    private final StateTokenUtils stateTokenUtils;
 
-    public SitePublicSpaceLinkPresenter(final StateManager stateManager) {
+    public SitePublicSpaceLinkPresenter(final StateManager stateManager, final StateTokenUtils stateTokenUtils) {
+        this.stateTokenUtils = stateTokenUtils;
         stateManager.onStateChanged(new Listener<StateAbstractDTO>() {
             public void onEvent(final StateAbstractDTO state) {
                 setState(state);
@@ -54,7 +57,7 @@
         if (state instanceof StateContainerDTO) {
             final StateToken token = state.getStateToken();
             if (((StateContainerDTO) state).getAccessLists().getViewers().getMode().equals(GroupListDTO.EVERYONE)) {
-                final String publicUrl = token.getPublicUrl();
+                final String publicUrl = stateTokenUtils.getPublicUrl(token);
                 view.setContentGotoPublicUrl(publicUrl);
                 if (state instanceof StateContentDTO) {
                     StateContentDTO content = (StateContentDTO) state;




More information about the kune-commits mailing list