about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-01-23 17:35:10 -0600
committerFrederick Muriuki Muriithi2026-01-23 17:35:10 -0600
commit89622a79f0881572d7cbf1fbc8fb0929b2ccb08b (patch)
tree00f83c3cde949001fa619d92772817073a694926
parentadec5deb3553632c405b43091eef106e296dbcca (diff)
downloadgn-uploader-89622a79f0881572d7cbf1fbc8fb0929b2ccb08b.tar.gz
DataTables: Add some custom utility functions.
-rw-r--r--uploader/static/js/datatables.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/uploader/static/js/datatables.js b/uploader/static/js/datatables.js
index 3259987..2ed435b 100644
--- a/uploader/static/js/datatables.js
+++ b/uploader/static/js/datatables.js
@@ -74,5 +74,8 @@ var buildDataTable = (tableId, data = [], columns = [], userSettings = {}) => {
                     .prop("checked", false);
             });
     });
+
+    theDataTable.selectAll = () => {theDataTable.rows().select()};
+    theDataTable.deselectAll = () => {theDataTable.rows().deselect()};
     return theDataTable;
 };