blob: 197e36e9a069a91796e8aef1334f1609f6eacde4 [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 */
Nils Diewald0e6992a2015-04-14 20:13:52 +000017 onclick : function () {
18 var m = this.menu();
Akron6ed13992016-05-23 18:06:05 +020019 var value = this.value();
Nils Diewald0e6992a2015-04-14 20:13:52 +000020 var h = m.hint();
21 m.hide();
22
Akron6ed13992016-05-23 18:06:05 +020023 h.inputField().insert(value);
Nils Diewald0e6992a2015-04-14 20:13:52 +000024 h.active = false;
25 }
26 };
27});