diff --git a/assets/js/admin/sportspress-admin.js b/assets/js/admin/sportspress-admin.js index 7902341e..bfdd2234 100644 --- a/assets/js/admin/sportspress-admin.js +++ b/assets/js/admin/sportspress-admin.js @@ -827,4 +827,18 @@ jQuery(document).ready(function($){ $select.find('input[value='+val+']').attr('checked', true); $select.slideUp('fast').siblings('.sp-edit-event-status').show(); }); + + // Box score time converter + $('.sp-convert-time-input').change(function() { + var s = 0; + var val = $(this).val(); + var a = val.split(':').reverse(); + $.each(a, function( index, value ) { + s += parseInt(value) * Math.pow(60, index); + }); + $(this).siblings('.sp-convert-time-output').val(s); + }); + + // Trigger box score time converter + $('.sp-convert-time-input').change(); }); \ No newline at end of file diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php index 0a21b7a8..9935f577 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-performance.php @@ -418,7 +418,24 @@ class SP_Meta_Box_Event_Performance { $placeholder = sp_get_format_placeholder( sp_array_value( $formats, $column, 'number' ) ); ?> - + + + + + + + + +