Update static/script.js
Browse files- static/script.js +17 -0
static/script.js
CHANGED
|
@@ -79,4 +79,21 @@ async function hienThiDanhSachPYCChoXuLy() {
|
|
| 79 |
console.error("Lỗi API ds_pyc_cho_xu_ly:", err);
|
| 80 |
}
|
| 81 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
|
|
|
| 79 |
console.error("Lỗi API ds_pyc_cho_xu_ly:", err);
|
| 80 |
}
|
| 81 |
}
|
| 82 |
+
function enableSubmenuClick() {
|
| 83 |
+
document.querySelectorAll(".menu-item.has-sub").forEach(item => {
|
| 84 |
+
item.addEventListener("click", () => {
|
| 85 |
+
const id = item.getAttribute("data-submenu");
|
| 86 |
+
const submenu = document.getElementById(id);
|
| 87 |
+
const arrow = document.getElementById("arrow-" + id);
|
| 88 |
+
|
| 89 |
+
if (submenu.style.display === "block") {
|
| 90 |
+
submenu.style.display = "none";
|
| 91 |
+
arrow.innerHTML = "►";
|
| 92 |
+
} else {
|
| 93 |
+
submenu.style.display = "block";
|
| 94 |
+
arrow.innerHTML = "▼";
|
| 95 |
+
}
|
| 96 |
+
});
|
| 97 |
+
});
|
| 98 |
+
}
|
| 99 |
|