diff --git a/templates/base.html b/templates/base.html index 842bf0c..daa0c1f 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,14 +1,15 @@ - +
-- - | Color | -Qty | -Missing | ++ + + | Qty | +Missing | |
---|---|---|---|---|---|---|---|
- | {{ brick[3] }} | ++ | {{ brick[3] }} | {{ brick[7] }} | -{{ brick[8] }} | +{{ brick[8] }} |
{% set ns = namespace(count='') %}
@@ -78,30 +73,6 @@
// } );
-
-
-
-// document.addEventListener('DOMContentLoaded', function () {
-// const myDataTable = document.getElementById('data');
-
-// myDataTable.addEventListener('click', function (event) {
-// const clickedRow = event.target.closest('td');
-// if (clickedRow) {
-// // Remove highlighting from all rows
-// const rows = myDataTable.querySelectorAll('tr');
-// rows.forEach(row => row.classList.remove('highlighted'));
-
-// // Add highlighting to the clicked row
-// if (clickedRow.classList.contains('highlighted')) {
-
-// clickedRow.classList.remove('highlighted');
-// } else {
-// clickedRow.classList.add('highlighted');
-// }
-// }
-// });
-// });
-
function goToPage(url) {
window.location.href = url;
}
@@ -135,12 +106,11 @@ document.addEventListener('DOMContentLoaded', function () {
element.addEventListener('click', function () {
const imgSrc = element.getAttribute('src');
textContent = '';
-try {
- textContent = element.closest('tr').querySelector('td:nth-child(2)').textContent; // Adjust the index accordingly
+ console.log(element.getAttribute('alt'));
+ textContent = element.getAttribute('alt');
+ // textContent = element.closest('tr').querySelector('td:nth-child(2)').textContent; // Adjust the index accordingly
lightboxText.textContent = textContent;
-} catch (e) {
- textContent = '';
-}
+
lightboxImage.setAttribute('src', imgSrc);
lightboxModal.style.display = 'block';
|