Mode check and styling
This commit is contained in:
@@ -276,8 +276,9 @@
|
|||||||
background: rgba(0, 0, 0, 0.02);
|
background: rgba(0, 0, 0, 0.02);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Highlight */
|
/* Highlight & Heading */
|
||||||
.sp-highlight {
|
.sp-highlight,
|
||||||
|
.sp-heading {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
|
|||||||
public function wp_insert_post_data( $data, $postarr ) {
|
public function wp_insert_post_data( $data, $postarr ) {
|
||||||
if ( $data['post_type'] == 'sp_event' && $data['post_title'] == '' ):
|
if ( $data['post_type'] == 'sp_event' && $data['post_title'] == '' ):
|
||||||
|
|
||||||
if ( 'teams' == get_option( 'sportspress_mode', 'teams' ) ) $post_type = 'sp_team';
|
if ( 'team' == get_option( 'sportspress_mode', 'team' ) ) $post_type = 'sp_team';
|
||||||
else $post_type = 'sp_player';
|
else $post_type = 'sp_player';
|
||||||
|
|
||||||
$teams = sp_array_value( $postarr, $post_type, array() );
|
$teams = sp_array_value( $postarr, $post_type, array() );
|
||||||
@@ -96,7 +96,7 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
|
|||||||
unset( $existing_columns['author'], $existing_columns['comments'] );
|
unset( $existing_columns['author'], $existing_columns['comments'] );
|
||||||
$columns = array_merge( array(
|
$columns = array_merge( array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'sp_format' => '<span class="dashicons sp-icon-calendar tips" title="' . __( 'Format', 'sportspress' ) . '"></span>',
|
'sp_format' => '<span class="dashicons sp-icon-calendar sp-tip" title="' . __( 'Format', 'sportspress' ) . '"></span>',
|
||||||
'title' => null,
|
'title' => null,
|
||||||
'date' => __( 'Date', 'sportspress' ),
|
'date' => __( 'Date', 'sportspress' ),
|
||||||
'sp_time' => __( 'Time', 'sportspress' ),
|
'sp_time' => __( 'Time', 'sportspress' ),
|
||||||
@@ -121,7 +121,7 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
|
|||||||
$formats = new SP_Formats();
|
$formats = new SP_Formats();
|
||||||
$event_formats = $formats->event;
|
$event_formats = $formats->event;
|
||||||
if ( array_key_exists( $format, $event_formats ) ):
|
if ( array_key_exists( $format, $event_formats ) ):
|
||||||
echo '<span class="dashicons sp-icon-' . $format . ' tips" title="' . $event_formats[ $format ] . '"></span>';
|
echo '<span class="dashicons sp-icon-' . $format . ' sp-tip" title="' . $event_formats[ $format ] . '"></span>';
|
||||||
endif;
|
endif;
|
||||||
break;
|
break;
|
||||||
case 'sp_time':
|
case 'sp_time':
|
||||||
@@ -162,7 +162,7 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
|
|||||||
$team_results = implode( ' | ', $team_results );
|
$team_results = implode( ' | ', $team_results );
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
echo '<a class="sp-result tips" tabindex="10" title="' . $team_results . '" data-team="' . $team_id . '" href="#">' . ( $team_result == '' ? '-' : $team_result ) . '</a>';
|
echo '<a class="sp-result sp-tip" tabindex="10" title="' . $team_results . '" data-team="' . $team_id . '" href="#">' . ( $team_result == '' ? '-' : $team_result ) . '</a>';
|
||||||
echo '<input type="text" tabindex="10" class="sp-edit-result hidden small-text" data-team="' . $team_id . '" data-key="' . $main_result . '" value="' . $team_result . '"> ';
|
echo '<input type="text" tabindex="10" class="sp-edit-result hidden small-text" data-team="' . $team_id . '" data-key="' . $main_result . '" value="' . $team_result . '"> ';
|
||||||
echo $team->post_title;
|
echo $team->post_title;
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
@@ -175,11 +175,6 @@ class SP_Admin_CPT_Event extends SP_Admin_CPT {
|
|||||||
<a href="#inline-edit" class="button-secondary cancel alignleft"><?php _e( 'Cancel' ); ?></a>
|
<a href="#inline-edit" class="button-secondary cancel alignleft"><?php _e( 'Cancel' ); ?></a>
|
||||||
<?php wp_nonce_field( 'sp-save-inline-results', 'sp-inline-nonce', false ); ?>
|
<?php wp_nonce_field( 'sp-save-inline-results', 'sp-inline-nonce', false ); ?>
|
||||||
<a href="#inline-edit" class="button-primary save alignright"><?php _e( 'Update' ); ?></a>
|
<a href="#inline-edit" class="button-primary save alignright"><?php _e( 'Update' ); ?></a>
|
||||||
<span class="spinner"></span>
|
|
||||||
<input type="hidden" name="post_view" value="<?php echo esc_attr( $m ); ?>" />
|
|
||||||
<input type="hidden" name="screen" value="<?php echo esc_attr( $screen->id ); ?>" />
|
|
||||||
<span class="error" style="display:none"></span>
|
|
||||||
<br class="clear" />
|
|
||||||
</p>
|
</p>
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class SP_Admin_CPT_Player extends SP_Admin_CPT {
|
|||||||
unset( $existing_columns['author'], $existing_columns['date'] );
|
unset( $existing_columns['author'], $existing_columns['date'] );
|
||||||
$columns = array_merge( array(
|
$columns = array_merge( array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'sp_number' => '<span class="dashicons sp-icon-tshirt tips" title="' . __( 'Number', 'sportspress' ) . '"></span>',
|
'sp_number' => '<span class="dashicons sp-icon-tshirt sp-tip" title="' . __( 'Number', 'sportspress' ) . '"></span>',
|
||||||
'title' => null,
|
'title' => null,
|
||||||
'sp_position' => __( 'Positions', 'sportspress' ),
|
'sp_position' => __( 'Positions', 'sportspress' ),
|
||||||
'sp_team' => __( 'Teams', 'sportspress' ),
|
'sp_team' => __( 'Teams', 'sportspress' ),
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class SP_Admin_CPT_Team extends SP_Admin_CPT {
|
|||||||
unset( $existing_columns['author'], $existing_columns['date'] );
|
unset( $existing_columns['author'], $existing_columns['date'] );
|
||||||
$columns = array_merge( array(
|
$columns = array_merge( array(
|
||||||
'cb' => '<input type="checkbox" />',
|
'cb' => '<input type="checkbox" />',
|
||||||
'sp_icon' => '<span class="dashicons sp-icon-shield tips" title="' . __( 'Logo', 'sportspress' ) . '"></span>',
|
'sp_icon' => '<span class="dashicons sp-icon-shield sp-tip" title="' . __( 'Logo', 'sportspress' ) . '"></span>',
|
||||||
'title' => null,
|
'title' => null,
|
||||||
'sp_url' => __( 'URL', 'sportspress' ),
|
'sp_url' => __( 'URL', 'sportspress' ),
|
||||||
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),
|
'sp_abbreviation' => __( 'Abbreviation', 'sportspress' ),
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ class SP_Meta_Box_Calendar_Data {
|
|||||||
$main_results[] = $team_result;
|
$main_results[] = $team_result;
|
||||||
unset( $team_results['outcome'] );
|
unset( $team_results['outcome'] );
|
||||||
$team_results = implode( ' | ', $team_results );
|
$team_results = implode( ' | ', $team_results );
|
||||||
echo '<a class="result tips" title="' . $team_results . '" href="' . get_edit_post_link( $event->ID ) . '">' . $team_result . '</a> ';
|
echo '<a class="result sp-tip" title="' . $team_results . '" href="' . get_edit_post_link( $event->ID ) . '">' . $team_result . '</a> ';
|
||||||
endif;
|
endif;
|
||||||
|
|
||||||
echo $name . '<br>';
|
echo $name . '<br>';
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class SP_Meta_Box_Event_Teams {
|
|||||||
sp_dropdown_taxonomies( $args );
|
sp_dropdown_taxonomies( $args );
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
<?php if ( 'teams' == get_option( 'sportspress_mode', 'teams' ) ) { ?>
|
<?php if ( 'team' == get_option( 'sportspress_mode', 'team' ) ) { ?>
|
||||||
<p class="sp-tab-select sp-title-generator">
|
<p class="sp-tab-select sp-title-generator">
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
@@ -61,7 +61,6 @@ class SP_Meta_Box_Event_Teams {
|
|||||||
'name' => 'sp_team[]',
|
'name' => 'sp_team[]',
|
||||||
'class' => 'sportspress-pages',
|
'class' => 'sportspress-pages',
|
||||||
'show_option_none' => __( '— None —', 'sportspress' ),
|
'show_option_none' => __( '— None —', 'sportspress' ),
|
||||||
'show_option_all' => __( '— Individual —', 'sportspress' ),
|
|
||||||
'values' => 'ID',
|
'values' => 'ID',
|
||||||
'selected' => $team,
|
'selected' => $team,
|
||||||
);
|
);
|
||||||
@@ -88,7 +87,7 @@ class SP_Meta_Box_Event_Teams {
|
|||||||
* Save meta box data
|
* Save meta box data
|
||||||
*/
|
*/
|
||||||
public static function save( $post_id, $post ) {
|
public static function save( $post_id, $post ) {
|
||||||
if ( 'teams' == get_option( 'sportspress_mode', 'teams' ) ) {
|
if ( 'team' == get_option( 'sportspress_mode', 'team' ) ) {
|
||||||
sp_update_post_meta_recursive( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
|
sp_update_post_meta_recursive( $post_id, 'sp_team', sp_array_value( $_POST, 'sp_team', array() ) );
|
||||||
}
|
}
|
||||||
sp_update_post_meta_recursive( $post_id, 'sp_player', sp_array_value( $_POST, 'sp_player', array() ) );
|
sp_update_post_meta_recursive( $post_id, 'sp_player', sp_array_value( $_POST, 'sp_player', array() ) );
|
||||||
|
|||||||
@@ -98,13 +98,12 @@ class SP_Meta_Box_Player_Statistics {
|
|||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<td>
|
<td>
|
||||||
<?php $value = sp_array_value( $leagues, $div_id, '-1' ); ?>
|
<?php $value = sp_array_value( $leagues, $div_id, '-1' ); ?>
|
||||||
<?php if ( 'teams' == get_option( 'sportspress_mode', 'teams' ) ) { ?>
|
<?php if ( 'team' == get_option( 'sportspress_mode', 'team' ) ) { ?>
|
||||||
<?php
|
<?php
|
||||||
$args = array(
|
$args = array(
|
||||||
'post_type' => 'sp_team',
|
'post_type' => 'sp_team',
|
||||||
'name' => 'sp_leagues[' . $league_id . '][' . $div_id . ']',
|
'name' => 'sp_leagues[' . $league_id . '][' . $div_id . ']',
|
||||||
'show_option_none' => __( '— None —', 'sportspress' ),
|
'show_option_none' => __( '— None —', 'sportspress' ),
|
||||||
'show_option_all' => __( '— Individual —', 'sportspress' ),
|
|
||||||
'sort_order' => 'ASC',
|
'sort_order' => 'ASC',
|
||||||
'sort_column' => 'menu_order',
|
'sort_column' => 'menu_order',
|
||||||
'selected' => $value,
|
'selected' => $value,
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class SP_Meta_Box_Table_Data {
|
|||||||
<table class="widefat sp-data-table sp-league-table">
|
<table class="widefat sp-data-table sp-league-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="radio"><span class="dashicons sp-icon-shield tips" title="<?php _e( 'Highlight', 'sportspress' ); ?>"></span></th>
|
<th class="radio"><span class="dashicons sp-icon-shield sp-tip" title="<?php _e( 'Highlight', 'sportspress' ); ?>"></span></th>
|
||||||
<th><?php _e( 'Team', 'sportspress' ); ?></th>
|
<th><?php _e( 'Team', 'sportspress' ); ?></th>
|
||||||
<?php foreach ( $columns as $key => $label ): ?>
|
<?php foreach ( $columns as $key => $label ): ?>
|
||||||
<th><label for="sp_columns_<?php echo $key; ?>">
|
<th><label for="sp_columns_<?php echo $key; ?>">
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<div id="debug-report"><textarea readonly="readonly"></textarea></div>
|
<div id="debug-report"><textarea readonly="readonly"></textarea></div>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
<table class="sp_status_table widefat" cellspacing="0">
|
<table class="sp-status-table widefat" cellspacing="0">
|
||||||
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -509,7 +509,7 @@
|
|||||||
|
|
||||||
var report = "";
|
var report = "";
|
||||||
|
|
||||||
jQuery('.sp_status_table thead, .sp_status_table tbody').each(function(){
|
jQuery('.sp-status-table thead, .sp-status-table tbody').each(function(){
|
||||||
|
|
||||||
if ( jQuery( this ).is('thead') ) {
|
if ( jQuery( this ).is('thead') ) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user