Class Papercube.ViewSelectView
| Extends: | Papercube.DropDownView |
| Defined in: | clients/papercube/views/viewselect.js |
| Version: | 1.0 |
| Author: | Peter Bergstrom |
| Copyright: | 2008-2009 Peter Bergström. |
Overview
This is the view drop down... it's a bit more complicated than most drop downs.
Property Summary
-
- (Boolean) isViewingModeSelector [R/W]Specifies what the views pulls its data from.
- Properties borrowed from class Papercube.DropDownView:
- _mouseDownHappened, button, buttonAction, buttonLabel, choices, emptyElement, funcScope, isButton, isEnabled, lazyListGenFuncFunc, list, orientationDown, outlets, selectionAction, showingList, value
Method Summary
-
- (void) mouseDown(evt)If the button has been clicked before show the list, if it is clicked again but it has the active class, hide the list. -
- (void) selectItem(str)Depending on the viewing mode, set a viewingChoice or a viewChoice, then hide the list. -
- (void) showList()Show the list. -
- (void) viewChoiceDidChange()Observe viewChoice and set the innerHTML of the button to the viewChoice name if it is that drop down. -
- (void) viewingModeDidChange()Observe viewingMode and set the innerHTML of the button to the viewingMode name if it is that drop down.
- Methods borrowed from class Papercube.DropDownView:
- _showList, init, isEnabledDidChange, mouseExited, mouseUp, valueDidChange
Property Details
isViewingModeSelector [R/W]
Specifies what the views pulls its data from.
- Boolean isViewingModeSelector
Default Value: NO
Discussion
Either viewingMode or viewChoice.
Method Detail
mouseDown()
If the button has been clicked before show the list, if it is clicked again but it has the active class, hide the list.
- (void) mouseDown (evt)
Parameters
(DOM Event)evt The mouseDown event.
selectItem()
Depending on the viewing mode, set a viewingChoice or a viewChoice, then hide the list.
- (void) selectItem (str)
Parameters
str {string} The selected item's string.
showList()
Show the list.
- (void) showList ()
Discussion
Construct the HTML based on the type of list.
viewChoiceDidChange()
Observe viewChoice and set the innerHTML of the button to the viewChoice name if it is that drop down.
- (void) viewChoiceDidChange ()
Observes
viewChoice
viewingModeDidChange()
Observe viewingMode and set the innerHTML of the button to the viewingMode name if it is that drop down.
- (void) viewingModeDidChange ()
Observes
viewingMode