mirror of
https://github.com/c0de-archive/pelican-mg.git
synced 2024-12-22 16:32:40 +00:00
Fix CSS class names in filter-tags.js
This commit is contained in:
parent
3ed200d47c
commit
50bbdd08fc
@ -16,18 +16,18 @@ function includes(array, value) {
|
|||||||
function toggleTagFilter(tag) {
|
function toggleTagFilter(tag) {
|
||||||
var filterState = window.tagFilters[tag]
|
var filterState = window.tagFilters[tag]
|
||||||
if (filterState === true) {
|
if (filterState === true) {
|
||||||
this.classList.remove('mg-tag-filter-exclude');
|
|
||||||
filterState = false;
|
|
||||||
this.classList.add('mg-tag-filter-include');
|
|
||||||
this.title = 'Tag filter (include matching articles)';
|
|
||||||
} else if (filterState === false) {
|
|
||||||
this.classList.remove('mg-tag-filter-include');
|
this.classList.remove('mg-tag-filter-include');
|
||||||
|
filterState = false;
|
||||||
|
this.classList.add('mg-tag-filter-exclude');
|
||||||
|
this.title = 'Tag filter (exclude matching articles)';
|
||||||
|
} else if (filterState === false) {
|
||||||
|
this.classList.remove('mg-tag-filter-exclude');
|
||||||
filterState = undefined;
|
filterState = undefined;
|
||||||
this.title = 'Tag filter (disabled)';
|
this.title = 'Tag filter (disabled)';
|
||||||
} else {
|
} else {
|
||||||
filterState = true;
|
filterState = true;
|
||||||
this.classList.add('mg-tag-filter-exclude');
|
this.classList.add('mg-tag-filter-include');
|
||||||
this.title = 'Tag filter (exclude matching articles)';
|
this.title = 'Tag filter (include matching articles)';
|
||||||
}
|
}
|
||||||
window.tagFilters[tag] = filterState;
|
window.tagFilters[tag] = filterState;
|
||||||
updateArticlesVisibility();
|
updateArticlesVisibility();
|
||||||
|
Loading…
Reference in New Issue
Block a user