Bugzilla – Attachment 79714 Details for
Bug 21174
Change default behavior to open OPAC cart in one click
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21174: Open the OPAC cart with one click by default
Bug-21174-Open-the-OPAC-cart-with-one-click-by-def.patch (text/plain), 4.42 KB, created by
Owen Leonard
on 2018-10-01 13:21:41 UTC
(
hide
)
Description:
Bug 21174: Open the OPAC cart with one click by default
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-10-01 13:21:41 UTC
Size:
4.42 KB
patch
obsolete
>From 3a9f62bb8888a2958ed0494235a5e27de9c69eaa Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Sat, 29 Sep 2018 05:24:22 +0000 >Subject: [PATCH] Bug 21174: Open the OPAC cart with one click by default > >Feedback from the Koha mailing list in Aug 2018 showed there was >widespread concensus for making the default behaviour of the OPAC cart >to be to open with one click, rather than clicking on the cart icon then >on the dropdown box to load the cart popup. > >This commit is a combination of Owen Leonard's alternative patch >(slightly changing the markup in masthead.inc) and my >work to remove the dropdown elements from the template and basket.js > >Test plan: >1. In Koha OPAC click on the cart icon (making sure to have items in the > cart and the dropdown box 'Items in your cart:..' appears. > >2. Click this dropdown and the cart popup appears. > >3. Confirm you can successfully remove items from and empty the > cart > >4. Apply patch > >5. Restart memcached, and plack > >6. Click on the cart icon (making sure to have items in the cart) and > notice no 'Items in your: ..' dropdown appears > instead the cart popup loads straight away. > >7. Confirm the items in your cart are displayed by the cart popup > >8. Confirm you can remove items from/empty the cart, and that as you do > this the number of cart items shown by the number to the right of the > cart icon changes accordingly > >Sponsored-By: Toi Ohomai Institute of Technology, New Zealand > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 11 +++-------- > koha-tmpl/opac-tmpl/bootstrap/js/basket.js | 5 ++--- > 2 files changed, 5 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >index 6de2d19..1162817 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc >@@ -21,15 +21,10 @@ > [% END %] > <ul class="nav"> > [% IF ( Koha.Preference( 'opacbookbag' ) == 1 ) %] >- <li class="dropdown"> >- <a href="#" title="Collect items you are interested in" class="dropdown-toggle" id="cartmenulink" data-toggle="dropdown" role="button"> >- <i id="carticon" class="fa fa-shopping-cart fa-icon-white"></i> <span class="cartlabel">Cart</span> <span id="basketcount"></span> <b class="caret"></b> >+ <li> >+ <a href="#" title="Collect items you are interested in" id="cartmenulink" role="button"> >+ <i id="carticon" class="fa fa-shopping-cart fa-icon-white"></i> <span class="cartlabel">Cart</span> <span id="basketcount"></span> > </a> >- <ul aria-labelledby="cartmenulink" role="menu" class="dropdown-menu"> >- <li role="presentation"> >- <a href="#" id="cartmenuitem" class="cart-message" tabindex="-1" role="menuitem">Your cart is empty.</a> >- </li> >- </ul> > </li> > [% END %] > [% IF ( Koha.Preference( 'virtualshelves' ) == 1 ) && ( Koha.Preference( 'opacbookbag' ) == 1 ) %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js b/koha-tmpl/opac-tmpl/bootstrap/js/basket.js >index 9eb6630..62dd99e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/basket.js >@@ -207,7 +207,6 @@ function addSelRecords(valSel) { // function for adding a selection of biblios t > function showCartUpdate(msg){ > // set body of popup window > $("#cartDetails").html(msg); >- $("#cartmenuitem").html(MSG_IN_YOUR_CART + " " + basketCount()); > showCart(); > setTimeout("hideCart()",2000); > } >@@ -504,8 +503,8 @@ function updateAllLinks(target){ > } > > $("#cartDetails").ready(function(){ >- $("#cartDetails,#cartmenuitem,#cartmenulink").on("click",function(){ hideCart(); }); >- $("#cartmenuitem").click(function(e){ >+ $("#cartDetails,#cartmenulink").on("click",function(){ hideCart(); }); >+ $("#cartmenulink").click(function(e){ > e.preventDefault(); > openBasket(); > $("li").closest().removeClass("open"); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21174
:
77550
|
77642
|
77684
|
78006
|
78007
|
78008
|
78009
|
78010
|
79647
|
79714
|
79856
|
80293
|
80294
|
80295
|
80373
|
80374
|
80375