Bugzilla – Attachment 173318 Details for
Bug 38222
Let staff pick a cancellation reason when canceling a booking
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38222: (follow-up) Minimally initialize combobox if passed no data via constructor or referenced elements
Bug-38222-follow-up-Minimally-initialize-combobox-.patch (text/plain), 1.57 KB, created by
Martin Renvoize (ashimema)
on 2024-10-25 07:28:40 UTC
(
hide
)
Description:
Bug 38222: (follow-up) Minimally initialize combobox if passed no data via constructor or referenced elements
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-25 07:28:40 UTC
Size:
1.57 KB
patch
obsolete
>From 46c0f7de2e132d2521ab533fc29517acd4593e8c Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Thu, 24 Oct 2024 14:41:39 +0000 >Subject: [PATCH] Bug 38222: (follow-up) Minimally initialize combobox if > passed no data via constructor or referenced elements >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> >Signed-off-by: LEBSimonsen <simonsen@bz-sh.de> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/prog/js/combobox.js | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/combobox.js b/koha-tmpl/intranet-tmpl/prog/js/combobox.js >index f70776b9822..813b6498498 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/combobox.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/combobox.js >@@ -78,12 +78,19 @@ > }) > .filter(option => option !== null); > >- const combinedData = [...existingOptions, ...data]; >- > let selectedValue = null; > let query = ""; > let focusedIndex = -1; > >+ const combinedData = [...existingOptions, ...data]; >+ if (!combinedData?.length) { >+ dropdownMenu.style.display = "none"; >+ return { >+ getSelectedValue: () => selectedValue, >+ reset, >+ }; >+ } >+ > // Setup input attributes > input.setAttribute("placeholder", placeholder); > input.setAttribute("aria-expanded", "false"); >-- >2.47.0
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 38222
:
173230
|
173231
|
173232
|
173233
|
173264
|
173265
|
173277
|
173278
|
173281
|
173282
|
173312
|
173313
|
173314
|
173315
|
173316
|
173317
| 173318 |
173319
|
173320
|
173321
|
173322
|
173323
|
173336
|
173337
|
173338
|
173339