blob: 541b9176e233e78f716f704cb31391643a7325b4 [file] [log] [blame]
Akron0b489ad2018-02-02 16:49:32 +01001define(['menu/lengthField', 'util'], function (lengthFieldClass) {
Akron1ff3ac22016-04-28 16:30:45 +02002 return {
3
4 /**
5 * Create lengthField object for the hint helper menu.
6 */
7 create : function () {
8 return Object.create(lengthFieldClass).
Akron0b489ad2018-02-02 16:49:32 +01009 upgradeTo(this)._init();
Akron1ff3ac22016-04-28 16:30:45 +020010 },
11
12 /**
13 * Override the prefix action.
14 */
15 add : function (param) {
Akron0b489ad2018-02-02 16:49:32 +010016 this._element.addE('span').addT(param[0] + '--');
Akron1ff3ac22016-04-28 16:30:45 +020017
Akron0b489ad2018-02-02 16:49:32 +010018 var desc = this._element.addE('span');
Akron1ff3ac22016-04-28 16:30:45 +020019 desc.classList.add("desc");
Akron0b489ad2018-02-02 16:49:32 +010020 desc.addT(param[2] + '--');
Akron1ff3ac22016-04-28 16:30:45 +020021 this._element.appendChild(desc);
22 }
23 };
24});