Failed to execute template. Cause: [Access denied when checking [script] access to [xwiki:Collaboratory.UX.HbpSkin.WebHome] for user [xwiki:XWiki.Admin]]. Click on this message for details.

Context Search - HBP Wiki

IAM21 instance, do not create collab nor modify a team, your changes will be lost


Changes for page Context Search

Last modified by bougault on 2023/02/20 16:29

From version 26.75
edited by bougault
on 2022/11/17 10:37
Change comment: There is no comment for this version
To version 26.73
edited by bougault
on 2022/11/17 10:34
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -26,7 +26,6 @@
26 26   this.viewer = false;
27 27   this.rolesFilter = [];
28 28   this.filterUrl = new URL(`${document.location.origin}/rest/v1/collabs?search=&offset=0&orderField=title&order=asc&favorite=true&roles=`);
29 - this.results = [];
30 30   }
31 31   toggleRoleFilter(roleName) {
32 32   if(this.rolesFilter.indexOf(roleName) == -1) {
... ... @@ -48,7 +48,7 @@
48 48   }
49 49   fetchWikiSearch() {
50 50   // request should be built from component, not from "external" dependency. Leave it here like this for POC.
51 - handleXWikiSearch(this.searchText).then(results => this.results = results);
50 + handleXWikiSearch(this.searchText).then(results => console.log(results));
52 52   }
53 53   buildFilter() {
54 54   //https://wiki-dev.ebrains.eu/rest/v1/collabs?search=&offset=0&orderField=title&order=asc&favorite=true&roles=
... ... @@ -74,8 +74,8 @@
74 74   function handleXWikiSearch(searchString) {
75 75   return new Promise((resolve) => {
76 76   require(['jquery'], function($) {
77 - const solrServiceURL = new XWiki.Document('SuggestSolrService', 'XWiki').getURL('get');
78 - //contextSearchButton.addEventListener('click', function() {
76 + var solrServiceURL = new XWiki.Document('SuggestSolrService', 'XWiki').getURL('get');
77 + contextSearchButton.addEventListener('click', function() {
79 79   $.post(solrServiceURL, {
80 80   outputSyntax: 'plain',
81 81   media: 'json',
... ... @@ -86,7 +86,7 @@
86 86   ].join('\n'),
87 87   input: searchString
88 88   }).then(resolve);
89 - //});
88 + });
90 90   });
91 91   });
92 92   }