From 7b0aa197fbb2f223f7deea633ed992c8a505b85c Mon Sep 17 00:00:00 2001 From: Patrick Cartlidge Date: Mon, 13 Nov 2023 14:44:46 +0000 Subject: [PATCH] change to new way of init modules --- app/assets/javascripts/modules/coronavirus-landing-page.js | 1 + app/assets/javascripts/modules/list-filter.js | 1 + app/assets/javascripts/modules/toggle-attribute.js | 1 + 3 files changed, 3 insertions(+) diff --git a/app/assets/javascripts/modules/coronavirus-landing-page.js b/app/assets/javascripts/modules/coronavirus-landing-page.js index dececac65..54f597be1 100644 --- a/app/assets/javascripts/modules/coronavirus-landing-page.js +++ b/app/assets/javascripts/modules/coronavirus-landing-page.js @@ -6,6 +6,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (Modules) { function CoronavirusLandingPage ($module) { this.module = $module + this.init() } CoronavirusLandingPage.prototype.init = function () { diff --git a/app/assets/javascripts/modules/list-filter.js b/app/assets/javascripts/modules/list-filter.js index 9eebf6bf3..80e943f6f 100644 --- a/app/assets/javascripts/modules/list-filter.js +++ b/app/assets/javascripts/modules/list-filter.js @@ -10,6 +10,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {}; this.filterTimeout = null this.form = this.$module.querySelector('[data-filter="form"]') this.searchResults = this.$module.querySelector('#search_results') + this.init() } ListFilter.prototype.init = function () { diff --git a/app/assets/javascripts/modules/toggle-attribute.js b/app/assets/javascripts/modules/toggle-attribute.js index 36f432af4..995aab114 100644 --- a/app/assets/javascripts/modules/toggle-attribute.js +++ b/app/assets/javascripts/modules/toggle-attribute.js @@ -4,6 +4,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {}; (function (Modules) { function ToggleAttribute ($module) { this.$module = $module + this.init() } ToggleAttribute.prototype.init = function () {