From bbb3dd180d44b9b012e0de27ffb389d9809c5688 Mon Sep 17 00:00:00 2001 From: Pieter Lambrecht Date: Thu, 12 Jan 2023 11:45:22 +0100 Subject: [PATCH] Buttons on forms and lists made sticky to top/btn --- netbox/project-static/dist/netbox-dark.css | Bin 374883 -> 375620 bytes netbox/project-static/dist/netbox-light.css | Bin 232430 -> 232963 bytes netbox/project-static/dist/netbox-print.css | Bin 726343 -> 727688 bytes netbox/project-static/styles/netbox.scss | 36 ++++++++++++++++++++ netbox/templates/generic/object_edit.html | 3 +- netbox/templates/generic/object_list.html | 2 +- netbox/templates/htmx/table.html | 8 +++-- 7 files changed, 44 insertions(+), 5 deletions(-) diff --git a/netbox/project-static/dist/netbox-dark.css b/netbox/project-static/dist/netbox-dark.css index 8b6b37a4cc545892c5ab1d46c60ebe75f8bc5a40..a150e1b3d3ac1db7009dffe852e6c93ae3fcdb21 100644 GIT binary patch delta 411 zcmaF-LF~vkv4$4L7N!>F7M3lnR}*=xt8_E-Qc^3d3=Iq>A3UM5{YN5eR@n6Sj~JDw zpOa%|7fi}8Dap^(P0r6NNzE(KEijn8ak=pH4fU+-;t(k-JpF7M3lnR}-i2JHn#8oi&LyD~yo~0PWNaaR2}S diff --git a/netbox/project-static/dist/netbox-light.css b/netbox/project-static/dist/netbox-light.css index 27e804c3084267eba5a70d9352ea5fb676a6d35f..eda89d8fb65d35e6f509e82866cdd9bbbec25002 100644 GIT binary patch delta 415 zcmaDiov(QgUqcIH3)2?n@E~66D&5Syl++3{2}k+ae>Fip*cn_+2SP>V~mAwshuRI{O;1%AyX ziAg!BKzpmF7kprnneK3hiEX;>UM4PMO>1K9hZaA|6BkaV2=9$ delta 28 kcmZpk!}o4FUqcIH3)2?n@Sy1%f|!-Jw+As7TQYJ10G~PuwEzGB diff --git a/netbox/project-static/dist/netbox-print.css b/netbox/project-static/dist/netbox-print.css index f0220c0500b66f04fbdffb8e04f83bc86900c527..43c39157b8503cc414d9eaa0955e86a8a8951a60 100644 GIT binary patch delta 739 zcmX@UN~dG1PD2Z03sVbo3rh=Y3tJ0&3r7p*7Op2*Le^EfnRzLx6;_4@2Bx(cCAm4% z9kaNUr?1WC;@&Qv&85F;@;*}`3BBTy%;fA!-K6}IlKfoV4G(!($nvYaI#P5ljr0U z0fiY>PhvM2#JqAzOs*DIN)sMW%Yj$Z=<2P+Q9d092y?)c^nh delta 42 ycmeC!s&jmmPD2Z03sVbo3rh=Y3tJ0&3r7p*7Op2*)7KSqvTgsK#TB!PkqZD*W)EHf diff --git a/netbox/project-static/styles/netbox.scss b/netbox/project-static/styles/netbox.scss index e486bc7db..46b252dea 100644 --- a/netbox/project-static/styles/netbox.scss +++ b/netbox/project-static/styles/netbox.scss @@ -174,6 +174,7 @@ span.profile-button .dropdown-menu { margin-top: 0.5rem; box-shadow: $box-shadow; transition: opacity 0.2s ease-in-out; + z-index: 1005; &:not(.show) { pointer-events: none; @@ -1039,3 +1040,38 @@ html { } } } + + +.sticky-bottom-content-p0 { + background-color: $tab-content-bg; + bottom: 0.05em; + z-index: 900; +} +.sticky-bottom-content-p1 { + background-color: $tab-content-bg; + bottom: 1.8em; + z-index: 900; +} + +.sticky-bottom-table-p0 { + background-color: var(--nbx-select-content-bg); + bottom: 0.05em; + z-index: 900; +} +.sticky-bottom-table-p1 { + background-color: var(--nbx-select-content-bg); + bottom: 1.8em; + z-index: 900; +} + +.sticky-top-table-p0 { + background-color: var(--nbx-select-content-bg); + top: 3.5em; + z-index: 900; +} +.sticky-top-table-p1 { + background-color: var(--nbx-select-content-bg); + top: 5.3em; + z-index: 900; +} + diff --git a/netbox/templates/generic/object_edit.html b/netbox/templates/generic/object_edit.html index c61fb723f..af144c768 100644 --- a/netbox/templates/generic/object_edit.html +++ b/netbox/templates/generic/object_edit.html @@ -98,8 +98,7 @@ Context: {% endif %} {% endblock form %} - -
+
{% block buttons %} {% if object.pk %}
{# Form buttons #} -
+
{% block bulk_buttons %} {% if 'bulk_edit' in actions %} diff --git a/netbox/templates/htmx/table.html b/netbox/templates/htmx/table.html index 6f168ac52..cf8850b5a 100644 --- a/netbox/templates/htmx/table.html +++ b/netbox/templates/htmx/table.html @@ -4,10 +4,14 @@ {% with preferences|get_key:"pagination.placement" as paginator_placement %} {% if paginator_placement == 'top' or paginator_placement == 'both' %} - {% include 'inc/paginator_htmx.html' with paginator=table.paginator page=table.page %} +
+ {% include 'inc/paginator_htmx.html' with paginator=table.paginator page=table.page %} +
{% endif %} {% render_table table 'inc/table_htmx.html' %} {% if paginator_placement != 'top' %} - {% include 'inc/paginator_htmx.html' with paginator=table.paginator page=table.page %} +
+ {% include 'inc/paginator_htmx.html' with paginator=table.paginator page=table.page %} +
{% endif %} {% endwith %}