Disable invisible checkboxes

This commit is contained in:
Takumi
2013-07-27 21:47:14 +10:00
parent 18eee98728
commit bc36a575f5
2 changed files with 8 additions and 2 deletions

View File

@@ -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 ]
);

View File

@@ -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