renamed plugin.js into metadata.js, rewritten
[unfold.git] / unfold / page.py
index d0c9727..9c1c412 100644 (file)
@@ -47,7 +47,7 @@ class Page:
         self._queries = set()
         self._queue = []
 
-    # the js async methods (see manifold_async_success)
+    # the js async methods (see manifold.asynchroneous_success)
     # offer the option to deliver the result to a specific DOM elt
     # otherwise (i.e. if domid not provided) 
     # it goes through the pubsub using query's uuid
@@ -98,14 +98,14 @@ class Page:
 
             request.session['metadata'] = self._metadata
 
-#        javascript = "all_headers=" + json.dumps(self._metadata) + ";"
-#        self.add_js_chunks(javascript)
+        javascript = "var MANIFOLD_METADATA =" + json.dumps(self._metadata) + ";"
+        self.add_js_chunks(javascript)
 
     def metadata_get_fields(self, method):
         return self._metadata[method]['column'].sort()
         
     def expose_js_manifold_config (self):
-        self.add_js_chunks(Config.manifold_js_export()+"\n")
+        self.add_js_chunks(Config.manifold_js_export())
 
     #################### requirements/prelude management
     # just forward to self.prelude - see decorator above