From 3b2d96cef7d587c51b1e604f371255ca43fa5f8b Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 20 Oct 2022 10:55:06 +0000 Subject: [PATCH] Bug 31803: "remove from cart" button displayed even if not in cart This patch modifies CSS related to the "Remove from cart" button associated with bibligraphic record views. A change in specificity of buttons made by Bug 30952 made it so that the button was no longer hidden correctly. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Locate a bibliographic record in the staff interface and view the detail page. - In the toolbar you should see an "Add to cart" button but not a "Remove from cart" button. - The buttons should correctly toggle on and off as you add and remove the title from the cart. Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../intranet-tmpl/prog/css/src/_toolbar.scss | 80 ++++++++++--------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_toolbar.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_toolbar.scss index f8259a1242..a82d8d2a0e 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/_toolbar.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/_toolbar.scss @@ -22,51 +22,53 @@ z-index: 100; } - a.addtocart { - display: block; - } + .btn { + &.btn-default { + font-weight: normal; + text-align: center; + white-space: nowrap; + vertical-align: middle; + touch-action: manipulation; + cursor: pointer; + background-image: none; + padding: 6px 12px; + box-shadow: none; + border-radius: 4px; + user-select: none; + font-size: 100%; + background-color: transparent; + border: 0; + display: inline-block; + color: #696969; - a.cartRemove { - padding: 6px 12px; - font-size: 12px; - display: none; - } + &:hover, &:focus { + text-decoration: none; + background-color: #DADADA; + color: #696969; + padding: 6px 12px; + } - a.addtocart.incart { - display: none; - } + &:active { + border: 0; + } - a.cartRemove.incart { - display: block; - } + &.addtocart { + display: block; - .btn.btn-default { - font-weight: normal; - text-align: center; - white-space: nowrap; - vertical-align: middle; - touch-action: manipulation; - cursor: pointer; - background-image: none; - padding: 6px 12px; - box-shadow: none; - border-radius: 4px; - user-select: none; - font-size: 100%; - background-color: transparent; - border: 0; - display: inline-block; - color: #696969; + &.incart { + display: none; + } + } - &:hover, &:focus { - text-decoration: none; - background-color: #DADADA; - color: #696969; - padding: 6px 12px; - } + &.cartRemove { + padding: 6px 12px; + font-size: 12px; + display: none; - &:active { - border: 0; + &.incart { + display: block; + } + } } } } -- 2.39.5