blob: 84adf008ae3e2ec01a9bacde2295f627bc082596 [file] [log] [blame]
Akron48b1e4d2015-06-17 18:47:01 +02001/**
Akroncd42a142019-07-12 18:55:37 +02002 * Menu showing all predefined virtual corpora.
Akron48b1e4d2015-06-17 18:47:01 +02003 * THIS IS EXPERIMENTAL AND MAY BE REMOVED!
4 */
Akron88d237e2020-10-21 08:05:18 +02005"use strict";
6
Akron48b1e4d2015-06-17 18:47:01 +02007define(['vc/menu', 'api'], function (menuClass, itemClass) {
8 return {
9 create : function (params) {
10 return Object.create(menuClass)
Akron0b489ad2018-02-02 16:49:32 +010011 .upgradeTo(this)
12 ._init(itemClass, undefined, undefined, params);
Akron48b1e4d2015-06-17 18:47:01 +020013 },
14
15 /**
16 * A click event was released
17 */
18 release : function (id, name) {
19 if (this._cb !== undefined)
Akron0b489ad2018-02-02 16:49:32 +010020 this._cb(id, name);
Akron48b1e4d2015-06-17 18:47:01 +020021 }
22 };
23});