blob: 79c7b7d79e5b91e2264782c2a2bc23edaf438853 [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) {
Akron0b489ad2018-02-02 16:49:32 +010018 this._element.addE('span').addT(param[0] + '--');
Akron1ff3ac22016-04-28 16:30:45 +020019
Akron0b489ad2018-02-02 16:49:32 +010020 var desc = this._element.addE('span');
Akron1ff3ac22016-04-28 16:30:45 +020021 desc.classList.add("desc");
Akron0b489ad2018-02-02 16:49:32 +010022 desc.addT(param[2] + '--');
Akron1ff3ac22016-04-28 16:30:45 +020023 this._element.appendChild(desc);
24 }
25 };
26});