From 716b319aaa9d2e3a3a818c484317cf2aeebae15e Mon Sep 17 00:00:00 2001 From: Mason Ballengee Date: Thu, 4 Jan 2024 17:20:26 -0500 Subject: [PATCH] Fix color contrast and minor bugs --- app/assets/stylesheets/avalon.scss | 2 +- app/assets/stylesheets/avalon/_collections.scss | 12 ++++++++---- app/assets/stylesheets/avalon/_facets.scss | 15 ++++++++++----- app/helpers/media_objects_helper.rb | 2 +- app/views/media_objects/_add_to_playlist.html.erb | 5 ++++- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/app/assets/stylesheets/avalon.scss b/app/assets/stylesheets/avalon.scss index 3b00652dc7..ba710f984d 100644 --- a/app/assets/stylesheets/avalon.scss +++ b/app/assets/stylesheets/avalon.scss @@ -177,7 +177,7 @@ div.alert-danger { font-family: $museoSlab; } .sub-headline { - color: $secondary; + color: $blueGreen; font-family: $museoSlab; } diff --git a/app/assets/stylesheets/avalon/_collections.scss b/app/assets/stylesheets/avalon/_collections.scss index a8cb27ff35..9d59765c15 100644 --- a/app/assets/stylesheets/avalon/_collections.scss +++ b/app/assets/stylesheets/avalon/_collections.scss @@ -1,12 +1,12 @@ -/* +/* * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * + * * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the @@ -43,4 +43,8 @@ .filter-collection-button-wrapper { margin-top: 1rem; } + + .breadcrumb-item.active { + color: black; + } } diff --git a/app/assets/stylesheets/avalon/_facets.scss b/app/assets/stylesheets/avalon/_facets.scss index 3c54b2b0ca..81be844e2f 100644 --- a/app/assets/stylesheets/avalon/_facets.scss +++ b/app/assets/stylesheets/avalon/_facets.scss @@ -1,12 +1,12 @@ -/* +/* * Copyright 2011-2023, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * + * * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the @@ -67,7 +67,7 @@ color: $primary; border: 1px solid $gray; background-color: $white; - + &:hover { background-color: $lightgray; } @@ -102,6 +102,11 @@ div[id*='facet-panel-'] { white-space: pre-line; } +.facet-values li .facet-label .selected, +.facet-values li .facet-count.selected { + color: #333333 !important; +} + .facet-values .facet-label { display: table-cell; position: relative; diff --git a/app/helpers/media_objects_helper.rb b/app/helpers/media_objects_helper.rb index 9c7d363bf4..f107af4ded 100644 --- a/app/helpers/media_objects_helper.rb +++ b/app/helpers/media_objects_helper.rb @@ -56,7 +56,7 @@ def combined_display_date media_object when MediaObject, SpeedyAF::Proxy::MediaObject [media_object.date_issued, media_object.date_created] when Hash - [media_object[:document]['date_ssi'], media_object[:document]['date_created_ssi']] + [media_object[:document]['date_issued_ssi'], media_object[:document]['date_created_ssi']] end result = issued result += " (Creation date: #{created})" if created.present? diff --git a/app/views/media_objects/_add_to_playlist.html.erb b/app/views/media_objects/_add_to_playlist.html.erb index 20cb8a2c7f..c79fec1ced 100644 --- a/app/views/media_objects/_add_to_playlist.html.erb +++ b/app/views/media_objects/_add_to_playlist.html.erb @@ -182,10 +182,13 @@ Unless required by applicable law or agreed to in writing, software distributed } }); player.on('dispose', () => { + let addToPlaylistBtn = document.getElementById('addToPlaylistBtn'); currentSectionLabel = undefined; $('#addToPlaylistPanel').collapse('hide'); resetAddToPlaylistForm(); - addToPlaylistBtn.disabled = true; + if (addToPlaylistBtn) { + addToPlaylistBtn.disabled = true; + } }); }