blob: d305960c256c3375f6e3c5def74b1f50ff5a5360 [file] [log] [blame]
Nils Diewald4c221252015-04-21 20:19:25 +00001/**
2 * Menu showing all key fields.
3 */
Nils Diewald1fcb2ad2015-04-20 19:19:18 +00004define(['menu', 'vc/item'], function (menuClass, itemClass) {
Nils Diewald0e6992a2015-04-14 20:13:52 +00005 return {
6 create : function (params) {
7 return Object.create(menuClass)
8 .upgradeTo(this)
9 ._init(itemClass, undefined, params)
Nils Diewald1fcb2ad2015-04-20 19:19:18 +000010 },
Nils Diewald4c221252015-04-21 20:19:25 +000011
12 /**
13 * Register callback for click event.
14 */
Nils Diewald1fcb2ad2015-04-20 19:19:18 +000015 released : function (cb) {
16 this._cb = cb;
17 },
Nils Diewald4c221252015-04-21 20:19:25 +000018
19 /**
20 * A click event was released
21 */
22 release : function (key, type) {
Nils Diewald1fcb2ad2015-04-20 19:19:18 +000023 if (this._cb !== undefined)
Nils Diewald4c221252015-04-21 20:19:25 +000024 this._cb(key, type);
Nils Diewald0e6992a2015-04-14 20:13:52 +000025 }
26 };
27});