|
|
@@ -73,9 +73,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="modal-footer mt-2 justify-content-between">
|
|
|
- <button class="btn--ui lightGrey hideDelete hideDeleteButton" onclick="showDelete()">Annulla Lezione</a>
|
|
|
- <button type="button" class="btn--ui btn-primary hideDelete" onclick="goPresence()">Presenze</button>
|
|
|
+ <button class="btn--ui lightGrey hideDelete hideDeleteButton activeCalendarButton" onclick="showDelete()">Annulla Lezione</a>
|
|
|
+ <button type="button" class="btn--ui btn-primary hideDelete activeCalendarButton" onclick="goPresence()">Presenze</button>
|
|
|
<button type="button" class="btn--ui primary showDelete" onclick="deleteCalendar()" style="display:none">Annulla lezione</button>
|
|
|
+
|
|
|
+ <button type="button" class="btn--ui primary revertDelete" onclick="revertCalendarDeletion()" style="display:none">Ripristina lezione</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -276,11 +278,13 @@
|
|
|
$(".title").html(title);
|
|
|
if (title.includes("annullata"))
|
|
|
{
|
|
|
- $(".hideDeleteButton").css("display", "none");
|
|
|
+ $(".activeCalendarButton").css("display", "none");
|
|
|
+ $(".revertDelete").css("display", "block");
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- $(".hideDeleteButton").css("display", "block");
|
|
|
+ $(".activeCalendarButton").css("display", "block");
|
|
|
+ $(".revertDelete").css("display", "none");
|
|
|
}
|
|
|
$(".time").html(pad(eventDate.getHours(), 2) + ":" + pad(eventDate.getMinutes(), 2));
|
|
|
$(".date").html(eventDate.toLocaleDateString('it-IT', { weekday: 'long' }) + " " + pad(eventDate.getDate(), 2) + " " + eventDate.toLocaleDateString('it-IT', { month: 'long' }));
|
|
|
@@ -318,6 +322,11 @@
|
|
|
@this.cancelCalendar(currentCalendar, motivation);
|
|
|
}
|
|
|
|
|
|
+ function revertCalendarDeletion()
|
|
|
+ {
|
|
|
+ @this.revertCalendarDeletion(currentCalendar);
|
|
|
+ }
|
|
|
+
|
|
|
function reloadCalendar()
|
|
|
{
|
|
|
document.location.href = '/calendar?name_filter=' + $("#name_filter").val();
|