/usr/share/pyshared/sprox/dojo/tablebase.py is in python-sprox 0.6.4-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | from tw.dojo import DojoJsonRestStore
from sprox.widgets.dojo import SproxEditableDojoGrid, SproxDojoGrid
from sprox.tablebase import TableBase
from sprox.metadata import FieldsMetadata
class DojoTableBase(TableBase):
"""This class allows you to credate a table widget.
:Modifiers:
see modifiers in :mod:`sprox.tablebase`
"""
#object overrides
__base_widget_type__ = SproxDojoGrid
__url__ = None
__column_options__ = {}
def _do_get_widget_args(self):
args = super(DojoTableBase, self)._do_get_widget_args()
if self.__url__ is not None:
args['action'] = self.__url__
args['columns'] = self.__fields__
args['column_options'] = self.__column_options__
args['headers'] = self.__headers__
args['jsId'] = self.__sprox_id__
return args
"""
Experimental for next version. Will not be included in 0.5"""
class DojoEditableTableBase(TableBase):
__base_widget_type__ = SproxEditableDojoGrid
__url__ = None
__column_options__ = {}
def _do_get_widget_args(self):
args = super(DojoEditableTableBase, self)._do_get_widget_args()
if self.__url__ is not None:
args['action'] = self.__url__
args['columns'] = self.__fields__
args['column_options'] = self.__column_options__
args['headers'] = self.__headers__
args['jsId'] = self.__sprox_id__
return args
|