Module: contextMenu_js

Methods

(inner) addDivider(contextMenuBody) → {void}

Adds a divider to the context menu
Parameters:
Name Type Description
contextMenuBody HTMLElement element to append the divider
Source:
Returns:
Type
void

(inner) addMenuItem(contextMenuBody, cmd, text) → {void}

Adds a menu item to the context menu
Parameters:
Name Type Description
contextMenuBody HTMLElement element to append the menu item
cmd object the command
text string menu text, will be translated
Source:
Returns:
Type
void

(inner) addMenuItemsAlbumActions(dataNode, contextMenuTitle, contextMenuBody, albumIdopt) → {void}

Appends album actions to the context menu
Parameters:
Name Type Attributes Description
dataNode HTMLElement | EventTarget element with the album data
contextMenuTitle HTMLElement element to set the menu header
contextMenuBody HTMLElement element to append the menu items
albumId string <optional>
the album id
Source:
Returns:
Type
void

(inner) addMenuItemsConsumeActions(contextMenuBody) → {void}

Appends consume actions for the queue actions context menu
Parameters:
Name Type Description
contextMenuBody HTMLElement element to append the menu items
Source:
Returns:
Type
void

(inner) addMenuItemsDirectoryActions(contextMenuBody, baseuri) → {void}

Appends directory actions to the context menu
Parameters:
Name Type Description
contextMenuBody HTMLElement element to append the menu items
baseuri string directory
Source:
Returns:
Type
void

(inner) addMenuItemsDiscActions(target, contextMenuTitle, contextMenuBody) → {void}

Callback function to create the disc context menu body
Parameters:
Name Type Description
target EventTarget triggering element
contextMenuTitle HTMLElement element to set the menu header
contextMenuBody HTMLElement element to append the menu items
Source:
Returns:
Type
void

(inner) addMenuItemsNavbarActions(target, popoverBody) → {void}

Callback function to create the navbar context menu body
Parameters:
Name Type Description
target EventTarget triggering element
popoverBody HTMLElement element to append the menu items
Source:
Returns:
Type
void

(inner) addMenuItemsPlaylistActions(dataNode, contextMenuBody, type, uri, name) → {void}

Appends actions for playlists to the context menu
Parameters:
Name Type Description
dataNode HTMLElement | EventTarget element with the data
contextMenuBody HTMLElement element to append the menu items
type string playlist type: plist, smartpls
uri string playlist uri
name string playlist name
Source:
Returns:
Type
void

(inner) addMenuItemsSearchActions(contextMenuBody, expression, sort, sortdesc) → {void}

Appends search actions to the context menu
Parameters:
Name Type Description
contextMenuBody HTMLElement element to append the menu items
expression string search expression
sort string sort tag
sortdesc boolean descending?
Source:
Returns:
Type
void

(inner) addMenuItemsSingleActions(contextMenuBody) → {void}

Appends single actions for the queue actions context menu
Parameters:
Name Type Description
contextMenuBody HTMLElement element to append the menu items
Source:
Returns:
Type
void

(inner) addMenuItemsSongActions(dataNode, contextMenuBody, uri, type, name) → {void}

Appends actions for single songs or streams to the context menu
Parameters:
Name Type Description
dataNode HTMLElement element with the album data
contextMenuBody HTMLElement element to append the menu items
uri string song or stream uri
type string type of the element: song, stream, ...
name string name of the element
Source:
Returns:
Type
void

(inner) addMenuItemsWebradioFavoritesActions(target, contextMenuTitle, contextMenuBody) → {void}

Appends actions for webradio favorites to the context menu
Parameters:
Name Type Description
target HTMLElement element with the data
contextMenuTitle HTMLElement element for the menu title
contextMenuBody HTMLElement element to append the menu items
Source:
Returns:
Type
void

(inner) addMenuItemsWebradioFavoritesHomeActions(contextMenuBody, uri) → {void}

Appends actions for webradio favorites home icon to the context menu
Parameters:
Name Type Description
contextMenuBody HTMLElement element to append the menu items
uri string webradio favorite uri
Source:
Returns:
Type
void

(inner) createMenuColumnsAppid(target, appid, contextMenuTitle, contextMenuBody) → {void}

Creates the column check list for views
Parameters:
Name Type Description
target EventTarget event target
appid string application id
contextMenuTitle HTMLElement title element
contextMenuBody HTMLElement element to append the menu item
Source:
Returns:
Type
void

(inner) createMenuHome(target, contextMenuTitle, contextMenuBody) → {boolean}

Creates the content of the first home icon actions for the context menu
Parameters:
Name Type Description
target EventTarget triggering element
contextMenuTitle HTMLElement title element
contextMenuBody HTMLElement content element
Source:
Returns:
true on success, else false
Type
boolean

(inner) createMenuHomeSecondary(target, contextMenuTitle, contextMenuBody) → {boolean}

Creates the contents of the secondary home icon actions for the context menu
Parameters:
Name Type Description
target EventTarget triggering element
contextMenuTitle HTMLElement title element
contextMenuBody HTMLElement content element
Source:
Returns:
true on success, else false
Type
boolean

(inner) createMenuLists(target, contextMenuTitle, contextMenuBody) → {boolean}

Creates the first context menu actions for list context menus
Parameters:
Name Type Description
target EventTarget triggering element
contextMenuTitle HTMLElement title element
contextMenuBody HTMLElement content element
Source:
Returns:
true on success, else false
Type
boolean

(inner) createMenuListsSecondary(target, contextMenuTitle, contextMenuBody) → {boolean}

Creates the secondary context menu actions for list context menus
Parameters:
Name Type Description
target EventTarget triggering element
contextMenuTitle HTMLElement title element
contextMenuBody HTMLElement content element
Source:
Returns:
true on success, else false
Type
boolean

(inner) createMenuViewSettings(target, contextMenuTitle, contextMenuBody) → {void}

Creates the column check list for views
Parameters:
Name Type Description
target EventTarget event target
contextMenuTitle HTMLElement title element
contextMenuBody HTMLElement element to append the menu item
Source:
Returns:
Type
void

(inner) showContextMenu(event) → {void}

Shows a context menu as popover or offcanvas
Parameters:
Name Type Description
event Event triggering event
Source:
Returns:
Type
void