mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 18:56:15 +02:00
formatting
This commit is contained in:
parent
4dec61990c
commit
7d92949e46
14 changed files with 1554 additions and 1610 deletions
|
@ -1,10 +1,5 @@
|
|||
import { hideElement, showElement, scrollToElement, toggleCaret } from './helpers.js';
|
||||
import { initializeTooltips, initializeModals, unloadModals } from './helpers-uswds.js';
|
||||
import { hideElement, showElement } from './helpers.js';
|
||||
|
||||
/**
|
||||
* An IIFE that changes the default clear behavior on comboboxes to the input field.
|
||||
* We want the search bar to act soley as a search bar.
|
||||
*/
|
||||
export function loadInitialValuesForComboBoxes() {
|
||||
var overrideDefaultClearButton = true;
|
||||
var isTyping = false;
|
||||
|
@ -117,6 +112,4 @@ export function loadInitialValuesForComboBoxes() {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
// <<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>>
|
||||
// Event handlers.
|
||||
|
||||
var DEFAULT_ERROR = "Please check this field for errors.";
|
||||
|
||||
var INFORMATIVE = "info";
|
||||
var WARNING = "warning";
|
||||
var ERROR = "error";
|
||||
var SUCCESS = "success";
|
||||
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
import { hideElement, showElement, scrollToElement, toggleCaret } from './helpers.js';
|
||||
import { initializeTooltips, initializeModals, unloadModals } from './helpers-uswds.js';
|
||||
import { hookupYesNoListener, hookupRadioTogglerListener } from './helpers-radios.js';
|
||||
import { getCsrfToken } from './get-csrf-token.js';
|
||||
import { hookupYesNoListener, hookupRadioTogglerListener } from './radios.js';
|
||||
import { initDomainValidators } from './domain-validators.js';
|
||||
import { initFormsetsForms, triggerModalOnDsDataForm, nameserversFormListener } from './formset-forms.js';
|
||||
import { initializeUrbanizationToggle } from './urbanization.js';
|
||||
|
@ -43,6 +40,3 @@ initDomainsTable();
|
|||
initDomainRequestsTable();
|
||||
initMembersTable();
|
||||
initMemberDomainsTable();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { hideElement, showElement, scrollToElement, toggleCaret } from './helpers.js';
|
||||
import { initializeTooltips, initializeModals, unloadModals } from './helpers-uswds.js';
|
||||
import { hideElement, showElement } from './helpers.js';
|
||||
|
||||
/** An IIFE that intializes the requesting entity page.
|
||||
* This page has a radio button that dynamically toggles some fields
|
||||
* Within that, the dropdown also toggles some additional form elements.
|
||||
|
@ -43,4 +43,4 @@ export function handleRequestingEntityFieldset() {
|
|||
|
||||
// Add event listener to the suborg dropdown to show/hide the suborg details section
|
||||
select.addEventListener("change", () => toggleSuborganization());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { hideElement, showElement, toggleCaret } from './helpers.js';
|
||||
import { initializeTooltips, initializeModals, unloadModals } from './helpers-uswds.js';
|
||||
|
||||
export class LoadTableBase {
|
||||
constructor(sectionSelector) {
|
||||
|
@ -356,4 +355,4 @@ export class LoadTableBase {
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { hideElement, showElement, scrollToElement, toggleCaret } from './helpers.js';
|
||||
import { initializeTooltips, initializeModals, unloadModals } from './helpers-uswds.js';
|
||||
import { getCsrfToken } from './get-csrf-token.js';
|
||||
import { hideElement, showElement, scrollToElement } from './helpers.js';
|
||||
import { initializeModals, unloadModals } from './helpers-uswds.js';
|
||||
import { getCsrfToken } from './helpers-csrf-token.js';
|
||||
|
||||
import { LoadTableBase } from './table-base.js';
|
||||
|
||||
|
@ -35,7 +35,7 @@ export class DomainRequestsTable extends LoadTableBase {
|
|||
hideElement(exportButton);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads rows in the domains list, as well as updates pagination around the domains list
|
||||
|
@ -389,14 +389,8 @@ export class DomainRequestsTable extends LoadTableBase {
|
|||
})
|
||||
.catch(error => console.error('Error fetching domain requests:', error));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An IIFE that listens for DOM Content to be loaded, then executes. This function
|
||||
* initializes the domain requests list and associated functionality.
|
||||
*
|
||||
*/
|
||||
export function initDomainRequestsTable() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const domainRequestsSectionWrapper = document.getElementById('domain-requests');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { hideElement, showElement, scrollToElement, toggleCaret } from './helpers.js';
|
||||
import { initializeTooltips, initializeModals, unloadModals } from './helpers-uswds.js';
|
||||
import { scrollToElement } from './helpers.js';
|
||||
import { initializeTooltips } from './helpers-uswds.js';
|
||||
|
||||
import { LoadTableBase } from './table-base.js';
|
||||
|
||||
|
@ -139,14 +139,8 @@ export class DomainsTable extends LoadTableBase {
|
|||
})
|
||||
.catch(error => console.error('Error fetching domains:', error));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An IIFE that listens for DOM Content to be loaded, then executes. This function
|
||||
* initializes the domains list and associated functionality.
|
||||
*
|
||||
*/
|
||||
export function initDomainsTable() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const isDomainsPage = document.getElementById("domains")
|
||||
|
@ -158,7 +152,4 @@ export function initDomainsTable() {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { hideElement, showElement, scrollToElement, toggleCaret } from './helpers.js';
|
||||
import { initializeTooltips, initializeModals, unloadModals } from './helpers-uswds.js';
|
||||
import { getCsrfToken } from './get-csrf-token.js';
|
||||
import { getCsrfToken } from './helpers-csrf-token.js';
|
||||
|
||||
import { LoadTableBase } from './table-base.js';
|
||||
|
||||
|
@ -109,10 +109,9 @@ export class MemberDomainsTable extends LoadTableBase {
|
|||
})
|
||||
.catch(error => console.error('Error fetching domains:', error));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export function initMemberDomainsTable() {
|
||||
export function initMemberDomainsTable() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const isMemberDomainsPage = document.getElementById("member-domains")
|
||||
if (isMemberDomainsPage){
|
||||
|
@ -123,4 +122,4 @@ export class MemberDomainsTable extends LoadTableBase {
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import { hideElement, showElement, scrollToElement, toggleCaret } from './helpers.js';
|
||||
import { initializeTooltips, initializeModals, unloadModals } from './helpers-uswds.js';
|
||||
import { getCsrfToken } from './get-csrf-token.js';
|
||||
import { hideElement, showElement, scrollToElement } from './helpers.js';
|
||||
|
||||
import { LoadTableBase } from './table-base.js';
|
||||
|
||||
|
@ -353,15 +351,8 @@ export class MembersTable extends LoadTableBase {
|
|||
})
|
||||
.catch(error => console.error('Error fetching members:', error));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* An IIFE that listens for DOM Content to be loaded, then executes. This function
|
||||
* initializes the members list and associated functionality.
|
||||
*
|
||||
*/
|
||||
export function initMembersTable() {
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const isMembersPage = document.getElementById("members")
|
||||
|
|
|
@ -1,21 +1,10 @@
|
|||
import { hideElement, showElement, scrollToElement, toggleCaret } from './helpers.js';
|
||||
import { initializeTooltips, initializeModals, unloadModals } from './helpers-uswds.js';
|
||||
import { getCsrfToken } from './get-csrf-token.js';
|
||||
|
||||
/**
|
||||
* An IIFE that displays confirmation modal on the user profile page
|
||||
*/
|
||||
export function userProfileListener() {
|
||||
|
||||
const showConfirmationModalTrigger = document.querySelector('.show-confirmation-modal');
|
||||
if (showConfirmationModalTrigger) {
|
||||
showConfirmationModalTrigger.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An IIFE that hooks up the edit buttons on the finish-user-setup page
|
||||
*/
|
||||
export function finishUserSetupListener() {
|
||||
|
||||
function getInputField(fieldName){
|
||||
|
@ -183,4 +172,4 @@ export function finishUserSetupListener() {
|
|||
// Show the input fields if an error exists
|
||||
showInputOnErrorFields();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue