Class Index | File Index

Classes


Class gva.component.Channel


Extends .

Defined in: Channel.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
 
A list of episode item DOM elements
<static>  
gva.component.Channel.EventType
Enumeration for event types dispatched from this class
 
Monitors the viewport size so that the grid can flex.
Method Summary
Method Attributes Method Name and Description
 
addEpisode(episode)
Adds an episode to the list based on current sorting/grouping states.
 
Creates the episode markup and sets listeners.
 
Creates and sets event listeners for the scrollbar.
 
Forwards a mousewheel event to the scroller's mousewheel handler.
 
initialize($context)
 
End video playback handler.
 
onPlayClick(event)
Click handler for episode list play button clicks that loads the clicked episode.
 
Click handler for episode remove button clicks.
 
Handles a mousedown on the scroller up/down buttons
 
Stops scrolling after a mouseup/mouseout event following a scroll button press.
 
Refreshes position of scrollbar to accomodate changed content.
 
Event handler for when an episode's show link is clicked.
 
Event handler for when a show tab link in the accordion is clicked.
 
onSortClick(event)
Event handler for when a sort by link is clicked.
 
playEpisode(episode)
Plays an episode and handles all related events including notification, displaying the episode as 'now playing' in the channel list, and adding the episode to the channel list if it wasn't found.
 
Refreshes position of scrollbar to accomodate changed content.
 
removeEpisode(episode)
Removes and episode from the channel list.
 
Resets the channel by clearing out the episode nodes and data.
 
setNowPlaying(episodeID)
Updates now-playing episode in channel and scrolls it into view.
 
setPlayer(player)
Sets the video player to be used.
 
Sorts function for video data by airdate in descending order.
 
Sorts function for video data by airdate in descending order.
 
Sorts the episodes based on current sorting options (grouping and order).
 
Toggles the channel playlist expanded state.
 
toggleTab($tab, animated)
Toggle accordion open/close with optional animation.
Class Detail
gva.component.Channel()
Field Detail
$episodes
A list of episode item DOM elements

<static> gva.component.Channel.EventType
Enumeration for event types dispatched from this class

viewportMonitor
Monitors the viewport size so that the grid can flex.
Method Detail
addEpisode(episode)
Adds an episode to the list based on current sorting/grouping states.
Parameters:
{gva.vo.Episode} episode
Episode data.

{Element} createEpisodeNode(episode)
Creates the episode markup and sets listeners.
Parameters:
{gva.vo.Episode} episode
Episode data.
Returns:
{Element} The episode element.

createScroller()
Creates and sets event listeners for the scrollbar.

handleMouseWheel(event)
Forwards a mousewheel event to the scroller's mousewheel handler.
Parameters:
{goog.events.MouseWheelEvent} event
The mouse wheel event object.

initialize($context)
Parameters:
$context

onEpisodeComplete()
End video playback handler.

onPlayClick(event)
Click handler for episode list play button clicks that loads the clicked episode.
Parameters:
{goog.events.BrowserEvent} event
A click event from a channel episode.

onRemoveClick(event)
Click handler for episode remove button clicks.
Parameters:
{goog.events.BrowserEvent} event
A click event from a channel episode.

onScrollButtonMousedown(event)
Handles a mousedown on the scroller up/down buttons
Parameters:
{goog.events.BrowserEvent} event
The event which triggered the handler.

onScrollButtonStop(event)
Stops scrolling after a mouseup/mouseout event following a scroll button press.
Parameters:
{goog.events.BrowserEvent} event
The event which triggered the handler.

onScrollChange()
Refreshes position of scrollbar to accomodate changed content.

onShowLinkClicked(event)
Event handler for when an episode's show link is clicked.
Parameters:
{goog.events.Event} event
The event which triggered the handler.

onShowTabClicked(event)
Event handler for when a show tab link in the accordion is clicked.
Parameters:
{goog.events.Event} event
The event which triggered the handler.

onSortClick(event)
Event handler for when a sort by link is clicked. Updates the sorting options and then calls the sort method.
Parameters:
{goog.events.Event} event
The event which triggered the handler.

playEpisode(episode)
Plays an episode and handles all related events including notification, displaying the episode as 'now playing' in the channel list, and adding the episode to the channel list if it wasn't found.
Parameters:
{gva.vo.Episode} episode
Episode data from the feed.

refreshScroller()
Refreshes position of scrollbar to accomodate changed content.

removeEpisode(episode)
Removes and episode from the channel list.
Parameters:
{element} episode
The episode dom node to be removed.

reset()
Resets the channel by clearing out the episode nodes and data.

setNowPlaying(episodeID)
Updates now-playing episode in channel and scrolls it into view.
Parameters:
{number} episodeID
The episode id to highlight as now playing.

setPlayer(player)
Sets the video player to be used.
Parameters:
{Object} player
The video player component instance.

{Number} sortByAirdateAscending(a, b)
Sorts function for video data by airdate in descending order.
Parameters:
{object} a
Video object.
{object} b
Video object.
Returns:
{Number} The difference (a - b) between video airdate timestamps.

{Number} sortByAirdateDescending(a, b)
Sorts function for video data by airdate in descending order.
Parameters:
{object} a
Video object.
{object} b
Video object.
Returns:
{Number} The difference (b - a) between video airdate timestamps.

sortEpisodes()
Sorts the episodes based on current sorting options (grouping and order). Note that these options must be set prior to calling this function.

toggleChannels()
Toggles the channel playlist expanded state.

toggleTab($tab, animated)
Toggle accordion open/close with optional animation.
Parameters:
{Element} $tab
The li tab element to toggle.
{Boolean} animated
Optional animation control - set to false to expand without slide animation.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Dec 22 2011 17:41:22 GMT-0800 (PST)