jquery-datatables-rails bootstrap styling -
in rails using bootstrap , datatables via jquery-datatables-rails gem. however, seem half bootstrap styling.
gem 'jquery-datatables-rails', git: 'git://github.com/rweng/jquery-datatables-rails.git'
application.js
//= require jquery //= require jquery_ujs //= require jquery.ui.core //= require jquery.ui.datepicker //= require twitter/bootstrap //= require datatables/jquery.datatables //= require datatables/jquery.datatables.bootstrap //= require datatables/extras/tabletools //= require chosen-jquery //= require best_in_place //= require cocoon //= require_tree . $.extend( $.fn.datatableext.ostdclasses, { "swrapper": "datatables_wrapper form-inline" } );
application.css
*= require_self *= require jquery.ui.core *= require jquery.ui.datepicker *= require datatables/jquery.datatables.bootstrap *= require datatables/extras/tabletools *= require datatables/extras/tabletools_jui *= require chosen *= require_tree . */
specific coffee script
jquery -> $('#customers').datatable sdom: "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>" spaginationtype: "bootstrap" bjqueryui: true
erb
<table id="customers" class="display" cellpadding="0" cellspacing="0" border="0" class="table table-bordered table-striped"> <thead> <tr> <th>etc.
however styling 1 shown below , not shown on datatable site http://www.datatables.net/media/blog/bootstrap/
note header wrong , stripes purple not grey
any thoughts on else need do?
this boiled down lack of understanding of assets pipeline. once got head around more things worked well.
it seemed had played around precompile , compress options in development , public/assets directory had css files in overiding else used.
once deleted contents of directory , configured capistrano deployment precompile on production worked well.
the asset pipeline excellent, needs care.
Comments
Post a Comment