From 26e1a4d9302ca0aee2db872c832214b5adec3232 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Fri, 6 Feb 2026 18:19:12 +0000 Subject: [PATCH] refactor(ui): extract duplicated row-expand handler into shared function The same ~250-character inline onclick handler was copy-pasted across all 7 list templates. Extract it into a toggleRow() function in base.html and replace the inline copies with a single call. --- templates/base.html | 12 ++++++++++++ templates/partials/lists/bag_list.html | 2 +- templates/partials/lists/brew_list.html | 2 +- templates/partials/lists/cafe_list.html | 2 +- templates/partials/lists/cup_list.html | 2 +- templates/partials/lists/gear_list.html | 2 +- templates/partials/lists/roast_list.html | 2 +- templates/partials/lists/roaster_list.html | 2 +- 8 files changed, 19 insertions(+), 7 deletions(-) diff --git a/templates/base.html b/templates/base.html index 68548bd..b3a6764 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,6 +23,18 @@ {% block head %}{% endblock %} +