From bc36a575f56057e14330db0a122a2801da4555c1 Mon Sep 17 00:00:00 2001 From: Takumi Date: Sat, 27 Jul 2013 21:47:14 +1000 Subject: [PATCH] Disable invisible checkboxes --- event.php | 2 +- sportspress-admin.js | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/event.php b/event.php index 078c81b2..55f969bb 100644 --- a/event.php +++ b/event.php @@ -46,7 +46,7 @@ function sp_event_team_meta( $post ) { 'post_type' => 'sp_team', 'name' => 'sportspress[sp_team][]', 'class' => 'sportspress-pages', - 'show_option_none' => __( 'None' ), + 'show_option_none' => sprintf( __( 'Select %s' ), 'Team' ), 'option_none_value' => 0, 'selected' => $teams[ $i ] ); diff --git a/sportspress-admin.js b/sportspress-admin.js index 8b50d3eb..1462f94f 100644 --- a/sportspress-admin.js +++ b/sportspress-admin.js @@ -6,7 +6,13 @@ jQuery(document).ready(function($){ }); // Filter tabs $('.sp-tab-panel').siblings('.sp-tab-select').find('select').change(function() { - $(this).closest('.sp-tab-select').siblings('.sp-tab-panel').find('.sp-post').hide().filter('.sp-filter-'+$(this).val()).show(); + $val = $(this).val(); + $(this).closest('.sp-tab-select').siblings('.sp-tab-panel').find('.sp-post').hide(0, function() { + $(this).find('input').prop('disabled', true); + $(this).filter('.sp-filter-'+$val).show(0, function() { + $(this).find('input').prop('disabled', false); + }); + }); return; }); // Activate tab filters