blob: 1a673f8769449aa9f7a1dc3668cea7326998d142 [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();
Akron6ed13992016-05-23 18:06:05 +020021 h.inputField().insert(value);
Akron954c6a52020-11-10 14:26:29 +010022 h.active(null);
23 m.hide();
24 // h.unshow();
25 e.halt();
Nils Diewald0e6992a2015-04-14 20:13:52 +000026 }
27 };
28});