APIs

Show:

This module manages active list of remote stations (screens) retrieved from the server Poll for stations status every n seconds, as well as remote manage each station individually.

Constructor

StationsListView

(
  • i_container
)
Object

Parameters:

  • i_container String

    element that CompCampaignNavigator inserts itself into

Returns:

Object:

instantiated StationsListView

Methods

_getStationModel

(
  • i_station_id
)

Translate a station id to Backbone.Model

Parameters:

  • i_station_id Number

_initStationRename

()

Init station rename component

_listenEnableServerMode

(
  • i_playerData
)
Number

Listen to enable server mode

Parameters:

  • i_playerData Number

Returns:

Number:

Unique clientId.

_listenIpChange

()

Listen to changes in IP selection to assign to station local server

_listenPortChange

()

Listen to changes in port selection to assign to station local server

_listenSnapshotComplete

()

Listen when a new remote snapshot is available on the server for a selected station, so we can display it in the properties panel We use the Image.load event to be notified when the Image element has succesfully recived a working image path

Returns:

none

_listenStationSelected

()

Listen to station selection, populate the properties panel

_onAddStation

(
  • e
)

When data is available from the remote server, update the list with current data.

Parameters:

  • e Event

    remote server data call back from Ajax call

Returns:

none

_onChangedCampaign

()

On change campaign action apply changes to local msdb

_onUpdateStation

(
  • i_stationModel
)

Update existing station in list with data from remote mediaSERVER If a station is selected in the list, make sure we also update its open property values

Parameters:

  • i_stationModel Object

_populateStationCampaignDropDown

(
  • i_campaignID
)

Populate the selection drop down UI with all available campaigns for station selection

Parameters:

  • i_campaignID Number

_reconfigSnapLocation!~YUIDOC_LINE~!!~YUIDOC_LINE~!_reconfigSnapLocation: function () );!~YUIDOC_LINE~! $(Elements.SNAP_SHOT_IMAGE).css({!~YUIDOC_LINE~! left: box + 15 + 'px'!~YUIDOC_LINE~! });!~YUIDOC_LINE~! $(Elements.SNAP_SHOT_SPINNER).css({!~YUIDOC_LINE~! left: (offset / 2) - 20 + 'px'!~YUIDOC_LINE~! });!~YUIDOC_LINE~! },

()

Reconfigure the location (offset) of the screen snapshot UI depending on current property with

_removeStationFromLI

(
  • i_stationID
)

Remove a selected station from UI LI

Parameters:

  • i_stationID Number

_selectCampaignDropDownForStation

(
  • i_stationID
)

Select the campaign that is bound to i_stationID and select it in the dropdown UI

Parameters:

  • i_stationID Number

_sendSnapshotCommand

(
  • i_station
)

Send a remote snapshot command for station id and wait for a call back.

Parameters:

  • i_station Number

Returns:

none

_sendStationEvent

(
  • i_eventName
  • i_eventValue
)
!~YUIDOC_LINE~! var self = this;!~YUIDOC_LINE~! model.sendStationEvent(model.getDataByID(self.m_selected_resource_id)'id', i_eventName, i_eventValue);!~YUIDOC_LINE~! $(Elements.EVENT_SEND_BUTTON).button('disable');!~YUIDOC_LINE~!

Send a remote value (i.e.: remote event / remote touch) to a selected station. If events are enabled at the campaign level, the _sendStationEvent method enables users to fire events on a selected Station and thus change campaign attributes.

Parameters:

  • i_eventName String
  • i_eventValue String

Returns:

!~YUIDOC_LINE~! var self = this;!~YUIDOC_LINE~! model.sendStationEvent(model.getDataByID(self.m_selected_resource_id)'id', i_eventName, i_eventValue);!~YUIDOC_LINE~! $(Elements.EVENT_SEND_BUTTON).button('disable');!~YUIDOC_LINE~!:

none _sendStationEvent: function (i_eventName, i_eventValue) ,

_stopSnapshot

()

Stop any ongoing snapshots that are pending and reset all related snapshot UI and values

_updatePropButtonState

(
  • i_model
)

Update properties > button state on station selection

Parameters:

  • i_model Object

_updateProperties

(
  • i_model
)

Update the properties UI station stats from Backbone collection > model

Parameters:

  • i_model Object

_wireSnapshot

()

Wire the Snapshot UI button and handle related opeations before and after executing a station snapshot

_wireUI

()

Bind all event listeners on the UI for remote stations commands including commands

Returns:

none

getTotalActiveStation

(
  • i_playerData
)
Number

Get current total active, non red stations

Parameters:

  • i_playerData Number

Returns:

Number:

total active / non red stations

initialize

()

Constructor

render

()

Render is called when the StackView is in view which tightly coupled with StationView instance so we can update the station list status when this View is visible

unrender

()

Unrender method used to notify this View that is it no longer visible so we can stop updating remote station status to increase app perfromance