Akron | 479994e | 2018-07-02 13:21:44 +0200 | [diff] [blame] | 1 | requirejs.config({ |
| 2 | baseUrl: '/js/src', |
| 3 | paths : { |
| 4 | 'lib': '../lib' |
| 5 | } |
| 6 | }); |
| 7 | |
Akron | e1c27f6 | 2018-07-20 11:42:59 +0200 | [diff] [blame] | 8 | define(['app/en','match', 'panel/match', 'plugin/server','lib/domReady','init'], function (lang, matchClass, matchPanelClass, pluginClass, domReady) { |
Akron | 479994e | 2018-07-02 13:21:44 +0200 | [diff] [blame] | 9 | domReady(function () { |
Akron | 7c6e05f | 2018-07-12 19:08:13 +0200 | [diff] [blame] | 10 | |
Akron | e1c27f6 | 2018-07-20 11:42:59 +0200 | [diff] [blame] | 11 | // Initialize match |
| 12 | matchClass.create( |
| 13 | document.getElementById('WPD-FFF.01460-p119-120') |
| 14 | ); |
| 15 | |
| 16 | // Load plugin server |
Akron | 8d646d7 | 2018-07-08 13:45:53 +0200 | [diff] [blame] | 17 | KorAP.Plugin = pluginClass.create(); |
Akron | 7c6e05f | 2018-07-12 19:08:13 +0200 | [diff] [blame] | 18 | |
Akron | e1c27f6 | 2018-07-20 11:42:59 +0200 | [diff] [blame] | 19 | // Register match plugin |
Akron | 7c6e05f | 2018-07-12 19:08:13 +0200 | [diff] [blame] | 20 | KorAP.Plugin.register({ |
| 21 | 'name' : 'Example New', |
| 22 | 'desc' : 'Some content about cats', |
| 23 | // 'about' : 'https://localhost:5678/', |
| 24 | 'embed' : [{ |
Akron | 10a4796 | 2018-07-12 21:17:10 +0200 | [diff] [blame] | 25 | 'panel' : 'match', |
Akron | 7c6e05f | 2018-07-12 19:08:13 +0200 | [diff] [blame] | 26 | 'title' : 'Translate', |
| 27 | 'classes' : ['translate'], |
| 28 | 'onClick' : { |
| 29 | 'action' : 'addWidget', |
Akron | 7c6e05f | 2018-07-12 19:08:13 +0200 | [diff] [blame] | 30 | 'template' : 'http://localhost:3003/demo/plugin-client.html', |
| 31 | } |
| 32 | }] |
| 33 | }); |
| 34 | |
Akron | 479994e | 2018-07-02 13:21:44 +0200 | [diff] [blame] | 35 | }); |
| 36 | }); |