GithubHelp home page GithubHelp logo

marcomontes / fullcalendar-rails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from martianinteractive/fullcalendar-rails

0.0 2.0 0.0 182 KB

an asset gem containing Adam Shaw's excellent fullcalendar jquery plugin

License: MIT License

Ruby 100.00%

fullcalendar-rails's Introduction

Fullcalendar::Rails

This gem is a simple rebundling of the contents of the JQuery FullCalendar plugin from Adam Shaw:

http://arshaw.com/fullcalendar/

I had created an earlier version of a demonstration of using FullCalendar in a rails app. That code is available at:

https://github.com/bokmann/rails3_fullcalendar

But I have always disliked finding random files and copying them into a public directory. So I made an asset gem for use with the asset pipeline.

Installation

Add this line to your application's Gemfile:

gem 'fullcalendar-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fullcalendar-rails

At this point, the files from the fullcalendar project are in your asset pipeline's path... all you have to do is require them in the appropriate places. For instance, in your application.css.scss:

*= require fullcalendar

And in your application.js:

//= require fullcalendar

You can also include the fullcalendar.print file in your css manifest like this:

*= require fullcalendar.print

but as Ray Zane pointed out in issue #11, this will cause a problem if you try to change the colors of events.

An ideal solution, if you need a print stylesheet, is to create an application-print.css.scss file and include this (and other print-related css) in it. You'll then need to add it to to the precompile array in config/application.rb:

config.assets.precompile += ['application-print.css']

and then in your layouts where you need it, add:

<%= stylesheet_link_tag "application-print", :media => "print" %>

While its not needed for this library, the original javascript library's author also includes an adapter for integrating google calendars as an event source:

//= require gcal

Usage

See the website of the original project for the usage, or my original Rails3 example I point to above. This gem just saves you from having to locate and copy the javascript and stylesheet into place.

http://arshaw.com/fullcalendar/

Motivations

I hate finding random versions of javscript and css out on the web and then just downloading, or copy/pasting into files in my asset pipeline... I like some kind of accountability as to the source of the files, and I especially like it when bundle can tell me when those versioned assets are out of date. Therefore, I tend to take the few extra minutes to package these things up as versioned gems.

As such, these are primarily for my own use, and may occasionally fall out of date as the project I created them for goes in and out of maintenance cycles. If thats the case, I will gladly accept pullup requests, or even be willing to talk to someone who wants to take over ownership for the repo and the gem on rubygems. As with all open source, I hope you find this useful, but if you don't, your right to complain starts with a pullup request.

Versioning

I am going to version this gem with the version of the fullcalendar code I use, adding an extra digit if I need to release any maintenance versions of the gem itself.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

If the original library I'm basing this off of has tests, I'd like to integrate that into the gem as well; but if it doesn't, its not the end of the world... as this is just a 'shrinkwrap' of someone else's work, I don't take on any testing responsibility within the scope of packaging.

fullcalendar-rails's People

Contributors

bokmann avatar brianejsmont avatar drwl avatar greshny avatar sergiobayona avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.