Improve select menu and integrate for query language choosing
diff --git a/dev/js/src/init.js b/dev/js/src/init.js
index 61e783b..c003a1d 100644
--- a/dev/js/src/init.js
+++ b/dev/js/src/init.js
@@ -9,6 +9,7 @@
'lib/alertify',
'session',
'tagger',
+ 'selectMenu',
'api',
'mailToChiffre',
'lib/highlight/highlight.pack',
@@ -22,7 +23,8 @@
vcArray,
alertifyClass,
sessionClass,
- tagger) {
+ tagger,
+ selectMenuClass) {
// Set hint array for hint helper
KorAP.hintArray = hintArray;
@@ -73,6 +75,7 @@
input.style.display = 'none';
vcname = document.createElement('span');
vcname.setAttribute('id', 'vc-choose');
+ vcname.classList.add('select');
var currentVC = loc.VC_allCorpora;
if (KorAP.koralQuery !== undefined && KorAP.koralQuery["collection"]) {
@@ -88,7 +91,6 @@
input.parentNode.insertBefore(vcname, input);
};
-
/**
* Add actions to match entries
*/
@@ -122,6 +124,11 @@
});
};
+ // Replace QL select menus with KorAP menus
+ selectMenuClass.create(
+ document.getElementById('ql-field').parentNode
+ ).limit(5);
+
var result = document.getElementById('resultinfo');
var resultButton = null;
if (result != null) {