User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:18.104.22.168) Gecko/20070725 Firefox/22.214.171.124
Build Identifier: Thunderbird v126.96.36.199 (20070728) / Lightning v0.7pre (2007081804)
If the 'all day event' box is ticked the start/end time get lost and is set to 00:00h instead. If the box is de-ticked again the time will not be restored properly.
Steps to Reproduce:
1. create a new event
2. tick 'all day event' box
3. de-tick 'all day event' box
start/end time get lost.
start/end time will be restored properly.
I can confirm the behavior with Lightning 0.8pre (2007110903) on WinXP. Christian, what is the expected behavior?
Oops, sorry, my bad, returning to the right component, awfully sorry about stomping your target milestone, please send hatemail to this address :(
I can confirm on Sunbird 0.9, Mac OS X 10.5.
Created attachment 399055 [details] [diff] [review]
Could I have an opinion here?
I think the patch covers all possible cases and, if the event is an all-day one, when the checkbox is de-ticked off, it sets the start time to next hour (like a new event).
Unfortunately I used two global variables (that I know aren't the best choice).
By the way, in the file 'calendar-event-dialog.js' there are two global variables that aren't used anywhere:
Comment on attachment 399055 [details] [diff] [review]
The first time I tested the patch, the date was reset to midnight, but afterwards I could not reproduce this. Maybe I just clicked in the wrong time slot or so. Further testing lets it look fine.
The only way we could "get rid" of those globals is to set the variables on the function object, i.e
onUpdateAllDay.oldStartTime = gStartTime.clone()
but given the large amount of globals we have I doubt its worth the extra effort.
Anyway, I'd like to have the globals prefixed with "g" and make the allday variable use "let". I'll change this before checkin.
Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/d595d8b75570>
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:188.8.131.52pre) Gecko/20100224 Calendar/1.0b2pre