Class Papercube.AuthorStatView
| Extends: | SC.View |
| Defined in: | clients/papercube/views/author_stat.js |
| Version: | 1.0 |
| Author: | Peter Bergstrom |
| Copyright: | 2008-2009 Peter Bergström. |
Overview
This is a more classical web-based view on an author's citation and references.
Property Summary
-
- (Boolean) _calledForAuthors [R/W]Reset when new content is set. -
- (Boolean) _calledForPapers [R/W]Reset when new content is set. -
- (String) _mouseDownGUID [R/W]The guid of the last clicked paper or author. -
- (Object) citeAuthorCount [R/W]refAuthor count. -
- (Object) citeAuthorList [R/W]citeAuthorList view. -
- (String) citeAuthorSortOrderBinding [R/W]Citation author sort order binding. -
- (Object) collaboratorCount [R/W]Collaborator count. -
- (Object) collaboratorList [R/W]collaboratorList view. -
- (String) collaboratorSortOrderBinding [R/W]Collaborator sort order binding. -
- (Object) graph [R/W]papersPerYear graph itself. -
- (Object) nameLabel [R/W]Name label. -
- (Object) outlets [R/W]Outlets for author stat view. -
- (Object) paperCount [R/W]Paper count. -
- (Object) paperList [R/W]paperList view. -
- (String) paperSortOrderBinding [R/W]Paper sort order binding. -
- (Object) papersPerYear [R/W]papersPerYear graph box. -
- (Object) refAuthorCount [R/W]refAuthor count. -
- (Object) refAuthorList [R/W]refAuthorList view. -
- (String) refAuthorSortOrderBinding [R/W]Reference author sort order binding. -
- (Object) stats [R/W]The container for the stat view boxes.
Method Summary
-
- (void) _clearGraph()Clear the graph innerHTML. -
- (Array) _collectAuthors(auths)Create the request and call the server. -
- (void) _renderGraph()Render the graph. -
- (Boolean) _renderList(type)Render a list of papers or authors. -
- (void) contentDidChange()Re-render the view when the content, sort order changes, or view is set to be visible. -
- (void) init()Initalization function. -
- (void) mouseDown(evt)Save the GUID of the element and then show the fan.
Property Details
_calledForAuthors [R/W]
Reset when new content is set.
- Boolean _calledForAuthors
Default Value: NO
Discussion
Is set to YES once the call for the server for additional author data is initiated.
_calledForPapers [R/W]
Reset when new content is set.
- Boolean _calledForPapers
Default Value: NO
Discussion
Is set to YES once the call for the server for additional paper data is initiated.
citeAuthorCount [R/W]
refAuthor count.
- Object citeAuthorCount
Discussion
Bound to the '.citeauthor-count?' element.
citeAuthorList [R/W]
citeAuthorList view.
- Object citeAuthorList
Discussion
Shows the authors that have cited the author. Bound to the '.refauthor-list?' element.
citeAuthorSortOrderBinding [R/W]
Citation author sort order binding.
- String citeAuthorSortOrderBinding
Bound To: 'Papercube.authorStatController.citeAuthorSortOrder'
collaboratorCount [R/W]
Collaborator count.
- Object collaboratorCount
Discussion
Bound to the '.collaborator-count?' element.
collaboratorList [R/W]
collaboratorList view.
- Object collaboratorList
Discussion
Shows the author's collaborators. Bound to the '.collaborator-list?' element.
collaboratorSortOrderBinding [R/W]
Collaborator sort order binding.
- String collaboratorSortOrderBinding
Bound To: 'Papercube.authorStatController.collaboratorSortOrder'
paperList [R/W]
paperList view.
- Object paperList
Discussion
Shows the author's papers. Bound to the '.paper-list?' element.
paperSortOrderBinding [R/W]
Paper sort order binding.
- String paperSortOrderBinding
Bound To: 'Papercube.authorStatController.paperSortOrder'
papersPerYear [R/W]
papersPerYear graph box.
- Object papersPerYear
Discussion
Bound to the '.papersperyear?' element.
refAuthorCount [R/W]
refAuthor count.
- Object refAuthorCount
Discussion
Bound to the '.refauthor-count?' element.
refAuthorList [R/W]
refAuthorList view.
- Object refAuthorList
Discussion
Shows the authors that the author has referenced. Bound to the '.refauthor-list?' element.
refAuthorSortOrderBinding [R/W]
Reference author sort order binding.
- String refAuthorSortOrderBinding
Bound To: 'Papercube.authorStatController.refAuthorSortOrder'
stats [R/W]
The container for the stat view boxes.
- Object stats
Discussion
Is set to display none by default so that the boxes don't show when there isn't any content. Bound to the '.stats?' element.
Method Detail
_collectAuthors()
Create the request and call the server.
- (Array) _collectAuthors (auths)
Parameters
auths {Array} The author relation array.
Returns
(Array) Returns a list of guids that are not in the data store.
_renderList()
Render a list of papers or authors.
- (Boolean) _renderList (type)
Parameters
type {string} The type of the list shown. Either 'collaborators', 'papers', 'refAuthors', or 'citeAuthors'.
Returns
(Boolean) Returns NO if there is no content.
contentDidChange()
Re-render the view when the content, sort order changes, or view is set to be visible.
- (void) contentDidChange ()
Observes
content
isVisible
paperSortOrder
collaboratorSortOrder
refAuthorSortOrder
citeAuthorSortOrder
mouseDown()
Save the GUID of the element and then show the fan.
- (void) mouseDown (evt)
Parameters
(DOM Event)evt The mouseDown event.