updater's query now has its own uuid
[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                             "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js",
18                             "js/Math.uuid.js",
19                             ],
20             'css_files' : "css/updater.css",
21             }
22
23     # although this has no query, we need a plugin instance to be created in the js output
24     def export_json_settings (self):     return True
25     # the js plugin expects a domid
26     def json_settings_list (self):       return [ 'plugin_uuid', 'query_uuid' ]
27
28     # and we don't need a spin wheel 
29     def start_with_spin (self):          return False
30
31     def default_togglable (self):        return False