Add single player metrics EOS table functionality
This commit is contained in:
@@ -90,16 +90,16 @@
|
||||
#sp_profilediv .wp-editor-container {
|
||||
background-color:#fff;
|
||||
}
|
||||
.sp-stats-table td {
|
||||
.sp-data-table td {
|
||||
padding: 4px 7px;
|
||||
line-height: 2;
|
||||
}
|
||||
.sp-stats-table td:first-child {
|
||||
.sp-data-table td:first-child {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.sp-stats-table input[type="text"],
|
||||
.sp-stats-table input[type="number"],
|
||||
.sp-stats-table select {
|
||||
.sp-data-table input[type="text"],
|
||||
.sp-data-table input[type="number"],
|
||||
.sp-data-table select {
|
||||
min-width: 14px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -41,10 +41,10 @@ jQuery(document).ready(function($){
|
||||
});
|
||||
|
||||
// Total stats calculator
|
||||
$('.sp-stats-table .sp-total input').on('updateTotal', function() {
|
||||
$('.sp-data-table .sp-total input').on('updateTotal', function() {
|
||||
index = $(this).parent().index();
|
||||
var sum = 0;
|
||||
$(this).closest('.sp-stats-table').find('.sp-post').each(function() {
|
||||
$(this).closest('.sp-data-table').find('.sp-post').each(function() {
|
||||
val = $(this).find('td').eq(index).find('input').val();
|
||||
if(val == '') {
|
||||
val = $(this).find('td').eq(index).find('input').attr('placeholder');
|
||||
@@ -57,9 +57,9 @@ jQuery(document).ready(function($){
|
||||
});
|
||||
|
||||
// Activate total stats calculator
|
||||
if($('.sp-stats-table .sp-total').size()) {
|
||||
$('.sp-stats-table .sp-post td input').on('keyup', function() {
|
||||
$(this).closest('.sp-stats-table').find('.sp-total td').eq($(this).parent().index()).find('input').trigger('updateTotal');
|
||||
if($('.sp-data-table .sp-total').size()) {
|
||||
$('.sp-data-table .sp-post td input').on('keyup', function() {
|
||||
$(this).closest('.sp-data-table').find('.sp-total td').eq($(this).parent().index()).find('input').trigger('updateTotal');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user