mirror of
https://github.com/ranaldsgift/KefinTweaks.git
synced 2026-11-05 15:52:47 +01:00
Update Modal for Playlist and Collection sorting
This commit is contained in:
1 parent
b6d17ac0b7
commit
603ae07711
2 files changed
+4
-3
No files matched your search
@@ -250,6 +250,7 @@
|
||||
|
||||
// Build modal content matching watchlist sort modal structure
|
||||
const sortOptionsContent = `
|
||||
<h2 style="margin: 0 0 .5em;">Sort By</h2>
|
||||
<div>
|
||||
${Object.entries(SORT_OPTIONS).map(([key, option]) => {
|
||||
const checked = key === currentSort ? 'checked=""' : '';
|
||||
@@ -313,7 +314,6 @@
|
||||
// Create modal using the generic modal system
|
||||
const modal = window.ModalSystem.create({
|
||||
id: 'kt-collections-sort-modal',
|
||||
title: 'Sort By',
|
||||
content: sortOptionsContent,
|
||||
onOpen: (modalInstance) => {
|
||||
// Set current selection
|
||||
|
||||
+3
-2
@@ -272,6 +272,7 @@
|
||||
|
||||
// Build modal content matching collections sort modal structure
|
||||
const sortOptionsContent = `
|
||||
<h2 style="margin: 0 0 .5em;">Sort By</h2>
|
||||
<div>
|
||||
${Object.entries(SORT_OPTIONS).map(([key, option]) => {
|
||||
const checked = key === currentSort ? 'checked=""' : '';
|
||||
@@ -335,7 +336,6 @@
|
||||
// Create modal using the generic modal system
|
||||
const modal = window.ModalSystem.create({
|
||||
id: 'kt-playlist-sort-modal',
|
||||
title: 'Sort By',
|
||||
content: sortOptionsContent,
|
||||
onOpen: (modalInstance) => {
|
||||
// Set current selection
|
||||
@@ -772,8 +772,9 @@
|
||||
*/
|
||||
async function reapplyPlaylistSorting(playlistId, playlistItemsContainer) {
|
||||
// Find items container
|
||||
const itemsContainer = playlistItemsContainer.querySelector('.childrenItemsContainer') ||
|
||||
const itemsContainer = playlistItemsContainer.classList.contains('itemsContainer') ? playlistItemsContainer : playlistItemsContainer.querySelector('.childrenItemsContainer') ||
|
||||
playlistItemsContainer.querySelector('#listChildrenCollapsible');
|
||||
|
||||
if (!itemsContainer) {
|
||||
WARN('Items container not found after re-render for playlist:', playlistId);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user