Akron | 48b1e4d | 2015-06-17 18:47:01 +0200 | [diff] [blame] | 1 | /** |
Akron | cd42a14 | 2019-07-12 18:55:37 +0200 | [diff] [blame] | 2 | * Menu showing all predefined virtual corpora. |
Akron | 48b1e4d | 2015-06-17 18:47:01 +0200 | [diff] [blame] | 3 | * THIS IS EXPERIMENTAL AND MAY BE REMOVED! |
| 4 | */ |
| 5 | define(['vc/menu', 'api'], function (menuClass, itemClass) { |
| 6 | return { |
| 7 | create : function (params) { |
| 8 | return Object.create(menuClass) |
Akron | 0b489ad | 2018-02-02 16:49:32 +0100 | [diff] [blame] | 9 | .upgradeTo(this) |
| 10 | ._init(itemClass, undefined, undefined, params); |
Akron | 48b1e4d | 2015-06-17 18:47:01 +0200 | [diff] [blame] | 11 | }, |
| 12 | |
| 13 | /** |
| 14 | * A click event was released |
| 15 | */ |
| 16 | release : function (id, name) { |
| 17 | if (this._cb !== undefined) |
Akron | 0b489ad | 2018-02-02 16:49:32 +0100 | [diff] [blame] | 18 | this._cb(id, name); |
Akron | 48b1e4d | 2015-06-17 18:47:01 +0200 | [diff] [blame] | 19 | } |
| 20 | }; |
| 21 | }); |