94a757168dc94a0e9d984ac57b0522e3b64b78a3
[myslice.git] / plugins / scheduler / __init__.py
1 from unfold.plugin import Plugin
2
3 class Scheduler(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, query_lease = None, **settings):
10         Plugin.__init__ (self, **settings)
11         self.query=query
12         self.query_lease = query_lease
13         self.query_lease_uuid = query_lease.query_uuid if query_lease else None
14
15     def template_file (self):
16         return "scheduler.html"
17
18     def template_env (self, request):
19         env={}
20         return env
21
22     def requirements (self):
23         reqs = {
24             'js_files' : [ "js/scheduler.js",
25                            #"//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js",
26                             "js/raphael.js",
27                             "js/manifold.js", "js/manifold-query.js", 
28                             "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js", 
29                             "js/unfold-helper.js",
30                             "js/jquery-ui-timepicker-addon.js", "js/jquery-ui-sliderAccess.js",
31                            ],
32             'css_files' : [ "css/scheduler.css",
33                             "css/jquery-ui-timepicker-addon.css",
34                             ],
35             }
36         return reqs
37
38     # the list of things passed to the js plugin
39     def json_settings_list (self): 
40         return ['plugin_uuid','query_uuid', 'query_lease_uuid', ]