ChannelListView Class
_views\ChannelListView.js:1
This class manages the UI of all blocks within a channel as well as the ability to sort and reorder the content of a channel
Constructor
ChannelListView
()
Object
Returns:
instantiated CompCampaignNavigator
Item Index
Methods
- _createNewChannelBlock
- _createSortable
- _deleteChannelBlock
- _deselectBlocksFromChannel
- _getTotalDurationChannel
- _listenAddRemoveBlocks
- _listenBlockLengthChanged
- _listenBlockSelected
- _listenChannelBlockSelected
- _listenContextMenu
- _listenReset
- _listenResourceRemoved
- _listenSceneRemoved
- _listenStorylineBlockSelected
- _listenStorylineChannelSelected
- _listenTimelineSelected
- _loadChannelBlocks
- _onBlockLengthChanged
- _onContentMenuSelection
- _onTimelineDeleted
- _openAddBlockWizard
- _reOrderChannelBlocks
- _resetChannel
- _selectLastBlockOnChannel
- _sortableDrag
- _sortableDragStart
- _sortablePress
- _sortableSnap
- initialize
- moveBlockFirst
- moveBlockLast
Methods
_createNewChannelBlock
-
i_blockID
-
i_resourceID
-
i_sceneID
Create a new block (player) on the current channel and refresh UI bindings such as properties open events.
Parameters:
-
i_blockID
Number -
i_resourceID
Numberoptional param used when creating a block with embedded resource (i.e.: video / image / swf)
-
i_sceneID
Numberoptional param used when creating a block with embedded scene
Returns:
false
_createSortable
-
i_selector
Create a draggable sortable channel list
Parameters:
-
i_selector
String
_deleteChannelBlock
()
Delete the selected block from the channel
Returns:
none
_deselectBlocksFromChannel
()
Reset the UI when no block on channel is selected.
_getTotalDurationChannel
()
Number
Get the total duration in seconds of the channel
Returns:
totalChannelLength
_listenAddRemoveBlocks
()
Wire the UI and listen to channel remove and channel add button events.
Returns:
none
_listenBlockLengthChanged
()
Listen to when a block length has changed so we can update all other blocks offset respectively
Returns:
none
_listenBlockSelected
()
Listen when a block is selected, if its properties need to be open than open panel. Also, reference the selected block internally and fire event announcing it was selected. We also load required AMD moduels if this is the first time a block was selected (i.e.: modules were never loaded yet) and when they finish loaded we continue with thread execution.
Returns:
none
_listenChannelBlockSelected
-
e
When block is selected within a channel, get the resource element so we can select it and fire the BLOCK_SELECTED event
Parameters:
-
e
Event
_listenContextMenu
()
Listen to any canvas right click
_listenReset
()
Listen to reset of when switching to different campaign so we forget current state
_listenResourceRemoved
()
Listen to when a resource has been deleted so we can delete the associated block and re calc channel length
Returns:
none
_listenSceneRemoved
()
Listen to when a resource has been deleted so we can delete the associated block and re calc channel length
Returns:
none
_listenStorylineBlockSelected
-
e
When a block is selected within a storyline get the resource element so we can select it and fire global block selection event
Parameters:
-
e
Event
_listenStorylineChannelSelected
()
Listen to when a channel is selected, but through the storyline so we can re-select appropriate block in channel list
_listenTimelineSelected
()
Listen to the BB.EVENTS.ON_VIEWER_SELECTED so we know when a timeline has been selected. Once a timeline selection was done we check if the event if one of a timeline owner or other; if of timeline we populate channel list, if latter reset list.
Returns:
none
_loadChannelBlocks
-
i_campaign_timeline_id
-
i_campaign_timeline_chanel_id
Load the channel list with its own blocks and refresh the UI.
Parameters:
-
i_campaign_timeline_id
Number -
i_campaign_timeline_chanel_id
Number
Returns:
none
_onBlockLengthChanged
-
e
Listen to when a block on channel is modified with respect to its length
Parameters:
-
e
Eventblock changed data
_onContentMenuSelection
-
i_command
On Scene right click context menu selection command
Parameters:
-
i_command
String
_onTimelineDeleted
()
Wire the UI for timeline deletion.
Returns:
none
_openAddBlockWizard
()
Launch the add new block wizard UI component.
Returns:
none
_reOrderChannelBlocks
()
Update the blocks offset times according to current order of LI elements and reorder accordingly in msdb.
Returns:
none
_resetChannel
()
Forget the selected channel and reset channel member references
_selectLastBlockOnChannel
()
Select the last block on the channel (last LI element) and fire a click event on it.
Returns:
none
_sortableDrag
()
Sortable drag channel list
_sortableDragStart
()
Sortable drag channel list on press
_sortablePress
()
Sortable channel list on press
_sortableSnap
()
snap channels to set rounder values
initialize
()
Init the ChannelList component and enable sortable channels UI via drag and drop operations.
moveBlockFirst
()
Move current selected block to be the first to play within the channel
moveBlockLast
()
Move current selected block to be the last to play within the channel