diff --git a/data/interfaces/default/css/plexpy.css b/data/interfaces/default/css/plexpy.css index 8b75c1db..d473e6fc 100644 --- a/data/interfaces/default/css/plexpy.css +++ b/data/interfaces/default/css/plexpy.css @@ -282,6 +282,10 @@ fieldset[disabled] .btn-bright.active { .modal-body i.fa { color: #fff; } +.modal-body td:hover a .fa, +.modal-body a:focus i.fa { + color: #f9aa03; +} .modal-body strong { color: #F9AA03; } @@ -2043,6 +2047,7 @@ a .home-platforms-instance-list-oval:hover, } .history-title .popover.right { margin-left: 12px; + z-index: 5; } .history-title .popover.right .popover-content { padding: 5px 8px; diff --git a/data/interfaces/default/history_table_modal.html b/data/interfaces/default/history_table_modal.html index cfff340d..152589eb 100644 --- a/data/interfaces/default/history_table_modal.html +++ b/data/interfaces/default/history_table_modal.html @@ -27,7 +27,8 @@ - + % else: diff --git a/data/interfaces/default/js/tables/history_table_modal.js b/data/interfaces/default/js/tables/history_table_modal.js index 1c684907..8a0afa22 100644 --- a/data/interfaces/default/js/tables/history_table_modal.js +++ b/data/interfaces/default/js/tables/history_table_modal.js @@ -74,6 +74,19 @@ history_table_modal_options = { { "targets": [3], "data":"player", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData !== '') { + var transcode_dec = ''; + if (rowData['video_decision'] === 'transcode') { + transcode_dec = ''; + } else if (rowData['video_decision'] === 'copy') { + transcode_dec = ''; + } else if (rowData['video_decision'] === 'direct play' || rowData['video_decision'] === '') { + transcode_dec = ''; + } + $(td).html('
' + transcode_dec + ' ' + cellData + '
'); + } + }, "className": "no-wrap hidden-sm hidden-xs modal-control" }, { @@ -81,14 +94,21 @@ history_table_modal_options = { "data":"full_title", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== '') { - if (rowData['media_type'] === 'movie' || rowData['media_type'] === 'episode') { - var transcode_dec = ''; - if (rowData['video_decision'] === 'transcode') { - transcode_dec = ' '; - } - $(td).html('
' + cellData + '
' + transcode_dec + '
'); + var media_type = ''; + var thumb_popover = ''; + if (rowData['media_type'] === 'movie') { + media_type = ''; + thumb_popover = '' + cellData + ' (' + rowData['year'] + ')' + $(td).html('
' + media_type + ' ' + thumb_popover + '
'); + } else if (rowData['media_type'] === 'episode') { + media_type = ''; + thumb_popover = '' + cellData + ' \ + (S' + ('00' + rowData['parent_media_index']).slice(-2) + 'E' + ('00' + rowData['media_index']).slice(-2) + ')' + $(td).html('
' + media_type + ' ' + thumb_popover + '
'); } else if (rowData['media_type'] === 'track') { - $(td).html('
' + cellData + '
'); + media_type = ''; + thumb_popover = '' + cellData + ' (' + rowData['parent_title'] + ')' + $(td).html('
' + media_type + ' ' + thumb_popover + '
'); } else { $(td).html('' + cellData + ''); } @@ -100,9 +120,40 @@ history_table_modal_options = { // Jump to top of page // $('html,body').scrollTop(0); $('#ajaxMsg').fadeOut(); + + // Create the tooltips. + $('.transcode-tooltip').tooltip(); + $('.media-type-tooltip').tooltip(); + $('.thumb-tooltip').popover({ + html: true, + trigger: 'hover', + placement: 'right', + content: function () { + return '
'; + } + }); }, "preDrawCallback": function(settings) { var msg = "
 Fetching rows...
"; showMsg(msg, false, false, 0) } -} \ No newline at end of file +} + +$('#history_table').on('click', 'td.modal-control', function () { + var tr = $(this).parents('tr'); + var row = history_table.row(tr); + var rowData = row.data(); + + function showStreamDetails() { + $.ajax({ + url: 'get_stream_data', + data: { row_id: rowData['id'], user: rowData['friendly_name'] }, + cache: false, + async: true, + complete: function (xhr, status) { + $("#info-modal").html(xhr.responseText); + } + }); + } + showStreamDetails(); +}); \ No newline at end of file