From c29d1b66ac7efd852b4bfb648a9a56451e3b8bcf Mon Sep 17 00:00:00 2001 From: andrew nimmo Date: Wed, 24 Jul 2024 14:36:05 -0700 Subject: [PATCH] Make projects/lists overflow-scroll --- app/assets/stylesheets/Admin.scss | 4 ++-- app/assets/stylesheets/Agaricus.scss | 2 +- app/assets/stylesheets/Amanita.scss | 2 +- app/assets/stylesheets/BlackOnWhite.scss | 2 +- app/assets/stylesheets/Cantharellaceae.scss | 4 ++-- app/assets/stylesheets/Hygrocybe.scss | 2 +- app/assets/stylesheets/Sudo.scss | 2 +- app/assets/stylesheets/mo/_form_elements.scss | 5 +++++ .../observations/form/_projects.html.erb | 14 ++++++++------ .../observations/form/_species_lists.html.erb | 3 ++- 10 files changed, 24 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/Admin.scss b/app/assets/stylesheets/Admin.scss index 7a016508b5..0b2d47c247 100644 --- a/app/assets/stylesheets/Admin.scss +++ b/app/assets/stylesheets/Admin.scss @@ -1,6 +1,6 @@ @import "defaults"; -$BODY_BG_COLOR: #DE01DD; // DD00DD +$BODY_BG_COLOR: #DD00DD; $LOGO_BORDER_COLOR: black; $LOGO_BORDER_WIDTH: 2px; // vs 1px in default @@ -9,7 +9,7 @@ $LOGO_BG_COLOR: yellow; $LOGO_HOVER_FG_COLOR: purple; $LOGO_HOVER_BG_COLOR: yellow; -$LEFT_BAR_BORDER_COLOR: gray; +$LEFT_BAR_BORDER_COLOR: #555555; // gray $LEFT_BAR_BORDER_RADIUS: 0px; $LEFT_BAR_HEADER_FG_COLOR: black; $LEFT_BAR_HEADER_BG_COLOR: yellow; diff --git a/app/assets/stylesheets/Agaricus.scss b/app/assets/stylesheets/Agaricus.scss index 0a7c4d7d62..276bed2641 100644 --- a/app/assets/stylesheets/Agaricus.scss +++ b/app/assets/stylesheets/Agaricus.scss @@ -1,6 +1,6 @@ @import "defaults"; -$augustus_cap: #EbCe94; // #ECCF95 +$augustus_cap: #EbCe93; // #ECCF95 $brasiliensis_gills_1: #A06463; $brasiliensis_gills_2: #743931; $campestris_cap: #F6F0F2; diff --git a/app/assets/stylesheets/Amanita.scss b/app/assets/stylesheets/Amanita.scss index f59620f285..e36b9ea90d 100644 --- a/app/assets/stylesheets/Amanita.scss +++ b/app/assets/stylesheets/Amanita.scss @@ -13,7 +13,7 @@ $calyptroderma_middle_cap: #c18346; $muscaria_background: #cc2616; $muscaria_foreground: #fff8c6; $velosa_background: #dd9d5f; -$velosa_light_veil: #fbebd4; // faebd4 +$velosa_light_veil: #fbebd3; // faebd4 $velosa_dark_veil: #f4d5a6; $novinupta_background: #d1afa5; $pachycolea_background: #383138; diff --git a/app/assets/stylesheets/BlackOnWhite.scss b/app/assets/stylesheets/BlackOnWhite.scss index f3c5669956..852c88ef95 100644 --- a/app/assets/stylesheets/BlackOnWhite.scss +++ b/app/assets/stylesheets/BlackOnWhite.scss @@ -3,7 +3,7 @@ @import "defaults"; $LOGO_BORDER_COLOR: #DDDDDD; -$LEFT_BAR_BORDER_COLOR: #DeDfDf; +$LEFT_BAR_BORDER_COLOR: #DfDfDf; $TOP_BAR_BORDER_COLOR: #DDDDDD; $LIST_BORDER_COLOR: #DDDDDD; $BUTTON_HOVER_BORDER_COLOR: #CCCCCC; diff --git a/app/assets/stylesheets/Cantharellaceae.scss b/app/assets/stylesheets/Cantharellaceae.scss index 5077d13187..81250bfe55 100644 --- a/app/assets/stylesheets/Cantharellaceae.scss +++ b/app/assets/stylesheets/Cantharellaceae.scss @@ -1,6 +1,6 @@ @import "defaults"; -$californicus_cap: #f5ad49; // image 557 #f6ae4a +$californicus_cap: #f6ae4a; // image 557 $californicus_stipe: #fae8b8; $cinnabarinus_dark_cap: #c12900; // image 551 $cinnabarinus_light_cap: #ff6524; @@ -11,7 +11,7 @@ $tubaeformis_hymenium: #c2914c; $tubaeformis_bright_stipe: #ffb230; $tubaeformis_dark_stipe: #4b2e0c; $tubaeformis_light_stipe: #e5bb67; -$cornucopioides_dark_hymenium: #10110b; // image 465 +$cornucopioides_dark_hymenium: #11110b; // image 465 #10110b $cornucopioides_light_hymenium: #9b9690; $cornucopioides_dark_cap: #4f4337; $cornucopioides_light_cap: #826c57; diff --git a/app/assets/stylesheets/Hygrocybe.scss b/app/assets/stylesheets/Hygrocybe.scss index 89b5a533df..c76d5c60ca 100644 --- a/app/assets/stylesheets/Hygrocybe.scss +++ b/app/assets/stylesheets/Hygrocybe.scss @@ -1,6 +1,6 @@ @import "defaults"; -$conica_stain: #36362e; // #37372f +$conica_stain: #36362d; // #37372f $conica_cap_red: #a31404; $conica_cap_orange: #dd6226; $conica_cap_yellow: #ffbf01; diff --git a/app/assets/stylesheets/Sudo.scss b/app/assets/stylesheets/Sudo.scss index 33904b3c79..4900ee18d5 100644 --- a/app/assets/stylesheets/Sudo.scss +++ b/app/assets/stylesheets/Sudo.scss @@ -1,6 +1,6 @@ @import "defaults"; -$BODY_BG_COLOR: #DE7700; // #DD7700 +$BODY_BG_COLOR: #DE7600; // #DD7700 $LOGO_BORDER_COLOR: black; $LOGO_BORDER_WIDTH: 2px; // vs 1px in default diff --git a/app/assets/stylesheets/mo/_form_elements.scss b/app/assets/stylesheets/mo/_form_elements.scss index aa4030834f..20ff6d9a2f 100644 --- a/app/assets/stylesheets/mo/_form_elements.scss +++ b/app/assets/stylesheets/mo/_form_elements.scss @@ -175,3 +175,8 @@ form { display: inline-block; } } + +.overflow-scroll-checklist { + max-height: 30rem; + overflow-y: auto; +} diff --git a/app/views/controllers/observations/form/_projects.html.erb b/app/views/controllers/observations/form/_projects.html.erb index cec864f6be..7d6ec0427b 100644 --- a/app/views/controllers/observations/form/_projects.html.erb +++ b/app/views/controllers/observations/form/_projects.html.erb @@ -59,12 +59,14 @@ end ].safe_join end %> - <% @projects.each do |project| %> - <%= check_box_with_label( - form: f_p, field: :"id_#{project.id}", label: project.title, - checked: @project_checks[project.id], - disabled: !project.user_can_add_observation?(@observation, @user) - ) %> + <%= tag.div(class: "overflow-scroll-checklist") do %> + <% @projects.each do |project| %> + <%= check_box_with_label( + form: f_p, field: :"id_#{project.id}", label: project.title, + checked: @project_checks[project.id], + disabled: !project.user_can_add_observation?(@observation, @user) + ) %> + <% end %> <% end %> <% end %> diff --git a/app/views/controllers/observations/form/_species_lists.html.erb b/app/views/controllers/observations/form/_species_lists.html.erb index 8c4325d060..4d6014bc29 100644 --- a/app/views/controllers/observations/form/_species_lists.html.erb +++ b/app/views/controllers/observations/form/_species_lists.html.erb @@ -2,6 +2,7 @@ <%= tag.div(id: "observation_projects") do %> <%= fields_for(:list) do |f_l| %> + <%= tag.p do [ tag.strong("#{:SPECIES_LISTS.l}:", class: "mr-3"), @@ -12,7 +13,7 @@ ].safe_join end %> - <%= fields_for(:list) do |f_l| %> + <%= tag.div(class: "overflow-scroll-checklist") do %> <% @lists.each do |list| %> <%= check_box_with_label( form: f_l, field: :"id_#{list.id}", label: list.title,