Display checklist only when needed
This commit is contained in:
@@ -457,12 +457,6 @@ jQuery(document).ready(function($){
|
||||
// Trigger player list layout change
|
||||
$(".post-type-sp_list #post-formats-select input.post-format").trigger("change");
|
||||
|
||||
// Auto-select hides options
|
||||
$(".sp-select-setting").find("select").change(function() {
|
||||
$(".sp-select-all-range").toggle("manual"==$(this).val());
|
||||
$(this).closest(".sp-select-setting").siblings(".sp-tab-select").find("select").change()
|
||||
});
|
||||
|
||||
// Configure primary result option (Ajax)
|
||||
$(".sp-admin-config-table").on("click", ".sp-primary-result-option", function() {
|
||||
$.post( ajaxurl, {
|
||||
|
||||
@@ -91,8 +91,10 @@ class SP_Meta_Box_List_Details {
|
||||
</select>
|
||||
</p>
|
||||
<?php
|
||||
sp_post_checklist( $post->ID, 'sp_player', ( 'auto' == $select ? 'none' : 'block' ), array( 'sp_league', 'sp_season', 'sp_current_team' ) );
|
||||
sp_post_adder( 'sp_player', __( 'Add New', 'sportspress' ) );
|
||||
if ( 'manual' == $select ) {
|
||||
sp_post_checklist( $post->ID, 'sp_player', ( 'auto' == $select ? 'none' : 'block' ), array( 'sp_league', 'sp_season', 'sp_current_team' ) );
|
||||
sp_post_adder( 'sp_player', __( 'Add New', 'sportspress' ) );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
@@ -43,8 +43,10 @@ class SP_Meta_Box_Table_Details {
|
||||
</select>
|
||||
</p>
|
||||
<?php
|
||||
sp_post_checklist( $post->ID, 'sp_team', ( 'auto' == $select ? 'none' : 'block' ), array( 'sp_league', 'sp_season' ) );
|
||||
sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
if ( 'manual' == $select ) {
|
||||
sp_post_checklist( $post->ID, 'sp_team', ( 'auto' == $select ? 'none' : 'block' ), array( 'sp_league', 'sp_season' ) );
|
||||
sp_post_adder( 'sp_team', __( 'Add New', 'sportspress' ) );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user