From 4344dfb271a6d75d8134eab40dd9565828184028 Mon Sep 17 00:00:00 2001 From: corbz Date: Sun, 21 Jan 2024 23:12:01 +0000 Subject: [PATCH] Remove commented code & remake tags dropdown --- apps/static/js/tickets.js | 22 ++------ apps/templates/home/tickets.html | 94 ++++++++++++-------------------- 2 files changed, 42 insertions(+), 74 deletions(-) diff --git a/apps/static/js/tickets.js b/apps/static/js/tickets.js index 32c7c24..f0c18c9 100644 --- a/apps/static/js/tickets.js +++ b/apps/static/js/tickets.js @@ -10,21 +10,6 @@ $(document).ready(function() { setupFilter("#filterSidebar .filter-tags", "tags"); setupFilter("#filterSidebar .filter-priority", "priority"); - // alert($(".deselect-radio-filters").length); - - // $(".deselect-radio-filters").on("change", function() { - // const checked = $(this).prop("checked"); - // alert(checked); - - // if (checked) { - // const name = $(this).prop("name"); - - // $(`[name='${name}']`).each(function(elem) { - // alert($(elem).prop("id")); - // }); - // } - // }); - loadFilterCounts(); loadTicketItems(); }); @@ -387,4 +372,9 @@ function fetchTicketsPromise(queryFilters) { } }); }); -} \ No newline at end of file +} + +// Prevent certain dropdowns from closing when the user clicks. +$(".dropdown-menu.prevent-click-close").on("click", function(e) { + e.stopPropagation(); +}); \ No newline at end of file diff --git a/apps/templates/home/tickets.html b/apps/templates/home/tickets.html index c8c29b2..14585b4 100644 --- a/apps/templates/home/tickets.html +++ b/apps/templates/home/tickets.html @@ -54,18 +54,6 @@ {% endfor %} - {% endif %} @@ -75,37 +63,43 @@ {% if tags %} - {% for tag in tags %} @@ -133,10 +127,6 @@ {% if departments %} - - - - {% for department in departments %}