Skip to content

Commit 14549be

Browse files
shiv-tyagipeterbarker
authored andcommitted
Move expand collapse button to features container
1 parent 43d9203 commit 14549be

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

static/js/add_build.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,12 @@ function createCategoryCard(category_name, options, expanded) {
392392

393393
function fillBuildOptions(buildOptions) {
394394
let output = document.getElementById('build_options');
395-
output.innerHTML = '<p class="card-text"><strong>Available features for the current selection are:</strong></p>';
395+
output.innerHTML = `<div class="d-flex mb-3 justify-content-between">
396+
<div class="d-flex d-flex align-items-center">
397+
<p class="card-text"><strong>Available features for the current selection are:</strong></p>
398+
</div>
399+
<button type="button" class="btn btn-outline-primary" id="exp_col_button" onclick="toggle_all_categories();"><i class="bi bi-chevron-expand me-2"></i>Expand/Collapse all categories</button>
400+
</div>`;
396401

397402
buildOptions.forEach((category, cat_idx) => {
398403
if (cat_idx % 4 == 0) {

templates/add_build.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,8 @@
4646
</nav>
4747
<div class="container-fluid px-3 py-3">
4848
<div class="card">
49-
<div class="card-header d-flex justify-content-between">
50-
<span class="d-flex align-items-center"><i class="bi bi-hammer me-2"></i><strong>ADD NEW BUILD</strong></span>
51-
<button class="btn btn-primary" id="exp_col_button" onclick="toggle_all_categories();"><i class="bi bi-chevron-expand me-2"></i>Expand/Collapse all categories</button>
49+
<div class="card-header">
50+
<span class="d-flex align-items-center"><i class="bi bi-hammer me-2"></i><strong>ADD NEW BUILD</strong></span>
5251
</div>
5352
<div class="card-body">
5453
<form id="build-form" action="/generate" method="post">
@@ -80,6 +79,7 @@
8079
</div>
8180
</div>
8281
</div>
82+
<hr>
8383
<div class="container-fluid" id="build_options">
8484
<div class="container-fluid w-25">
8585
<div class="container-fluid d-flex align-content-between">

0 commit comments

Comments
 (0)