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