Add side scrolling datatables

This commit is contained in:
JonnyWong16 2016-05-14 10:46:26 -07:00
parent b47f542df7
commit 9e1c4b1a88
19 changed files with 137 additions and 93 deletions

View file

@ -29,6 +29,7 @@ history_table_options = {
"pageLength": 25,
"order": [ 1, 'desc'],
"autoWidth": false,
"scrollX": true,
"columnDefs": [
{
"targets": [0],
@ -75,7 +76,7 @@ history_table_options = {
}
},
"width": "9%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [3],
@ -97,7 +98,7 @@ history_table_options = {
}
},
"width": "8%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control-ip"
"className": "no-wrap modal-control-ip"
},
{
"targets": [4],
@ -108,7 +109,7 @@ history_table_options = {
}
},
"width": "10%",
"className": "no-wrap hidden-md hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [5],
@ -127,7 +128,7 @@ history_table_options = {
}
},
"width": "12%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
"className": "no-wrap modal-control"
},
{
"targets": [6],
@ -157,8 +158,9 @@ history_table_options = {
}
}
},
"width": "33%"
},
"width": "33%",
"className": "datatable-wrap"
},
{
"targets": [7],
"data":"started",
@ -171,7 +173,7 @@ history_table_options = {
},
"searchable": false,
"width": "5%",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [8],
@ -185,7 +187,7 @@ history_table_options = {
},
"searchable": false,
"width": "5%",
"className": "no-wrap hidden-md hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [9],
@ -199,7 +201,7 @@ history_table_options = {
},
"searchable": false,
"width": "5%",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [10],
@ -213,7 +215,7 @@ history_table_options = {
},
"searchable": false,
"width": "5%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [11],
@ -229,7 +231,7 @@ history_table_options = {
},
"searchable": false,
"orderable": false,
"className": "no-wrap hidden-md hidden-sm hidden-xs",
"className": "no-wrap",
"width": "2%"
},
],

View file

@ -27,7 +27,8 @@ history_table_modal_options = {
"pageLength": 10,
"lengthChange": false,
"autoWidth": false,
"order": [ 0, 'desc'],
"scrollX": true,
"order": [0, 'desc'],
"columnDefs": [
{
"targets": [0],
@ -72,7 +73,7 @@ history_table_modal_options = {
}
},
"width": "15%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [3],
@ -91,7 +92,7 @@ history_table_modal_options = {
}
},
"width": "25%",
"className": "no-wrap hidden-sm hidden-xs modal-control"
"className": "no-wrap modal-control"
},
{
"targets": [4],
@ -121,7 +122,8 @@ history_table_modal_options = {
}
}
},
"width": "40%"
"width": "40%",
"className": "datatable-wrap"
}
],
"drawCallback": function (settings) {

View file

@ -16,9 +16,10 @@ libraries_list_table_options = {
"serverSide": true,
"pageLength": 10,
"order": [ 2, 'asc'],
"autoWidth": true,
"stateSave": true,
"pagingType": "full_numbers",
"autoWidth": false,
"scrollX": true,
"columnDefs": [
{
"targets": [0],
@ -80,7 +81,7 @@ libraries_list_table_options = {
}
},
"width": "10%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [4],
@ -92,7 +93,7 @@ libraries_list_table_options = {
},
"width": "10%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [5],
@ -104,7 +105,7 @@ libraries_list_table_options = {
},
"width": "10%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [6],
@ -116,7 +117,7 @@ libraries_list_table_options = {
},
"width": "10%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [7],
@ -130,7 +131,7 @@ libraries_list_table_options = {
},
"searchable": false,
"width": "10%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [8],
@ -182,7 +183,7 @@ libraries_list_table_options = {
}
},
"width": "18%",
"className": "hidden-sm hidden-xs"
"className": "datatable-wrap"
},
{
"targets": [9],
@ -193,7 +194,8 @@ libraries_list_table_options = {
}
},
"searchable": false,
"width": "7%"
"width": "7%",
"className": "no-wrap"
},
{
"targets": [10],
@ -204,7 +206,8 @@ libraries_list_table_options = {
}
},
"searchable": false,
"width": "10%"
"width": "10%",
"className": "no-wrap"
}
],

View file

