Bugzilla – Attachment 73788 Details for
Bug 20122
Empty and close link on cart page not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20122: Empty lists keep coming back
Bug-20122-Empty-lists-keep-coming-back.patch (text/plain), 2.18 KB, created by
Mark Tompsett
on 2018-04-06 16:12:02 UTC
(
hide
)
Description:
Bug 20122: Empty lists keep coming back
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-04-06 16:12:02 UTC
Size:
2.18 KB
patch
obsolete
>From 6497617cabfee27fe5daaa7998021043947f7430 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 6 Apr 2018 16:03:31 +0000 >Subject: [PATCH] Bug 20122: Empty lists keep coming back > >This is caused by bib_list not being deleted. >The path was not explicitly set. >This patch adds path=/ explicitly to ensure it >does get deleted. > >TEST PLAN >--------- >1) search for 'the' in OPAC >2) add several items to cart. >3) look at your cart. >4) empty and close the cart, select all->remove > -- either way window closes and it looks empty. >5) refresh the page > -- cart comes back. > -- in chromium inspecting the page, specifically > the "Application" area, bib_list is shown as > a cookie still. >6) apply patch >7) restart_all and empty cache forcing JS reload >8) repeat steps 1-5 > -- this time cart stays empty. > -- and the bib_list cookie is gone >9) run koha qa test tools. >--- > koha-tmpl/opac-tmpl/bootstrap/js/basket.js | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js b/koha-tmpl/opac-tmpl/bootstrap/js/basket.js >index 7c6bde8..9eb6630 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/basket.js >@@ -57,9 +57,9 @@ function delCookie(name) { > var exp = new Date(); > exp.setTime(exp.getTime()-1); > if(parent.opener){ >- parent.opener.document.cookie = name + "=null; expires=" + exp.toGMTString(); >+ parent.opener.document.cookie = name + "=null; path=/; expires=" + exp.toGMTString(); > } else { >- document.cookie = name + "=null; expires=" + exp.toGMTString(); >+ document.cookie = name + "=null; path=/; expires=" + exp.toGMTString(); > } > } > >@@ -406,11 +406,12 @@ function updateBasket(updated_value,target) { > } else { > bcount = ""; > } >- $('#basketcount').html(bcount); >- $('.cart-message').html(MSG_IN_YOUR_CART+updated_value); > if(target){ > target.$('#basketcount').html(bcount); > target.$('.cart-message').html(MSG_IN_YOUR_CART+updated_value); >+ } else { >+ $('#basketcount').html(bcount); >+ $('.cart-message').html(MSG_IN_YOUR_CART+updated_value); > } > } > >-- >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 20122
:
73788
|
73789
|
73790
|
73803
|
73828