File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
pydis_site/static/js/resources Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ function updateURL() {
115
115
function updateUI ( ) {
116
116
let resources = $ ( '.resource-box' ) ;
117
117
let filterTags = $ ( '.filter-box-tag' ) ;
118
+ let resourceTags = $ ( '.resource-tag' ) ;
118
119
let noTagsSelected = $ ( ".no-tags-selected.tag" ) ;
119
120
let closeFiltersButton = $ ( ".close-filters-button" ) ;
120
121
@@ -127,9 +128,17 @@ function updateUI() {
127
128
filterTags . hide ( ) ;
128
129
noTagsSelected . show ( ) ;
129
130
closeFiltersButton . hide ( ) ;
131
+ resourceTags . removeClass ( "active" ) ;
130
132
$ ( `.filter-checkbox:checked` ) . prop ( "checked" , false )
131
133
return ;
132
134
} else {
135
+ // Hide everything
136
+ $ ( '.filter-box-tag' ) . hide ( ) ;
137
+ $ ( '.resource-tag' ) . removeClass ( "active" ) ;
138
+ noTagsSelected . show ( ) ;
139
+ closeFiltersButton . hide ( ) ;
140
+
141
+ // Now conditionally show the stuff we want
133
142
$ . each ( activeFilters , function ( filterType , filters ) {
134
143
$ . each ( filters , function ( index , filter ) {
135
144
// Show a corresponding filter box tag
You can’t perform that action at this time.
0 commit comments