Skip to content

Commit a39d4d8

Browse files
authored
Style/grid (#200)
* Js scrolling duplication days fixed
1 parent f64bd20 commit a39d4d8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

app/static/js/grid_scripts.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@ function loadWeek(lastDay, index) {
1818
if (lastDay.dataset.last === "false") {
1919
return false;
2020
}
21+
lastDay.dataset.last = false;
2122
const path = '/calendar/month/' + lastDay.id;
22-
const newDays = document.createElement('html');
2323
fetch(path).then(function (response) {
24-
lastDay.dataset.last = false;
2524
return response.text();
2625
}).then(function (html) {
27-
const newDiv = document.createElement("div");
28-
newDays.innerHTML = html;
29-
newDiv.appendChild(newDays);
30-
document.getElementById("calender-grid").append(newDays);
26+
document.getElementById("calender-grid").insertAdjacentHTML('beforeEnd', html);
3127
setToggle("day", "day-view", "day-view-visible", index);
3228
});
3329
}

0 commit comments

Comments
 (0)