| ... |
... |
@@ -33,6 +33,13 @@ |
| 33 |
33 |
font-size: 12px; |
| 34 |
34 |
margin-top: 2em; |
| 35 |
35 |
} |
|
36 |
+ .rawResults > div { |
|
37 |
+ width: 100%; |
|
38 |
+ } |
|
39 |
+ .rawResults ul { |
|
40 |
+ list-style-type: none; |
|
41 |
+ padding: 0; |
|
42 |
+ } |
| 36 |
36 |
`; |
| 37 |
37 |
constructor() { |
| 38 |
38 |
super(); |
| ... |
... |
@@ -45,6 +45,7 @@ |
| 45 |
45 |
this.filterUrl = new URL(`${document.location.origin}/rest/v1/collabs?search=&offset=0&orderField=title&order=asc&limit=10000&favorite=false&roles=`); |
| 46 |
46 |
this.results = []; |
| 47 |
47 |
this.resultsCache = []; |
|
55 |
+ this.collabFiltersResults = []; |
| 48 |
48 |
} |
| 49 |
49 |
firstUpdated() { |
| 50 |
50 |
this.renderRoot.getElementById('searchInput').focus(); |
| ... |
... |
@@ -115,6 +115,7 @@ |
| 115 |
115 |
clearResults() { |
| 116 |
116 |
this.results = []; |
| 117 |
117 |
this.resultsCache = []; |
|
126 |
+ this.collabFiltersResults = []; |
| 118 |
118 |
} |
| 119 |
119 |
getLink(xwikiDocSpace) { |
| 120 |
120 |
return `/bin/view/${xwikiDocSpace.replaceAll('.', '/')}`; |
| ... |
... |
@@ -148,11 +148,11 @@ |
| 148 |
148 |
<div class="rawResults"> |
| 149 |
149 |
<div> |
| 150 |
150 |
<strong>XWiki Search Results</strong> |
| 151 |
|
- <pre>${JSON.stringify(this.resultsCache, null, 2)}</pre> |
|
160 |
+ <ul>${this.resultsCache.map((res) => html`<li>${res.space}</li>`)}</ul> |
| 152 |
152 |
</div> |
| 153 |
153 |
<div> |
| 154 |
154 |
<strong>Collab Search Results (Filters)</strong> |
| 155 |
|
- <pre>${JSON.stringify(this.collabFiltersResults, null, 2)}</pre> |
|
164 |
+ <ul>${this.collabFiltersResults.map((res) => html`<li>${res.name}</li>`)}</ul> |
| 156 |
156 |
</div> |
| 157 |
157 |
</div> |
| 158 |
158 |
</div> |