make datatable responsive

This commit is contained in:
Ilion Beyst 2015-09-09 19:37:23 +02:00
parent 7eb32bf1c3
commit 4173275e96
3 changed files with 6 additions and 2 deletions

View file

@ -13,6 +13,8 @@
//= require jquery //= require jquery
//= require jquery_ujs //= require jquery_ujs
//= require dataTables/jquery.dataTables //= require dataTables/jquery.dataTables
//= require dataTables/extras/dataTables.responsive
//= require dataTables/jquery.dataTables
//= require select2 //= require select2
//= require turbolinks //= require turbolinks
//= require_tree . //= require_tree .

View file

@ -11,6 +11,7 @@
* file per style scope. * file per style scope.
* *
*= require_tree . *= require_tree .
*= require dataTables/extras/dataTables.responsive
*= require dataTables/jquery.dataTables *= require dataTables/jquery.dataTables
*= require select2 *= require select2
*= require_self *= require_self

View file

@ -1,5 +1,5 @@
%h2= @user.name %h2= @user.name
%table#transactions.display{data: { source: user_path(@user) }} %table#transactions.display.responsive.no-wrap{data: { source: user_path(@user) }}
%thead %thead
%tr %tr
%th Amount %th Amount
@ -39,7 +39,8 @@
{ data: 'message', name: 'Message' }, { data: 'message', name: 'Message' },
{ data: 'peer', name: 'Peer' }, { data: 'peer', name: 'Peer' },
{ data: 'time', name: 'Time' } { data: 'time', name: 'Time' }
] ],
autoWidth: false
}); });
var tds = $('.input-listen'); var tds = $('.input-listen');