506416bdf43ff0254c526a8b79ea692d76c3b5ea
[myslice.git] / plugins / updater / updater.py
1 from unfold.plugin import Plugin
2
3 class Updater (Plugin):
4
5     def __init__ (self, query, label="Update", **settings):
6         Plugin.__init__ (self, **settings)
7         # xxx would make sense to check this is a Get query...
8         self.query=query
9         self.label=label
10
11     def template_file (self):
12         return "updater.html"
13
14     def requirements (self):
15         return {
16             'js_files' :  [ "js/updater.js" , "js/manifold.js", "js/manifold-query.js", ],
17             'css_files' : "css/updater.css",
18             }
19
20     # although this has no query, we need a plugin instance to be created in the js output
21     def export_json_settings (self):     return True
22     # the js plugin expects a domid
23     def json_settings_list (self):       return [ 'plugin_uuid', 'query_uuid' ]
24
25     # and we don't need a spin wheel 
26     def start_with_spin (self):          return False
27
28     def default_togglable (self):        return False