1 from unfold.plugin import Plugin
3 class Scheduler(Plugin):
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)
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
17 def template_file (self):
18 return "scheduler.html"
20 def template_env (self, request):
24 def requirements (self):
26 'js_files' : [ "js/scheduler.js",
27 #"//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.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",
34 'css_files' : [ "css/scheduler.css",
35 "css/jquery-ui-timepicker-addon.css",
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']