| ... |
... |
@@ -27,16 +27,6 @@ |
| 27 |
27 |
a { |
| 28 |
28 |
color: var(--color-brand-primary, blue); |
| 29 |
29 |
} |
| 30 |
|
- .rawResults { |
| 31 |
|
- width: 100%; |
| 32 |
|
- display: flex; |
| 33 |
|
- font-size: 12px; |
| 34 |
|
- margin-top: 2em; |
| 35 |
|
- } |
| 36 |
|
- .rawResults ul { |
| 37 |
|
- list-style-type: none; |
| 38 |
|
- padding: 0; |
| 39 |
|
- } |
| 40 |
40 |
`; |
| 41 |
41 |
constructor() { |
| 42 |
42 |
super(); |
| ... |
... |
@@ -49,7 +49,6 @@ |
| 49 |
49 |
this.filterUrl = new URL(`${document.location.origin}/rest/v1/collabs?search=&offset=0&orderField=title&order=asc&limit=10000&favorite=false&roles=`); |
| 50 |
50 |
this.results = []; |
| 51 |
51 |
this.resultsCache = []; |
| 52 |
|
- this.collabFiltersResults = []; |
| 53 |
53 |
} |
| 54 |
54 |
firstUpdated() { |
| 55 |
55 |
this.renderRoot.getElementById('searchInput').focus(); |
| ... |
... |
@@ -104,10 +104,7 @@ |
| 104 |
104 |
fetchFilterSearch() { |
| 105 |
105 |
return new Promise((resolve) => { |
| 106 |
106 |
if(this.hasActiveFilters()) { |
| 107 |
|
- fetch(this.filterUrl).then(res => res.json()).then((res) => { |
| 108 |
|
- this.collabFiltersResults = res; |
| 109 |
|
- resolve(res); |
| 110 |
|
- }); |
|
96 |
+ fetch(this.filterUrl).then(res => res.json()).then((res) => resolve(res)); |
| 111 |
111 |
} else { |
| 112 |
112 |
resolve([]); |
| 113 |
113 |
} |
| ... |
... |
@@ -150,17 +150,6 @@ |
| 150 |
150 |
</div> |
| 151 |
151 |
`)} |
| 152 |
152 |
</div> |
| 153 |
|
- <div class="rawResults"> |
| 154 |
|
- <div> |
| 155 |
|
- <strong>XWiki Search Results</strong> |
| 156 |
|
- <ul>${this.resultsCache.map((res) => html`<li>${res.space}</li>`)}</ul> |
| 157 |
|
- </div> |
| 158 |
|
- <div> |
| 159 |
|
- <strong>Collab Search Results (Filters)</strong> |
| 160 |
|
- <ul>${this.collabFiltersResults.map((res) => html`<li>${res.name}</li>`)}</ul> |
| 161 |
|
- </div> |
| 162 |
|
- </div> |
| 163 |
|
-</div> |
| 164 |
164 |
` |
| 165 |
165 |
} |
| 166 |
166 |
} |