Add simple searchable column support for non-AJAX grids
idk maybe even AJAX grids can use? not gonna try at the moment
This commit is contained in:
parent
63fef16c37
commit
ec2600ddf7
4 changed files with 22 additions and 2 deletions
|
@ -105,6 +105,9 @@ class EmailSettingView(MasterView):
|
|||
g.set_link('key')
|
||||
g.set_link('subject')
|
||||
|
||||
g.set_searchable('key')
|
||||
g.set_searchable('subject')
|
||||
|
||||
# to
|
||||
g.set_renderer('to', self.render_to_short)
|
||||
g.sorters['to'] = g.make_simple_sorter('to', foldcase=True)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
# Copyright © 2010-2022 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -70,6 +70,8 @@ class TableView(MasterView):
|
|||
g.sorters['row_count'] = g.make_simple_sorter('row_count')
|
||||
g.set_sort_defaults('name')
|
||||
|
||||
g.set_searchable('name')
|
||||
|
||||
# TODO: deprecate / remove this
|
||||
TablesView = TableView
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue