mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -07:00
Move icons to the left
* Added icons for "direct play" and "direct stream" * Separate icons for "movie" and "episode"
This commit is contained in:
parent
e94c00ca48
commit
3a703eb605
1 changed files with 36 additions and 15 deletions
|
@ -34,6 +34,7 @@ history_table_options = {
|
|||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
$(td).html('<button class="btn btn-xs btn-danger" data-id="' + rowData['id'] + '"><i class="fa fa-trash-o"></i> Delete</button>');
|
||||
},
|
||||
"width": "5%",
|
||||
"className": "delete-control no-wrap hidden",
|
||||
"searchable": false,
|
||||
"orderable": false
|
||||
|
@ -49,6 +50,7 @@ history_table_options = {
|
|||
}
|
||||
},
|
||||
"searchable": false,
|
||||
"width": "8%",
|
||||
"className": "no-wrap"
|
||||
},
|
||||
{
|
||||
|
@ -65,6 +67,7 @@ history_table_options = {
|
|||
$(td).html(cellData);
|
||||
}
|
||||
},
|
||||
"width": "8%",
|
||||
"className": "no-wrap hidden-xs"
|
||||
},
|
||||
{
|
||||
|
@ -85,6 +88,7 @@ history_table_options = {
|
|||
$(td).html('n/a');
|
||||
}
|
||||
},
|
||||
"width": "8%",
|
||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control-ip"
|
||||
},
|
||||
{
|
||||
|
@ -94,12 +98,16 @@ history_table_options = {
|
|||
if (cellData !== '') {
|
||||
var transcode_dec = '';
|
||||
if (rowData['video_decision'] === 'transcode') {
|
||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Transcode"><i class="fa fa-server"></i></span> ';
|
||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Transcode"><i class="fa fa-server fa-fw"></i></span> ';
|
||||
} else if (rowData['video_decision'] === 'copy') {
|
||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Stream"><i class="fa fa-video-camera fa-fw"></i></span> ';
|
||||
} else if (rowData['video_decision'] === 'direct play' || rowData['video_decision'] === '') {
|
||||
transcode_dec = '<span class="transcode-tooltip" data-toggle="tooltip" title="Direct Play"><i class="fa fa-play-circle fa-fw"></i></span> ';
|
||||
}
|
||||
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;"><i class="fa fa-lg fa-info-circle"></i> ' + cellData + '</div> \
|
||||
<div style="float: right; text-align: right; padding-right: 5px;">' + transcode_dec + '</div></a></div>');
|
||||
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + ' ' + cellData + '</div></a></div>');
|
||||
}
|
||||
},
|
||||
"width": "15%",
|
||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
||||
},
|
||||
{
|
||||
|
@ -107,18 +115,26 @@ history_table_options = {
|
|||
"data":"full_title",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
if (rowData['media_type'] === 'movie' || rowData['media_type'] === 'episode') {
|
||||
var media_type = rowData['media_type'][0].toUpperCase() + rowData['media_type'].substring(1);
|
||||
$(td).html('<div class="history-title"><a href="info?source=history&item_id=' + rowData['id'] + '"><div style="float: left;" class="thumb-tooltip" data-toggle="tooltip" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=80&height=120&fallback=poster">' + cellData + '</div> \
|
||||
<div style="float: right; text-align: right; padding-right: 5px;"><span class="media-type-tooltip" data-toggle="tooltip" title="' + media_type + '"><i class="fa fa-video-camera"></i></span></div></a></div>');
|
||||
var media_type = '';
|
||||
var thumb_popover = ''
|
||||
if (rowData['media_type'] === 'movie') {
|
||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Movie"><i class="fa fa-film fa-fw"></i></span>';
|
||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=80&height=120&fallback=poster" data-height="120">' + cellData + '</span>'
|
||||
$(td).html('<div class="history-title"><a href="info?source=history&item_id=' + rowData['id'] + '"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||
} else if (rowData['media_type'] === 'episode') {
|
||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Episode"><i class="fa fa-television fa-fw"></i></span>';
|
||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=80&height=120&fallback=poster" data-height="120">' + cellData + '</span>'
|
||||
$(td).html('<div class="history-title"><a href="info?source=history&item_id=' + rowData['id'] + '"><div style="float: left;" >' + media_type + ' ' + thumb_popover + '</div></a></div>');
|
||||
} else if (rowData['media_type'] === 'track') {
|
||||
$(td).html('<div class="history-title"><div style="float: left;" class="thumb-tooltip" data-toggle="tooltip" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=80&height=120&fallback=poster">' + cellData + '</div> \
|
||||
<div style="float: right; text-align: right; padding-right: 5px;"><span class="media-type-tooltip" data-toggle="tooltip" title="' + media_type + '"><i class="fa fa-music"></i></span></div></div>');
|
||||
media_type = '<span class="media-type-tooltip" data-toggle="tooltip" title="Track"><i class="fa fa-music fa-fw"></i></span>';
|
||||
thumb_popover = '<span class="thumb-tooltip" data-toggle="popover" data-img="pms_image_proxy?img=' + rowData['thumb'] + '&width=80&height=80&fallback=poster" data-height="80">' + cellData + '</span>'
|
||||
$(td).html('<div class="history-title"><div style="float: left;">' + media_type + ' ' + thumb_popover + '</div></div>');
|
||||
} else {
|
||||
$(td).html('<a href="info?item_id=' + rowData['id'] + '">' + cellData + '</a>');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"width": "35%"
|
||||
},
|
||||
{
|
||||
"targets": [6],
|
||||
|
@ -131,6 +147,7 @@ history_table_options = {
|
|||
}
|
||||
},
|
||||
"searchable": false,
|
||||
"width": "5%",
|
||||
"className": "no-wrap hidden-sm hidden-xs"
|
||||
},
|
||||
{
|
||||
|
@ -144,6 +161,7 @@ history_table_options = {
|
|||
}
|
||||
},
|
||||
"searchable": false,
|
||||
"width": "5%",
|
||||
"className": "no-wrap hidden-md hidden-sm hidden-xs"
|
||||
},
|
||||
{
|
||||
|
@ -157,6 +175,7 @@ history_table_options = {
|
|||
}
|
||||
},
|
||||
"searchable": false,
|
||||
"width": "5%",
|
||||
"className": "no-wrap hidden-sm hidden-xs"
|
||||
},
|
||||
{
|
||||
|
@ -170,6 +189,7 @@ history_table_options = {
|
|||
}
|
||||
},
|
||||
"searchable": false,
|
||||
"width": "5%",
|
||||
"className": "no-wrap hidden-xs"
|
||||
},
|
||||
{
|
||||
|
@ -177,17 +197,17 @@ history_table_options = {
|
|||
"data":"percent_complete",
|
||||
"render": function ( data, type, full ) {
|
||||
if (data > 80) {
|
||||
return '<i class="fa fa-lg fa-circle"></i>'
|
||||
return '<span class="watched-tooltip" data-toggle="tooltip" title="Watched"><i class="fa fa-lg fa-circle"></i></span>'
|
||||
} else if (data > 40) {
|
||||
return '<i class="fa fa-lg fa-adjust fa-rotate-180"></i>'
|
||||
return '<span class="watched-tooltip" data-toggle="tooltip" title="Partial"><i class="fa fa-lg fa-adjust fa-rotate-180"></i></span>'
|
||||
} else {
|
||||
return '<i class="fa fa-lg fa-circle-o"></i>'
|
||||
return '<span class="watched-tooltip" data-toggle="tooltip" title="Unwatched"><i class="fa fa-lg fa-circle-o"></i></span>'
|
||||
}
|
||||
},
|
||||
"searchable": false,
|
||||
"orderable": false,
|
||||
"className": "no-wrap hidden-md hidden-sm hidden-xs",
|
||||
"width": "10px"
|
||||
"width": "1%"
|
||||
},
|
||||
],
|
||||
"drawCallback": function (settings) {
|
||||
|
@ -198,12 +218,13 @@ history_table_options = {
|
|||
// Create the tooltips.
|
||||
$('.transcode-tooltip').tooltip();
|
||||
$('.media-type-tooltip').tooltip();
|
||||
$('.watched-tooltip').tooltip();
|
||||
$('.thumb-tooltip').popover({
|
||||
html: true,
|
||||
trigger: 'hover',
|
||||
placement: 'right',
|
||||
content: function () {
|
||||
return '<div style="background-image: url(' + $(this).data('img') + '); width: 80px; height: 120px;" />';
|
||||
return '<div style="background-image: url(' + $(this).data('img') + '); width: 80px; height: ' + $(this).data('height') + 'px;" />';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue