From fb6cfc7d9bde853a83c14c0cb18e4cecc57291b2 Mon Sep 17 00:00:00 2001 From: Goutte Date: Sun, 17 Dec 2017 11:43:09 +0100 Subject: [PATCH] Make sure we cannot disable the last meaningful target. --- web/view/home.html.jinja2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/view/home.html.jinja2 b/web/view/home.html.jinja2 index f5bdaeb..c311ce1 100755 --- a/web/view/home.html.jinja2 +++ b/web/view/home.html.jinja2 @@ -634,7 +634,11 @@ jQuery().ready(function($){ var isLastTargetEnabled = function(target_slug) { var s = 0; $(".targets-filters .target:not(.locked)").each(function(i,p) { - if ($(p).hasClass('active') && ! $(p).hasClass('loading')) s++; + if ($(p).hasClass('active') + && ! $(p).hasClass('loading') + && ! $(p).hasClass('empty') + && ! $(p).hasClass('failed') + ) { s++; } }); return s < 2; }; -- libgit2 0.21.2