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

Method Summary

Property Details

_sc [R/W]

Internal search count for synchronization.

+   Integer _sc

Default Value: 0


_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" }


_searchLimit [R/W]

Limit for paging.

+   Integer _searchLimit

Default Value: 50


_searchStart [R/W]

Start for paging.

+   Integer _searchStart

Default Value: 0


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.


searchKey [R/W]

The current searchKey.

+   String searchKey

Default Value: ''


searchKeys [R/W]

These are the search keys.

+   Array searchKeys


searchResults [R/W]

The data retrieved from a search.

+   String searchResults

Discussion

This property is used by the searchResultsCollectionView.


searchValue [R/W]

The current searchValue.

+   String searchValue

Default Value: ''


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

displayResults()

Display the results from the server.

+   (void) displayResults ()


init()

Initialiation function.

+   (void) init ()


performSearch()

Perform the search operation.

+   (void) performSearch ()


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


Documentation generated by JsDoc Toolkit 2.0.2 on Sat Nov 21 2009 21:24:39 GMT-0800 (PST)