add jquery-ui.css in the mix for nicer hazelnut rendering - although not perfect yet
[unfold.git] / plugins / hazelnut / hazelnut.py
index 60c9ec9..a93c709 100644 (file)
@@ -2,9 +2,10 @@ from unfold.plugin import Plugin
 
 class Hazelnut (Plugin):
 
-    def __init__ (self, query, **settings):
+    def __init__ (self, query, checkboxes=False, **settings):
         Plugin.__init__ (self, **settings)
         self.query=query
+        self.checkboxes=checkboxes
 
     def template_file (self):
         return "hazelnut.html"
@@ -16,20 +17,22 @@ class Hazelnut (Plugin):
 # $subject_keys = Plugins::get_default_fields($query->subject, $is_unique);
 # $fields = Plugins::metadata_get_fields($query->subject);
 # for now I am hard-coding the ones from haze.py
-        env['subject_fields']=[ 'hostname', 'hrn' ]
+        env['subject_fields']=[ 'network', 'type', 'hostname', 'hrn' ]
         return env
 
     def requirements (self):
         reqs = {
             'js_files' : [ "js/hazelnut.js", 
-                           "js/manifold.js", "js/manifold-query.js", "js/manifold-core.js",
+                           "js/manifold.js", "js/manifold-query.js", 
                            "js/dataTables.js", "js/with-datatables.js",
                            "js/spin.presets.js", "js/spin.min.js", "js/jquery.spin.js", 
                            "js/unfold-helper.js",
                            ] ,
-            'css_files': [ "css/hazelnut.css" , "css/demo_table.css", "css/demo_table_jui.css", ],
+            'css_files': [ "css/hazelnut.css" , 
+                           "css/demo_table.css", "css/demo_table_jui.css", "css/jquery-ui.css",
+                           ],
             }
         return reqs
 
     # the list of things passed to the js plugin
-    def json_settings_list (self): return ['plugin_uuid','query_uuid']
+    def json_settings_list (self): return ['plugin_uuid','query_uuid','checkboxes']