blob: eb91f141267e34d9a8087787093cf0ba6cc6aa33 [file] [log] [blame]
Akron479994e2018-07-02 13:21:44 +02001requirejs.config({
2 baseUrl: '/js/src',
3 paths : {
4 'lib': '../lib'
5 }
6});
7
hebastae094dc62019-12-06 13:12:40 +01008
9
10
11define(['app/en','match', 'panel/match', 'panel/result', 'plugin/server','lib/domReady','init'], function (lang, matchClass, matchPanelClass, resultPanelClass, pluginClass, domReady) {
Akron479994e2018-07-02 13:21:44 +020012 domReady(function () {
hebastae094dc62019-12-06 13:12:40 +010013
14 //Load Plugin Server first
Akron8d646d72018-07-08 13:45:53 +020015 KorAP.Plugin = pluginClass.create();
Akron22598cd2019-12-09 14:59:03 +010016
17 // Add services container to head
18 document.head.appendChild(KorAP.Plugin.element());
hebastae094dc62019-12-06 13:12:40 +010019
20 //Register result plugin
21 KorAP.Plugin.register({
22 'name' : 'Export',
23 'desc' : 'Exports Kalamar results',
24 // 'about' : 'https://localhost:5678/',
25 'embed' : [{
26 'panel' : 'result',
27 'title' : 'Export',
28 'classes' : ['export'],
29 'onClick' : {
30 'action' : 'addWidget',
31 'template' : 'http://localhost:3003/demo/plugin-client.html',
32 }
Akron22598cd2019-12-09 14:59:03 +010033 },{
34 'panel' : 'result',
35 'title' : 'Glemm',
36 'onClick' : {
37 'action' : 'toggle',
38 'state' : 'glemm',
39 'template' : 'http://localhost:3003/demo/plugin-client.html',
40 }
hebastae094dc62019-12-06 13:12:40 +010041 }]
42 });
Akron7c6e05f2018-07-12 19:08:13 +020043
Akrone1c27f62018-07-20 11:42:59 +020044 // Register match plugin
Akron7c6e05f2018-07-12 19:08:13 +020045 KorAP.Plugin.register({
46 'name' : 'Example New',
47 'desc' : 'Some content about cats',
48 // 'about' : 'https://localhost:5678/',
49 'embed' : [{
Akron10a47962018-07-12 21:17:10 +020050 'panel' : 'match',
Akron7c6e05f2018-07-12 19:08:13 +020051 'title' : 'Translate',
52 'classes' : ['translate'],
53 'onClick' : {
54 'action' : 'addWidget',
Akron7c6e05f2018-07-12 19:08:13 +020055 'template' : 'http://localhost:3003/demo/plugin-client.html',
56 }
57 }]
58 });
Akron479994e2018-07-02 13:21:44 +020059 });
60});