assets/js/theme.js in appscms-tools-theme-3.4.2 vs assets/js/theme.js in appscms-tools-theme-3.4.3
- old
+ new
@@ -61,10 +61,12 @@
if ("{{ site.removeBootstrapJs }}"==="true") {
const languagesModal = document.querySelector("#staticBackdrop");
const intModalBtn = document.querySelector("#int-modal-btn");
const closeBtn = document.querySelector("#close-modal");
+
+if(intModalBtn){
intModalBtn.addEventListener("click", () => {
languagesModal.style.display = "block";
languagesModal.classList.add("show");
let modal = document.createElement("div");
modal.classList.add("modal-backdrop", "show");
@@ -74,9 +76,10 @@
languagesModal.style.display = "none";
languagesModal.classList.remove("show");
let modal = document.querySelector(".modal-backdrop");
document.body.removeChild(modal);
});
+}
let navbarDropdown = document.querySelector("#navbarDropdown");
let dropmenu = document.querySelector(".dropmenu");
navbarDropdown.addEventListener("click", () => {
if (dropmenu.classList.contains("show")) {
dropmenu.classList.remove("show");