mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 21:21:15 -07:00
Give tables unique ids to save state indivdually
This commit is contained in:
parent
fa8c5e0982
commit
464d2a541d
4 changed files with 32 additions and 32 deletions
|
@ -348,21 +348,21 @@ DOCUMENTATION :: END
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
<table class="display" id="history_table" width="100%">
|
<table class="display" id="history_table-RK-${data['rating_key']}" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align='left' id="delete">Delete</th>
|
<th align="left" id="delete">Delete</th>
|
||||||
<th align='left' id="time">Time</th>
|
<th align="left" id="time">Time</th>
|
||||||
<th align='left' id="friendly_name">User</th>
|
<th align="left" id="friendly_name">User</th>
|
||||||
<th align='left' id="ip_address">IP Address</th>
|
<th align="left" id="ip_address">IP Address</th>
|
||||||
<th align='left' id="platform">Platform</th>
|
<th align="left" id="platform">Platform</th>
|
||||||
<th align='left' id="player">Player</th>
|
<th align="left" id="player">Player</th>
|
||||||
<th align='left' id="title">Title</th>
|
<th align="left" id="title">Title</th>
|
||||||
<th align='left' id="started">Started</th>
|
<th align="left" id="started">Started</th>
|
||||||
<th align='left' id="paused_counter">Paused</th>
|
<th align="left" id="paused_counter">Paused</th>
|
||||||
<th align='left' id="stopped">Stopped</th>
|
<th align="left" id="stopped">Stopped</th>
|
||||||
<th align='left' id="duration">Duration</th>
|
<th align="left" id="duration">Duration</th>
|
||||||
<th align='left' id="percent_complete"></th>
|
<th align="left" id="percent_complete"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody></tbody>
|
<tbody></tbody>
|
||||||
|
@ -458,11 +458,11 @@ DOCUMENTATION :: END
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
get_history();
|
get_history();
|
||||||
history_table = $('#history_table').DataTable(history_table_options);
|
history_table = $('#history_table-RK-${data["rating_key"]}').DataTable(history_table_options);
|
||||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
||||||
$(colvis.button()).appendTo('div.colvis-button-bar');
|
$(colvis.button()).appendTo('div.colvis-button-bar');
|
||||||
|
|
||||||
clearSearchButton('history_table', history_table);
|
clearSearchButton('history_table-RK-${data["rating_key"]}', history_table);
|
||||||
|
|
||||||
$('#row-edit-mode').on('click', function() {
|
$('#row-edit-mode').on('click', function() {
|
||||||
$('#row-edit-mode-alert').fadeIn(200);
|
$('#row-edit-mode-alert').fadeIn(200);
|
||||||
|
@ -521,7 +521,7 @@ DOCUMENTATION :: END
|
||||||
</script>
|
</script>
|
||||||
% if source == 'history':
|
% if source == 'history':
|
||||||
<script>
|
<script>
|
||||||
$('#row-edit-mode').after('<a href="update_metadata?rating_key=${data['rating_key']}&update=True" class="btn btn-danger btn-edit" id="fix-metadata"> \
|
$('#row-edit-mode').after('<a href="update_metadata?rating_key=${data["rating_key"]}&update=True" class="btn btn-danger btn-edit" id="fix-metadata"> \
|
||||||
<i class="fa fa-wrench"></i> Fix Metadata</a>');
|
<i class="fa fa-wrench"></i> Fix Metadata</a>');
|
||||||
</script>
|
</script>
|
||||||
% endif
|
% endif
|
||||||
|
|
|
@ -23,7 +23,7 @@ media_info_table_options = {
|
||||||
"emptyTable": "No data in table"
|
"emptyTable": "No data in table"
|
||||||
},
|
},
|
||||||
"pagingType": "bootstrap",
|
"pagingType": "bootstrap",
|
||||||
"stateSave": false,
|
"stateSave": true,
|
||||||
"processing": false,
|
"processing": false,
|
||||||
"serverSide": true,
|
"serverSide": true,
|
||||||
"pageLength": 25,
|
"pageLength": 25,
|
||||||
|
|
|
@ -186,7 +186,7 @@ DOCUMENTATION :: END
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
<table class="display" id="history_table" width="100%">
|
<table class="display" id="history_table-SID-${data['section_id']}" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left" id="delete">Delete</th>
|
<th align="left" id="delete">Delete</th>
|
||||||
|
@ -245,7 +245,7 @@ DOCUMENTATION :: END
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
<table class="display" id="media_info_table" width="100%">
|
<table class="display" id="media_info_table-SID-${data['section_id']}" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left" id="added_at">Added At</th>
|
<th align="left" id="added_at">Added At</th>
|
||||||
|
@ -380,12 +380,12 @@ DOCUMENTATION :: END
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
history_table = $('#history_table').DataTable(history_table_options);
|
history_table = $('#history_table-SID-${data["section_id"]}').DataTable(history_table_options);
|
||||||
|
|
||||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
||||||
$(colvis.button()).appendTo('#button-bar-history');
|
$(colvis.button()).appendTo('#button-bar-history');
|
||||||
|
|
||||||
clearSearchButton('history_table', history_table);
|
clearSearchButton('history_table-SID-${data["section_id"]}', history_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadMediaInfoTable() {
|
function loadMediaInfoTable() {
|
||||||
|
@ -401,12 +401,12 @@ DOCUMENTATION :: END
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
media_info_table = $('#media_info_table').DataTable(media_info_table_options);
|
media_info_table = $('#media_info_table-SID-${data["section_id"]}').DataTable(media_info_table_options);
|
||||||
|
|
||||||
var colvis = new $.fn.dataTable.ColVis(media_info_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark' });
|
var colvis = new $.fn.dataTable.ColVis(media_info_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark' });
|
||||||
$(colvis.button()).appendTo('#button-bar-media-info');
|
$(colvis.button()).appendTo('#button-bar-media-info');
|
||||||
|
|
||||||
clearSearchButton('media_info_table', media_info_table);
|
clearSearchButton('media_info_table-SID-${data["section_id"]}', media_info_table);
|
||||||
}
|
}
|
||||||
|
|
||||||
$( "#history-tab-btn" ).one( "click", function() {
|
$( "#history-tab-btn" ).one( "click", function() {
|
||||||
|
|
|
@ -148,7 +148,7 @@ from plexpy import helpers
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
<table id="user_ip_table" class="display" width="100%">
|
<table id="user_ip_table-UID-${data['user_id']}" class="display" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left">Last Seen</th>
|
<th align="left">Last Seen</th>
|
||||||
|
@ -186,7 +186,7 @@ from plexpy import helpers
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
<table class="display" id="history_table" width="100%">
|
<table class="display" id="history_table-UID-${data['user_id']}" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left" id="delete">Delete</th>
|
<th align="left" id="delete">Delete</th>
|
||||||
|
@ -226,7 +226,7 @@ from plexpy import helpers
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-card-back">
|
<div class="table-card-back">
|
||||||
<table class="display" id="sync_table" width="100%">
|
<table class="display" id="sync_table-UID-${data['user_id']}" width="100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left" id="state">State</th>
|
<th align="left" id="state">State</th>
|
||||||
|
@ -356,13 +356,13 @@ from plexpy import helpers
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
history_table = $('#history_table').DataTable(history_table_options);
|
history_table = $('#history_table-UID-${data["user_id"]}').DataTable(history_table_options);
|
||||||
history_table.column(2).visible(false);
|
history_table.column(2).visible(false);
|
||||||
|
|
||||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
||||||
$(colvis.button()).appendTo('#button-bar-history');
|
$(colvis.button()).appendTo('#button-bar-history');
|
||||||
|
|
||||||
clearSearchButton('history_table', history_table);
|
clearSearchButton('history_table-UID-${data["user_id"]}', history_table);
|
||||||
|
|
||||||
$('#history_table_filter').prepend('<div class="btn-group" data-toggle="buttons" id="media_type-selection" style="padding-right: 15px;"> \
|
$('#history_table_filter').prepend('<div class="btn-group" data-toggle="buttons" id="media_type-selection" style="padding-right: 15px;"> \
|
||||||
<label class="btn btn-dark active"> \
|
<label class="btn btn-dark active"> \
|
||||||
|
@ -405,9 +405,9 @@ from plexpy import helpers
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
user_ip_table = $('#user_ip_table').DataTable(user_ip_table_options);
|
user_ip_table = $('#user_ip_table-UID-${data["user_id"]}').DataTable(user_ip_table_options);
|
||||||
|
|
||||||
clearSearchButton('user_ip_table', user_ip_table);
|
clearSearchButton('user_ip_table-UID-${data["user_id"]}', user_ip_table);
|
||||||
});
|
});
|
||||||
|
|
||||||
$( "#sync-tab-btn" ).one( "click", function() {
|
$( "#sync-tab-btn" ).one( "click", function() {
|
||||||
|
@ -418,13 +418,13 @@ from plexpy import helpers
|
||||||
d.user_id = user_id;
|
d.user_id = user_id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sync_table = $('#sync_table').DataTable(sync_table_options);
|
sync_table = $('#sync_table-UID-${data["user_id"]}').DataTable(sync_table_options);
|
||||||
sync_table.column(1).visible(false);
|
sync_table.column(1).visible(false);
|
||||||
|
|
||||||
var colvis_sync = new $.fn.dataTable.ColVis( sync_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark' } );
|
var colvis_sync = new $.fn.dataTable.ColVis( sync_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark' } );
|
||||||
$( colvis_sync.button() ).appendTo('#button-bar-sync');
|
$( colvis_sync.button() ).appendTo('#button-bar-sync');
|
||||||
|
|
||||||
clearSearchButton('sync_table', sync_table);
|
clearSearchButton('sync_table-UID-${data["user_id"]}', sync_table);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load edit user modal
|
// Load edit user modal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue