From a9baa36005134c2b1073e662b5c97beb1bf430a1 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 3 Jan 2019 10:50:05 +0000 Subject: [PATCH] =?UTF-8?q?Hide=20=E2=80=98nothing=20selected=E2=80=99=20i?= =?UTF-8?q?f=20nothing=20to=20select?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s doesn’t make sense to show the state if the state can’t change. This is especially true when you’re in a brand new, empty service. --- app/assets/javascripts/templateFolderForm.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/assets/javascripts/templateFolderForm.js b/app/assets/javascripts/templateFolderForm.js index f3adfe5cf..5f9079fbf 100644 --- a/app/assets/javascripts/templateFolderForm.js +++ b/app/assets/javascripts/templateFolderForm.js @@ -111,6 +111,12 @@ $('.template-list-selected-counter-count').html(numSelected); + $('.template-list-selected-counter').toggle(this.hasCheckboxes()); + + }; + + this.hasCheckboxes = function() { + return !!this.$form.find('input:checkbox').length; }; this.countSelectedCheckboxes = function() {