use SliceList rather than SimpleList
[unfold.git] / plugins / simplelist.py
1 from engine.plugin import Plugin
2
3 class SimpleList (Plugin) :
4
5     # only deal with our own stuff here and let Plugin handle the rest
6     def __init__ (self, key, value, with_datatables=False, **settings):
7         Plugin.__init__ (self, **settings)
8         self.key=key
9         self.value=value
10         self.with_datatables = with_datatables
11
12     # SimpleList is useless per se anyways
13     def template_file (self): return "simplelist.html"
14
15     def requirements (self):
16         reqs = { 'js_files' : [ "js/simplelist.js", "js/plugin.js", "js/query.js", "js/onavail.js",
17                                 "js/manifold-pubsub.js", "js/manifold-async.js", "spin/spin.all.js", 
18 ] ,
19                  'css_files': [ "css/simplelist.css" ],
20                  }
21         if self.with_datatables:
22             reqs['js_files'].append ("datatables/js/dataTables.js")
23             reqs['js_files'].append ("js/with-datatables.js")
24         return reqs
25     
26     def json_settings_list (self): return ['plugin_uuid', 'query','query_uuid','key','value']
27