Commit fb6cfc7d9bde853a83c14c0cb18e4cecc57291b2
1 parent
51d614e6
Exists in
master
and in
2 other branches
Make sure we cannot disable the last meaningful target.
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
web/view/home.html.jinja2
@@ -634,7 +634,11 @@ jQuery().ready(function($){ | @@ -634,7 +634,11 @@ jQuery().ready(function($){ | ||
634 | var isLastTargetEnabled = function(target_slug) { | 634 | var isLastTargetEnabled = function(target_slug) { |
635 | var s = 0; | 635 | var s = 0; |
636 | $(".targets-filters .target:not(.locked)").each(function(i,p) { | 636 | $(".targets-filters .target:not(.locked)").each(function(i,p) { |
637 | - if ($(p).hasClass('active') && ! $(p).hasClass('loading')) s++; | 637 | + if ($(p).hasClass('active') |
638 | + && ! $(p).hasClass('loading') | ||
639 | + && ! $(p).hasClass('empty') | ||
640 | + && ! $(p).hasClass('failed') | ||
641 | + ) { s++; } | ||
638 | }); | 642 | }); |
639 | return s < 2; | 643 | return s < 2; |
640 | }; | 644 | }; |