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