Bug 34114: Replace the use of jQueryUI sortable
authorOwen Leonard <oleonard@myacpl.org>
Thu, 13 Jul 2023 11:57:02 +0000 (11:57 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 22 Sep 2023 16:00:00 +0000 (13:00 -0300)
commit872c4ba2dc83446e58b06f4add117c309bc7fde9
tree69eea40f9a1aacec5d18dc1dbdf6515c3b4d8878
parentfe18b0569298502dc20ca1322d919baab5526281
Bug 34114: Replace the use of jQueryUI sortable

This patch adds a replacement for jQueryUI sortable, a standalone
library called Sortable. The patch updates pages which previously used
jQueryUI for sorting.

The patch updates the style of most sortable elements to use the
"grip-vertical" Font Awesome icon.

To test, apply the patch and test the following pages, confirming that
sortable elements are sortable and that the newly sorted state is saved
correctly:

- Administration -> System prefernces -> I18N/L10N
  - With multiple languages installed, test that languages listed in the
    'language' and 'OPACLanguages' preferences can be sorted and that
    after saving your changes the interface relfects your changes: In
    the footer and header of the OPAC and in the footer of the staff
    interface.
- Administration -> MARC bibliographic framework -> MARC structure ->
  Edit subfields of a tag.
  - Test using a tag with multiple subfields, e.g. MARC21 245.
    - Test that you can click and drag to reorder the tabs in the
      subfield edit view.
    - Test that when you save your changes, including changes to the
      "New" tab position, that fields are ordered correctly both in the
       display on this page and in the basic MARC editor.
  - Perform the same tests on Authorities: Administration -> Authority
    types -> MARC structure -> Edit subfields of a tag.
- Authorities -> New (or edit) authority
  - Multiple subfields of a tag should be sortable.
  - Multiple copies of the same tag should be sortable relative to each
    other.
  - Confirm that your changes are saved correctly and that the detail
    view of your updated authority record is correct.
  - Perform the same tests on Cataloging -> New (or edit) record in the
    basic MARC editor.
- Enable the StockRotation system preference if necessary.
  - Go to Cataloging -> Stock rotation
    - If necessary, create a new rota and add multiple stages
      - In the "Manage stages" view you should be able to click and drag
        to reorder stages. The new position should be saved immediately
        via AJAX.

Signed-off-by: paul <paul.poulain@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
12 files changed:
koha-tmpl/intranet-tmpl/lib/sortable/Sortable.min.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/css/addbiblio.css
koha-tmpl/intranet-tmpl/prog/css/preferences.css
koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tt
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/stockrotation.tt
koha-tmpl/intranet-tmpl/prog/js/marc_subfields_structure.js
koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js
koha-tmpl/intranet-tmpl/prog/js/pages/stockrotation.js