Browse Source
* Add standard task for linting JavaScript * Lint JavaScript * Pin govuk-frontend to v4.0.1pull/670/head
Paul Robert Lloyd
3 years ago
committed by
GitHub
15 changed files with 1060 additions and 148 deletions
@ -1,22 +1,23 @@
|
||||
// This file is automatically compiled by Webpack, along with any other files
|
||||
// present in this directory. You're encouraged to place your actual application logic in
|
||||
// a relevant structure within app/javascript and only use these pack files to reference
|
||||
// that code so it'll be compiled.
|
||||
// present in this directory. You're encouraged to place your actual application
|
||||
// logic in a relevant structure within app/javascript and only use these pack
|
||||
// files to reference that code so it'll be compiled.
|
||||
|
||||
// Polyfills for IE
|
||||
import "@webcomponents/webcomponentsjs" |
||||
import "core-js/stable" |
||||
import "regenerator-runtime/runtime" |
||||
import "@stimulus/polyfills" |
||||
import "custom-event-polyfill" |
||||
import "intersection-observer" |
||||
import '@webcomponents/webcomponentsjs' |
||||
import 'core-js/stable' |
||||
import 'regenerator-runtime/runtime' |
||||
import '@stimulus/polyfills' |
||||
import 'custom-event-polyfill' |
||||
import 'intersection-observer' |
||||
|
||||
//
|
||||
import GOVUKFrontend from 'govuk-frontend' |
||||
import GOVUKPrototypeComponents from 'govuk-prototype-components' |
||||
import './styles/application.scss' |
||||
import './controllers' |
||||
|
||||
require.context("govuk-frontend/govuk/assets") |
||||
import GOVUKFrontend from "govuk-frontend" |
||||
import GOVUKPrototypeComponents from "govuk-prototype-components" |
||||
import "./styles/application.scss" |
||||
import "./controllers" |
||||
require.context('govuk-frontend/govuk/assets') |
||||
|
||||
GOVUKFrontend.initAll() |
||||
GOVUKPrototypeComponents.initAll() |
||||
|
@ -1,13 +1,13 @@
|
||||
import { Controller } from "@hotwired/stimulus" |
||||
import { Controller } from '@hotwired/stimulus' |
||||
|
||||
export default class extends Controller { |
||||
initialize() { |
||||
initialize () { |
||||
this.clearIfHidden() |
||||
} |
||||
|
||||
clearIfHidden() { |
||||
if(this.element.style["display"] == "none") { |
||||
this.element.value = "" |
||||
clearIfHidden () { |
||||
if (this.element.style.display === 'none') { |
||||
this.element.value = '' |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,22 +1,22 @@
|
||||
// Load all the controllers within this directory and all subdirectories.
|
||||
// Controller files must be named *_controller.js.
|
||||
|
||||
import { application } from "./application" |
||||
import { application } from './application' |
||||
|
||||
import AccessibleAutocompleteController from "./accessible_autocomplete_controller.js" |
||||
application.register("accessible-autocomplete", AccessibleAutocompleteController) |
||||
import AccessibleAutocompleteController from './accessible_autocomplete_controller.js' |
||||
|
||||
import ConditionalFilterController from "./conditional_filter_controller.js" |
||||
application.register("conditional-filter", ConditionalFilterController) |
||||
import ConditionalFilterController from './conditional_filter_controller.js' |
||||
|
||||
import ConditionalQuestionController from "./conditional_question_controller.js" |
||||
application.register("conditional-question", ConditionalQuestionController) |
||||
import ConditionalQuestionController from './conditional_question_controller.js' |
||||
|
||||
import GovukfrontendController from "./govukfrontend_controller.js" |
||||
application.register("govukfrontend", GovukfrontendController) |
||||
import GovukfrontendController from './govukfrontend_controller.js' |
||||
|
||||
import NumericQuestionController from "./numeric_question_controller.js" |
||||
application.register("numeric-question", NumericQuestionController) |
||||
import NumericQuestionController from './numeric_question_controller.js' |
||||
|
||||
import FilterLayoutController from "./filter_layout_controller.js" |
||||
application.register("filter-layout", FilterLayoutController) |
||||
import FilterLayoutController from './filter_layout_controller.js' |
||||
application.register('accessible-autocomplete', AccessibleAutocompleteController) |
||||
application.register('conditional-filter', ConditionalFilterController) |
||||
application.register('conditional-question', ConditionalQuestionController) |
||||
application.register('govukfrontend', GovukfrontendController) |
||||
application.register('numeric-question', NumericQuestionController) |
||||
application.register('filter-layout', FilterLayoutController) |
||||
|
Loading…
Reference in new issue