APIs

Show:

CampaignView module manages campaign related logic and UI

Constructor

CampaignView

() Object

Returns:

Object:

instantiated CampaignView

Methods

_deleteTimeline

(
  • e
  • i_caller
)

When a timeline is deleted, remove it from the local timelines hash and notify sequencer.

Parameters:

  • e Event
  • i_caller Object

Returns:

none

_listenAddNewTimeline

()

Wire the UI for adding a new timeline

_listenBackToCampaigns

()

Go back to campaign selection screen

_listenCampaignExpandedView

()

Listen to when we should expand the view of all collapsible bootstrap widgets in our campaign view moduke

_listenCampaignPreview

()

Wire the UI for launching campaign preview

_listenCampaignSelected

()

Listen to campaign selection

_listenCampaignTimelinePreview

()

Wire the UI for launching specific timeline preview

_listenDelTimeline

()

Wire the UI for timeline deletion.

Returns:

none

_listenScreenTemplateEdit

()

Listen screen template edit button

_listenSelectNextChannel

()

Listen to select next channel clicj

_listenTimelineLengthChanged

()

Listen for updates on changes in length of currently selected timeline through the pepper framework

_listenTimelineViewSelected

()

This is a key method that we use to listen to fire event of ScreenLayoutSelectorView.ON_VIEWER_SELECTED. Upon the event we examine e.context.m_owner to find out who was the owner if the fired event (i.e.: instanceof) so we can select tha appropriate campaign or timeline in the UI. See further notes in code.

Returns:

none

_listenToggleTimelinesCollapsible

()

Toggle the arrow of the collapsible timelines / sequencer UI widget

_loadSequencerFirstTimeline

()

Select the first timeline in the sequencer UI and if fails, select main Campaign > timeline.

Returns:

none

_loadTimelinesFromDB

()

Load all of the campaign's timelines from msdb and populate the sequencer.

Returns:

none

_render

()

If loading an existing campaign (i.e.: we are not creating a brand new one) we load all campaign data from msdb and populate UI

_restart

()

Reset the module and settings

_updatedTimelinesLengthUI

()

Update UI of total timelines length on length changed

duplicateTimeline

(
  • i_playerData
)
Number

Duplicate a campaign_timeline including it's screen layout, channels and blocks

Parameters:

  • i_playerData Number

Returns:

Number:

Unique clientId.

getSelectedCampaign

() Number

Get currently selected campaign, which we hold a reference to.

Returns:

Number:

m_selected_campaign_id

getSelectedTimeline

() Number

Get currently selected timeline id for campaign

Returns:

Number:

m_selected_timeline_id

getTimelineInstance

(
  • i_campaign_timeline_id
)
Object

Get selected timeline instance, which we hold a reference to, via it's timeline_id.

Parameters:

  • i_campaign_timeline_id Number

Returns:

Object:

timeline instance

getTimelineViewStack

() Object

Get the timeline viewstack and provide to others.

Returns:

Object:

timeline viewStack instance

initialize

()

Init the instance and listen to VIEW_CHANGED event so we know when it's time to act. If no campaign was selected, we launch the campaign wizard creator, otherwise we populate the campaign / timelines. We also use this method to wire the rest of the campaigns elements.

Returns:

none

populateTimelines

(
  • order
)

recreate the UI for all timelines in the timelined sequence supplied

Parameters:

  • order Array

    of timelines to create

Events

CAMPAIGN_EXPANDED_VIEW

final static

Custom event fired when a requesing an expanded view of the timelines and storyboard

Event Payload:

  • caller This
  • context Self

    caller

CAMPAIGN_SELECTED

final static

Custom event fired before changing to a new campaign

Event Payload:

  • caller This
  • context Self

    caller

  • UNKNOWN Event

CAMPAIGN_TIMELINE_CHANGED

final static

Custom event fired when a timeline or channel or block within the timeline has changed it ignores the event.

Event Payload:

  • caller This
  • context Self

    caller

  • timelineID Event

    of the timeline selected