Namespace Papercube.searchController
| Extends: | SC.Object |
| Defined in: | clients/papercube/controllers/search.js |
| Version: | 1.0 |
| Author: | Peter Bergstrom |
| Copyright: | 2008-2009 Peter Bergström. |
Overview
Controls the search of data. Interfaces with the server.
Property Summary
-
+ (Integer) _sc [R/W]Internal search count for synchronization. -
+ (Object) _searchHeadings [R/W]These are the valid search headings. -
+ (Integer) _searchLimit [R/W]Limit for paging. -
+ (Integer) _searchStart [R/W]Start for paging. -
+ (String) searchCount [R/W]The search count is a string that is displayed at the bottom of the search window. -
+ (String) searchHeading [R/W]Currently selected search heading. -
+ (String) searchKey [R/W]The current searchKey. -
+ (Array) searchKeys [R/W]These are the search keys. -
+ (String) searchResults [R/W]The data retrieved from a search. -
+ (String) searchValue [R/W]The current searchValue. -
+ (Boolean) showMoreAllowed [R/W]Show more button visiblity. -
+ (Boolean) showRequestSpinner [R/W]boolean that is bound to show the request spinner. -
+ (String) viewingModeBinding [R/W]The current viewing mode is specified in the viewController.
Method Summary
-
+ (void) displayResults()Display the results from the server. -
+ (void) init()Initialiation function. -
+ (void) performSearch()Perform the search operation. -
+ (void) selectionDidChange()Observe the selection of the search results. -
+ (void) showMoreFromSearch()Without starting a new search, increment the start index and get more search results. -
+ (void) viewingModeDidChange()Observes the viewingMode from the viewingController and switches search options based on it.
Property Details
_searchHeadings [R/W]
These are the valid search headings.
+ Object _searchHeadings
Discussion
Depending on the view mode, you switch the heading.
Values
{ "Authors": "Search for authors", "Papers": "Search for papers" }
searchCount [R/W]
The search count is a string that is displayed at the bottom of the search window.
+ String searchCount
Default Value: ''
searchHeading [R/W]
Currently selected search heading.
+ String searchHeading
Default Value: ''
Discussion
Defaults to Papers.
searchResults [R/W]
The data retrieved from a search.
+ String searchResults
Discussion
This property is used by the searchResultsCollectionView.
showMoreAllowed [R/W]
Show more button visiblity.
+ Boolean showMoreAllowed
Default Value: NO
Discussion
Only visible when there are results.
showRequestSpinner [R/W]
boolean that is bound to show the request spinner.
+ Boolean showRequestSpinner
Default Value: NO
viewingModeBinding [R/W]
The current viewing mode is specified in the viewController.
+ String viewingModeBinding
Bound To: "Papercube.viewController.viewingMode"
Method Detail
selectionDidChange()
Observe the selection of the search results.
+ (void) selectionDidChange ()
Observes
selection
Discussion
Call the viewController when it changes.
showMoreFromSearch()
Without starting a new search, increment the start index and get more search results.
+ (void) showMoreFromSearch ()
viewingModeDidChange()
Observes the viewingMode from the viewingController and switches search options based on it.
+ (void) viewingModeDidChange ()
Observes
viewingMode