Uncheck auto if disabled field is clicked
This commit is contained in:
@@ -43,7 +43,7 @@ function sp_player_stats_meta( $post ) {
|
|||||||
else
|
else
|
||||||
$data[ $id ] = array();
|
$data[ $id ] = array();
|
||||||
endforeach;
|
endforeach;
|
||||||
sp_data_table( $data, 0, array( 'Team', 'Played', 'Goals', 'Assists', 'Yellow Cards', 'Red Cards' ), false );
|
sp_data_table( $data, 0, array( 'Team', 'Played', 'Goals', 'Assists', 'Yellow Cards', 'Red Cards' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
function sp_player_profile_meta( $post ) {
|
function sp_player_profile_meta( $post ) {
|
||||||
|
|||||||
@@ -20,11 +20,19 @@ jQuery(document).ready(function($){
|
|||||||
// Activate tab filters
|
// Activate tab filters
|
||||||
$('.sp-tab-panel').siblings('.sp-tab-select').find('select').change();
|
$('.sp-tab-panel').siblings('.sp-tab-select').find('select').change();
|
||||||
|
|
||||||
// Stats table checkboxes
|
// Data table checkboxes
|
||||||
$('.sp-data-table tr input[type=checkbox]').change(function() {
|
$('.sp-data-table tr input[type=checkbox]').change(function() {
|
||||||
$(this).closest('tr').find('input[type=text], input[type=number]').prop('readonly', $(this).prop('checked'));
|
$(this).closest('tr').find('input[type=text], input[type=number]').prop('readonly', $(this).prop('checked'));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Uncheck auto to edit
|
||||||
|
$('.sp-data-table tr input[type=text], .sp-data-table tr input[type=text]').click(function() {
|
||||||
|
$el = $(this).closest('tr').find('input[type=checkbox]');
|
||||||
|
if($el.size()) {
|
||||||
|
$el.prop('checked', false).change();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// Change title
|
// Change title
|
||||||
$('.sp-title-generator select').change(function() {
|
$('.sp-title-generator select').change(function() {
|
||||||
title = $('.sp-title-generator select[value!=0]').map(function(){
|
title = $('.sp-title-generator select[value!=0]').map(function(){
|
||||||
|
|||||||
Reference in New Issue
Block a user