Refine event performance interface

This commit is contained in:
Brian Miyaji
2014-08-14 23:04:08 +10:00
parent 5bcd97a5d2
commit c62b52b7a8
5 changed files with 15 additions and 4 deletions

View File

@@ -188,6 +188,16 @@ table.widefat.sp-data-table td:first-child {
white-space: nowrap;
}
table.widefat.sp-data-table th.icon,
table.widefat.sp-data-table td.icon {
width: 1px;
}
table.widefat.sp-data-table th.icon span,
table.widefat.sp-data-table td.icon span {
margin-right: 0;
}
table.widefat.sp-data-table input[type="text"],
table.widefat.sp-data-table input[type="number"] {
min-width: 1.25em;

View File

@@ -58,6 +58,7 @@ class SP_Meta_Box_Event_Performance {
<table class="widefat sp-data-table sp-performance-table sp-sortable-table">
<thead>
<tr>
<th class="icon">&nbsp;</th>
<th>#</th>
<th><?php _e( 'Player', 'sportspress' ); ?></th>
<th>
@@ -93,6 +94,7 @@ class SP_Meta_Box_Event_Performance {
$value = sp_array_value( $player_performance, 'number', '' );
?>
<tr class="sp-row sp-post" data-player="<?php echo $player_id; ?>">
<td class="icon"><span class="dashicons dashicons-menu post-state-format"></span></td>
<td>
<input class="small-text sp-player-number-input" type="text" name="sp_players[<?php echo $team_id; ?>][<?php echo $player_id; ?>][number]" value="<?php echo $value; ?>" />
</td>

View File

@@ -40,7 +40,7 @@ class SP_Meta_Box_Table_Data {
public static function table( $columns = array(), $usecolumns = null, $data = array(), $placeholders = array(), $adjustments = array() ) {
if ( is_array( $usecolumns ) )
$usecolumns = array_filter( $usecolumns );
$show_team_logo = get_option( 'sportspress_table_show_logos', false );
$show_team_logo = get_option( 'sportspress_table_show_logos', 'no' ) == 'yes' ? true : false;
?>
<ul class="subsubsub sp-table-bar">
<li><a href="#sp-table-values" class="current"><?php _e( 'Values', 'sportspress' ); ?></a></li> |

View File

@@ -51,7 +51,7 @@ class SP_Settings_Teams extends SP_Settings_Page {
array( 'type' => 'sectionend', 'id' => 'team_options' ),
array( 'title' => __( 'League Tables', 'sportspress' ), 'type' => 'title', 'id' => 'table_options' ),
array(
'title' => __( 'Teams', 'sportspress' ),
'desc' => __( 'Display logos', 'sportspress' ),

View File

@@ -28,7 +28,6 @@ $status = $event->status();
$show_players = get_option( 'sportspress_event_show_players', 'yes' ) == 'yes' ? true : false;
$link_posts = get_option( 'sportspress_link_players', 'yes' ) == 'yes' ? true : false;
$sortable = get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false;
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
$responsive = get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false;
$mode = get_option( 'sportspress_event_performance_mode', 'values' );
@@ -67,7 +66,7 @@ if ( is_array( $teams ) ):
endif;
?>
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
<table class="sp-event-performance sp-data-table <?php if ( $responsive ) { ?> sp-responsive-table<?php } if ( $has_players && $sortable ) { ?> sp-sortable-table<?php } ?>">
<table class="sp-event-performance sp-data-table <?php if ( $responsive ) { ?> sp-responsive-table<?php } ?>">
<thead>
<tr>
<?php if ( $has_players ): ?>