From c615c079a4d4c1aa5a910aae7bf385024f4b1ad9 Mon Sep 17 00:00:00 2001 From: Vaibhav Mule <vaibhavmule135@gmail.com> Date: Fri, 6 Mar 2020 22:42:30 +0530 Subject: [PATCH] fix indentation --- .../static/js/django_select2-checkboxes.js | 7 ++-- .../src/sass/apply/components/_select2.scss | 37 ++++++++----------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/hypha/apply/dashboard/static/js/django_select2-checkboxes.js b/hypha/apply/dashboard/static/js/django_select2-checkboxes.js index 63ecf8588..e6aec3af2 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 fa4207c8d..2c068c4f8 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: ''; } - + } } } -- GitLab