Skip to content

Commit

Permalink
Make projects/lists overflow-scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Jul 24, 2024
1 parent 30608fc commit c29d1b6
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 16 deletions.
4 changes: 2 additions & 2 deletions app/assets/stylesheets/Admin.scss
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/Agaricus.scss
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/Amanita.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/BlackOnWhite.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/Cantharellaceae.scss
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/Hygrocybe.scss
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/Sudo.scss
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions app/assets/stylesheets/mo/_form_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,8 @@ form {
display: inline-block;
}
}

.overflow-scroll-checklist {
max-height: 30rem;
overflow-y: auto;
}
14 changes: 8 additions & 6 deletions app/views/controllers/observations/form/_projects.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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,
Expand Down

0 comments on commit c29d1b6

Please sign in to comment.