istart-rails
iStart-Rails is a set of common helpers to improve your app and speed up it's development
Helpers
- Disable submit input after form submission (update value with
data-loading-textif present) - Open external links in new window (links must have the class name
external) - Consider element with
data-link-urlas links (also support opening in new window with the class nameexternal) - Init Chosen if in use
- Init DataTables if in use. Add the class
.datatableto any table to activate - Init DataTables's FixedHeader if in use. Add the class
.fixed_headerto any table to activate
Requirements
rails >= 3.1 (with Asset Pipeline)
jquery-rails
Install
Add this to your application Gemfile
gem 'istart-rails'
Within app/assets/javascripts/application.js add the following
//= require jquery
...
//= require chosen-jquery (optional)
//= require dataTables/jquery.dataTables (optional)
//= require dataTables/jquery.dataTables.bootstrap (optional)
//= require dataTables/extras/FixedHeader (optional)
//= require istart
Within app/assets/stylesheets/application.css add the following
*= require chosen (optional)
*= require dataTables/jquery.dataTables.bootstrap (optional)
*= require_self
...
For FixedHeader, you might like to add the following in your bootstrap_and_overwrites.css.less
.FixedHeader_Header {
background-color: #fff;
border-bottom: 1px solid @tableBorder;
}
License
MIT License. Copyright 2012 Sébastien Grosjean, sponsored by BookingSync, Vacation Rental's Booking Calendar Software