From 3b8a3dc66a780702f432e9622d1fc20ec2d6b68a Mon Sep 17 00:00:00 2001 From: atownson <> Date: Mon, 23 Sep 2024 13:04:44 -0500 Subject: [PATCH] Added style classes to represent left and right justified floating button groups --- netbox/project-static/styles/custom/_misc.scss | 14 +++++++++++--- netbox/templates/generic/bulk_edit.html | 2 +- netbox/templates/generic/object_edit.html | 2 +- netbox/templates/generic/object_list.html | 2 +- netbox/templates/inc/filter_list.html | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/netbox/project-static/styles/custom/_misc.scss b/netbox/project-static/styles/custom/_misc.scss index 8461e71ed..bf2d5ab59 100644 --- a/netbox/project-static/styles/custom/_misc.scss +++ b/netbox/project-static/styles/custom/_misc.scss @@ -37,10 +37,18 @@ span.color-label { // A floating div for form buttons .btn-float-group { position: sticky; - bottom: 0px; - z-index: 1; + bottom: 10px; + z-index: 2; +} + +.btn-float-group-left { + @extend .btn-float-group; + float: left; +} + +.btn-float-group-right { + @extend .btn-float-group; float: right; - padding: 0 0 10px; } // Override a transparent background diff --git a/netbox/templates/generic/bulk_edit.html b/netbox/templates/generic/bulk_edit.html index 5e5e8ec62..4b4d5aece 100644 --- a/netbox/templates/generic/bulk_edit.html +++ b/netbox/templates/generic/bulk_edit.html @@ -102,7 +102,7 @@ Context: {% endif %} -
+
{% trans "Cancel" %}
diff --git a/netbox/templates/generic/object_edit.html b/netbox/templates/generic/object_edit.html index 923b04aac..3e0a096fa 100644 --- a/netbox/templates/generic/object_edit.html +++ b/netbox/templates/generic/object_edit.html @@ -67,7 +67,7 @@ Context: {% endblock form %}
-
+
{% block buttons %} {% trans "Cancel" %} {% if object.pk %} diff --git a/netbox/templates/generic/object_list.html b/netbox/templates/generic/object_list.html index a89c5a960..fdd3cd3d8 100644 --- a/netbox/templates/generic/object_list.html +++ b/netbox/templates/generic/object_list.html @@ -121,7 +121,7 @@ Context: {# /Objects table #} {# Form buttons #} -
+
{% block bulk_buttons %}
{% if 'bulk_edit' in actions %} diff --git a/netbox/templates/inc/filter_list.html b/netbox/templates/inc/filter_list.html index 01f3fbb0e..9e1629d10 100644 --- a/netbox/templates/inc/filter_list.html +++ b/netbox/templates/inc/filter_list.html @@ -38,7 +38,7 @@ {% endif %}
-
+