Author: andrei_exadel
Date: 2009-03-23 09:57:53 -0400 (Mon, 23 Mar 2009)
New Revision: 13100
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByShelf.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/shelfResult.xhtml
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchWidget.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelvesList.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css
Log:
RF-6578
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-03-23
13:40:27 UTC (rev 13099)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-03-23
13:57:53 UTC (rev 13100)
@@ -39,6 +39,7 @@
public ImageSearchHelper() {
options = new ArrayList<ISearchOption>();
+ options.add(new SearchOptionByShelf());
options.add(new SearchOptionByAlbum());
options.add(new SearchOptionByImage());
options.add(new SearchOptionByUser());
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByShelf.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByShelf.java
(rev 0)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/SearchOptionByShelf.java 2009-03-23
13:57:53 UTC (rev 13100)
@@ -0,0 +1,61 @@
+/**
+ *
+ */
+package org.richfaces.realworld.search;
+
+import java.util.List;
+
+import org.richfaces.realworld.domain.Shelf;
+import org.richfaces.realworld.service.ISearchAction;
+
+/**
+ * @author Andrey
+ *
+ */
+public class SearchOptionByShelf extends ISearchOption {
+
+ /* (non-Javadoc)
+ * @see org.richfaces.realworld.search.ISearchOption#getName()
+ */
+ @Override
+ public String getName() {
+ return "Shelves";
+ }
+
+ /* (non-Javadoc)
+ * @see org.richfaces.realworld.search.ISearchOption#getSearchResultName()
+ */
+ @Override
+ public String getSearchResultName() {
+ return "Shelf search result";
+ }
+
+ /* (non-Javadoc)
+ * @see org.richfaces.realworld.search.ISearchOption#getSearchResultTemplate()
+ */
+ @Override
+ public String getSearchResultTemplate() {
+ return "/includes/search/result/shelfResult.xhtml";
+ }
+
+ /* (non-Javadoc)
+ * @see org.richfaces.realworld.search.ISearchOption#getTemplate()
+ */
+ @Override
+ public String getTemplate() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see
org.richfaces.realworld.search.ISearchOption#search(org.richfaces.realworld.service.ISearchAction,
java.lang.String, boolean, boolean)
+ */
+ @Override
+ public void search(ISearchAction action, String searchQuery,
+ boolean searchInMyAlbums, boolean searchInShared) {
+ List<Shelf> list = action.searchByShelfs(searchQuery, searchInMyAlbums,
searchInShared);
+ setSearchResult(list);
+
+ }
+
+}
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/shelfResult.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/shelfResult.xhtml
(rev 0)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/shelfResult.xhtml 2009-03-23
13:57:53 UTC (rev 13100)
@@ -0,0 +1,14 @@
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+ <a4j:outputPanel rendered="#{result.size() > 0}">
+ <ui:decorate template="/includes/shelf/shelvesList.xhtml">
+ <ui:param name="shelfs" value="#{result}" />
+ <ui:define name="header" />
+ </ui:decorate>
+ </a4j:outputPanel>
+ <h:outputText rendered="#{result.size() == 0}" value="No results
found" />
+</ui:composition>
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchWidget.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelvesList.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css 2009-03-23
13:40:27 UTC (rev 13099)
+++
trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css 2009-03-23
13:57:53 UTC (rev 13100)
@@ -425,7 +425,7 @@
.search-options {
background: transparent none repeat scroll 0% 0%;
overflow: hidden;
- height: 90px;
+ height: 110px;
width: 327px;
position: absolute;
top: 107px;
@@ -459,7 +459,7 @@
.search-hide-options-div {
position: absolute;
- top: 70px;
+ bottom: 5px;
left: 163px;
}