Let config totally disable the old/legacy jQuery mobile app
This commit is contained in:
parent
d2c4791611
commit
d9f6a7201e
11 changed files with 87 additions and 48 deletions
|
@ -1651,11 +1651,13 @@ class ProductsView(MasterView):
|
|||
|
||||
@classmethod
|
||||
def _product_defaults(cls, config):
|
||||
rattail_config = config.registry.settings.get('rattail_config')
|
||||
route_prefix = cls.get_route_prefix()
|
||||
url_prefix = cls.get_url_prefix()
|
||||
template_prefix = cls.get_template_prefix()
|
||||
permission_prefix = cls.get_permission_prefix()
|
||||
model_title = cls.get_model_title()
|
||||
legacy_mobile = cls.legacy_mobile_enabled(rattail_config)
|
||||
|
||||
# print labels
|
||||
config.add_tailbone_permission('products', 'products.print_labels',
|
||||
|
@ -1683,8 +1685,9 @@ class ProductsView(MasterView):
|
|||
config.add_view(cls, attr='image', route_name='products.image')
|
||||
|
||||
# mobile quick lookup
|
||||
config.add_route('mobile.products.quick_lookup', '/mobile/products/quick-lookup')
|
||||
config.add_view(cls, attr='mobile_quick_lookup', route_name='mobile.products.quick_lookup')
|
||||
if legacy_mobile:
|
||||
config.add_route('mobile.products.quick_lookup', '/mobile/products/quick-lookup')
|
||||
config.add_view(cls, attr='mobile_quick_lookup', route_name='mobile.products.quick_lookup')
|
||||
|
||||
|
||||
class ProductsAutocomplete(AutocompleteView):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue