indentation small fix
[myslice.git] / plugins / univbris / __init__.py
1 from unfold.plugin import Plugin
2
3 class Univbris(Plugin):
4     
5     def __init__ (self, query=None, **settings):
6         Plugin.__init__ (self, **settings)
7         self.query=query
8         self.query_uuid = query.query_uuid if query else None
9         print "called univbris plugin"
10
11     def template_file (self):
12         try:
13             return "univbris_welcome.html"
14         except Exception:
15                     print "error template"
16
17     def requirements (self):
18         reqs = {
19             'js_files' : [ "js/spin-presets.js", "js/spin.min.js", "js/jquery.spin.js",
20                            "js/manifold.js", "js/manifold-query.js",
21                            "js/unfold-helper.js",
22                 'js/univbris.js',
23             ],
24             'css_files': [
25                 'css/univbris.css',
26             ]
27         }
28         return reqs
29
30     def json_settings_list (self):
31         # query_uuid will pass self.query results to the javascript
32         # and will be available as "record" in :
33         # on_new_record: function(record)
34         return ['plugin_uuid', 'domid', 'query_uuid','init_key',]
35
36     def export_json_settings (self):
37         return True