Closed Bug 168224 Opened 24 years ago Closed 23 years ago

Should be allowed to drag and drop events in day and week view to change start dates

Categories

(Calendar :: Sunbird Only, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mikeypotter, Assigned: mikeypotter)

Details

Attachments

(4 files)

You should be able to drag and drop events in the month view to change the events start date. Drag and event, drop it onto another day, changes the start and end date to that day, keeping the time the same.
Status: NEW → ASSIGNED
This is done in CVS for month view.
Summary: Should be allowed to drag and drop events in month view to change start dates → Should be allowed to drag and drop events in day and week view to change start dates
I have a calendardragdrop unit for day/week views, but never finnished it because I couldn't get Maildragdrop working.
-> default owner, more important things to do now.
Status: ASSIGNED → NEW
I'll do this I guess.
Status: NEW → ASSIGNED
Target Milestone: --- → 0.9
I have (old) code for this, i'll check if it still works
I wrote calendarDragDrop.js several months ago for better drag/drop support,but stopped after having problems with mailnews drag/drop. It seems to work with the latest calendar. Note that this version only works with Mozilla 1.2, for Mozilla 1.0 search the mozilla10 comment.
Patch to use calendarDragDrop and switch the dayview to this new unit. allows dragging of events (ctrl-drag on windows is copy) I didn't test weekview
Does this only work in Mozilla 1.2?
This is pretty good, so I'm going to put it into CVS. I'm leaving the bug open, here are remaining issues: 1. Week view dragging and dropping is not yet supported. 2. When you click on the title label in the day view, you can't drag and drop the event. This makes it hard to drag and drop the event, since you have to grab it from the sides.
drag/drop and clipboard support is incompatible between 1.0/1.1 and 1.2, so clipboard and other drag/drop stuff in Calendar won't work on 1.2. Do you think there will be new builds for 1.0, so would it be worth the trouble to make this work on both 1.0/1.2? (maybe scan the useragent and do a if/then)
No, its not worth the trouble to make it work on 1.0 and 1.2. We'll go with 1.2 only.
note that the event in weekview must be selected first before it can be dragged.
This is great. Any idea why the event has to be selected first?
onDragStart 'catches' the mouseclick so the event that should be checked isn't. That's why I added calendarViewClick() to calendarDragDrop to first send a mouseclick to the view for selection. Seems that weekview click is captures by eventDescriptionElement not eventBox, doing eventDescriptionElement.calendarEventDisplay = calendarEventDisplay; in calendarWeekView.js and in dragdrop[48]: if(aEvent.target.className == "week-view-event-label-class") weekEventItemClick( aEvent.target, aEvent ); seems to work
That doesn't fix the week view for me. If I put it in, I can't drag and drop at all. I'm still putting the drag and drop in, but we need to clean it up at some point.
Looking at the checkin of calendarDayView.js 1.30 ( http://bonsai.mozilla.org/cvsview2.cgi? diff_mode=context&whitespace_mode=show&file=calendarDayView.js&root=/cvsroot&su bdir=mozilla/calendar/resources/content&command=DIFF_FRAMESET&rev1=1.29&rev2=1. 30 ) I see that together with my patch, there is another change: [1.29] var eventHTMLElement = document.createElement( "label" ); [1.30] var eventHTMLElement = document.createElement( "description" ); Before the drag/click-event returned a box object as target (the label is 'tranparent'?) now the target is of description type, breaking the dragdrop code. Do you know why this change is in with the d&d patch? If on purpose, it is probably not hard to fix d&d by adding classname/d&d- event/calendarEventDisplay to the description
note that on dayview now the mousecursor over events has changed from a hand to a arrow (windows xp), but when moving around changes to the hand when over the event-border.
That change was going in because I was going to fix another bug that someone logged saying they wanted to have the event note (description) along with the title in the day view. I will back that change out and try and get drag and drop working again here.
dayView.js : added a class for the label of events dragDrop.js : - added code to select the event at the begining of a drag - code to allow to allow to drag an event even if we take it from the center (not only the border of the box) - code to allow the drop to change the day in the week view. weekView.js : added eventBox.setAttribute( "dayindex", index+1 ); used to DND to another day.
Attachment #118630 - Flags: first-review?(mikep)
Checked into cvs, seems to work fine.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Attachment #118630 - Flags: first-review?(mikep)
The bugspam monkeys have been set free and are feeding on Calendar :: Sunbird Only. Be afraid for your sanity!
QA Contact: colint → sunbird
Target Milestone: 0.9 → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: