Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

Commit

Permalink
set display length maximum to 80
Browse files Browse the repository at this point in the history
  • Loading branch information
qianyuanzhu committed Mar 29, 2019
1 parent a603eda commit 20ccf3d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/assets/javascripts/datatables.js.coffee
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 20ccf3d

Please sign in to comment.