mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 17:22:56 -07:00
Improve look of collections and playlists tables
This commit is contained in:
parent
c5ea50d480
commit
1061c334ae
7 changed files with 59 additions and 30 deletions
|
@ -24,7 +24,7 @@ collections_table_options = {
|
|||
"data": "title",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
$(td).html('<a href="' + page('info', rowData['ratingKey']) + '">' + cellData + '</a>');
|
||||
$(td).html('<a href="' + page('info', rowData['ratingKey']) + '"><i class="fa fa-blank fa-fw"></i>' + cellData + '</a>');
|
||||
}
|
||||
},
|
||||
"width": "50%",
|
||||
|
@ -35,7 +35,17 @@ collections_table_options = {
|
|||
"data": "collectionMode",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
$(td).html(cellData);
|
||||
var mode = '';
|
||||
if (cellData === -1) {
|
||||
mode = 'Library default';
|
||||
} else if (cellData === 0) {
|
||||
mode = 'Hide collection';
|
||||
} else if (cellData === 1) {
|
||||
mode = 'Hide items in this collection';
|
||||
} else if (cellData === 2) {
|
||||
mode = 'Show this collection and its items';
|
||||
}
|
||||
$(td).html(mode);
|
||||
}
|
||||
},
|
||||
"width": "20%",
|
||||
|
@ -46,7 +56,13 @@ collections_table_options = {
|
|||
"data": "collectionSort",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
$(td).html(cellData);
|
||||
var sort = '';
|
||||
if (cellData === 0) {
|
||||
sort = 'Release date';
|
||||
} else if (cellData === 1) {
|
||||
sort = 'Alphabetical';
|
||||
}
|
||||
$(td).html(sort);
|
||||
}
|
||||
},
|
||||
"width": "20%",
|
||||
|
|
|
@ -24,10 +24,14 @@ playlists_table_options = {
|
|||
"data": "title",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
$(td).html('<a href="' + page('info', rowData['ratingKey']) + '§ion_id=' + rowData['librarySectionID'] +'">' + cellData + '</a>');
|
||||
var smart = '<i class="fa fa-blank fa-fw"></i>';
|
||||
if (rowData['smart']) {
|
||||
smart = '<span class="media-type-tooltip" data-toggle="tooltip" title="Smart Playlist"><i class="fa fa-cog fa-fw"></i></span> '
|
||||
}
|
||||
$(td).html('<a href="' + page('info', rowData['ratingKey']) + '§ion_id=' + rowData['librarySectionID'] +'">' + smart + cellData + '</a>');
|
||||
}
|
||||
},
|
||||
"width": "50%",
|
||||
"width": "60%",
|
||||
"className": "no-wrap"
|
||||
},
|
||||
{
|
||||
|
@ -51,27 +55,23 @@ playlists_table_options = {
|
|||
},
|
||||
"width": "20%",
|
||||
"className": "no-wrap"
|
||||
},
|
||||
{
|
||||
"targets": [3],
|
||||
"data": "smart",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
$(td).html(cellData);
|
||||
}
|
||||
},
|
||||
"width": "10%",
|
||||
"className": "no-wrap"
|
||||
}
|
||||
],
|
||||
"drawCallback": function (settings) {
|
||||
// Jump to top of page
|
||||
//$('html,body').scrollTop(0);
|
||||
$('#ajaxMsg').fadeOut();
|
||||
|
||||
// Create the tooltips.
|
||||
$('body').tooltip({
|
||||
selector: '[data-toggle="tooltip"]',
|
||||
container: 'body'
|
||||
});
|
||||
},
|
||||
"preDrawCallback": function(settings) {
|
||||
var msg = "<i class='fa fa-refresh fa-spin'></i> Fetching rows...";
|
||||
showMsg(msg, false, false, 0);
|
||||
$('[data-toggle="tooltip"]').tooltip('destroy');
|
||||
},
|
||||
"rowCallback": function (row, rowData, rowIndex) {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue