Skip to content

Commit

Permalink
Moved toggleSelectAll alongside other checkbox methods
Browse files Browse the repository at this point in the history
  • Loading branch information
rw251 committed Feb 11, 2025
1 parent eba28a8 commit 5080ff5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
11 changes: 0 additions & 11 deletions airlock/static/assets/file_browser/dir.js

This file was deleted.

11 changes: 11 additions & 0 deletions airlock/static/assets/file_browser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ function saveCheckboxSessionState() {
sessionStorage.setItem("checkbox-cache", JSON.stringify(currentState));
}

// implement select all checkbox
function toggleSelectAll(elem) {
const checkboxes = getVisibleCheckboxes();

checkboxes.forEach((checkbox) => {
checkbox.checked = elem.checked;
});

saveCheckboxSessionState();
}

// Update the state of the select all checkbox. Checked if
// all other checkboxes are checked, unchecked if none of the
// others are checked, and "intermediate" (visual only) if some
Expand Down
1 change: 0 additions & 1 deletion airlock/templates/file_browser/repo/dir.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@

{% vite_hmr_client %}
{% vite_asset "assets/src/scripts/datatable.js" %}
<script src="{% static 'assets/file_browser/dir.js' %}"></script>
1 change: 0 additions & 1 deletion airlock/templates/file_browser/request/dir.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,3 @@

{% vite_hmr_client %}
{% vite_asset "assets/src/scripts/datatable.js" %}
<script src="{% static 'assets/file_browser/dir.js' %}"></script>
1 change: 0 additions & 1 deletion airlock/templates/file_browser/workspace/dir.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,3 @@

{% vite_hmr_client %}
{% vite_asset "assets/src/scripts/datatable.js" %}
<script src="{% static 'assets/file_browser/dir.js' %}"></script>

0 comments on commit 5080ff5

Please sign in to comment.