Remove several references to "buefy" name
class methods, template filenames, etc. also made various edits per newer conventions
This commit is contained in:
parent
96ba039299
commit
c036932ce4
50 changed files with 373 additions and 361 deletions
|
@ -1339,10 +1339,10 @@ class Grid(object):
|
|||
includes the context menu items and grid tools.
|
||||
"""
|
||||
if 'grid_columns' not in kwargs:
|
||||
kwargs['grid_columns'] = self.get_buefy_columns()
|
||||
kwargs['grid_columns'] = self.get_table_columns()
|
||||
|
||||
if 'grid_data' not in kwargs:
|
||||
kwargs['grid_data'] = self.get_buefy_data()
|
||||
kwargs['grid_data'] = self.get_table_data()
|
||||
|
||||
if 'static_data' not in kwargs:
|
||||
kwargs['static_data'] = self.has_static_data()
|
||||
|
@ -1364,10 +1364,11 @@ class Grid(object):
|
|||
warnings.warn("Grid.render_buefy() is deprecated; "
|
||||
"please use Grid.render_complete() instead",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
return self.render_complete(**kwargs)
|
||||
|
||||
def render_buefy_table_element(self, template='/grids/b-table.mako',
|
||||
data_prop='gridData', empty_labels=False,
|
||||
**kwargs):
|
||||
def render_table_element(self, template='/grids/b-table.mako',
|
||||
data_prop='gridData', empty_labels=False,
|
||||
**kwargs):
|
||||
"""
|
||||
This is intended for ad-hoc "small" grids with static data. Renders
|
||||
just a ``<b-table>`` element instead of the typical "full" grid.
|
||||
|
@ -1377,7 +1378,7 @@ class Grid(object):
|
|||
context['data_prop'] = data_prop
|
||||
context['empty_labels'] = empty_labels
|
||||
if 'grid_columns' not in context:
|
||||
context['grid_columns'] = self.get_buefy_columns()
|
||||
context['grid_columns'] = self.get_table_columns()
|
||||
context.setdefault('paginated', False)
|
||||
if context['paginated']:
|
||||
context.setdefault('per_page', 20)
|
||||
|
@ -1572,10 +1573,10 @@ class Grid(object):
|
|||
return True
|
||||
return False
|
||||
|
||||
def get_buefy_columns(self):
|
||||
def get_table_columns(self):
|
||||
"""
|
||||
Return a list of dicts representing all grid columns. Meant for use
|
||||
with Buefy table.
|
||||
Return a list of dicts representing all grid columns. Meant
|
||||
for use with the client-side JS table.
|
||||
"""
|
||||
columns = []
|
||||
for name in self.columns:
|
||||
|
@ -1597,9 +1598,10 @@ class Grid(object):
|
|||
if hasattr(rowobj, 'uuid'):
|
||||
return rowobj.uuid
|
||||
|
||||
def get_buefy_data(self):
|
||||
def get_table_data(self):
|
||||
"""
|
||||
Returns a list of data rows for the grid, for use with Buefy table.
|
||||
Returns a list of data rows for the grid, for use with
|
||||
client-side JS table.
|
||||
"""
|
||||
# filter / sort / paginate to get "visible" data
|
||||
raw_data = self.make_visible_data()
|
||||
|
@ -1635,8 +1637,8 @@ class Grid(object):
|
|||
# instance, when the "display" version is different than raw data.
|
||||
# here is the hack we use for that.
|
||||
columns = list(self.columns)
|
||||
if hasattr(self, 'buefy_data_columns'):
|
||||
columns.extend(self.buefy_data_columns)
|
||||
if hasattr(self, 'raw_data_columns'):
|
||||
columns.extend(self.raw_data_columns)
|
||||
|
||||
# iterate over data fields
|
||||
for name in columns:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue