Purge things for legacy (jquery) mobile, and unused template themes
gosh it feels good to get rid of this stuff... fingers crossed that nothing was broken, but am thinking it's safe
This commit is contained in:
parent
fac00e6ecd
commit
708641a8f1
70 changed files with 196 additions and 4886 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2020 Lance Edgar
|
||||
# Copyright © 2010-2021 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -67,7 +67,7 @@ class Grid(object):
|
|||
Core grid class. In sore need of documentation.
|
||||
"""
|
||||
|
||||
def __init__(self, key, data, columns=None, width='auto', request=None, mobile=False,
|
||||
def __init__(self, key, data, columns=None, width='auto', request=None,
|
||||
model_class=None, model_title=None, model_title_plural=None,
|
||||
enums={}, labels={}, assume_local_times=False, renderers={},
|
||||
extra_row_class=None, linked_columns=[], url='#',
|
||||
|
@ -84,7 +84,6 @@ class Grid(object):
|
|||
self.columns = FieldList(columns) if columns is not None else None
|
||||
self.width = width
|
||||
self.request = request
|
||||
self.mobile = mobile
|
||||
self.model_class = model_class
|
||||
if self.model_class and self.columns is None:
|
||||
self.columns = self.make_columns()
|
||||
|
@ -341,7 +340,6 @@ class Grid(object):
|
|||
def make_webhelpers_grid(self):
|
||||
kwargs = dict(self._whgrid_kwargs)
|
||||
kwargs['request'] = self.request
|
||||
kwargs['mobile'] = self.mobile
|
||||
kwargs['url'] = self.make_url
|
||||
|
||||
columns = list(self.columns)
|
||||
|
@ -1302,17 +1300,11 @@ class CustomWebhelpersGrid(webhelpers2_grid.Grid):
|
|||
"""
|
||||
|
||||
def __init__(self, itemlist, columns, **kwargs):
|
||||
self.mobile = kwargs.pop('mobile', False)
|
||||
self.renderers = kwargs.pop('renderers', {})
|
||||
self.linked_columns = kwargs.pop('linked_columns', [])
|
||||
self.extra_record_class = kwargs.pop('extra_record_class', None)
|
||||
super(CustomWebhelpersGrid, self).__init__(itemlist, columns, **kwargs)
|
||||
|
||||
def default_header_record_format(self, headers):
|
||||
if self.mobile:
|
||||
return HTML('')
|
||||
return super(CustomWebhelpersGrid, self).default_header_record_format(headers)
|
||||
|
||||
def generate_header_link(self, column_number, column, label_text):
|
||||
|
||||
# display column header as simple no-op link; client-side JS takes care
|
||||
|
@ -1329,8 +1321,6 @@ class CustomWebhelpersGrid(webhelpers2_grid.Grid):
|
|||
label_text)
|
||||
|
||||
def default_record_format(self, i, record, columns):
|
||||
if self.mobile:
|
||||
return columns
|
||||
kwargs = {
|
||||
'class_': self.get_record_class(i, record, columns),
|
||||
}
|
||||
|
@ -1359,12 +1349,6 @@ class CustomWebhelpersGrid(webhelpers2_grid.Grid):
|
|||
|
||||
def default_column_format(self, column_number, i, record, column_name):
|
||||
value = self.get_column_value(column_number, i, record, column_name)
|
||||
if self.mobile:
|
||||
url = self.url_generator(record, i)
|
||||
attrs = {}
|
||||
if hasattr(record, 'uuid'):
|
||||
attrs['data_uuid'] = record.uuid
|
||||
return HTML.tag('li', tags.link_to(value, url), **attrs)
|
||||
if self.linked_columns and column_name in self.linked_columns and (
|
||||
value is not None and value != ''):
|
||||
url = self.url_generator(record, i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue