mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 20:18:38 +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
|
* accessible directly in getgov.min.js
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export function initializeTooltips() {
|
export function uswdsInitializeTooltips() {
|
||||||
function checkTooltip() {
|
function checkTooltip() {
|
||||||
// Check that the tooltip library is loaded, and if not, wait and retry
|
// Check that the tooltip library is loaded, and if not, wait and retry
|
||||||
if (window.tooltip && typeof window.tooltip.init === 'function') {
|
if (window.tooltip && typeof window.tooltip.init === 'function') {
|
||||||
|
|
|
@ -375,6 +375,13 @@ export class BaseTable {
|
||||||
*/
|
*/
|
||||||
loadModals(page, total, unfiltered_total) {}
|
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
|
* 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
|
* Dynamically manages the visibility set up of columns, adding/removing headers
|
||||||
|
@ -471,6 +478,7 @@ export class BaseTable {
|
||||||
this.initCheckboxListeners();
|
this.initCheckboxListeners();
|
||||||
|
|
||||||
this.loadModals(data.page, data.total, data.unfiltered_total);
|
this.loadModals(data.page, data.total, data.unfiltered_total);
|
||||||
|
this.initializeTooltips();
|
||||||
|
|
||||||
// Do not scroll on first page load
|
// Do not scroll on first page load
|
||||||
if (scroll)
|
if (scroll)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { BaseTable } from './table-base.js';
|
import { BaseTable } from './table-base.js';
|
||||||
|
import { uswdsInitializeTooltips } from './helpers-uswds.js';
|
||||||
|
|
||||||
export class DomainsTable extends BaseTable {
|
export class DomainsTable extends BaseTable {
|
||||||
|
|
||||||
|
@ -66,6 +67,9 @@ export class DomainsTable extends BaseTable {
|
||||||
`;
|
`;
|
||||||
tbody.appendChild(row);
|
tbody.appendChild(row);
|
||||||
}
|
}
|
||||||
|
initializeTooltips() {
|
||||||
|
uswdsInitializeTooltips();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initDomainsTable() {
|
export function initDomainsTable() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue