From fab8766c97be0415af1aa21a1ff31bf4c75ee04c Mon Sep 17 00:00:00 2001 From: R Fultz Date: Tue, 29 Mar 2022 14:34:10 -0400 Subject: [PATCH] Stop using JavaScript to hide columns --- fec/fec/static/js/modules/tables.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fec/fec/static/js/modules/tables.js b/fec/fec/static/js/modules/tables.js index cfb56fb51f..3222e3b270 100644 --- a/fec/fec/static/js/modules/tables.js +++ b/fec/fec/static/js/modules/tables.js @@ -174,8 +174,8 @@ function modalRenderFactory(template, fetch) { $row.toggleClass('row-active', true); $('body').toggleClass('panel-active', true); accessibility.restoreTabindex($modal); - var hideColumns = api.columns('.hide-panel'); - hideColumns.visible(false); + // var hideColumns = api.columns('.hide-panel'); + // hideColumns.visible(false); // Populate the pdf button if there is one if (fetched.pdf_url) { @@ -189,9 +189,9 @@ function modalRenderFactory(template, fetch) { // When under $large-screen // TODO figure way to share these values with CSS. - if ($(document).width() < 980) { - api.columns('.hide-panel-tablet').visible(false); - } + // if ($(document).width() < 980) { + // api.columns('.hide-panel-tablet').visible(false); + // } }); } } @@ -215,14 +215,14 @@ function hidePanel(api, $modal) { $('body').toggleClass('panel-active', false); $modal.attr('aria-hidden', 'true'); - if ($(document).width() > 640) { - api.columns('.hide-panel-tablet').visible(true); - api.columns('.hide-panel.min-tablet').visible(true); - } + // if ($(document).width() > 640) { + // api.columns('.hide-panel-tablet').visible(true); + // api.columns('.hide-panel.min-tablet').visible(true); + // } - if ($(document).width() > 980) { - api.columns('.hide-panel').visible(true); - } + // if ($(document).width() > 980) { + // api.columns('.hide-panel').visible(true); + // } accessibility.removeTabindex($modal); }