Add "player" to tables

* Also rename user platforms to user players
* Fix other platform vs. player ambiguities
This commit is contained in:
Jonathan Wong 2015-09-29 22:43:23 -07:00
parent f1c4bf6249
commit 2616e14c83
15 changed files with 128 additions and 61 deletions

View file

@ -100,7 +100,18 @@ history_table_options = {
},
{
"targets": [4],
"data":"player",
"data":"platform",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
$(td).html(cellData);
}
},
"width": "8%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
},
{
"targets": [5],
"data": "player",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
var transcode_dec = '';
@ -114,11 +125,11 @@ history_table_options = {
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + '&nbsp;' + cellData + '</div></a></div>');
}
},
"width": "15%",
"width": "12%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
},
{
"targets": [5],
"targets": [6],
"data":"full_title",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
@ -145,7 +156,7 @@ history_table_options = {
"width": "35%"
},
{
"targets": [6],
"targets": [7],
"data":"started",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData === null) {
@ -159,7 +170,7 @@ history_table_options = {
"className": "no-wrap hidden-sm hidden-xs"
},
{
"targets": [7],
"targets": [8],
"data":"paused_counter",
"render": function (data, type, full) {
if (data !== null) {
@ -173,7 +184,7 @@ history_table_options = {
"className": "no-wrap hidden-md hidden-sm hidden-xs"
},
{
"targets": [8],
"targets": [9],
"data":"stopped",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData === null) {
@ -187,7 +198,7 @@ history_table_options = {
"className": "no-wrap hidden-sm hidden-xs"
},
{
"targets": [9],
"targets": [10],
"data":"duration",
"render": function (data, type, full) {
if (data !== null) {
@ -201,7 +212,7 @@ history_table_options = {
"className": "no-wrap hidden-xs"
},
{
"targets": [10],
"targets": [11],
"data": "watched_status",
"render": function (data, type, full) {
if (data == 1) {
@ -462,6 +473,7 @@ function childTableFormat(rowData) {
'<th align="left" id="friendly_name">User</th>' +
'<th align="left" id="ip_address">IP Address</th>' +
'<th align="left" id="platform">Platform</th>' +
'<th align="left" id="platform">Player</th>' +
'<th align="left" id="title">Title</th>' +
'<th align="left" id="started">Started</th>' +
'<th align="left" id="paused_counter">Paused</th>' +

View file

@ -67,13 +67,13 @@ sync_table_options = {
},
{
"targets": [4],
"data": "device_name",
"className": "no-wrap hidden-xs"
"data": "platform",
"className": "no-wrap hidden-sm hidden-xs"
},
{
"targets": [5],
"data": "platform",
"className": "no-wrap hidden-sm hidden-xs"
"data": "device_name",
"className": "no-wrap hidden-xs"
},
{
"targets": [6],

View file

@ -49,7 +49,18 @@ user_ip_table_options = {
},
{
"targets": [2],
"data":"platform",
"data": "platform",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
$(td).html(cellData);
}
},
"width": "15%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
},
{
"targets": [3],
"data":"player",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData) {
var transcode_dec = '';
@ -69,7 +80,7 @@ user_ip_table_options = {
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
},
{
"targets": [3],
"targets": [4],
"data":"last_watched",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
@ -94,10 +105,11 @@ user_ip_table_options = {
}
}
},
"width": "30%",
"className": "hidden-sm hidden-xs"
},
{
"targets": [4],
"targets": [5],
"data":"play_count",
"searchable": false,
"width": "10%"

View file

@ -64,7 +64,7 @@ users_list_table_options = {
$(td).html(cellData);
}
},
"width": "12%",
"width": "10%",
"className": "edit-user-control no-wrap"
},
{
@ -78,7 +78,7 @@ users_list_table_options = {
}
},
"searchable": false,
"width": "12%",
"width": "10%",
"className": "no-wrap hidden-xs"
},
{
@ -99,12 +99,25 @@ users_list_table_options = {
$(td).html('n/a');
}
},
"width": "12%",
"width": "10%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control-ip"
},
{
"targets": [5],
"data":"platform",
"data": "platform",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
$(td).html(cellData);
} else {
$(td).html('n/a');
}
},
"width": "10%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
},
{
"targets": [6],
"data":"player",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData) {
var transcode_dec = '';
@ -120,11 +133,11 @@ users_list_table_options = {
$(td).html('n/a');
}
},
"width": "12%",
"width": "15%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
},
{
"targets": [6],
"targets": [7],
"data":"last_watched",
"createdCell": function (td, cellData, rowData, row, col) {
if (cellData !== '') {
@ -153,7 +166,7 @@ users_list_table_options = {
"className": "hidden-sm hidden-xs"
},
{
"targets": [7],
"targets": [8],
"data": "plays",
"searchable": false,
"width": "10%"