Bugzilla – Attachment 166395 Details for
Bug 36774
Flatpickr clear() adds unintentional clear button
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36774: Dont add wrapper if already exists
Bug-36774-Dont-add-wrapper-if-already-exists.patch (text/plain), 1.49 KB, created by
Jonathan Druart
on 2024-05-08 12:19:15 UTC
(
hide
)
Description:
Bug 36774: Dont add wrapper if already exists
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-05-08 12:19:15 UTC
Size:
1.49 KB
patch
obsolete
>From 49272b9e3253df7604c5cca2f94802a10809430c Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 3 May 2024 14:07:25 +0000 >Subject: [PATCH] Bug 36774: Dont add wrapper if already exists > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index 62a7059b09c..c343e5e5dff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -61,9 +61,14 @@ > }, > onReady: function( selectedDates, dateStr, instance ){ > /* When flatpickr instance is created, automatically append a "clear date" link */ >+ >+ if( $(instance.input).parent().find('.flatpickr_wrapper_'+instance.input.id).length ){ >+ return; >+ } >+ > $(instance.input).find('~input.flatpickr:first') > /* Add a wrapper element so that we can prevent the clear button from wrapping */ >- .wrap("<span class='flatpickr_wrapper'></span>") >+ .wrap("<span class='flatpickr_wrapper_"+instance.input.id+"'></span>") > .attr("autocomplete", "off") > .after( $("<a/>") > .attr("href","#") >-- >2.34.1
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 36774
:
166138
|
166139
|
166162
|
166163
|
166278
|
166303
|
166304
|
166305
|
166383
|
166384
|
166385
|
166395
|
166396
|
166423
|
166424
|
166425
|
166427
|
166463
|
166464