From c5c67b9c6923a96a89d4023bf3097411f79282cf Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 11 Oct 2020 18:43:47 -0700 Subject: [PATCH] Let select_all, deselect_all ignore hidden cards. So that ctrl+a after filtering only selects the filter results. --- frontends/ycdl_flask/templates/channel.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontends/ycdl_flask/templates/channel.html b/frontends/ycdl_flask/templates/channel.html index 6ecfb18..3508c85 100644 --- a/frontends/ycdl_flask/templates/channel.html +++ b/frontends/ycdl_flask/templates/channel.html @@ -346,6 +346,10 @@ function select_all() video_card_first_selected = null; for (const video_card of document.getElementsByClassName("video_card")) { + if (video_card.classList.contains("hidden")) + { + continue; + } video_card.classList.add("video_card_selected"); } } @@ -369,6 +373,10 @@ function deselect_all() video_card_first_selected = null; for (const video_card of Array.from(video_card_selections)) { + if (video_card.classList.contains("hidden")) + { + continue; + } video_card.classList.remove("video_card_selected"); } }