From 3886c98ea5c689974f1b4ebbcbd804db3eaa8dbe Mon Sep 17 00:00:00 2001 From: jcorporation Date: Wed, 4 Sep 2024 21:08:21 +0200 Subject: [PATCH] Upd: Rename playlistDetails to gotoPlaylist --- docs/scripting/widges.md | 1 + htdocs/js/clickActions.js | 2 +- htdocs/js/contextMenu.js | 6 +++--- htdocs/js/home.js | 2 +- htdocs/js/viewBrowsePlaylist.js | 8 ++++++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/scripting/widges.md b/docs/scripting/widges.md index 55e51f181..5b47d1a21 100644 --- a/docs/scripting/widges.md +++ b/docs/scripting/widges.md @@ -33,4 +33,5 @@ Add the `data-href` attribute to the html element. The content must be a valid s | FUNCTION | OPTIONS | DESCRIPTION | | -------- | ------- | ----------- | | `gotoAlbum` | AlbumId | Shows the album with given id. | +| `gotoPlaylist` | uri | Playlist name. | | `songDetails` | uri | Song URI | diff --git a/htdocs/js/clickActions.js b/htdocs/js/clickActions.js index 32ff79e78..f0ca22df7 100644 --- a/htdocs/js/clickActions.js +++ b/htdocs/js/clickActions.js @@ -180,7 +180,7 @@ function clickPlaylist(uri, event) { case 'insertPlayAfterCurrent': return insertPlayAfterCurrentQueue('plist', [uri]); case 'replace': return replaceQueue('plist', [uri]); case 'replacePlay': return replacePlayQueue('plist', [uri]); - case 'view': return playlistDetails(uri); + case 'view': return gotoPlaylist(uri); case 'context': return showContextMenu(event); default: logError('Invalid action: ' + settings.webuiSettings.clickPlaylist); } diff --git a/htdocs/js/contextMenu.js b/htdocs/js/contextMenu.js index cf60d4a36..6c8101f48 100644 --- a/htdocs/js/contextMenu.js +++ b/htdocs/js/contextMenu.js @@ -535,7 +535,7 @@ function addMenuItemsPlaylistActions(dataNode, contextMenuBody, type, uri, name) { if (isMPDplaylist(uri) === true) { addDivider(contextMenuBody); - addMenuItem(contextMenuBody, {"cmd": "playlistDetails", "options": [uri]}, 'View playlist'); + addMenuItem(contextMenuBody, {"cmd": "gotoPlaylist", "options": [uri]}, 'View playlist'); } else { addMenuItem(contextMenuBody, {"cmd": "gotoFilesystem", "options": [uri, "plist"]}, 'View playlist'); @@ -599,10 +599,10 @@ function createMenuLists(target, contextMenuTitle, contextMenuBody) { addMenuItemsPlaylistActions(dataNode, contextMenuBody, type, uri, name); addDivider(contextMenuBody); if (type === 'smartpls') { - addMenuItem(contextMenuBody, {"cmd": "playlistDetails", "options": [uri]}, 'View playlist'); + addMenuItem(contextMenuBody, {"cmd": "gotoPlaylist", "options": [uri]}, 'View playlist'); } else { - addMenuItem(contextMenuBody, {"cmd": "playlistDetails", "options": [uri]}, 'Edit playlist'); + addMenuItem(contextMenuBody, {"cmd": "gotoPlaylist", "options": [uri]}, 'Edit playlist'); } addMenuItem(contextMenuBody, {"cmd": "showRenamePlaylist", "options": [uri]}, 'Rename playlist'); addMenuItem(contextMenuBody, {"cmd": "showCopyPlaylist", "options": [[uri]]}, 'Copy playlist'); diff --git a/htdocs/js/home.js b/htdocs/js/home.js index a3889f31b..0d80652c5 100644 --- a/htdocs/js/home.js +++ b/htdocs/js/home.js @@ -252,7 +252,7 @@ function homeIconGoto(type, options) { break; case 'plist': case 'smartpls': - playlistDetails(options[0]); + gotoPlaylist(options[0]); break; default: logError('Invalid type: ' + type); diff --git a/htdocs/js/viewBrowsePlaylist.js b/htdocs/js/viewBrowsePlaylist.js index fd3edca60..d2db70fe8 100644 --- a/htdocs/js/viewBrowsePlaylist.js +++ b/htdocs/js/viewBrowsePlaylist.js @@ -89,6 +89,10 @@ function viewPlaylistListListClickHandler(event, target) { } } +function gotoPlaylist(uri) { + +} + /** * Click event handler for playlist detail list * @param {MouseEvent} event click event @@ -352,8 +356,8 @@ function currentPlaylistEnumerate() { * @returns {void} */ //eslint-disable-next-line no-unused-vars -function playlistDetails(uri) { - setUpdateViewId('BrowsePlaylistListList'); +function gotoPlaylist(uri) { + setUpdateViewId('BrowsePlaylistDetailList'); appGoto('Browse', 'Playlist', 'Detail', 0, undefined, undefined, {'tag': '', 'desc': false}, uri, ''); }