Skip to content

Commit

Permalink
Merge pull request #90 from acrosman/feature/object-selections
Browse files Browse the repository at this point in the history
Select/Deselect All
  • Loading branch information
acrosman authored Sep 6, 2021
2 parents 13136a2 + 84a6329 commit 52d9318
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ <h2>Last Response:</h2>
<div class="results-summary">
<h3 id="results-summary-count"></h3>
</div>
<button type="button" id="btn-deselect-all-objects" class="btn btn-secondary">Clear
Selections</button>
<button type="button" id="btn-select-all-objects" class="btn btn-secondary">Select All
Objects</button>
<table id="results-table" class="table table-striped table-bordered table-hover">
<thead>
<tr class="results-table-header"></tr>
Expand Down
12 changes: 12 additions & 0 deletions app/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ $.when($.ready).then(() => {
}
});

// Setup Object Select All
$('#btn-select-all-objects').on('click', (event) => {
event.preventDefault();
$('#results-table input[type=checkbox]').prop('checked', true);
});

// Setup Object Select All
$('#btn-deselect-all-objects').on('click', (event) => {
event.preventDefault();
$('#results-table input[type=checkbox]').prop('checked', false);
});

// Hide loader.
$('#loader-indicator').hide();
});
Expand Down

0 comments on commit 52d9318

Please sign in to comment.