diff --git a/docroot/themes/humsci/humsci_basic/humsci_basic.libraries.yml b/docroot/themes/humsci/humsci_basic/humsci_basic.libraries.yml index f60ec0782..1d6d66a9f 100644 --- a/docroot/themes/humsci/humsci_basic/humsci_basic.libraries.yml +++ b/docroot/themes/humsci/humsci_basic/humsci_basic.libraries.yml @@ -23,3 +23,7 @@ search: secondarymenu: js: dist/js/secondarytoggler.js: {} + +tablewrap: + js: + dist/js/tablewrap.js: {} diff --git a/docroot/themes/humsci/humsci_basic/humsci_basic.theme b/docroot/themes/humsci/humsci_basic/humsci_basic.theme index d1faba040..b232c0a67 100644 --- a/docroot/themes/humsci/humsci_basic/humsci_basic.theme +++ b/docroot/themes/humsci/humsci_basic/humsci_basic.theme @@ -220,6 +220,7 @@ function humsci_basic_preprocess_we_megamenu_frontend(&$vars) { */ function humsci_basic_preprocess_views_view(&$variables) { $view = $variables['view']; + $variables['#attached']['library'][] = 'humsci_basic/tablewrap'; switch ($view->id()) { case 'hs_default_search': @@ -250,3 +251,12 @@ function humsci_basic_preprocess_paragraph(&$variables) { } $variables['content']['field_hs_view'][0]['#heading_tag'] = $heading_tag; } + +/** + * Implements hook_preprocess_HOOK(). + */ +function humsci_basic_preprocess_field(&$variables) { + if ($variables['field_name'] == 'field_hs_text_area') { + $variables['#attached']['library'][] = 'humsci_basic/tablewrap'; + } +}