From 62a7b0ac23cc9868768c43bab76ff38e808a426a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 9 Jan 2023 18:53:27 +0000 Subject: [PATCH] Bug 32341: (follow-up) Alternate button style This patch applies a different button style and does a couple of clean up tasks: Removing the redundant sorting-related CSS and moving the responsive button CSS to _common.scss where other DataTable-related styles are found. I think this different button style is more consistent with the OPAC's design. It also eliminates untranslatable strings from the CSS. Signed-off-by: David Cook Signed-off-by: Martin Renvoize --- .../opac-tmpl/bootstrap/css/src/_common.scss | 61 ++++++++++++++----- .../opac-tmpl/bootstrap/css/src/opac.scss | 33 ---------- 2 files changed, 46 insertions(+), 48 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss index 06d6d7f95d..98b43f9e83 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/_common.scss @@ -541,6 +541,52 @@ div.dt-button-collection button.dt-button.buttons-print:not( .disabled )::before } } +table { + &.dataTable { + &.dtr-column { + tbody { + tr { + td, + th { + &.dtr-control { + min-width: 4em; + padding: 0; + + &::before { + background-color: #E1E1E1; + background-image: linear-gradient(180deg, #EBEBEB, #E1E1E1); + border: 1px solid #B3B3B3; + border-radius: .25rem; + box-shadow: none; + color: #000; + content: "\f067"; + font-family: FontAwesome; + font-size: 1em; + font-style: normal; + height: 1em; + left: 35%; + padding: .5rem; + width: 1em; + } + } + } + + &.parent { + td, + th { + &.dtr-control { + &::before { + content: "\f068"; + } + } + } + } + } + } + } + } +} + .buttons-print { &::before { content: "\f02f"; @@ -624,21 +670,6 @@ div.dt-button-collection button.dt-button.buttons-print:not( .disabled )::before } .table { - .sorting_asc { - background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi4zODRtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMiAyLjM4NDAzODkiPjxnPjxwYXRoIGZpbGw9IiMwMDZhY2MiIGQ9Ik00LjA1IDEuNzRoLTIuMUwzIC42NHoiLz48L2c+PC9zdmc+" ) no-repeat scroll 100% 80% #E2E8E8; - padding-right: 19px; - } - - .sorting_desc { - background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi4zODRtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMiAyLjM4NDAzODkiPjxnPjxwYXRoIGZpbGw9IiMwMDZhY2MiIGQ9Ik00LjA1LjY0aC0yLjFMMyAxLjc0eiIvPjwvZz48L3N2Zz4=" ) no-repeat scroll 100% 80% #E2E8E8; - padding-right: 19px; - } - - .sorting { - background: url( "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2bW0iIGhlaWdodD0iMi41NTFtbSIgdmlld0JveD0iMCAwIDYuMDAwMDAwMyAyLjU1MDY2MTQiPjxwYXRoIGZpbGw9IiNhY2FjYWMiIGQ9Ik00LjA1IDEuNDVoLTIuMUwzIDIuNTV6Ii8+PHBhdGggZmlsbD0iI2FjYWNhYyIgZD0iTTQuMDUgMS4xaC0yLjFMMyAweiIvPjwvc3ZnPg==" ) no-repeat scroll 100% 75% #E2E8E8; - padding-right: 19px; - } - &.dataTable{ thead{ .sorting_asc { diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index befaae9c36..7a8091493a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -2874,37 +2874,4 @@ $star-selected: #EDB867; } } -table.dataTable.dtr-column>tbody>tr{ - - > td, - > th{ - &.dtr-control{ - min-width:10em; - - &:before{ - top: 50%; - left:unset; - height: 1em; - width: 5.3em; - content: "Expand"; - background-color: #31b131; - } - } - } - - &.parent { - - td,th{ - - &.dtr-control{ - - &:before{ - content: "Unexpand"; - background-color:#d33333 - } - } - } - } - -} @import "responsive"; -- 2.41.0