From 84eddba3e276c124aa5b328cbe43b76c36961887 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 12 Jun 2007 21:19:18 +0000 Subject: [PATCH] Monotone-Parent: 03c04ebe5a884f273812846b653628eea0f968b4 Monotone-Revision: ea4ca54e11a96603a73ece17c13a825c99c9eba1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-12T21:19:18 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/SchedulerUI.css | 4 +++- UI/WebServerResources/SchedulerUI.js | 21 ++++++++++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/UI/WebServerResources/SchedulerUI.css b/UI/WebServerResources/SchedulerUI.css index 55df6e63c..b3b26fc4c 100644 --- a/UI/WebServerResources/SchedulerUI.css +++ b/UI/WebServerResources/SchedulerUI.css @@ -819,6 +819,7 @@ DIV.events > DIV.event position: absolute; left: 0px; right: 1px; + margin-top: 1px; padding: 1px; } DIV[class~="event"]._selected > DIV.eventInside @@ -891,7 +892,8 @@ DIV.monthView DIV.event { position: relative; cursor: default; white-space: nowrap; - margin: 2px; + margin-top: 1px; + margin-left: 1px; margin-right: 3px; padding: 1px; height: 2em; } diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index df7c9d592..2f717ac71 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -78,8 +78,8 @@ function editEvent() { _editEventId(nodes[i].getAttribute("id"), nodes[i].owner); } else if (selectedCalendarCell) { - _editEventId(selectedCalendarCell.getAttribute("aptCName"), - selectedCalendarCell.owner); + _editEventId(selectedCalendarCell[0].cname, + selectedCalendarCell[0].owner); } return false; /* stop following the link */ @@ -137,8 +137,8 @@ function deleteEvent() { document.deleteEventAjaxRequest.aborted = true; document.deleteEventAjaxRequest.abort(); } - eventsToDelete.push([selectedCalendarCell.getAttribute("aptCName")]); - ownersOfEventsToDelete.push(selectedCalendarCell.owner); + eventsToDelete.push([selectedCalendarCell[0].cname]); + ownersOfEventsToDelete.push(selectedCalendarCell[0].owner); _batchDeleteEvents(); } } @@ -616,6 +616,8 @@ function drawCalendarEvent(eventData, sd, ed) { // log("viewS: " + viewStartDate); var startHour = null; var endHour = null; + + var siblings = new Array(); for (var i = 0; i < days.length; i++) if (days[i].earlierDate(viewStartDate) == viewStartDate && days[i].laterDate(viewEndDate) == viewEndDate) { @@ -647,6 +649,8 @@ function drawCalendarEvent(eventData, sd, ed) { var eventDiv = newEventDIV(eventData[0], eventData[1], starts, lasts, null, null, title); + siblings.push(eventDiv); + eventDiv.siblings = siblings; var dayString = days[i].getDayString(); // log("day: " + dayString); var parentDiv = null; @@ -1023,9 +1027,12 @@ function onCalendarSelectEvent() { list.deselectAll(); if (selectedCalendarCell) - selectedCalendarCell.deselect(); - this.select(); - selectedCalendarCell = this; + for (var i = 0; i < selectedCalendarCell.length; i++) + selectedCalendarCell[i].deselect(); + + for (var i = 0; i < this.siblings.length; i++) + this.siblings[i].select(); + selectedCalendarCell = this.siblings; var row = $(this.cname); if (row) { var div = row.parentNode.parentNode.parentNode;