diff --git a/UI/WebServerResources/SchedulerUI.css b/UI/WebServerResources/SchedulerUI.css index 908bf7193..cb615858d 100644 --- a/UI/WebServerResources/SchedulerUI.css +++ b/UI/WebServerResources/SchedulerUI.css @@ -687,7 +687,6 @@ TABLE.monthOverview DIV.appointmentInside width: auto; position: static; } - DIV.daysView > DIV.hours { position: absolute; border: 0px; @@ -834,6 +833,9 @@ DIV.appointments > DIV.appointment right: 0px; padding: 0px; } +DIV[class~="appointment"]._selected > DIV.appointmentInside +{ background-color: #ffa !important; } + DIV.appointment > DIV { position: absolute; overflow: hidden; diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 764603ef4..f30162de0 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -3,6 +3,7 @@ var sortKey = ''; var listFilter = 'view_today'; var listOfSelection = null; +var selectedCalendarCell; var hideCompletedTasks = 0; @@ -57,6 +58,9 @@ function editEvent() { for (var i = 0; i < nodes.length; i++) _editEventId(nodes[i].getAttribute("id"), nodes[i].getAttribute("owner")); + } else if (selectedCalendarCell) { + _editEventId(selectedCalendarCell.getAttribute("aptCName"), + selectedCalendarCell.getAttribute("owner")); } return false; /* stop following the link */ @@ -108,6 +112,18 @@ function deleteEvent() } } } + else if (selectedCalendarCell) { + var label = labels["appointmentDeleteConfirmation"].decodeEntities(); + if (confirm(label)) { + if (document.deleteEventAjaxRequest) { + document.deleteEventAjaxRequest.aborted = true; + document.deleteEventAjaxRequest.abort(); + } + eventsToDelete.push([selectedCalendarCell.getAttribute("aptCName")]); + ownersOfEventsToDelete.push(selectedCalendarCell.getAttribute("owner")); + _batchDeleteEvents(); + } + } else window.alert("no selection"); @@ -379,6 +395,8 @@ function changeCalendarDisplay(time, newView) { var url = ApplicationBaseURL + ((newView) ? newView : currentView); + selectedCalendarCell = null; + var day = null; var hour = null; if (time) { @@ -742,6 +760,11 @@ function onCalendarSelectAppointment() { list.deselectAll(); var aptCName = this.getAttribute("aptCName"); + listOfSelection = null; + if (selectedCalendarCell) + selectedCalendarCell.deselect(); + this.select(); + selectedCalendarCell = this; var row = $(aptCName); if (row) { var div = row.parentNode.parentNode.parentNode;