diff --git a/app/assets/javascripts/datatables.js.coffee b/app/assets/javascripts/datatables.js.coffee index 10c66ec..0b412ca 100644 --- a/app/assets/javascripts/datatables.js.coffee +++ b/app/assets/javascripts/datatables.js.coffee @@ -1,3 +1,4 @@ + # Place all the DataTables related behaviors and hooks here. # All this logic will automatically be available in application.js. # You can use CoffeeScript in this file: http://coffeescript.org/ @@ -10,6 +11,10 @@ jQuery -> columnDefs: [{ orderable: false targets: 'no-sort' + }, + { + targets: 1, + render: (data, type, row) -> if type == 'display' and data.length > 80 then data.substr(0, 80) + '…' else data }] iDisplayLength: 25 @@ -21,6 +26,10 @@ jQuery -> columnDefs: [{ orderable: false targets: 'no-sort' + }, + { + targets: 0, + render: (data, type, row) -> if type == 'display' and data.length > 80 then data.substr(0, 80) + '…' else data }] iDisplayLength: 10