limiting the #modal shit to mobile only
parent
0f62958024
commit
2953a918bd
|
@ -584,21 +584,24 @@ function handleUploadProgress(e, upload_prog) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('expandImageModal').addEventListener('show.bs.modal', function () {
|
|
||||||
setTimeout(() => {
|
|
||||||
location.hash = "modal";
|
|
||||||
}, 200);
|
|
||||||
});
|
|
||||||
|
|
||||||
document.getElementById('expandImageModal').addEventListener('hide.bs.modal', function () {
|
if (width <= 768) {
|
||||||
if(location.hash == "#modal") {
|
document.getElementById('expandImageModal').addEventListener('show.bs.modal', function () {
|
||||||
history.back();
|
setTimeout(() => {
|
||||||
}
|
location.hash = "modal";
|
||||||
});
|
}, 200);
|
||||||
|
});
|
||||||
|
|
||||||
window.addEventListener('hashchange', function () {
|
document.getElementById('expandImageModal').addEventListener('hide.bs.modal', function () {
|
||||||
if(location.hash != "#modal") {
|
if(location.hash == "#modal") {
|
||||||
const curr_modal = bootstrap.Modal.getInstance(document.getElementsByClassName('show')[0])
|
history.back();
|
||||||
if (curr_modal) curr_modal.hide()
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
|
window.addEventListener('hashchange', function () {
|
||||||
|
if(location.hash != "#modal") {
|
||||||
|
const curr_modal = bootstrap.Modal.getInstance(document.getElementsByClassName('show')[0])
|
||||||
|
if (curr_modal) curr_modal.hide()
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue