| Issue 1594: | Drag and Drop onto Resource view | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Every view besides Resource view seems to allow dragging events onto the calendar (Am I just missing something?) so to allow dragging onto the Resource view, I added a small change to the dragStop declaration in ResourceView.js:
trigger('drop', _dragElement, cellDate(cell), cellIsAllDay(cell), resources[cell.col].id, ev, ui);
By using the dropped cell's col as an index against resources, I can then grab the resource's ID, pass it into the drop declaration, and bind it to copiedEventObject:
drop: function(date, allDay, resourceId, jsEvent) {
...
copiedEventObject.resourceId = resourceId;
If I am missing another way to do this, any advice is appreciated! Otherwise, if there is interest in integrating this change into fullcalendar, I am happy to lend a hand :)
Aug 18, 2013
Project Member
#1
adamrs...@gmail.com
Status:
Invalid
Nov 7, 2013
Thank you. This is the best solution I've found on the web.
Jan 27, 2014
I had to make the following changes in ResourceView.js in order to have the correct cell overlay when mouse was dragging to other resources:
on line 480:
removed: function renderSlotOverlay(overlayStart, overlayEnd) {
replaced with: function renderSlotOverlay(overlayStart, overlayEnd, cellcol) {
line 488:
var rect = coordinateGrid.rect(0, cellcol, 0, cellcol, slotContent);
Inside the dragStart function I call:
line 814: renderSlotOverlay(d1, d2, cell.col);
Aug 21, 2014
Thanks guys, the first bit of code did not work for me though the following did;
trigger('drop', _dragElement, dDrop, cellIsAllDay(cell), resources[cell.col].id, ev, ui);
|
|
| ► Sign in to add a comment |