637c66b0679972fcb5767da98a80b94093bd80e2
[myslice.git] / plugins / querycode.py
1 from engine.plugin import Plugin
2
3 class QueryCode (Plugin):
4
5     def __init__ (self, query, **settings):
6         Plugin.__init__ (self, **settings)
7         self.query=query
8         # our javascript requires the details of the manifold server
9         self.page.expose_js_manifold_config()
10
11     def template_file (self):
12         return "querycode.html"
13
14     def requirements (self):
15         return { 
16             'js_files' : [ "js/querycode.js", "js/plugin.js", "js/query.js", "js/onavail.js",
17                            "js/manifold-pubsub.js", "js/manifold-async.js", "spin/spin.all.js", 
18 #        Plugins::add_js('/QueryCode/beautyofcode/scripts/shCore.js');
19 #        Plugins::add_js('/QueryCode/beautyofcode/scripts/shBrushPython.js');
20 #        Plugins::add_js('/QueryCode/beautyofcode/scripts/shBrushRuby.js');
21 #        Plugins::add_js('/QueryCode/beautyofcode/scripts/shAutoloader.js');
22                            ] ,
23             'css_files': [ "css/querycode.css" ,
24 #        Plugins::add_css('/QueryCode/beautyofcode/styles/shCore.css');
25 #        Plugins::add_css('/QueryCode/beautyofcode/styles/shCoreDefault.css');
26 #        Plugins::add_css('/QueryCode/beautyofcode/styles/shThemeDefault.css');
27                            ],
28             }
29
30     def json_settings_list (self): return ['plugin_uuid', 'query','query_uuid']
31         
32     def start_with_spin (self): return False