From 813069cd9202a7a2894c79407fe8419f7e491b7f Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 16 Mar 2014 15:13:15 +1100 Subject: [PATCH] Fix #12 --- assets/js/admin.js | 10 +++++++++- functions.php | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/assets/js/admin.js b/assets/js/admin.js index 6e61cfe5..840b7b5e 100644 --- a/assets/js/admin.js +++ b/assets/js/admin.js @@ -52,12 +52,20 @@ jQuery(document).ready(function($){ filter += ".sp-filter-"+$(this).find("select").val(); }); } - $(this).closest(".sp-tab-select").siblings(".sp-tab-panel").find(".sp-post").hide(0, function() { + $panel = $(this).closest(".sp-tab-select").siblings(".sp-tab-panel") + $panel.find(".sp-post").hide(0, function() { $(this).find("input").prop("disabled", true); $(this).filter(filter).show(0, function() { $(this).find("input").prop("disabled", false); }); }); + if($panel.find(".sp-post:visible").length > 0) { + $panel.find(".sp-select-all-container").show(); + $panel.find(".sp-not-found-container").hide(); + } else { + $panel.find(".sp-select-all-container").hide(); + $panel.find(".sp-not-found-container").show(); + } }); // Trigger tab filter diff --git a/functions.php b/functions.php index ce17d01b..65b38c9e 100644 --- a/functions.php +++ b/functions.php @@ -485,7 +485,7 @@ if ( !function_exists( 'sportspress_post_checklist' ) ) {