Added query panel for plugin capabilities
Change-Id: I5766cf45aa711ebea9a6f9f3dfa51e706ebd0d0d
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index bafa473..82d9de9 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -26,6 +26,7 @@
'session',
'selectMenu',
'panel/result',
+ 'panel/query',
'tour/tours',
'api',
'mailToChiffre',
@@ -40,6 +41,7 @@
sessionClass,
selectMenuClass,
resultPanelClass,
+ queryPanelClass,
tourClass) {
const d = document;
@@ -376,6 +378,22 @@
// Add the hinthelper to the KorAP object to make it manipulatable globally
KorAP.Hint = obj.hint;
+
+ /**
+ * Add query panel
+ */
+ var queryPanel = queryPanelClass.create();
+
+ // Get input field
+ var sform = d.getElementById("searchform");
+ var vcView = d.getElementById('vc-view')
+ if (sform && vcView) {
+ // The views are below the query bar
+ sform.insertBefore(queryPanel.element(), vcView);
+ KorAP.Panel = KorAP.Panel || {};
+ KorAP.Panel['query'] = queryPanel;
+ }
+
return obj;
});