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 | |
hebasta | e094dc6 | 2019-12-06 13:12:40 +0100 | [diff] [blame] | 8 | |
| 9 | |
| 10 | |
| 11 | define(['app/en','match', 'panel/match', 'panel/result', 'plugin/server','lib/domReady','init'], function (lang, matchClass, matchPanelClass, resultPanelClass, pluginClass, domReady) { |
Akron | 479994e | 2018-07-02 13:21:44 +0200 | [diff] [blame] | 12 | domReady(function () { |
hebasta | e094dc6 | 2019-12-06 13:12:40 +0100 | [diff] [blame] | 13 | |
| 14 | //Load Plugin Server first |
Akron | 8d646d7 | 2018-07-08 13:45:53 +0200 | [diff] [blame] | 15 | KorAP.Plugin = pluginClass.create(); |
hebasta | e094dc6 | 2019-12-06 13:12:40 +0100 | [diff] [blame] | 16 | |
| 17 | //Register result plugin |
| 18 | KorAP.Plugin.register({ |
| 19 | 'name' : 'Export', |
| 20 | 'desc' : 'Exports Kalamar results', |
| 21 | // 'about' : 'https://localhost:5678/', |
| 22 | 'embed' : [{ |
| 23 | 'panel' : 'result', |
| 24 | 'title' : 'Export', |
| 25 | 'classes' : ['export'], |
| 26 | 'onClick' : { |
| 27 | 'action' : 'addWidget', |
| 28 | 'template' : 'http://localhost:3003/demo/plugin-client.html', |
| 29 | } |
| 30 | }] |
| 31 | }); |
Akron | 7c6e05f | 2018-07-12 19:08:13 +0200 | [diff] [blame] | 32 | |
Akron | e1c27f6 | 2018-07-20 11:42:59 +0200 | [diff] [blame] | 33 | // Register match plugin |
Akron | 7c6e05f | 2018-07-12 19:08:13 +0200 | [diff] [blame] | 34 | KorAP.Plugin.register({ |
| 35 | 'name' : 'Example New', |
| 36 | 'desc' : 'Some content about cats', |
| 37 | // 'about' : 'https://localhost:5678/', |
| 38 | 'embed' : [{ |
Akron | 10a4796 | 2018-07-12 21:17:10 +0200 | [diff] [blame] | 39 | 'panel' : 'match', |
Akron | 7c6e05f | 2018-07-12 19:08:13 +0200 | [diff] [blame] | 40 | 'title' : 'Translate', |
| 41 | 'classes' : ['translate'], |
| 42 | 'onClick' : { |
| 43 | 'action' : 'addWidget', |
Akron | 7c6e05f | 2018-07-12 19:08:13 +0200 | [diff] [blame] | 44 | 'template' : 'http://localhost:3003/demo/plugin-client.html', |
| 45 | } |
| 46 | }] |
| 47 | }); |
Akron | 479994e | 2018-07-02 13:21:44 +0200 | [diff] [blame] | 48 | }); |
| 49 | }); |