blob: aed2a91a136b871d9ed6e8e51201beaf75309838 [file] [log] [blame]
Akron2d0d96d2019-11-18 19:49:50 +01001/**
2 * The query panel
3 *
4 * @author Nils Diewald
5 */
6define([
7 'panel'
8], function (panelClass) {
9
10 const d = document;
11
12 // Localization values
13 const loc = KorAP.Locale;
14
15 return {
16 create : function (opened) {
17 return Object.create(panelClass)._init(['query']).upgradeTo(this)._init(opened);
18 },
19
20 // Initialize panel
21 _init : function (opened) {
22 this._opened = opened;
23
24 // If plugins are enabled, add all buttons for the query panel
25 if (KorAP.Plugin) {
26 var queryButtons = KorAP.Plugin.buttonGroup("query");
27
28 // Add all matchbuttons in order
29 for (i in queryButtons) {
30 a.add.apply(a, queryButtons[i]);
31 };
32
33 KorAP.Plugin.clearButtons("query")
34 };
35
36 return this;
37 }
38 }
39});