Calendar: Fix hide/show of selected day contents

This commit is contained in:
Raphael Michel
2021-06-07 12:52:25 +02:00
parent 193407d819
commit 3e178a7293
3 changed files with 9 additions and 5 deletions

View File

@@ -107,7 +107,7 @@
{% endfor %}
</tr>
{% endfor %}
<tr class="selected-day">
<tr class="selected-day hidden">
<td colspan="7"></td>
</tr>
</tbody>

View File

@@ -321,7 +321,7 @@ $(function () {
var $tr = $(this).closest(".table-calendar").find(".selected-day");
$tr.find("td").html($(this).find(".events").html());
$tr.find("td").prepend($("<h3>").text($(this).attr("data-date")));
$tr.show();
$tr.removeClass("hidden");
});
$(".print-this-page").on("click", function (e) {

View File

@@ -69,9 +69,6 @@
background: darken($brand-primary, 15%);
}
}
.selected-day {
display: none;
}
}
.week-calendar {
.weekday {
@@ -123,6 +120,13 @@
}
}
}
@media (min-width: $screen-sm-min) {
.table-calendar, .week-calendar {
.selected-day {
display: none !important;
}
}
}
@media (max-width: $screen-xs-max) {
.table-calendar .day .events {
display: none;