From f9523048189ce1541acdfaf2a68731dadf431c67 Mon Sep 17 00:00:00 2001 From: Takumi Date: Tue, 30 Jul 2013 16:00:13 +1000 Subject: [PATCH] Add auto column argument to sp_data_table --- event.php | 2 +- helpers.php | 28 +++++++++++++++++----------- sportspress-admin.js | 1 + 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/event.php b/event.php index 23900c8b..8f60567f 100644 --- a/event.php +++ b/event.php @@ -93,7 +93,7 @@ function sp_event_stats_meta( $post ) { else $data[ $id ] = array(); endforeach; - sp_data_table( $data, $value, array( 'Player', 'Goals', 'Assists', 'Yellow Cards', 'Red Cards' ) ); + sp_data_table( $data, $value, array( 'Player', 'Goals', 'Assists', 'Yellow Cards', 'Red Cards' ), true, false ); ?> @@ -187,7 +187,9 @@ if ( ! function_exists( 'sp_data_table' ) ) { - + + + @@ -195,10 +197,7 @@ if ( ! function_exists( 'sp_data_table' ) ) { $i = 0; foreach ( $data as $key => $values ): if ( !$key ) continue; - if ( array_key_exists( 'auto', $values ) ) - $auto = (int)$values[ 'auto' ]; - else - $auto = 0; + $is_auto = array_key_exists( 'auto', $values ) ? (int)$values[ 'auto' ] : 0; ?> /> + /> - /> + + /> + - /> + /> - /> + + /> + diff --git a/sportspress-admin.js b/sportspress-admin.js index c0d7f2a8..894ae6c6 100644 --- a/sportspress-admin.js +++ b/sportspress-admin.js @@ -32,4 +32,5 @@ jQuery(document).ready(function($){ }).get().join(' vs '); $('input[name=post_title]').val(title); }); + }); \ No newline at end of file