Bug 25727: (follow-up) Some style updates, JS i18n
authorOwen Leonard <oleonard@myacpl.org>
Fri, 21 Aug 2020 13:19:26 +0000 (13:19 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 24 Aug 2020 09:19:03 +0000 (11:19 +0200)
commitf1d8bb181affe72a082ee53102d96aabd28c40e3
tree4a3d1dbbbc778d538e7efeb8309e964e735a659b
parent9b00a25ab7fb53e04e3ddf2032c191d984c1134a
Bug 25727: (follow-up) Some style updates, JS i18n

This patch makes to general changes. First, it makes some minor style
changes to the appearance of the dropdowns. Second, it moves the JS
content in select2.inc into a separate JS file. This is made possible by
Bug 21156.

To test, apply the patch and view a page which uses the Select2 library,
e.g. the add item screen. Confirm that the Select2-styled dropdowns look
good and work correctly.

TESTING TRANSLATABILITY

- Update a translation, e.g. fr-FR:

  > cd misc/translator
  > perl translate update fr-FR

- Open the corresponding .po file for JavaScript strings, e.g.
  misc/translator/po/fr-FR-messages-js.po
- Locate strings pulled from
  koha-tmpl/intranet-tmpl/prog/js/select2.js for translation,
  e.g.:

  msgid "No results found"
  msgstr ""

- Edit the "msgstr" string however you want (it's just for
  testing).
- Install the updated translation:

  > perl translate install fr-FR

- Switch to your newly translated language in the staff client and
  test a Select2-styled dropdown. Test that translated strings appear.
  For example:
  - Use the filter form to search for a string which isn't found. You
    should see a translated version.
  - Make a selection in one of the dropdowns. Hover your mouse over the
    "X" icon which now appears. The tooltip should be a translated
    version.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/css/select2.css
koha-tmpl/intranet-tmpl/prog/en/includes/select2.inc
koha-tmpl/intranet-tmpl/prog/js/select2.js [new file with mode: 0644]