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