@ -16,6 +16,7 @@ login_table_options = {
"pageLength": 10,
"order": [0, 'desc'],
"autoWidth": false,
"scrollX": true,
"columnDefs": [
{
"targets": [0],
@ -45,7 +46,7 @@ login_table_options = {
},
"searchable": false,
"width": "10%",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [2],

View file

@ -7,7 +7,7 @@ var log_table_options = {
"pageLength": 50,
"stateSave": true,
"language": {
"search":"Search: ",
"search": "Search: ",
"lengthMenu": "Show _MENU_ lines per page",
"emptyTable": "No log information available",
"info": "Showing _START_ to _END_ of _TOTAL_ lines",
@ -15,16 +15,18 @@ var log_table_options = {
"infoFiltered": "(filtered from _MAX_ total lines)",
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
},
"autoWidth": false,
"scrollX": true,
"columnDefs": [
{
"targets": [0],
"width": "15%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [1],
"width": "10%",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [2],

View file

@ -30,6 +30,7 @@ media_info_table_options = {
"pageLength": 25,
"order": [ 1, 'asc'],
"autoWidth": false,
"scrollX": true,
"columnDefs": [
{
"targets": [0],
@ -107,8 +108,9 @@ media_info_table_options = {
}
}
},
"width": "20%"
},
"width": "20%",
"className": "no-wrap",
},
{
"targets": [2],
"data": "container",
@ -118,7 +120,7 @@ media_info_table_options = {
}
},
"width": "6%",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [3],
@ -129,7 +131,7 @@ media_info_table_options = {
}
},
"width": "6%",
"className": "no-wrap hidden-md hidden-sm hidden-xs",
"className": "no-wrap",
"searchable": false
},
{
@ -141,7 +143,7 @@ media_info_table_options = {
}
},
"width": "8%",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [5],
@ -152,7 +154,7 @@ media_info_table_options = {
}
},
"width": "8%",
"className": "no-wrap hidden-md hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [6],
@ -163,7 +165,7 @@ media_info_table_options = {
}
},
"width": "8%",
"className": "no-wrap hidden-md hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [7],
@ -174,7 +176,7 @@ media_info_table_options = {
}
},
"width": "8%",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [8],
@ -185,7 +187,7 @@ media_info_table_options = {
}
},
"width": "8%",
"className": "no-wrap hidden-md hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [9],
@ -200,7 +202,7 @@ media_info_table_options = {
}
},
"width": "7%",
"className": "no-wrap hidden-md hidden-sm hidden-xs",
"className": "no-wrap",
"searchable": false
},
{
@ -213,7 +215,7 @@ media_info_table_options = {
}
},
"width": "7%",
"className": "no-wrap hidden-xs",
"className": "no-wrap",
"searchable": false
},
{
@ -225,7 +227,7 @@ media_info_table_options = {
}
},
"width": "5%",
"className": "no-wrap hidden-xs",
"className": "no-wrap",
"searchable": false
}
],

View file

@ -15,6 +15,8 @@ notification_log_table_options = {
"infoFiltered": "(filtered from _MAX_ total lines)",
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
},
"autoWidth": false,
"scrollX": true,
"columnDefs": [
{
"targets": [0],
@ -25,7 +27,7 @@ notification_log_table_options = {
}
},
"width": "10%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [1],
@ -36,7 +38,7 @@ notification_log_table_options = {
}
},
"width": "7%",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [2],
@ -46,7 +48,8 @@ notification_log_table_options = {
$(td).html(cellData);
}
},
"width": "5%"
"width": "5%",
"className": "no-wrap"
},
{
"targets": [3],

View file

@ -1,7 +1,7 @@
var plex_log_table_options = {
"destroy": true,
"serverSide": true,
"processing": false,
"serverSide": false,
"pagingType": "full_numbers",
"order": [ 0, 'desc'],
"pageLength": 50,
@ -15,20 +15,31 @@ var plex_log_table_options = {
"infoFiltered": "(filtered from _MAX_ total lines)",
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
},
"autoWidth": false,
"scrollX": true,
"columnDefs": [
{
"targets": [0],
"width": "15%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [1],
"width": "10%",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [2],
"width": "75%"
}
]
],
"drawCallback": function (settings) {
// Jump to top of page
//$('html,body').scrollTop(0);
$('#ajaxMsg').fadeOut();
},
"preDrawCallback": function(settings) {
var msg = "<i class='fa fa-refresh fa-spin'></i>&nbspFetching rows...";
showMsg(msg, false, false, 0)
}
}

