From 48dc181ddf51a6766ad7c46304f98d8c50d12fa3 Mon Sep 17 00:00:00 2001 From: Janusz Kaczmarek Date: Thu, 21 Mar 2024 16:20:24 +0100 Subject: [PATCH] Bug 36388: Mouse operation does not work in draggable fields in authority editor When using the authority editor in Firefox, it is not possible to set the cursor or select text from the text field. This patch mimics the corrections made in bug 35425 for biblio editor. Test plan: ========== 1. Start editing an existing authority record and try to put the cursor with the mouse in the middle of the content of any subfield or to select text with the mouse. It should not be possilbe. 2. Apply the patch (reload plack etc.). 3. Repeat p. 1 - everything should work as expected. Signed-off-by: Lucas Gass Signed-off-by: Victor Grousset/tuxayo --- .../en/modules/authorities/authorities.tt | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt index cb7e6530cb..a51bdd1446 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -48,17 +48,17 @@ selectTab( "#tab0XX_panel" ); } - $("#authoritytabs ul.sortable_field").each( (i, e) => { - Sortable.create(e, { - animation: 150 - }); - }); - - $("#authoritytabs ul.sortable_subfield").each( (i, e) => { - Sortable.create(e, { - animation: 150 - }); - }); + function initializeSortable(selector) { + $(selector).each((i, e) => { + Sortable.create(e, { + handle: '.handle', + direction: 'vertical', + animation: 150, + }); + }); + } + initializeSortable("#authoritytabs ul.sortable_field"); + initializeSortable("#authoritytabs ul.sortable_subfield"); Sticky = $("#toolbar"); Sticky.hcSticky({ @@ -614,6 +614,9 @@
[% UNLESS hide_marc %] + [% IF ( innerloo.repeatable ) %] + + [% END %] [% IF advancedMARCEditor %] [% innerloo.tag | html %] [% ELSE %] @@ -696,6 +699,7 @@ [% UNLESS hide_marc %]
+