Spaces:
Running
Running
eaglelandsonce
commited on
Update index.html
Browse files- index.html +14 -9
index.html
CHANGED
@@ -84,7 +84,7 @@
|
|
84 |
const cardId = e.dataTransfer.getData('text');
|
85 |
const card = document.getElementById(cardId);
|
86 |
e.target.appendChild(card);
|
87 |
-
checkCompletion(
|
88 |
});
|
89 |
|
90 |
column.cards.forEach(card => {
|
@@ -106,17 +106,22 @@
|
|
106 |
});
|
107 |
}
|
108 |
|
109 |
-
function checkCompletion(
|
110 |
-
const
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
}
|
117 |
|
118 |
createKanbanBoard(config);
|
119 |
</script>
|
120 |
</body>
|
121 |
</html>
|
122 |
-
|
|
|
84 |
const cardId = e.dataTransfer.getData('text');
|
85 |
const card = document.getElementById(cardId);
|
86 |
e.target.appendChild(card);
|
87 |
+
checkCompletion();
|
88 |
});
|
89 |
|
90 |
column.cards.forEach(card => {
|
|
|
106 |
});
|
107 |
}
|
108 |
|
109 |
+
function checkCompletion() {
|
110 |
+
const columns = document.querySelectorAll('.column');
|
111 |
+
|
112 |
+
columns.forEach(column => {
|
113 |
+
const cards = column.querySelectorAll('.card');
|
114 |
+
const cardContainer = column.querySelector('.card-container');
|
115 |
+
|
116 |
+
if (cards.length === 0) {
|
117 |
+
cardContainer.classList.add('active');
|
118 |
+
} else {
|
119 |
+
cardContainer.classList.remove('active');
|
120 |
+
}
|
121 |
+
});
|
122 |
}
|
123 |
|
124 |
createKanbanBoard(config);
|
125 |
</script>
|
126 |
</body>
|
127 |
</html>
|
|