Skip to content

Commit

Permalink
Merge pull request #1163 from ministryofjustice/CAS-1242-kill-j-query…
Browse files Browse the repository at this point in the history
…-in-cas-2-and-cas-3

UI Refactor - Use more of MOJ Frontend
  • Loading branch information
aliuk2012 authored Dec 9, 2024
2 parents 842476b + 53aaa88 commit 0594745
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 979 deletions.
608 changes: 0 additions & 608 deletions assets/js/datepicker.js

This file was deleted.

4 changes: 4 additions & 0 deletions assets/js/mojFrontendInit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const $datepickers = document.querySelectorAll('[data-module="moj-date-picker"]')
MOJFrontend.nodeListForEach($datepickers, function ($datepicker) {
new MOJFrontend.DatePicker($datepicker, {}).init();
})
1 change: 0 additions & 1 deletion assets/sass/application.sass
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ $path: "/assets/images/"
@import './components/_place-context-header'
@import './components/_primary-navigation'
@import './components/_form-row-dl'
@import './components/_date-picker'
@import './components/_result-card'
@import './components/_overlap-details'
@import 'components/filter'
Expand Down
278 changes: 0 additions & 278 deletions assets/sass/components/_date-picker.scss

This file was deleted.

3 changes: 0 additions & 3 deletions server/views/components/datePicker/macro.njk

This file was deleted.

66 changes: 0 additions & 66 deletions server/views/components/datePicker/template.njk

This file was deleted.

1 change: 1 addition & 0 deletions server/views/partials/layout.njk
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
{# Run JavaScript at end of the <body>, to avoid blocking the initial render. #}
<script type="module" src="/assets/govukFrontendInit.js"></script>
<script src="/assets/moj/all.js"></script>
<script type="module" src="/assets/mojFrontendInit.js"></script>
{% block extraScripts %}{% endblock %}
{% endblock %}

Expand Down
Loading

0 comments on commit 0594745

Please sign in to comment.