From 75570d93223f36e1f23bc69bbd39ca43fd56f0d3 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 26 Sep 2013 11:08:30 +0200 Subject: [PATCH] various cleanups in the use of datatables --- portal/platformsview.py | 12 +++++------- portal/sliceview.py | 8 ++------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/portal/platformsview.py b/portal/platformsview.py index 6f788bea..71011642 100644 --- a/portal/platformsview.py +++ b/portal/platformsview.py @@ -28,13 +28,11 @@ class PlatformsView(TemplateView): query = platform_query, query_all = platform_query, checkboxes = False, - datatables_options = { - # for now we turn off sorting on the checkboxes columns this way - # this of course should be automatic in hazelnut - 'aoColumns' : [None, None, None, None, {'bSortable': False}], - 'iDisplayLength' : 25, - 'bLengthChange' : True, - }, + datatables_options = { + 'iDisplayLength': 10, + 'bLengthChange' : True, + 'bAutoWidth' : True, + }, ) context = super(PlatformsView, self).get_context_data(**kwargs) diff --git a/portal/sliceview.py b/portal/sliceview.py index 82018149..d3dea6f8 100644 --- a/portal/sliceview.py +++ b/portal/sliceview.py @@ -205,11 +205,9 @@ class SliceView (LoginRequiredAutoLogoutView): query_all = query_user_all, checkboxes = True, datatables_options = { - # for now we turn off sorting on the checkboxes columns this way - # this of course should be automatic in hazelnut - 'aoColumns' : [None, None, None, None, {'bSortable': False}], 'iDisplayLength' : 25, 'bLengthChange' : True, + 'bAutoWidth' : True, }, )) @@ -235,11 +233,9 @@ class SliceView (LoginRequiredAutoLogoutView): query = sq_measurement, checkboxes = True, datatables_options = { - # for now we turn off sorting on the checkboxes columns this way - # this of course should be automatic in hazelnut - 'aoColumns' : [None, None, None, None, {'bSortable': False}], 'iDisplayLength' : 25, 'bLengthChange' : True, + 'bAutoWidth' : True, }, )) -- 2.43.0