expose each query ONCE to js, plugin gets initialized with query_uuid only
[unfold.git] / unfold / templates / page-queries.js
diff --git a/unfold/templates/page-queries.js b/unfold/templates/page-queries.js
new file mode 100644 (file)
index 0000000..63a5aa9
--- /dev/null
@@ -0,0 +1,8 @@
+{% for json in queries_jsons %} manifold.insert_query({{ json|safe }});
+{% endfor %}
+$(document).ready(function () {
+var async_queries = new Array();
+{% for d in query_uuid_domids %} async_queries.push({'query_uuid':"{{ d.query_uuid }}", 'id':{{ d.domid }}});
+{% endfor %}
+manifold_async_exec(async_queries);
+})