From: Thierry Parmentelat Date: Thu, 26 Sep 2013 09:08:30 +0000 (+0200) Subject: various cleanups in the use of datatables X-Git-Tag: myslice-0.2-5~89 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=75570d93223f36e1f23bc69bbd39ca43fd56f0d3;p=unfold.git various cleanups in the use of datatables --- 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, }, ))