diff --git a/data/interfaces/default/css/tautulli.css b/data/interfaces/default/css/tautulli.css index 61b1af65..a34b4777 100644 --- a/data/interfaces/default/css/tautulli.css +++ b/data/interfaces/default/css/tautulli.css @@ -473,6 +473,21 @@ fieldset[disabled] .btn-bright.active { background-color: #ac2925; border-color: #761c19; } +.btn-dark.btn-download:hover { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-dark.btn-download.active { + color: #fff; + background-color: #449d44; + border-color: #398439; +} +.btn-dark.btn-download.active:hover { + color: #fff; + background-color: #398439; + border-color: #255625; +} .btn-group select { margin-top: 0; } diff --git a/data/interfaces/default/js/tables/export_table.js b/data/interfaces/default/js/tables/export_table.js new file mode 100644 index 00000000..cde8c815 --- /dev/null +++ b/data/interfaces/default/js/tables/export_table.js @@ -0,0 +1,100 @@ +var date_format = 'YYYY-MM-DD'; +var time_format = 'hh:mm a'; + +$.ajax({ + url: 'get_date_formats', + type: 'GET', + success: function (data) { + date_format = data.date_format; + time_format = data.time_format; + } +}); + +export_table_options = { + "destroy": true, + "language": { + "search": "Search: ", + "lengthMenu": "Show _MENU_ entries per page", + "info": "Showing _START_ to _END_ of _TOTAL_ library items", + "infoEmpty": "Showing 0 to 0 of 0 entries", + "infoFiltered": "
", + "emptyTable": "No data in table", + "loadingRecords": ' Loading items...' + }, + "pagingType": "full_numbers", + "stateSave": true, + "stateDuration": 0, + "processing": false, + "serverSide": true, + "pageLength": 25, + "order": [0, 'desc'], + "autoWidth": false, + "scrollX": true, + "columnDefs": [ + { + "targets": [0], + "data": "timestamp", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData !== '') { + $(td).html(moment(cellData, "X").format(date_format + ' ' + time_format)); + } + }, + "width": "10%", + "className": "no-wrap" + }, + { + "targets": [1], + "data": "media_type_title", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData !== '') { + $(td).html(cellData); + } + }, + "width": "10%", + "className": "no-wrap" + }, + { + "targets": [2], + "data": "rating_key", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData !== '') { + $(td).html(cellData); + } + }, + "width": "10%", + "className": "no-wrap" + }, + { + "targets": [3], + "data": "filename", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData !== '') { + $(td).html(cellData); + } + }, + "width": "60%", + "className": "no-wrap" + }, + { + "targets": [4], + "data": "complete", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData === 1) { + $(td).html(''); + } else { + $(td).html(''); + } + }, + "width": "10%" + } + ], + "drawCallback": function (settings) { + // Jump to top of page + //$('html,body').scrollTop(0); + $('#ajaxMsg').fadeOut(); + }, + "preDrawCallback": function(settings) { + var msg = " Fetching rows..."; + showMsg(msg, false, false, 0) + } +}; diff --git a/data/interfaces/default/library.html b/data/interfaces/default/library.html index 99a2deaf..9c0eef45 100644 --- a/data/interfaces/default/library.html +++ b/data/interfaces/default/library.html @@ -93,6 +93,7 @@ DOCUMENTATION :: END % if _session['user_group'] == 'admin': % if data['section_id'] != LIVE_TV_SECTION_ID:Exported At | +Media Type | +Rating Key | +Filename | +Download | +
---|