From 48e42d41e1273c6c59afec7fbdf0dc9a5705c951 Mon Sep 17 00:00:00 2001 From: Felix Hamann Date: Tue, 23 Apr 2019 22:20:13 +0200 Subject: [PATCH 1/6] add julius file for communication recipientLayout --- templates/widgets/communication/recipientLayout.julius | 1 + 1 file changed, 1 insertion(+) create mode 100644 templates/widgets/communication/recipientLayout.julius diff --git a/templates/widgets/communication/recipientLayout.julius b/templates/widgets/communication/recipientLayout.julius new file mode 100644 index 000000000..d38d48a6d --- /dev/null +++ b/templates/widgets/communication/recipientLayout.julius @@ -0,0 +1 @@ +// TODO: js utility to check all/none of the checkboxes in a recipient category at once From 60c9de44c5c7210a5d9cff5b12c342741abb4c43 Mon Sep 17 00:00:00 2001 From: Felix Hamann Date: Wed, 24 Apr 2019 19:16:58 +0200 Subject: [PATCH 2/6] special styling for checkboxes in table headers --- static/css/utils/checkbox.scss | 6 ++++++ static/js/utils/checkAll.js | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/static/css/utils/checkbox.scss b/static/css/utils/checkbox.scss index 9a73b01e7..6db7f97e3 100644 --- a/static/css/utils/checkbox.scss +++ b/static/css/utils/checkbox.scss @@ -74,3 +74,9 @@ filter: grayscale(1); } } + +/* special treatment for checkboxes in table headers */ +th .checkbox { + margin-right: 7px; + vertical-align: bottom; +} diff --git a/static/js/utils/checkAll.js b/static/js/utils/checkAll.js index 86749f2a9..5a15e0ac7 100644 --- a/static/js/utils/checkAll.js +++ b/static/js/utils/checkAll.js @@ -96,9 +96,9 @@ checkAllCheckbox.setAttribute('id', getCheckboxId()); th.insertBefore(checkAllCheckbox, th.firstChild); - // manually set up newly created checkbox + // manually set up new checkbox if (UtilRegistry) { - UtilRegistry.setup(UtilRegistry.find('checkbox')); + UtilRegistry.setup(UtilRegistry.find('checkbox'), th); } checkAllCheckbox.addEventListener('input', onCheckAllCheckboxInput); From 7e7ba291f20981af58c9c67aa339bcd20ae7f95f Mon Sep 17 00:00:00 2001 From: Felix Hamann Date: Tue, 23 Apr 2019 13:38:08 +0200 Subject: [PATCH 3/6] wrap recipient form categories in wrapper and only show when necessary --- .../communication/recipientLayout.hamlet | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/templates/widgets/communication/recipientLayout.hamlet b/templates/widgets/communication/recipientLayout.hamlet index c52ff534d..f3f759de1 100644 --- a/templates/widgets/communication/recipientLayout.hamlet +++ b/templates/widgets/communication/recipientLayout.hamlet @@ -1,14 +1,16 @@ $newline never -$forall category <- activeCategories -
- -