From c006e7ea80879000bbfcd9ef28f660c4f16a62bf Mon Sep 17 00:00:00 2001 From: zsloan Date: Tue, 26 Jul 2022 13:25:17 -0500 Subject: Create generalize-tables.gmi --- issues/generalize-tables.gmi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 issues/generalize-tables.gmi diff --git a/issues/generalize-tables.gmi b/issues/generalize-tables.gmi new file mode 100644 index 0000000..fa97e6c --- /dev/null +++ b/issues/generalize-tables.gmi @@ -0,0 +1,29 @@ +# Enable all DataTables to call the same code + +# Tags + +* assigned: zsloan +* priority: medium +* type: refactor +* status: open, in progress +* keywords: tables, javascript + +# Description + +Currently most DataTables are drawn independently, so each separate page has its own DataTables initialization code. This results in inconsistency with features (like some tables having resizable columns and others not) and a lot of duplicated code. + +I'm changing this so that there's a couple files (create_datatable.js) with shared functions for initializing tables. This function takes the following parameters as input: +tableId - the table's ID +tableData - the table's row contents as JSON +columnDefs - the table's column definitions - the column names, how they should be sorted, how to render their cell contents, etc (see - https://datatables.net/examples/advanced_init/column_render.html ) +customSettings - settings specific to the table in question, which can override the defaults + +Converted tables: +[X] - Search Results +[X] - Collection View +[ ] - Collection List +[ ] - Correlation Results +[ ] - Global Search +[ ] - Trait Page Sample Table +[X] - Mapping Results +[ ] - Interval Analyst ( might not convert this ) -- cgit v1.2.3