Fix marking invalid filters in the UI

Label classes are incorrectly set on the filter text span, rather than the label under which that span is placed.
This commit is contained in:
Łukasz Mierzwa
2017-04-20 13:37:47 -07:00
parent 82fb5ce0d6
commit 61aba84eba
2 changed files with 4 additions and 4 deletions

View File

@@ -106,10 +106,10 @@ var Filters = (function() {
$.each($('span.tag-badge'), function(j, tag) {
if (sha1(filter.text) == $(tag).data('badge-id')) {
$(tag).html(filter.hits.toString());
if (filter.isValid) {
$(tag).addClass('label-info').removeClass('label-danger');
if (filter.isValid == true) {
$(tag).parent().addClass('label-info').removeClass('label-danger');
} else {
$(tag).addClass('label-danger').removeClass('label-info');
$(tag).parent().addClass('label-danger').removeClass('label-info');
}
}
});

File diff suppressed because one or more lines are too long