mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 19:58:25 +02:00
Render only useful content when displaying modals
This commit is contained in:
@ -259,7 +259,7 @@
|
||||
if (!modalBody.innerHTML.trim()) {
|
||||
if (url instanceof Function) url = url()
|
||||
|
||||
fetch(url)
|
||||
fetch(url, {headers: {'CONTENT-ONLY': '1'}})
|
||||
.then(resp => resp.text())
|
||||
.then(resp => new DOMParser().parseFromString(resp, 'text/html'))
|
||||
.then(res => modalBody.innerHTML = res.getElementById(content_id).outerHTML)
|
||||
|
Reference in New Issue
Block a user