-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/npm_and_yarn/babel/core-7.21.0
- Loading branch information
Showing
137 changed files
with
4,664 additions
and
24,696 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (c) 2024. Hion Digital | ||
*/ | ||
|
||
// Use jQuery as $ within this file scope. | ||
const $ = jQuery; // eslint-disable-line no-unused-vars | ||
|
||
/** | ||
* Class AnchorLinks | ||
*/ | ||
export default class AnchorLinks { | ||
|
||
/** | ||
* Scroll to anchor element | ||
* | ||
* @param {Object} event The click event object. | ||
* | ||
* @return {void} | ||
*/ | ||
scrollToDiv( event ) { | ||
$( 'html, body' ).animate( { | ||
scrollTop: $( $( event.target ).attr( 'href' ) ).offset().top, | ||
}, 200 ); | ||
} | ||
|
||
/** | ||
* Run when the document is ready. | ||
* | ||
* @return {void} | ||
*/ | ||
docReady() { | ||
$( '.anchor-links__list a' ).on( 'click', this.scrollToDiv.bind( this ) ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) 2023. Hion Digital | ||
*/ | ||
|
||
// Use jQuery as $ within this file scope. | ||
const $ = jQuery; // eslint-disable-line no-unused-vars | ||
|
||
/** | ||
* Export the class reference. | ||
*/ | ||
export default class FocusOnSearch { | ||
|
||
/** | ||
* Focus on search input when button is clicked | ||
*/ | ||
FocusOnSearch() { | ||
const $searchContainer = $( '#js-search-toggle-target' ); | ||
const $searchInput = $searchContainer.find( 'input[type=search]' ); | ||
|
||
if ( $( '#js-search-toggle' ).hasClass( 'is-active' ) ) { | ||
$searchInput.trigger( 'focus' ); | ||
} | ||
} | ||
|
||
/** | ||
* Run when the document is ready. | ||
* | ||
* @return {void} | ||
*/ | ||
docReady() { | ||
$( '#js-search-toggle' ).on( 'click', this.FocusOnSearch.bind( this ) ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (c) 2023. Hion Digital | ||
*/ | ||
|
||
// Use jQuery as $ within this file scope. | ||
const $ = jQuery; // eslint-disable-line no-unused-vars | ||
|
||
/** | ||
* Export the class reference. | ||
*/ | ||
export default class SearchFilters { | ||
|
||
/** | ||
* Check or uncheck checkboxes depending on selections | ||
* | ||
* @param {Object} event Change event | ||
*/ | ||
SearchFilters( event ) { | ||
const $checkBoxContainer = $( '.search-filters' ); | ||
const $checkBoxes = $checkBoxContainer.find( 'input[type=checkbox]' ); | ||
const $clickedCheckbox = event.target; | ||
|
||
if ( $( $clickedCheckbox ).is( ':checked' ) ) { | ||
// Uncheck "All"-checkbox when others are checked | ||
if ( $( $clickedCheckbox ).prop( 'id' ) !== 'cpt-all' ) { | ||
$( '#cpt-all' ).prop( 'checked', false ); | ||
} | ||
// Uncheck other checkboxes when "All" is selected | ||
else { | ||
$checkBoxes.each( function() { | ||
if ( $( this ).prop( 'id' ) !== 'cpt-all' ) { | ||
$( this ).prop( 'checked', false ); | ||
} | ||
} ); | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* Run when the document is ready. | ||
* | ||
* @return {void} | ||
*/ | ||
docReady() { | ||
$( '.search-filters input[type=checkbox]' ).on( 'change', this.SearchFilters.bind( this ) ); | ||
} | ||
} |
Oops, something went wrong.