Browse Source

(feat: tabs) add "Hide/Show" for all cards in tab

tags/v0.3.5
bertieb 3 years ago
parent
commit
ad536fe608
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      src/ts/frontend.ts

+ 11
- 0
src/ts/frontend.ts View File

@@ -541,6 +541,17 @@ async function getResults():Promise<string>{
$(`#${tabContentId}`).append(`<div class="${tabClass}"
id="tabContent-c${cutoff}" role="tabpanel">`);

// Add title & hide/show all for this variant
$(`#tabContent-c${cutoff}`).append(`<div class="d-flex justify-content-between">
${bigTitle(`Results Set for Cutoff ${cutoff}`)}
<button id="variantButton-${cutoff}"
class="btn btn-primary" type="button"
data-bs-toggle="collapse" data-bs-target=".asphodice-c${cutoff}"
aria-expanded="true" aria-controls="resultsToggleVariant">
Hide / Show All (c=${cutoff})
</button>
</div>`);

// Roll the dice for this variant
for (let i = 1; i < maxDice; i++) {
let rsSetup = { numDice: i, diceOptions: { successCutOff: cutoff } };


Loading…
Cancel
Save