Bugzilla – Attachment 114236 Details for
Bug 27124
JS error "select2Width is not defined"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27124: JS error "select2Width is not defined"
Bug-27124-JS-error-select2Width-is-not-defined.patch (text/plain), 1.71 KB, created by
Martin Renvoize (ashimema)
on 2020-12-07 16:46:56 UTC
(
hide
)
Description:
Bug 27124: JS error "select2Width is not defined"
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-12-07 16:46:56 UTC
Size:
1.71 KB
patch
obsolete
>From a84835a51a8e42078fd0c7be66edd53f22bac9ce Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 3 Dec 2020 16:12:46 +0000 >Subject: [PATCH] Bug 27124: JS error "select2Width is not defined" > >This patch changes the way select2.js checks for an existing value of >the "select2Width" variable in order to avoid errors when it is >undefined. > >To test, apply the patch and view various pages where the select2 plugin >is used: > > - Basic MARC editor > - Items edit > - Batch item edit > - Authority editor > >In each case check that the Select2 plugin works correctly to style >fields like collection code and home library. > >On the basic MARC editor page these <select>s should have a width that >adjusts as the browser window changes. On other pages the width should >be fixed. > >Check the browser console and confirm that there are no >JavaScript errors. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/prog/js/select2.js | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/select2.js b/koha-tmpl/intranet-tmpl/prog/js/select2.js >index a5c07fe12a..f591cab9d9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/select2.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/select2.js >@@ -1,7 +1,8 @@ > /* global __ */ >+var select2Width = typeof select2Width === "undefined" || !select2Width ? "element" : select2Width; > $.fn.select2.defaults.set("allowClear", true); > $.fn.select2.defaults.set("placeholder", ""); >-$.fn.select2.defaults.set("width", select2Width || "element" ); >+$.fn.select2.defaults.set("width", select2Width ); > > // Internationalization > $.fn.select2.defaults.set("language", { >-- >2.20.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 27124
:
114152
|
114163
|
114236
|
114300
|
114400
|
114441