Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 1 | define(['menu/prefix'], function (prefixClass) { |
| 2 | return { |
Nils Diewald | 7148c6f | 2015-05-04 15:07:53 +0000 | [diff] [blame^] | 3 | |
| 4 | /** |
| 5 | * Create prefix object for the hint helper menu. |
| 6 | */ |
Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 7 | create : function (params) { |
Nils Diewald | 7148c6f | 2015-05-04 15:07:53 +0000 | [diff] [blame^] | 8 | return Object.create(prefixClass). |
| 9 | upgradeTo(this)._init(params); |
Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 10 | }, |
Nils Diewald | 7148c6f | 2015-05-04 15:07:53 +0000 | [diff] [blame^] | 11 | |
| 12 | /** |
| 13 | * Override the prefix action. |
| 14 | */ |
Nils Diewald | 0e6992a | 2015-04-14 20:13:52 +0000 | [diff] [blame] | 15 | onclick : function () { |
| 16 | var m = this.menu(); |
| 17 | var h = m.hint(); |
| 18 | m.hide(); |
| 19 | |
| 20 | h.inputField().insert(this.value()); |
| 21 | h.active = false; |
| 22 | } |
| 23 | }; |
| 24 | }); |