Maurycy-Sokolowski / gwt-cal

GWT based calendar
0 stars 0 forks source link

Create Appointment with Drag & Drop #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Description of the new feature:
Looking into iCal and Google Calendar seems like a standard to create an 
Appointment with simple Drag & Drop

Use Case:
Double-Click should automatically create (or fire an event like now) to create 
a new default Appointment.
Single-Click should start the creation of a new Appointment with automatically 
resizing it until the drag ends

Incompatibility:
The TimeBlock ClickHandler would only receive double-click events 
OR
If the TimeBlock Click is configured to Single-click, then cannot automatically 
create the Appointments with Drag&Drop

Code / psuedo-code:
Not yet, probably in some days ;)

Original issue reported on code.google.com by ctasada on 2 Aug 2010 at 9:37

GoogleCodeExporter commented 9 years ago

Original comment by Brad.Ryd...@gmail.com on 15 Aug 2010 at 8:40

GoogleCodeExporter commented 9 years ago
Ok, took me longer than expected, but here's a working patch to implement it.

There are some points that could (and probably should) be discussed, but this 
patch can be applied directly without breaking any existing configuration

I hope it will be helpful

Original comment by ctasada on 17 Dec 2010 at 7:43

Attachments:

GoogleCodeExporter commented 9 years ago
awesome! i'll check it out

Original comment by Brad.Ryd...@gmail.com on 17 Dec 2010 at 7:53

GoogleCodeExporter commented 9 years ago
How to use it:

// Enable the Drag&Drop
settings.setENableDragDrop(true);
// Enable the Drag&Drop Creation
settings.setEnableDragDropCreation(true)
// And the "magic setting"
settings.setTimeBlockClickNumber(Click.None);

The last setting is doing the 'magic' (see the DayView.java) to avoid the event 
creation with Single or Double-Click. The setting could be automatically 
enabled with the setEnableDragDropCreation, but I wanted to avoid the obscure 
modification

Original comment by ctasada on 18 Jul 2011 at 7:07

GoogleCodeExporter commented 9 years ago
There is a new branch which implements this patch: 
/svn/branches/version-0.9.2-dndCreation

Original comment by ctasada on 19 Jul 2011 at 9:36

GoogleCodeExporter commented 9 years ago

Original comment by ctasada on 11 Aug 2011 at 8:32

GoogleCodeExporter commented 9 years ago
I've renamed Click.None for Click.Drag since seems more descriptive

Original comment by ctasada on 7 Jan 2012 at 7:53