1 from engine.plugin import Plugin
3 class SimpleList (Plugin) :
5 # only deal with our own stuff here and let Plugin handle the rest
6 def __init__ (self, key, with_datatables=False, **settings):
7 Plugin.__init__ (self, **settings)
9 self.with_datatables = with_datatables
11 # SimpleList is useless per se anyways
12 def template_file (self):
13 return "simplelist.html"
15 def template_env (self, request):
17 header=getattr(self,'header',None)
18 if header: env['header']=header
19 env['with_datatables']= "yes" if self.with_datatables else ""
22 def requirements (self):
23 reqs = { 'js_files' : [ "js/simplelist.js", "js/plugin.js", "js/query.js", "js/onavail.js",
24 "js/manifold-pubsub.js", "js/manifold-async.js",
25 "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js",
27 'css_files': [ "css/simplelist.css" ],
29 if self.with_datatables:
30 reqs['js_files'].append ("js/dataTables.js")
31 reqs['js_files'].append ("js/with-datatables.js")
34 def json_settings_list (self): return ['plugin_uuid', 'query','query_uuid','key']