mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.0 to HEAD
5091: AWC-1118 5092: pooledactor assignment 5100: AWC-1133 5103: CML copy and cm:name 5106: Bubble view discussion topics 5107: AWC-1030, AWC-1137, Console buttons git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5312 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1184,7 +1184,7 @@ public class TrashcanBean implements IContextListener
|
||||
}
|
||||
else
|
||||
{
|
||||
img = Utils.getFileTypeImage(node.getName(), false);
|
||||
img = Utils.getFileTypeImage(node.getName(), true);
|
||||
}
|
||||
buf.append("<img width=16 height=16 alt='' src='").append(contextPath).append(img).append("'>");
|
||||
buf.append("</td><td>");
|
||||
|
@@ -1036,7 +1036,7 @@ public class ForumsBean implements IContextListener
|
||||
{
|
||||
ResponseWriter out = context.getResponseWriter();
|
||||
|
||||
out.write("<tr><td colspan='99' align='right'>");
|
||||
out.write("<tr><td colspan='99' align='center'>");
|
||||
for (Iterator i = richList.getChildren().iterator(); i.hasNext(); /**/)
|
||||
{
|
||||
// output all remaining child components that are not UIColumn
|
||||
|
@@ -30,12 +30,14 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.event.ActionEvent;
|
||||
import javax.transaction.UserTransaction;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.search.impl.lucene.QueryParser;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -45,7 +47,6 @@ import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||
import org.alfresco.service.cmr.security.PersonService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.ISO9075;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.context.IContextListener;
|
||||
import org.alfresco.web.app.context.UIContextService;
|
||||
@@ -441,7 +442,7 @@ public class UsersBean implements IContextListener
|
||||
{
|
||||
this.usersRichList.setValue(null);
|
||||
|
||||
if (this.searchCriteria == null || this.searchCriteria.length() == 0)
|
||||
if (this.searchCriteria == null || this.searchCriteria.trim().length() == 0)
|
||||
{
|
||||
this.users = Collections.<Node>emptyList();
|
||||
}
|
||||
@@ -456,21 +457,30 @@ public class UsersBean implements IContextListener
|
||||
tx.begin();
|
||||
|
||||
// define the query to find people by their first or last name
|
||||
String search = ISO9075.encode(this.searchCriteria);
|
||||
String query = "( TYPE:\"{http://www.alfresco.org/model/content/1.0}person\") AND " +
|
||||
"((@\\{http\\://www.alfresco.org/model/content/1.0\\}firstName:" + search +
|
||||
"*) OR (@\\{http\\://www.alfresco.org/model/content/1.0\\}lastName:" + search +
|
||||
"*) OR (@\\{http\\://www.alfresco.org/model/content/1.0\\}userName:" + search +
|
||||
"*)))";
|
||||
String search = this.searchCriteria.trim();
|
||||
StringBuilder query = new StringBuilder(256);
|
||||
query.append("TYPE:\"{http://www.alfresco.org/model/content/1.0}person\" AND (");
|
||||
for (StringTokenizer t = new StringTokenizer(search, " "); t.hasMoreTokens(); /**/)
|
||||
{
|
||||
String term = QueryParser.escape(t.nextToken());
|
||||
query.append("((@\\{http\\://www.alfresco.org/model/content/1.0\\}firstName:*");
|
||||
query.append(term);
|
||||
query.append("*) OR (@\\{http\\://www.alfresco.org/model/content/1.0\\}lastName:*");
|
||||
query.append(term);
|
||||
query.append("*) OR (@\\{http\\://www.alfresco.org/model/content/1.0\\}userName:");
|
||||
query.append(term);
|
||||
query.append("*)) "); // final space here is important as default OR separator
|
||||
}
|
||||
query.append(")");
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Query: " + query);
|
||||
logger.debug("Query: " + query.toString());
|
||||
|
||||
// define the search parameters
|
||||
SearchParameters params = new SearchParameters();
|
||||
params.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||
params.addStore(Repository.getStoreRef());
|
||||
params.setQuery(query);
|
||||
params.setQuery(query.toString());
|
||||
|
||||
List<NodeRef> people = this.searchService.query(params).getNodeRefs();
|
||||
|
||||
|
@@ -115,6 +115,47 @@ public class UIOpenSearch extends SelfRenderingComponent
|
||||
out.write("', '");
|
||||
out.write(engine.getUrl());
|
||||
out.write("');\n");
|
||||
|
||||
// pass in NLS strings
|
||||
out.write(clientId);
|
||||
out.write(".setMsgNoResults(\"");
|
||||
out.write(Application.getMessage(context, "no_results"));
|
||||
out.write("\");\n");
|
||||
|
||||
out.write(clientId);
|
||||
out.write(".setMsgOf(\"");
|
||||
out.write(Application.getMessage(context, "of"));
|
||||
out.write("\");\n");
|
||||
|
||||
out.write(clientId);
|
||||
out.write(".setMsgFailedGenerateUrl(\"");
|
||||
out.write(Application.getMessage(context, "failed_gen_url"));
|
||||
out.write("\");\n");
|
||||
|
||||
out.write(clientId);
|
||||
out.write(".setMsgFailedSearch(\"");
|
||||
out.write(Application.getMessage(context, "failed_search"));
|
||||
out.write("\");\n");
|
||||
|
||||
out.write(clientId);
|
||||
out.write(".setMsgFirstPage(\"");
|
||||
out.write(Application.getMessage(context, "first_page"));
|
||||
out.write("\");\n");
|
||||
|
||||
out.write(clientId);
|
||||
out.write(".setMsgPreviousPage(\"");
|
||||
out.write(Application.getMessage(context, "prev_page"));
|
||||
out.write("\");\n");
|
||||
|
||||
out.write(clientId);
|
||||
out.write(".setMsgNextPage(\"");
|
||||
out.write(Application.getMessage(context, "next_page"));
|
||||
out.write("\");\n");
|
||||
|
||||
out.write(clientId);
|
||||
out.write(".setMsgLastPage(\"");
|
||||
out.write(Application.getMessage(context, "last_page"));
|
||||
out.write("\");\n");
|
||||
}
|
||||
out.write("</script>\n");
|
||||
|
||||
|
Reference in New Issue
Block a user