Bug 27571: "Add to lists" on MARC and ISBD view of OPAC detail page doesn't open in new window

This page corrects the global click handler in the OPAC so that all
"addtoshelf" links will work correctly to trigger the popup window for
adding titles to a list.

To test, apply the patch and test the process of adding a title to a
list in the OPAC from various places:

- Search results
- Bibliographic detail page (normal)
- Bibliographic detail page (MARC view)
- Bibliographic detail page (ISBD view)

Test both adding to an existing list and adding to a new list.
Everything should work correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 1cc252c145)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 032fffa4b5)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
Owen Leonard 2021-01-29 13:19:12 +00:00 committed by Andrew Fuerste-Henry
parent bcafcac476
commit 5d1501b28e
1 changed files with 3 additions and 3 deletions

View File

@ -195,9 +195,9 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
window.print();
return false;
});
$("#ulactioncontainer > ul > li > a.addtoshelf").on("click",function(){
Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber | uri %]');
return false;
$(".addtoshelf").on("click",function(e){
e.preventDefault();
Dopop( this.href );
});
$("body").on("click", ".addtocart", function(e){
e.preventDefault();