blob: bdc7bdf9be65c43d18e17540cd14971089ee1972 [file] [log] [blame]
Nils Diewald0e6992a2015-04-14 20:13:52 +00001define(['menu/prefix'], function (prefixClass) {
2 return {
Nils Diewald7148c6f2015-05-04 15:07:53 +00003
4 /**
5 * Create prefix object for the hint helper menu.
6 */
Nils Diewald0e6992a2015-04-14 20:13:52 +00007 create : function (params) {
Nils Diewald7148c6f2015-05-04 15:07:53 +00008 return Object.create(prefixClass).
9 upgradeTo(this)._init(params);
Nils Diewald0e6992a2015-04-14 20:13:52 +000010 },
Nils Diewald7148c6f2015-05-04 15:07:53 +000011
12 /**
13 * Override the prefix action.
14 */
Nils Diewald0e6992a2015-04-14 20:13:52 +000015 onclick : function () {
16 var m = this.menu();
Akron6ed13992016-05-23 18:06:05 +020017 var value = this.value();
Nils Diewald0e6992a2015-04-14 20:13:52 +000018 var h = m.hint();
19 m.hide();
20
Akron6ed13992016-05-23 18:06:05 +020021 h.inputField().insert(value);
Nils Diewald0e6992a2015-04-14 20:13:52 +000022 h.active = false;
23 }
24 };
25});