From 27fd38f96f87d65d99b1acbd1aa9520353421efa Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 14 Oct 2009 19:44:46 +0000 Subject: [PATCH] JavaScript: don't highligh the day selection when in the day view. Monotone-Parent: b0bcd8d5f48a8980666352842c09c5de8b59a5d4 Monotone-Revision: 2a112877a8784837004167070989be6cdda17134 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-10-14T19:44:46 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ UI/WebServerResources/SchedulerUI.js | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6f88afbdb..c058dec44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2009-10-14 Francis Lachapelle + * UI/WebServerResources/SchedulerUI.js (changeCalendarDisplay): + don't highlight the day selection when in the day view. + * UI/Scheduler/UIxCalListingActions.m (_fixDates:): start/end dates must be adjust for DST only when dealing with the day based view. No change is required for the month view, except for the diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 30a84af95..26a52c329 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -610,22 +610,23 @@ function eventsListCallback(http) { var td = $(document.createElement("td")); row.appendChild(td); td.observe("mousedown", listRowMouseDownHandler, true); - td.appendChild(document.createTextNode(data[i][3])); + td.appendChild(document.createTextNode(data[i][3])); // title td = $(document.createElement("td")); row.appendChild(td); td.observe("mousedown", listRowMouseDownHandler, true); - td.appendChild(document.createTextNode(data[i][16])); + td.appendChild(document.createTextNode(data[i][16])); // start date td = $(document.createElement("td")); row.appendChild(td); td.observe("mousedown", listRowMouseDownHandler, true); - td.appendChild(document.createTextNode(data[i][17])); + td.appendChild(document.createTextNode(data[i][17])); // end date td = $(document.createElement("td")); row.appendChild(td); td.observe("mousedown", listRowMouseDownHandler, true); - td.appendChild(document.createTextNode(data[i][6])); + if (data[i][6]) + td.appendChild(document.createTextNode(data[i][6])); // location } if (sorting["attribute"] && sorting["attribute"].length > 0) { @@ -811,9 +812,10 @@ function changeCalendarDisplay(data, newView) { }); // Select new day - divs.each(function(div) { - div.addClassName('selectedDay'); - }); + if (currentView != 'dayview') + divs.each(function(div) { + div.addClassName('selectedDay'); + }); // Deselect day in date selector if (document.selectedDate) @@ -1073,6 +1075,7 @@ function newBaseEventDIV(eventRep, event, eventText) { if (event[2] == null) { eventDiv.observe("selectstart", listRowMouseDownHandler); eventDiv.observe("click", onCalendarSelectEvent); + eventDiv.observe("dblclick", Event.stop); } else { // Status field is defined -- user can read event @@ -1510,7 +1513,7 @@ function selectCalendarEvent(calendar, cname, recurrenceTime) { return selection; } -function onCalendarSelectEvent() { +function onCalendarSelectEvent(event) { selectCalendarEvent(this.calendar, this.cname, this.recurrenceTime); // Select event in events list