Hi guys,
I love this module and the jquery plugin. I started to integrated for my module but I needed a way to create my event by drag and drop from the calendar, like it can be done on google calendar. There is a demo with this possibility on the fullcalendar website. So I modified the fullcalendar module. And I continued the same with edit and delete.
It works now for my module as you can see in the screenshot in attachment but it not generic yet to be integrated in the fullcalendar module. I'm now working on the migration of the code from my module to fullcalendar.
What has been done and what to do:
- create an event by drag and drop: complete
- node creation form open in colorbox and save with ajax: complete
- right click to open a context menu on the event: complete (with jquery plugin contextMenu)
- edit the event in colorbox and save with ajax: complete
- delete the event with ajax: complete
- permission for create, edit, delete: todo
- detect the date field: todo
- add settings in the view to select the content type that can be created: todo
- open form for all content type: todo
- save all the node field from the node form whatever the content type: todo (and I don't know exactly how to do that...)
I think I can submit a first patch this week end this week end.
Comment | File | Size | Author |
---|---|---|---|
#7 | 1085862-fullcalendar_add_ajax_crud-4229100-D6.patch | 25.23 KB | leilyrken |
#6 | fullcalendar_-6.x-2.x-dev_crud-ajax.zip | 50.84 KB | leilyrken |
fullcalendar_context-menu.png | 23.43 KB | leilyrken | |
fullcalendar_form-create.png | 26.72 KB | leilyrken | |
fullcalendar_drag-to-create.png | 20.56 KB | leilyrken |
Comments
Comment #1
jmaties CreditAttribution: jmaties commentedGreat!!!
subscribing ;)
Comment #2
huslabs CreditAttribution: huslabs commentedsubscribing too ;)
Comment #3
leilyrken CreditAttribution: leilyrken commentedQuick update:
- permission for create, edit, delete: complete
- detect the date field: complete
- add settings in the view to select the content type that can be created: complete
- open form for all content type: complete
Todo:
- handle full form validation (currently just title)
- handle preview and delete button in create or edit form
- find my problem with fullcalendar_date_fields() and several date field
Comment #4
tim.plunkettleilyrken, can we see a patch?
Or better yet, a Drupal git sandbox?
Comment #5
jhaski CreditAttribution: jhaski commentedAwesome... subscribing.
Comment #6
leilyrken CreditAttribution: leilyrken commentedI'm installing git to create a patch. I also I upload a zip with the dev version with what has been complete.
It's working but not completely tested and some part are imcomplete (see the TODO in the code).
How it works:
- configure the view with the content type to create in the style configuration
- configure the permission (create any fullcalendar event, delete any fullcalendar event, edit any fullcalendar event)
- drag on the calendar to create the create type configured
- right click on the mouse icon to open the context menu with edit and delete option
Not fully tested:
- Permissions
- Alternative for fields for date, title and url
Todo:
- handle correct validation (in the edit/create form and in the the ajax save): now only the title is checked
- save all the field: now only the title and the date field are saved
- the multi days are not displayed correctly in the calendar but maybe it's a fullcalendar stuff
Comment #7
leilyrken CreditAttribution: leilyrken commentedAnd here the patch.
Comment #8
tim.plunkettIs there any way to possible do this in D7 first?
I understand if you want to leave it for D6.
Please use two spaces, not tabs.
This is a big change, it would be very helpful if you could set up a Drupal git sandbox.
Comment #9
leilyrken CreditAttribution: leilyrken commentedI will setup a Drupal Git sandbox. But I developp it for Drupal 6 because I use it for my feature for Open Atrium.
I have no idea about how to do the migration to Drupal7, I can try later. But there is 2 major todo to complete and I have no idea how to handle it. If you know you can give me a clue. Then I can start migration to D7
Comment #10
tim.plunkettI would take some time to review the Drupal coding standards before writing any more patches, please.
Comment #11
zhuoyan CreditAttribution: zhuoyan commentedsubscribing
Comment #12
panosp CreditAttribution: panosp commentedIn Reply to #7.
Great work. I tested it a bit and I came across two issues:
1. In View configuration -> FullCalendar style options -> Node manipulation settings are not saved. Every time the view is edited the information in that set is back to default (i.e. the first content type found and empty fields).
2. Drag on the calendar is not populating the form with the chosen date-time but the current. I tried a variety of settings (on cck field, node, view) but nothing seemed to work. Your code looks right though...
Thank you.
Comment #13
leilyrken CreditAttribution: leilyrken commentedThanks, I will have a look this week end and update the code with Drupal coding standart.
Comment #14
Vidus CreditAttribution: Vidus commentedSubscribing. Keep up the great work. Very excited about using these features.
Comment #15
leilyrken CreditAttribution: leilyrken commentedI've been quite busy but I took time to create the git sandbox:
http://drupal.org/sandbox/leilyrken/1112686
I will check the issues from #12.
Comment #16
lindsayo CreditAttribution: lindsayo commentedsubscribing
Comment #17
lindsayo CreditAttribution: lindsayo commentedsubscribing
Comment #18
abaihaki CreditAttribution: abaihaki commentedany news on this thing?
Comment #19
alexio2170 CreditAttribution: alexio2170 commentedgreat idea (D7) any subscribing too
Comment #20
arnemaine CreditAttribution: arnemaine commentedSubscribing. Definitely thinking D7.
Comment #21
leilyrken CreditAttribution: leilyrken commentedHi guys... Long time without news. I'm very busy those days (I'm gonna get married \ o /) and have unfortunately no time to spend on this module right now.
If someone want to get a look to the code to implement it for D7 it could be great.
Comment #22
tim.plunkettCongrats leilyrken!
Hopefully I'll have some time, or someone else can step up.
Comment #23
Open Social CreditAttribution: Open Social commentedWe love this module and will try to free some time to help you out with patching!
The module is also requested for Drupal Commons:
http://commons.acquia.com/blog/eventslots-shifts-module
Comment #24
aspilicious CreditAttribution: aspilicious commentedI looked at the sandbox and I alrdy have 1 concern. Colorbox is not and will not be a dependency. Please be carefull with this while coding stuff :)
Comment #25
Open Social CreditAttribution: Open Social commentedHey!
I have worked on it, made some little changes. http://drupal.org/node/1184044
Download the sandbox version via git and apply the patch in the comment.
@aspilicious, Why won't colorbox be a dependency?
Comment #26
tim.plunkettColorbox is not going to be a dependency of FullCalendar because it currently works without it. If this can be a sub-module, that'd be great, and it can depend on whatever is needed.
I have to look at the code, but I imagine it could easily hook_menu_alter to take over the callbacks.
Comment #27
aspilicious CreditAttribution: aspilicious commentedBecause people that don't need that feature would have to install an useless module.
This actually should be a submodule that depend on the fullcalendar module THAN it can have colorbox as a dependency.
Looking at the code it should be possible (with some small modifications to fullcalendar it self) only the javascript and views stuff I'm not certain about.
And *please* use the coding standards while coding, because its hard to read code with tabs and trailing whitespaces in it. Sometimes I forget it myself but I try to do the best I can.
Comment #28
Open Social CreditAttribution: Open Social commentedok! Tomorrow I will go through the patch and make sure it is coding standard.
I like the idea of a submodule. Maybe I could write it. Will see.
Comment #29
kuemerle5 CreditAttribution: kuemerle5 commentedSubscribing. This is looking good.
Comment #30
webankit CreditAttribution: webankit commented+1
Comment #31
Open Social CreditAttribution: Open Social commentedhttp://drupal.org/sandbox/goalgorilla/1207988
Install instructions:
Known bugs
If you have ideas about how to fix these issues or you need help with implementing you can send an email to daniel@goalgorilla.com or post them in the issues queue of the sandbox
Comment #32
Open Social CreditAttribution: Open Social commentedI have added some more options:
url with a hash with the dates. This makes deeplinking possible.
z-index when hover. When overlapping you can still click edit.
some more small bugs.
if you checked the example and could add an event, it was because the pager was set to display only ten. That is fixed now.
I found another bug, will check today if it is also in the fullcalendar module.
When resizing an event and click next and back the event is in its old status (the node IS saved but displayed in its old status)
Comment #33
kenkasmar CreditAttribution: kenkasmar commentedThis is some great work!
I have a question about varying the colors of the events. I notice that you have that function in the demo, but I'm having a hard time figuring out how to implement it on my site. Am I missing something obvious?
Comment #34
Open Social CreditAttribution: Open Social commentedHey Ken,
If you are using the fullcalendar_extra module you can do this with a theme function
put the following in your theme template.php
function YOURTHEME_fullcalendar_extra_classname($node) {
$className = array(
'fc-event-default',
$node->type,
'color-' . $node->field_color[0]['value'],
);
return implode(' ', $className);
}
In this example we put three classes. the last one is a cck field. This one is used in the example.
Comment #35
UK_Rogue CreditAttribution: UK_Rogue commentedRef Commit f6600d4 fullcalendar_extras
Thanks for both these modules, they meets all requirements I have for my site, but I have bumbled into the following issues.
1. I followed instructions as per #31 but am receiving an error on all fullcalendar views before it can populate the time fields or add any content:
V.find("tr:eq(" + x + ") td div")[0] is undefined
2. It's not possible to save settings in views, it just reverts back to defaults.
3. Weekend settings although set to true, only shows Monday to Friday in the calendar.
Fullcalendar itself was working upto this point.
Once again, brill module!
******Additional*********
It appears to be the commenting out of line 206 "The Ugly Hack". Changing this back fixes fullcalendar but removes the additional functions from extras.
******Update**********
Install file was missing. Copied from initial commit.
Comment #36
xlyz CreditAttribution: xlyz commentedsubscribing (+1 x D7)
Comment #37
paulgemini CreditAttribution: paulgemini commentedsub +d7
Comment #39
tim.plunkettThis thread is full of pain. Marking it as a duplicate of #1275980: Drag & Drop Creation.
Comment #40
sterodste CreditAttribution: sterodste commentedHi,
I'm new to Drupal. I have instal fullcalendar and colorbox and it's work great(Drupal 7). I try something in the code of the module:fullcalendar/fullcalendar_options/js/colorbox.fullcalendar.js to be able to see my events in editable mode.
L-15
if ($.colorbox) {
var url = "/?q=node/"+calEvent.eid+"/edit" ; //// Pour faire ouvrir en mode édition avant: calEvent.url;
if (settings.colorboxClass !== '') {
url += ' ' + settings.colorboxClass ;
}
$.colorbox({
href: url,
width: settings.colorboxWidth,
height: settings.colorboxHeight,
iframe: settings.colorboxIFrame === 1 ? true : false
});
}
L-26
I would like to know if it's a good thing to do or it's gone a make me suffer later?
Is there a better way?
And if you have a hint to be able to redirect the user by the way he came, after a save (like history back). I'm able to redirect with action and trigger but....not back(-1).
I came from Filemaker and I'm very impress by Drupal.....
Sorry for my english and the term I used.
Thanks
Comment #41
tim.plunkettYou can point the url to the edit link with the "customizable fields".
Open a separate support request if you need more info.
Comment #42
sterodste CreditAttribution: sterodste commentedThanks Tim,
I all ready try this, but I always have a "Request unsuccessful: error", Maybe I miss something?
ADD FIELD:
Content: Edit link
Provide a simple link to edit the content.
CUSTOMIZABLE FIELD:
Use a custom redirect URL - edit link
And is it correct -- reply and support request or I would have to create a new one?
Comment #43
tim.plunkettThis is a D6 feature request that has been marked a duplicate. Please open a new issue.
Comment #44
apoc1 CreditAttribution: apoc1 commentedany update on this feature?