diff --git a/hypha/apply/dashboard/static/js/django_select2-checkboxes.js b/hypha/apply/dashboard/static/js/django_select2-checkboxes.js index 63ecf8588bddf3a3fe5d4628701d95cdbffc085a..e6aec3af2c9749e27a8151719d6619d4423a563a 100644 --- a/hypha/apply/dashboard/static/js/django_select2-checkboxes.js +++ b/hypha/apply/dashboard/static/js/django_select2-checkboxes.js @@ -1,4 +1,3 @@ -/* global jQuery */ (function($) { $.fn.select2.amd.require( [ @@ -10,7 +9,7 @@ $(function () { $('.django-select2-checkboxes').each(function (i, element) { - var $element = $(element) + var $element = $(element); $element.select2({ placeholder: $element.data('placeholder'), @@ -19,13 +18,13 @@ if (!data.selected.length) { return filterType - } else if (data.selected.length == data.all.length ) { + } else if (data.selected.length == data.all.length) { return 'All ' + filterType + ' selected'; } return data.selected.length + ' of ' + data.all.length + ' ' + filterType + ' selected'; }, selectionAdapter: SelectionAdapter, - resultsAdapter: ResultsAdapter + returnesultsAdapter: ResultsAdapter }); }); diff --git a/hypha/static_src/src/sass/apply/components/_select2.scss b/hypha/static_src/src/sass/apply/components/_select2.scss index fa4207c8d1d8709d1440d37e831673382e40e69b..2c068c4f8c0422f47c2222ad29a6724caf50bf16 100644 --- a/hypha/static_src/src/sass/apply/components/_select2.scss +++ b/hypha/static_src/src/sass/apply/components/_select2.scss @@ -69,31 +69,26 @@ $dropdown-height: 45px; .select2-results__option { padding: 0; - - &[aria-selected='true'] { - - &::before { - background: url('./../../images/tick.svg') $color--dark-blue center no-repeat; - background-size: 12px; - border: 1px solid $color--dark-blue; - content: ''; - } - + display: flex; + align-items: center; + padding: 6px; + + &::before { + min-width: 20px; + height: 20px; + margin-right: 10px; + background: $color--white; + border: 1px solid $color--mid-grey; + content: ''; } - - display: flex; - align-items: center; - padding: 6px; - + &[aria-selected='true'] { &::before { - min-width: 20px; - height: 20px; - margin-right: 10px; - background: $color--white; - border: 1px solid $color--mid-grey; + background: url('./../../images/tick.svg') $color--dark-blue center no-repeat; + background-size: 12px; + border: 1px solid $color--dark-blue; content: ''; } - + } } }