Module: modalScripts_js

Methods

(inner) addScriptAPIcall(event) → {void}

Adds an API call to the script content element
Parameters:
Name Type Description
event Event triggering event
Source:
Returns:
Type
void

(inner) addScriptArgument() → {void}

Appends an argument to the list of script arguments
Source:
Returns:
Type
void

(inner) addScriptFunction(event) → {void}

Adds a function to the script content element
Parameters:
Name Type Description
event Event triggering event
Source:
Returns:
Type
void

(inner) apiParamsToArgs(p) → {string}

Adds the documented api params to the options lua table for the add api call function
Parameters:
Name Type Description
p object parameters object
Source:
Returns:
lua code
Type
string

(inner) deleteScript(el, script) → {void}

Deletes a script after confirmation
Parameters:
Name Type Description
el EventTarget triggering element
script string script to delete
Source:
Returns:
Type
void

(inner) deleteScriptCheckError(obj) → {void}

Handler for the MYMPD_API_SCRIPT_RM jsonrpc response
Parameters:
Name Type Description
obj object jsonrpc response
Source:
Returns:
Type
void

(inner) getImportScript(script) → {void}

Imports a script
Parameters:
Name Type Description
script string script to import
Source:
Returns:
Type
void

(inner) getImportScriptList() → {void}

Fetches the list of available scripts to import
Source:
Returns:
Type
void

(inner) getScriptList(all) → {void}

Gets the list of scripts
Parameters:
Name Type Description
all boolean true = get all scripts, false = get all scripts with pos > 0
Source:
Returns:
Type
void

(inner) importScript(event) → {void}

Imports a script
Parameters:
Name Type Description
event Event triggering event
Source:
Returns:
Type
void

(inner) initModalScripts() → {void}

Initialization functions for the script elements
Source:
Returns:
Type
void

(inner) parseEditScript(obj) → {void}

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

(inner) parseScriptList(obj) → {void}

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

(inner) removeScriptArgument(ev) → {void}

Removes an argument from the list of script arguments
Parameters:
Name Type Description
ev Event triggering element
Source:
Returns:
Type
void

(inner) saveScript(target) → {void}

Saves a script
Parameters:
Name Type Description
target Element triggering element
Source:
Returns:
Type
void

(inner) saveScriptCheckError(obj) → {void}

Handler for the MYMPD_API_SCRIPT_SAVE jsonrpc response
Parameters:
Name Type Description
obj object jsonrpc response
Source:
Returns:
Type
void

(inner) showEditScript(script) → {void}

Shows the edit script tab
Parameters:
Name Type Description
script string script name
Source:
Returns:
Type
void

(inner) showEditScriptModal(script) → {void}

Opens the scripts modal and shows the edit tab
Parameters:
Name Type Description
script string name to edit
Source:
Returns:
Type
void

(inner) showListScriptModal() → {void}

Opens the scripts modal and shows the list tab
Source:
Returns:
Type
void

(inner) showListScripts() → {void}

Shows the list scripts tab
Source:
Returns:
Type
void

(inner) validateScript(target) → {void}

Validates a script
Parameters:
Name Type Description
target Element triggering element
Source:
Returns:
Type
void

(inner) validateScriptCheckError(obj) → {void}

Handler for the MYMPD_API_SCRIPT_VALIDATE jsonrpc response
Parameters:
Name Type Description
obj object jsonrpc response
Source:
Returns:
Type
void