]> git.koha-community.org Git - koha.git/commit
Bug 27124: JS error "select2Width is not defined"
authorOwen Leonard <oleonard@myacpl.org>
Thu, 10 Dec 2020 11:48:43 +0000 (11:48 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 28 Dec 2020 13:37:52 +0000 (14:37 +0100)
commitd3b4093fb8a4754205693bce2632233e5beb30b4
tree3a6c4d911061381c1c72ee562aa1880dfe1e722e
parentd9f5da5aa56a60400c51e4a749c05092bbd6e721
Bug 27124: JS error "select2Width is not defined"

This patch changes the default width paramter passed to the
select2 plugin. This allows the basic MARC editor's Select2
widgets to be styled differently than on other pages.

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.

Update: Thanks to Julian for the suggested optimization

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ff7318c62ec7097c5b88f7278b71d0cc7feb1f39)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
koha-tmpl/intranet-tmpl/prog/js/select2.js