Skip to content

Commit

Permalink
netbox-community#16009 Removed floating div background and moved filt…
Browse files Browse the repository at this point in the history
…er form buttons outside of card
  • Loading branch information
atownson committed Sep 20, 2024
1 parent 7de5efd commit 30e6704
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion netbox/project-static/dist/netbox.css

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion netbox/project-static/styles/custom/_misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,11 @@ span.color-label {
position: sticky;
bottom: 0px;
z-index: 1;
padding: 2px 0px 10px 0px;
float: right;
padding: 0 0 10px;
}

// Override a transparent background
.btn-float {
--tblr-btn-bg: var(--#{$prefix}bg-surface-tertiary) !important;
}
4 changes: 2 additions & 2 deletions netbox/project-static/styles/overrides/_tabler.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pre {
}

// Altering background colors
.page, .page-tabs .nav-tabs .nav-link.active, .btn-float-group {
.page, .page-tabs .nav-tabs .nav-link.active {
background-color: var(--#{$prefix}bg-surface-tertiary) !important;
}
.page-body .card .card-header {
Expand Down Expand Up @@ -105,7 +105,7 @@ body[data-bs-theme=dark] {
.navbar, .page-header {
background-color: $rich-black;
}
.page, .page-tabs .nav-tabs .nav-link.active, .btn-float-group {
.page, .page-tabs .nav-tabs .nav-link.active {
background-color: $rich-black-light !important;
}

Expand Down
4 changes: 2 additions & 2 deletions netbox/templates/generic/bulk_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ <h2 class="col-9 offset-3">{% trans "Comments" %}</h2>

{% endif %}

<div class="text-end btn-float-group">
<a href="{{ return_url }}" class="btn btn-outline-secondary">{% trans "Cancel" %}</a>
<div class="btn-float-group">
<a href="{{ return_url }}" class="btn btn-outline-secondary btn-float">{% trans "Cancel" %}</a>
<button type="submit" name="_apply" class="btn btn-primary">{% trans "Apply" %}</button>
</div>

Expand Down
6 changes: 3 additions & 3 deletions netbox/templates/generic/object_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@
{% endblock form %}
</div>

<div class="text-end my-3 btn-float-group">
<div class="btn-float-group">
{% block buttons %}
<a href="{{ return_url }}" class="btn btn-outline-secondary">{% trans "Cancel" %}</a>
<a href="{{ return_url }}" class="btn btn-outline-secondary btn-float">{% trans "Cancel" %}</a>
{% if object.pk %}
<button type="submit" name="_update" class="btn btn-primary">
{% trans "Save" %}
Expand All @@ -79,7 +79,7 @@
<button type="submit" name="_create" class="btn btn-primary">
{% trans "Create" %}
</button>
<button type="submit" name="_addanother" class="btn btn-outline-primary">
<button type="submit" name="_addanother" class="btn btn-outline-primary btn-float">
{% trans "Create & Add Another" %}
</button>
</div>
Expand Down
16 changes: 8 additions & 8 deletions netbox/templates/inc/filter_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
</div>
{% endif %}
</div>
<div class="card-footer text-end btn-float-group d-print-none border-0">
<button type="button" class="btn btn-outline-danger m-1" data-reset-select>
<i class="mdi mdi-backspace"></i> {% trans "Reset" %}
</button>
<button type="submit" class="btn btn-primary m-1">
<i class="mdi mdi-magnify"></i> {% trans "Search" %}
</button>
</div>
</div>
<div class="btn-float-group me-1">
<button type="button" class="btn btn-outline-danger btn-float" data-reset-select>
<i class="mdi mdi-backspace"></i> {% trans "Reset" %}
</button>
<button type="submit" class="btn btn-primary">
<i class="mdi mdi-magnify"></i> {% trans "Search" %}
</button>
</div>
</form>

0 comments on commit 30e6704

Please sign in to comment.