| * The vc info panel displays information about the virtual corpus, |
| * for example the corpus statistic |
| * @author Helge Stallkamp |
| ], function (panelClass, corpStatVClass) { |
| const loc = KorAP.Locale; |
| loc.SHOW_STAT= loc.SHOW_STAT || 'Statistics'; |
| loc.VERB_SHOWSTAT = loc.VERB_SHOWSTAT || 'Corpus Statistics'; |
| return Object.create(panelClass)._init(['vcinfo']).upgradeTo(this)._init(vc); |
| const actions = this.actions(); |
| actions.add(loc.SHOW_STAT, {'cls':['statistic']}, function() { |
| * Add corpus statistic view to panel |
| //Refreshes corpus statistic |
| if (t.statView !== undefined && t.statView.shown()){ |
| let statt = t.statView.show(); |
| if (statt.classList.contains('stdisabled')){ |
| statt.classList.remove('stdisabled'); |
| if (t.statView === undefined || !t.statView.shown()) { |
| t.statView = corpStatVClass.create(t.vc,t); |
| t.vc.oldvcQuery = KorAP.vc.toQuery(); |
| * Reload corpus statistic |
| reloadCorpStat: function(){ |