mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-24 19:48:36 +02:00
Merge branch 'main' into ag/3234-test-existing-script
This commit is contained in:
commit
6a495192c6
3 changed files with 13 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
|||
* accessible directly in getgov.min.js
|
||||
*
|
||||
*/
|
||||
export function initializeTooltips() {
|
||||
export function uswdsInitializeTooltips() {
|
||||
function checkTooltip() {
|
||||
// Check that the tooltip library is loaded, and if not, wait and retry
|
||||
if (window.tooltip && typeof window.tooltip.init === 'function') {
|
||||
|
|
|
@ -375,6 +375,13 @@ export class BaseTable {
|
|||
*/
|
||||
loadModals(page, total, unfiltered_total) {}
|
||||
|
||||
/**
|
||||
* Loads tooltips + sets up event listeners
|
||||
* "Activates" the tooltips after the DOM updates
|
||||
* Utilizes "uswdsInitializeTooltips"
|
||||
*/
|
||||
initializeTooltips() {}
|
||||
|
||||
/**
|
||||
* Allows us to customize the table display based on specific conditions and a user's permissions
|
||||
* Dynamically manages the visibility set up of columns, adding/removing headers
|
||||
|
@ -471,6 +478,7 @@ export class BaseTable {
|
|||
this.initCheckboxListeners();
|
||||
|
||||
this.loadModals(data.page, data.total, data.unfiltered_total);
|
||||
this.initializeTooltips();
|
||||
|
||||
// Do not scroll on first page load
|
||||
if (scroll)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { BaseTable } from './table-base.js';
|
||||
import { uswdsInitializeTooltips } from './helpers-uswds.js';
|
||||
|
||||
export class DomainsTable extends BaseTable {
|
||||
|
||||
|
@ -66,6 +67,9 @@ export class DomainsTable extends BaseTable {
|
|||
`;
|
||||
tbody.appendChild(row);
|
||||
}
|
||||
initializeTooltips() {
|
||||
uswdsInitializeTooltips();
|
||||
}
|
||||
}
|
||||
|
||||
export function initDomainsTable() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue