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 %} {% endfor %}
</tr> </tr>
{% endfor %} {% endfor %}
<tr class="selected-day"> <tr class="selected-day hidden">
<td colspan="7"></td> <td colspan="7"></td>
</tr> </tr>
</tbody> </tbody>

View File

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

View File

@@ -69,9 +69,6 @@
background: darken($brand-primary, 15%); background: darken($brand-primary, 15%);
} }
} }
.selected-day {
display: none;
}
} }
.week-calendar { .week-calendar {
.weekday { .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) { @media (max-width: $screen-xs-max) {
.table-calendar .day .events { .table-calendar .day .events {
display: none; display: none;