Commit 305ccad8 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Remplacement de code JQuery posant pb sur certaines machines (essai) #59140

parent 50fee677
Loading
Loading
Loading
Loading
Loading
+8 −3
Changes for public/js/pop-ajax.js: 8 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -358,13 +358,18 @@ function popConfirm(element, options)
        };
        popConfirm = new bootstrap.Popover(element, popoptions);
        element.addEventListener('shown.bs.popover', (eventShown) => {
            let popDivId = $(eventShown.target).attr('aria-describedby');
            $("#" + popDivId).find("button#go").click(() => {
            const popDivId = eventShown.target.getAttribute('aria-describedby');
            const popDiv = document.getElementById(popDivId);

            const goButton = popDiv.querySelector('button#go');
            const nogoButton = popDiv.querySelector('button#nogo');

            goButton.addEventListener('click', () => {
                popConfirm.hide();
                goFunc();
            });

            $("#" + popDivId).find("button#nogo").click(() => {
            nogoButton.addEventListener('click', () => {
                popConfirm.hide();
            });
        });