Add back-end support for multi-column grid sorting
or very nearly, anyway. front-end still just supports 1 column yet
This commit is contained in:
parent
4beca7af20
commit
6d7754cf2a
9 changed files with 222 additions and 202 deletions
|
@ -340,11 +340,9 @@ class MasterView(View):
|
|||
if grid.pageable and hasattr(grid, 'pager'):
|
||||
self.first_visible_grid_index = grid.pager.first_item
|
||||
|
||||
# return grid only, if partial page was requested
|
||||
# return grid data only, if partial page was requested
|
||||
if self.request.params.get('partial'):
|
||||
# render grid data only, as JSON
|
||||
return render_to_response('json', grid.get_buefy_data(),
|
||||
request=self.request)
|
||||
return self.json_response(grid.get_buefy_data())
|
||||
|
||||
context = {
|
||||
'grid': grid,
|
||||
|
@ -1156,8 +1154,7 @@ class MasterView(View):
|
|||
# return grid only, if partial page was requested
|
||||
if self.request.params.get('partial'):
|
||||
# render grid data only, as JSON
|
||||
return render_to_response('json', grid.get_buefy_data(),
|
||||
request=self.request)
|
||||
return self.json_response(grid.get_buefy_data())
|
||||
|
||||
context = {
|
||||
'instance': instance,
|
||||
|
@ -1284,8 +1281,7 @@ class MasterView(View):
|
|||
# return grid only, if partial page was requested
|
||||
if self.request.params.get('partial'):
|
||||
# render grid data only, as JSON
|
||||
return render_to_response('json', grid.get_buefy_data(),
|
||||
request=self.request)
|
||||
return self.json_response(grid.get_buefy_data())
|
||||
|
||||
return self.render_to_response('versions', {
|
||||
'instance': instance,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue