blob: 7f4d300800a6e99ba8f88bc71caf2109f484fd67 [file] [log] [blame]
Akronda5bd3a2020-10-16 17:37:49 +02001"use strict";
2
Nils Diewald0e6992a2015-04-14 20:13:52 +00003define(['menu/prefix'], function (prefixClass) {
4 return {
Nils Diewald7148c6f2015-05-04 15:07:53 +00005
6 /**
7 * Create prefix object for the hint helper menu.
8 */
Nils Diewald0e6992a2015-04-14 20:13:52 +00009 create : function (params) {
Nils Diewald7148c6f2015-05-04 15:07:53 +000010 return Object.create(prefixClass).
Akrone4961b12017-05-10 21:04:46 +020011 upgradeTo(this)._init(params);
Nils Diewald0e6992a2015-04-14 20:13:52 +000012 },
Nils Diewald7148c6f2015-05-04 15:07:53 +000013
14 /**
15 * Override the prefix action.
16 */
Akron954c6a52020-11-10 14:26:29 +010017 onclick : function (e) {
Akron24aa0052020-11-10 11:00:34 +010018 const m = this.menu();
19 const value = this.value();
20 const h = m.hint();
Leo Repp57997402021-08-18 16:37:52 +020021
Akron6ed13992016-05-23 18:06:05 +020022 h.inputField().insert(value);
Akron954c6a52020-11-10 14:26:29 +010023 h.active(null);
24 m.hide();
25 // h.unshow();
26 e.halt();
Nils Diewald0e6992a2015-04-14 20:13:52 +000027 }
28 };
29});