From 404e915776da4f07c8dc33b901b91736d7b95f2b Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 29 Aug 2018 17:25:18 +0200 Subject: Ellipis plugin for datatable - truncate too long text --- ishtar_common/templates/blocks/DataTables.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ishtar_common/templates/blocks') diff --git a/ishtar_common/templates/blocks/DataTables.html b/ishtar_common/templates/blocks/DataTables.html index ef407d553..f2ae42412 100644 --- a/ishtar_common/templates/blocks/DataTables.html +++ b/ishtar_common/templates/blocks/DataTables.html @@ -166,7 +166,7 @@ jQuery(document).ready(function(){ 'selectAll', 'selectNone' ], - language: { + "language": { buttons: { selectAll: "{% trans 'Select all items' %}", selectNone: "{% trans 'Select none' %}" @@ -179,7 +179,8 @@ jQuery(document).ready(function(){ "columns": [ { "data": "id", "visible": false }, { "data": "link", "orderable": false },{% for col in extra_cols %} - { "data": "{{col}}", "defaultContent": "-"}{% if not forloop.last %},{% endif %}{% endfor %} + { "data": "{{col}}", "defaultContent": "-", + "render": $.fn.dataTable.render.ellipsis( 70, true ) }{% if not forloop.last %},{% endif %}{% endfor %} ] }; -- cgit v1.2.3