From f7fa773ec7e1b65944d5879e851c7949fadf7e37 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Fri, 2 Oct 2020 22:03:33 -0700 Subject: [PATCH] Add thumb popover to collections and playlists tables --- .../default/js/tables/collections_table.js | 15 ++++++++++++++- .../default/js/tables/playlists_table.js | 14 +++++++++++++- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/data/interfaces/default/js/tables/collections_table.js b/data/interfaces/default/js/tables/collections_table.js index a3cde91c..27e92263 100644 --- a/data/interfaces/default/js/tables/collections_table.js +++ b/data/interfaces/default/js/tables/collections_table.js @@ -24,7 +24,8 @@ collections_table_options = { "data": "titleSort", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== '') { - $(td).html('' + rowData['title'] + ''); + var thumb_popover = '' + rowData['title'] + ''; + $(td).html('' + thumb_popover + ''); } }, "width": "50%", @@ -88,6 +89,18 @@ collections_table_options = { // Jump to top of page //$('html,body').scrollTop(0); $('#ajaxMsg').fadeOut(); + + $('body').popover({ + selector: '[data-toggle="popover"]', + html: true, + container: 'body', + trigger: 'hover', + placement: 'right', + template: '', + content: function () { + return '
'; + } + }); }, "preDrawCallback": function(settings) { var msg = "  Fetching rows..."; diff --git a/data/interfaces/default/js/tables/playlists_table.js b/data/interfaces/default/js/tables/playlists_table.js index 25474040..2c0a2a01 100644 --- a/data/interfaces/default/js/tables/playlists_table.js +++ b/data/interfaces/default/js/tables/playlists_table.js @@ -34,7 +34,8 @@ playlists_table_options = { } else if (rowData['librarySectionID']) { breadcrumb = '§ion_id=' + rowData['librarySectionID']; } - $(td).html('' + smart + cellData + ''); + var thumb_popover = '' + smart + cellData + ''; + $(td).html('' + thumb_popover + ''); } }, "width": "60%", @@ -77,6 +78,17 @@ playlists_table_options = { selector: '[data-toggle="tooltip"]', container: 'body' }); + $('body').popover({ + selector: '[data-toggle="popover"]', + html: true, + container: 'body', + trigger: 'hover', + placement: 'right', + template: '', + content: function () { + return '
'; + } + }); }, "preDrawCallback": function(settings) { var msg = "  Fetching rows...";