[Koha-bugs] [Bug 35383] Dragging and dropping subfield of repeated tags doesn't work

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 28 18:38:52 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35383

--- Comment #5 from Slava Shishkin <slavashishkin at gmail.com> ---
(In reply to Marcel de Rooy from comment #4)

thanks, that makes a sense,

I can wrap up it in "if",

    if (typeof Sortable !== 'undefined') {
        $(clone).find("ul.sortable_subfield").each((i, e) => {
            Sortable.create(e, {
                animation: 150,
            });
        });
    }

but the best then is to make a callback option for CloneSubfield and leave
Sortable.create code in files where it resides,

but that also leads to refactoring of onclick="CloneSubfield... to modern way
how we doing that in our codebase by moving that listener to JS document ready
block

Marcel, what do you think?

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list