Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate _download.js to use Bootstrap5 modals #14

Open
nboisteault opened this issue Oct 3, 2024 · 0 comments
Open

Migrate _download.js to use Bootstrap5 modals #14

nboisteault opened this issue Oct 3, 2024 · 0 comments
Assignees

Comments

@nboisteault
Copy link
Member

nboisteault commented Oct 3, 2024

Code should be :

    layersadded: function() {
        var html = '<div class="modal-dialog modal-dialog-scrollable"><div class="modal-content">';
        html+= '<div class="modal-header"><h3>Welcome on this map</h3><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div>';

        html+= '<div class="modal-body">';
        html+= document.getElementById('metadata')?.innerHTML;
        html+= '</div>';

        html+= '<div class="modal-footer"><button type="button" class="btn btn-default" data-bs-dismiss="modal">Ok</button></div>';

        html += '</div></div>'

        const modalElt = document.getElementById('lizmap-modal');
        modalElt.innerHTML = html;
        const myModal = new bootstrap.Modal(modalElt);
        myModal.show();
    }
@nboisteault nboisteault changed the title Migtate _download.js to use Bootstrap5 modals Migrate _download.js to use Bootstrap5 modals Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants