| ... |
... |
@@ -15,13 +15,13 @@ |
| 15 |
15 |
super(); |
| 16 |
16 |
this.searchText = ""; |
| 17 |
17 |
this.favoritesFilter = false; |
| 18 |
|
- this.administratorFilter = true; |
|
18 |
+ this.administratorFilter = false; |
| 19 |
19 |
this.editorFilter = false; |
| 20 |
20 |
this.viewerFilter = false; |
| 21 |
21 |
this.publicFilter = false; |
| 22 |
22 |
this.privateFilter = false; |
| 23 |
23 |
} |
| 24 |
|
- toggleFilter(filterName) { |
|
24 |
+ toggleBooleanFilter(filterName) { |
| 25 |
25 |
this[filterName] = !this[filterName]; |
| 26 |
26 |
console.log(this.administratorFilter); |
| 27 |
27 |
} |
| ... |
... |
@@ -29,6 +29,7 @@ |
| 29 |
29 |
this.searchText = e.target.value; |
| 30 |
30 |
} |
| 31 |
31 |
handleSearch() { |
|
32 |
+ // check if text changed |
| 32 |
32 |
console.log(this.searchText); |
| 33 |
33 |
} |
| 34 |
34 |
render() { |
| ... |
... |
@@ -38,7 +38,14 @@ |
| 38 |
38 |
<input @change="${this.setSearchText}" type="text" placeholder="Search..." /> |
| 39 |
39 |
<button @click="${this.handleSearch}">Search</button> |
| 40 |
40 |
</div> |
| 41 |
|
- <label><input type="checkbox" @change="${() => this.toggleFilter('administratorFilter')}" .checked="${this.administratorFilter}"/> Administrator</label> |
|
42 |
+ <div> |
|
43 |
+ <label><input type="checkbox" @change="${() => this.toggleBooleanFilter('favoritesFilter')}" .checked="${this.favoritesFilter}"/> Favorites</label> |
|
44 |
+ <label><input type="checkbox" @change="${() => this.toggleBooleanFilter('administratorFilter')}" .checked="${this.administratorFilter}"/> Administrator</label> |
|
45 |
+ <label><input type="checkbox" @change="${() => this.toggleBooleanFilter('editorFilter')}" .checked="${this.editorFilter}"/> Editor</label> |
|
46 |
+ <label><input type="checkbox" @change="${() => this.toggleBooleanFilter('viewerFilter')}" .checked="${this.viewerFilter}"/> Viewer</label> |
|
47 |
+ <label><input type="checkbox" @change="${() => this.toggleBooleanFilter('publicFilter')}" .checked="${this.publicFilter}"/> Public</label> |
|
48 |
+ <label><input type="checkbox" @change="${() => this.toggleBooleanFilter('privateFilter')}" .checked="${this.privateFilter}"/> Public</label> |
|
49 |
+ </div> |
| 42 |
42 |
</div> |
| 43 |
43 |
` |
| 44 |
44 |
} |
| ... |
... |
@@ -47,7 +47,7 @@ |
| 47 |
47 |
</script> |
| 48 |
48 |
|
| 49 |
49 |
<clb-unified-search></clb-unified-search> |
| 50 |
|
- |
|
58 |
+<!-- |
| 51 |
51 |
<select id="context-search-type"> |
| 52 |
52 |
<option value="all">All</option> |
| 53 |
53 |
<option value="collabs">Collabs</option> |
| ... |
... |
@@ -171,7 +171,6 @@ |
| 171 |
171 |
}) |
| 172 |
172 |
} |
| 173 |
173 |
}); |
| 174 |
|
- |
| 175 |
|
- |
| 176 |
176 |
</script> |
|
183 |
+--> |
| 177 |
177 |
{{/html}} |