[Koha-bugs] [Bug 26692] Add barcode image generator service for OPAC
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Aug 31 04:13:29 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26692
--- Comment #36 from David Cook <dcook at prosentient.com.au> ---
Created attachment 139994
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139994&action=edit
Koha plugin proof-of-concept
This is still just a proof-of-concept but here is some sample code for
OPACUserJS:
$(document).ready(function(){
let opac_user_views = $("body#opac-user div#opac-user-views");
if (opac_user_views.length > 0 ){
let borrowernumber = window.borrowernumber;
let url =
`${location.origin}/api/v1/contrib/opac_account_barcode/public/patrons/${borrowernumber}/account_barcode/Code39`;
$.ajax({
type: 'HEAD',
url: url,
success: function(data,status,xhr){
opac_user_views.append(`<h2>Your barcode</h2><img
src="${url}">`);
}
});
}
});
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list