View file

@ -14,6 +14,8 @@ sync_table_options = {
"infoFiltered": "(filtered from _MAX_ total lines)",
"loadingRecords": '<i class="fa fa-refresh fa-spin"></i> Loading items...</div>'
},
"autoWidth": false,
"scrollX": true,
"columnDefs": [
{
"targets": [0],
@ -26,7 +28,7 @@ sync_table_options = {
$(td).html(cellData.toProperCase());
}
},
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [1],
@ -55,25 +57,26 @@ sync_table_options = {
$(td).html(cellData);
}
}
}
},
},
"className": "datatable-wrap"
},
{
"targets": [3],
"data": "metadata_type",
"render": function ( data, type, full ) {
return data.toProperCase();
},
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [4],
"data": "platform",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [5],
"data": "device_name",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [6],
@ -86,22 +89,22 @@ sync_table_options = {
$(td).html('0MB');
}
},
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [7],
"data": "item_count",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [8],
"data": "item_complete_count",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [9],
"data": "item_downloaded_count",
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [10],
@ -113,7 +116,7 @@ sync_table_options = {
$(td).html('<span class="badge">0%</span>');
}
},
"className": "no-wrap hidden-sm hidden-xs"
"className": "no-wrap"
}
],
"drawCallback": function (settings) {

View file

@ -16,6 +16,7 @@ user_ip_table_options = {
"pageLength": 10,
"order": [ 0, 'desc'],
"autoWidth": false,
"scrollX": true,
"columnDefs": [
{
"targets": [0],
@ -25,7 +26,7 @@ user_ip_table_options = {
},
"searchable": false,
"width": "15%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [1],
@ -58,7 +59,7 @@ user_ip_table_options = {
}
},
"width": "15%",
"className": "no-wrap hidden-md hidden-sm hidden-xs"
"className": "no-wrap"
},
{
"targets": [3],
@ -79,7 +80,7 @@ user_ip_table_options = {
}
},
"width": "15%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
"className": "no-wrap modal-control"
},
{
"targets": [4],
@ -112,13 +113,14 @@ user_ip_table_options = {
}
},
"width": "30%",
"className": "hidden-sm hidden-xs"
"className": "datatable-wrap"
},
{
"targets": [5],
"data":"play_count",
"searchable": false,
"width": "10%"
"width": "10%",
"className": "no-wrap"
}
],
"drawCallback": function (settings) {

View file

@ -33,9 +33,10 @@ users_list_table_options = {
"serverSide": true,
"pageLength": 10,
"order": [ 2, 'asc'],
"autoWidth": true,
"stateSave": true,
"pagingType": "full_numbers",
"autoWidth": false,
"scrollX": true,
"columnDefs": [
{
"targets": [0],
@ -97,7 +98,7 @@ users_list_table_options = {
},
"searchable": false,
"width": "10%",
"className": "no-wrap hidden-xs"
"className": "no-wrap"
},
{
"targets": [4],
@ -118,7 +119,7 @@ users_list_table_options = {
}
},
"width": "10%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control-ip"
"className": "no-wrap modal-control-ip"
},
{
"targets": [5],
@ -131,7 +132,7 @@ users_list_table_options = {
}
},
"width": "10%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
"className": "no-wrap modal-control"
},
{
"targets": [6],
@ -152,7 +153,7 @@ users_list_table_options = {
}
},
"width": "15%",
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
"className": "no-wrap modal-control"
},
{
"targets": [7],
@ -185,7 +186,7 @@ users_list_table_options = {
}
},
"width": "23%",
"className": "hidden-sm hidden-xs"
"className": "datatable-wrap"
},
{
"targets": [8],
@ -196,7 +197,8 @@ users_list_table_options = {
}
},
"searchable": false,
"width": "7%"
"width": "7%",
"className": "no-wrap"
},
{
"targets": [9],
@ -207,7 +209,8 @@ users_list_table_options = {
}
},
"searchable": false,
"width": "10%"
"width": "10%",
"className": "no-wrap"
}
],