blob: 7cf8c1928992652deed08660c6b2c307fcb44837 [file] [log] [blame]
Akronda5bd3a2020-10-16 17:37:49 +02001"use strict";
2
Akron0b489ad2018-02-02 16:49:32 +01003define(['menu/lengthField', 'util'], function (lengthFieldClass) {
Akron1ff3ac22016-04-28 16:30:45 +02004 return {
5
6 /**
7 * Create lengthField object for the hint helper menu.
8 */
9 create : function () {
10 return Object.create(lengthFieldClass).
Akron0b489ad2018-02-02 16:49:32 +010011 upgradeTo(this)._init();
Akron1ff3ac22016-04-28 16:30:45 +020012 },
13
14 /**
15 * Override the prefix action.
16 */
17 add : function (param) {
Akron24aa0052020-11-10 11:00:34 +010018 this._el.addE('span').addT(param[0] + '--');
Akron1ff3ac22016-04-28 16:30:45 +020019
Akron24aa0052020-11-10 11:00:34 +010020 var desc = this._el.addE('span');
Akron1ff3ac22016-04-28 16:30:45 +020021 desc.classList.add("desc");
Akron0b489ad2018-02-02 16:49:32 +010022 desc.addT(param[2] + '--');
Akron24aa0052020-11-10 11:00:34 +010023 this._el.appendChild(desc);
Akron1ff3ac22016-04-28 16:30:45 +020024 }
25 };
26});