harmonize js files naming under unfold/
[myslice.git] / plugins / maddash / __init__.py
1 from unfold.plugin import Plugin
2
3 class MadDash (Plugin):
4
5     # set checkboxes if a final column with checkboxes is desired
6     # pass columns as the initial set of columns
7     #   if None then this is taken from the query's fields
8     # latitude,longitude, zoom : the starting point
9     def __init__ (self, query = None, query_all = None, **settings):
10         Plugin.__init__ (self, **settings)
11         self.query=query
12         self.query_all = query_all
13         self.query_all_uuid = query_all.query_uuid if query_all else None
14
15     def template_file (self):
16         return "maddash.html"
17
18     def template_env (self, request):
19         env={}
20         return env
21
22     def requirements (self):
23         reqs = {
24             'js_files' : [ 
25                 'http://d3js.org/d3.v3.min.js',
26                 'js/jquery.tipsy.js',
27                 'js/buffer.js', 'js/maddash.js',
28                 'js/manifold.js', 'js/manifold-query.js',
29                 'js/spin-presets.js', 'js/spin.min.js', 'js/jquery.spin.js', 
30                 'js/unfold-helper.js',
31             ],
32             'css_files' : [ 
33                 'css/maddash.css',
34                 'css/tipsy.css',
35             ],
36         }
37         return reqs
38
39     # the list of things passed to the js plugin
40     def json_settings_list (self): return ['plugin_uuid','query_uuid', 'query_all_uuid']