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 Widegt 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) 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) 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