Module: viewHome_js

Methods

(inner) createHomeIcon(data, pos) → {HTMLElement}

Creates a home icon
Parameters:
Name Type Description
data object Icon data
pos number Icon position
Source:
Returns:
Created icon wrapped in col
Type
HTMLElement

(inner) createHomeWidget(data, pos) → {HTMLElement}

Creates a home widget
Parameters:
Name Type Description
data object Widget data
pos number Widget position
Source:
Returns:
Created widget wrapped in col
Type
HTMLElement

(inner) getHomeIconType(cmd, action) → {string}

Returns the friendly type of the home icon
Parameters:
Name Type Description
cmd string the command
action string action of the command
Source:
Returns:
friendly type
Type
string

(inner) handleHome() → {void}

Handles home
Source:
Returns:
Type
void

(inner) homeMoveIcon(oldPos, newPos) → {void}

Moves a home icon
Parameters:
Name Type Description
oldPos number Old icon pos
newPos number New icon pos
Source:
Returns:
Type
void

(inner) homeWidgetsRefresh() → {void}

Refreshes the home widgets. This function is called by the websocket keepalive timer if the websocket is connected.
Source:
Returns:
Type
void

(inner) isHomeWidget(type) → {boolean}

Checks the type of a home screen element
Parameters:
Name Type Description
type string Home widget type
Source:
Returns:
true if it is a home widget type, else false
Type
boolean

(inner) parseHomeIcons(obj) → {void}

Parses the MYMPD_API_HOME_ICON_LIST response
Parameters:
Name Type Description
obj object jsonrpc response object
Source:
Returns:
Type
void

(inner) updateHomeWidget(card) → {void}

Updates the widget by calling the script
Parameters:
Name Type Description
card HTMLElement | ChildNode Widget to populate
Source:
Returns:
Type
void

(inner) updateHomeWidgetIframe(card, data) → {void}

Updates the iFrame widget
Parameters:
Name Type Description
card HTMLElement | ChildNode Widget to refresh
data object Widget data
Source:
Returns:
Type
void

(inner) updateHomeWidgetScript(card, data) → {void}

Updates the script widget
Parameters:
Name Type Description
card HTMLElement | ChildNode Widget to refresh
data object Widget data
Source:
Returns:
Type
void

(inner) viewHomeClickHandler(event, target) → {void}

Click event handler for home icons
Parameters:
Name Type Description
event MouseEvent click event
target HTMLElement calculated target
Source:
Returns:
Type
void