Akron | da5bd3a | 2020-10-16 17:37:49 +0200 | [diff] [blame] | 1 | "use strict"; |
2 | |||||
Akron | 0b489ad | 2018-02-02 16:49:32 +0100 | [diff] [blame] | 3 | define(['menu/lengthField', 'util'], function (lengthFieldClass) { |
Akron | 1ff3ac2 | 2016-04-28 16:30:45 +0200 | [diff] [blame] | 4 | return { |
5 | |||||
6 | /** | ||||
7 | * Create lengthField object for the hint helper menu. | ||||
8 | */ | ||||
9 | create : function () { | ||||
10 | return Object.create(lengthFieldClass). | ||||
Akron | 0b489ad | 2018-02-02 16:49:32 +0100 | [diff] [blame] | 11 | upgradeTo(this)._init(); |
Akron | 1ff3ac2 | 2016-04-28 16:30:45 +0200 | [diff] [blame] | 12 | }, |
13 | |||||
14 | /** | ||||
15 | * Override the prefix action. | ||||
16 | */ | ||||
17 | add : function (param) { | ||||
Akron | 24aa005 | 2020-11-10 11:00:34 +0100 | [diff] [blame] | 18 | this._el.addE('span').addT(param[0] + '--'); |
Akron | 1ff3ac2 | 2016-04-28 16:30:45 +0200 | [diff] [blame] | 19 | |
Akron | 24aa005 | 2020-11-10 11:00:34 +0100 | [diff] [blame] | 20 | var desc = this._el.addE('span'); |
Akron | 1ff3ac2 | 2016-04-28 16:30:45 +0200 | [diff] [blame] | 21 | desc.classList.add("desc"); |
Akron | 0b489ad | 2018-02-02 16:49:32 +0100 | [diff] [blame] | 22 | desc.addT(param[2] + '--'); |
Akron | 24aa005 | 2020-11-10 11:00:34 +0100 | [diff] [blame] | 23 | this._el.appendChild(desc); |
Akron | 1ff3ac2 | 2016-04-28 16:30:45 +0200 | [diff] [blame] | 24 | } |
25 | }; | ||||
26 | }); |