Bugzilla – Attachment 168166 Details for
Bug 26777
Give the user the option to display their patron card barcode from the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26777: Add barcode generator file and initial styling
Bug-26777-Add-barcode-generator-file-and-initial-s.patch (text/plain), 2.08 KB, created by
Sam Lau
on 2024-06-26 16:33:15 UTC
(
hide
)
Description:
Bug 26777: Add barcode generator file and initial styling
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2024-06-26 16:33:15 UTC
Size:
2.08 KB
patch
obsolete
>From 866014ea685bb2047bc8f0c106ee40cfed44a9e0 Mon Sep 17 00:00:00 2001 >From: Sam Lau <samalau@gmail.com> >Date: Thu, 20 Jun 2024 20:50:04 +0000 >Subject: [PATCH] Bug 26777: Add barcode generator file and initial styling > >--- > .../opac-tmpl/bootstrap/css/src/opac.scss | 30 +++++++++++++++++++ > .../bootstrap/js/barcode-generator.js | 11 +++++++ > 2 files changed, 41 insertions(+) > create mode 100644 koha-tmpl/opac-tmpl/bootstrap/js/barcode-generator.js > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >index da3a8c4206..f265937c9b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >+++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss >@@ -3004,4 +3004,34 @@ $star-selected: #EDB867; > } > } > >+#patron-virtual-card { >+ display: flex; >+ flex-direction: column; >+ align-items: flex-start; >+ >+ #barcode-container { >+ flex: 1; >+ width: 100%; >+ #patron-barcode { >+ padding: 1rem 0.25rem 1rem 0.25rem; >+ width: 100%; >+ height: auto; >+ min-height: 25px; >+ } >+ } >+ >+ #image-and-library-container { >+ #image-container { >+ flex: 0; >+ width: 100%; >+ #patron-image { >+ padding: 1rem 0 0.25rem 0.25rem; >+ display: block; >+ width: 100%; >+ height: auto; >+ } >+ } >+ } >+} >+ > @import "responsive"; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/barcode-generator.js b/koha-tmpl/opac-tmpl/bootstrap/js/barcode-generator.js >new file mode 100644 >index 0000000000..afd32f8284 >--- /dev/null >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/barcode-generator.js >@@ -0,0 +1,11 @@ >+document.addEventListener("DOMContentLoaded", function() { >+ var barcodeNumber = document.getElementById("patron-barcode").dataset.barcode; >+ JsBarcode("#patron-barcode", barcodeNumber, { >+ format: "CODE39", >+ lineColor: "#000", >+ width: 2, >+ height: 100, >+ displayValue: false, >+ margin: 0 >+ }); >+}); >\ No newline at end of file >-- >2.39.2
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 26777
:
167969
|
167970
|
167971
|
167972
|
167976
|
167977
|
168029
|
168030
|
168165
|
168166
|
168167
|
168168
|
168169
|
168170
|
168171
|
168172
|
168289
|
168290
|
168291
|
168292
|
168293
|
168294
|
168295
|
168296
|
169742
|
169743
|
169744
|
169745
|
169746
|
169747
|
169748
|
169749
|
170667
|
170668
|
170669
|
170670
|
170671
|
170672
|
170673
|
170674