Skip to content

Commit

Permalink
YDA-5938: Metadata form header sticks to the top of the page
Browse files Browse the repository at this point in the history
  • Loading branch information
kaur16 authored Oct 1, 2024
1 parent 6ac3550 commit 53e894b
Show file tree
Hide file tree
Showing 8 changed files with 16,230 additions and 20 deletions.
5 changes: 5 additions & 0 deletions research/metadata-form/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,11 @@ function loadForm() {
$('#metadata-form').removeClass('hide');
}

// If maintenance banner is visible, add padding to metadata form header
if ($('div[name="banner head"]').length) {
$('#metadata-form .card-header').addClass('pt-4 pb-3')
}

// Specific required textarea handling
$('textarea').each(function() {
if ($(this).attr('required')) {
Expand Down
4 changes: 4 additions & 0 deletions research/static/research/css/metadata/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
#metadata-form .d-flex, #metadata-form .col {
padding: 0 15px;
}

.metadata-card {
background-color: rgba(var(--bs-body-bg-rgb), 1);
}
8,112 changes: 8,104 additions & 8 deletions research/static/research/js/metadata-form.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions research/templates/research/metadata-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ <h5 class="card-title float-start">
<div id="metadata-form" class="row hide">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="card-header sticky-top metadata-card">
<h5 class="card-title float-start">
Metadata form - {{ path | trim }}
</h5>
Expand All @@ -97,7 +97,7 @@ <h5 class="card-title float-start">
<p>Loading metadata <i class="fa-solid fa-spinner fa-spin fa-fw"></i></p>
</div>
</div>
<div class="card-footer">
<div class="card-footer metadata-card">
<h5 class="card-title float-start">
Metadata form - {{ path | trim }}
</h5>
Expand Down
5 changes: 5 additions & 0 deletions vault/metadata-form/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,11 @@ function loadForm() {
$('#metadata-form').removeClass('hide');
}

// If maintenance banner is visible, add padding to metadata form header
if ($('div[name="banner head"]').length) {
$('#metadata-form .card-header').addClass('pt-4 pb-3')
}

// Specific required textarea handling
$('textarea').each(function() {
if ($(this).attr('required')) {
Expand Down
4 changes: 4 additions & 0 deletions vault/static/vault/css/metadata/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@
#metadata-form .d-flex, #metadata-form .col {
padding: 0 15px;
}

.metadata-card {
background-color: rgba(var(--bs-body-bg-rgb), 1);
}
8,112 changes: 8,104 additions & 8 deletions vault/static/vault/js/metadata-form.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions vault/templates/vault/metadata-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h3 class="card-title float-start">
<div id="metadata-form" class="row hide">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<div class="card-header sticky-top metadata-card">
<h5 class="card-title float-start">
Metadata form - {{ path | trim }}
</h5>
Expand All @@ -60,7 +60,7 @@ <h5 class="card-title float-start">
<p>Loading metadata <i class="fa-solid fa-spinner fa-spin fa-fw"></i></p>
</div>
</div>
<div class="card-footer">
<div class="card-footer metadata-card">
<h5 class="card-title float-start">
Metadata form - {{ path | trim }}
</h5>
Expand Down

0 comments on commit 53e894b

Please sign in to comment.