vinsol / fullcalendar-rails-engine

Rails engine implementation of fullcalendar jQuery plugin(http://arshaw.com/fullcalendar/). Create, edit, delete, reschedule, resize events like google calendar.
http://vinsol.com/fullcalendar-demo
MIT License
66 stars 51 forks source link

Event color #19

Open ehannes opened 9 years ago

ehannes commented 9 years ago

Adds support for changing color of an event. An attribute "color" is added to the FullcalendarEngine::Event model. Fullcalendar already has this function, and this pull request enables it in this rails engine.

This pull request fixes #18

ehannes commented 9 years ago

Will you merge this pull request?

aditya-kapoor commented 9 years ago

hi @ehannes where do we stand on this?

ehannes commented 9 years ago

Hi! Sorry that I've not been in touch. I used this plugin in a project that was ended in February. Fortunately, I will resume the work of that project in May then I will try to complete this pull request.

asadmoosa commented 9 years ago

That is what I've been looking for. What about adding user_id? User_id + color will be awesome. Can you please write a full project (Fullcalendar_engine + project) so that I can understand how values of color and user_id are added to MySQL. And how to retrieve calendar based on user_id + color.

ehannes commented 9 years ago

This pull request will unfortunately not, if I manage to finish it, include connection to user_id. It will only include the possibility to set the color of specific events in the calendar, a feature already available in Fullcalendar. Include user_id is, in my opinion, a totally different topic.

asadmoosa commented 9 years ago

Hannes, I totally agree with you that user_id is a different topic. I see that the color attribute is added to the gem. When i create a new project and Gemfile has that calendar gem and add a new model for user. How can the color of a speciic user be added to the event calendar?

ehannes commented 8 years ago

@aditya-kapoor: Took me nearly a year or so, but now I've added the color attribute to the strong parameters list and a color picker to the GUI :) Are we ready to merge now?

ehannes commented 8 years ago

@kuldeepaggarwal would you mind checking this PR as well?

kuldeepaggarwal commented 8 years ago

@ehannes Any updates?

ehannes commented 8 years ago

@kuldeepaggarwal Not yet I'm afraid. I'm not sure how to implement the initializer file. Any links or tips about that?

kuldeepaggarwal commented 8 years ago

@ehannes We will implement that later, but could you please extract that logic to FullcalendarEngine::Configuration class and set default_color in that file and use FullcalendarEngine::Configuration.default_color

scout208 commented 8 years ago

We are using this gem for a project and we really want to use this feature. @ehannes do you have any idea when you might be finished? Or is there anything I can help with?

ehannes commented 8 years ago

Hi! Sorry for the delay.

@kuldeepaggarwal I gave it a try in 4bcc011. Was that what you meant? If not, please feel free to give further instructions. Otherwise I can push the branch to your repo so you can fix it.

@scout208 If we just get the default value for event color correct I think it's ready for merge.

kuldeepaggarwal commented 8 years ago

@ehannes Just fix above issues and then I think, we are good to go.

ehannes commented 8 years ago

I should probably add that I have not tested these changes. And I see that the test coverage of this engine is about 0%... I am using the engine in one of my own applications, but I haven't tested this specific branch.

kuldeepaggarwal commented 8 years ago

@ehannes Can you please test this in your app? It will be a great help.

ehannes commented 8 years ago

@kuldeepaggarwal Ok, I'll test it. Though, it would be advisable to add at least some basic tests to this engine.

kuldeepaggarwal commented 8 years ago

I agree that there must be test cases for the engine. Will plan something for this. Can you please create an issue for this on the repo?