From 82c84b5ce6cd2b85192c2d87924ed40112367204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Wed, 13 Aug 2025 22:36:16 +0200 Subject: [PATCH] jedna kategoria dla listy --- config.py | 2 +- static/css/style.css | 32 ++++++++++++++--------- static/js/select.js | 4 +-- templates/admin/edit_list.html | 4 ++- templates/admin/mass_edit_categories.html | 2 +- templates/edit_my_list.html | 6 +++-- 6 files changed, 31 insertions(+), 19 deletions(-) diff --git a/config.py b/config.py index 4d313f3..07a9267 100644 --- a/config.py +++ b/config.py @@ -78,6 +78,6 @@ class Config: "Spożywcze,Budowlane,Zabawki,Chemia,Inne,Elektronika,Odzież i obuwie," "Artykuły biurowe,Kosmetyki i higiena,Motoryzacja,Ogród i rośliny," "Zwierzęta,Sprzęt sportowy,Książki i prasa,Narzędzia i majsterkowanie," - "RTV / AGD,Apteka i suplementy,Artykuły dekoracyjne,Gry i hobby,Usługi,Pieczywo" + "RTV / AGD,Apteka i suplementy,Artykuły dekoracyjne,Gry i hobby,Usługi,Pieczywo,Różne" ).split(",") if c.strip() ] \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css index 07435ab..aa9ee3a 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -319,17 +319,6 @@ input.form-control { } } -.ts-control { - background-color: #212529 !important; - color: #fff !important; - border: 1px solid #495057 !important; -} - -.ts-dropdown { - background-color: #212529 !important; - color: #fff !important; - z-index: 9999 !important; -} .ts-dropdown .active { background-color: #495057 !important; @@ -348,7 +337,7 @@ input.form-control { } .pagination-dark .page-item.active .page-link { - background-color: #0d6efd; /* primary */ + background-color: #0d6efd; border-color: #0d6efd; color: #fff; } @@ -358,3 +347,22 @@ input.form-control { border-color: #495057; color: #6c757d; } + +.tom-dark .ts-control { + background-color: #212529 !important; + color: #fff !important; + border: 1px solid #495057 !important; +} + +.ts-dropdown { + background-color: #212529 !important; + color: #fff !important; + z-index: 9999 !important; +} + +.tom-dark .ts-control .item { + background-color: #343a40 !important; + color: #fff !important; + border-radius: 0.25rem; + padding: 2px 8px; +} \ No newline at end of file diff --git a/static/js/select.js b/static/js/select.js index 60384ef..e23cff4 100644 --- a/static/js/select.js +++ b/static/js/select.js @@ -1,8 +1,8 @@ document.addEventListener("DOMContentLoaded", function () { new TomSelect("#categories", { plugins: ['remove_button'], - maxItems: 4, - placeholder: 'Wybierz kategorie...', + maxItems: 1, + placeholder: 'Wybierz jedną kategorie...', create: false, sortField: { field: "text", diff --git a/templates/admin/edit_list.html b/templates/admin/edit_list.html index 56b8882..5ee15ef 100644 --- a/templates/admin/edit_list.html +++ b/templates/admin/edit_list.html @@ -81,7 +81,9 @@
- + {% for cat in categories %}