From 464d2a541d50c1bf043937d483d84527421ad530 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 27 Feb 2016 13:39:21 -0800 Subject: [PATCH] Give tables unique ids to save state indivdually --- data/interfaces/default/info.html | 32 +++++++++---------- .../default/js/tables/media_info_table.js | 2 +- data/interfaces/default/library.html | 12 +++---- data/interfaces/default/user.html | 18 +++++------ 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/data/interfaces/default/info.html b/data/interfaces/default/info.html index 9a025348..2ddd7420 100644 --- a/data/interfaces/default/info.html +++ b/data/interfaces/default/info.html @@ -348,21 +348,21 @@ DOCUMENTATION :: END
- +
- - - - - - - - - - - - + + + + + + + + + + + + @@ -458,11 +458,11 @@ DOCUMENTATION :: END % if source == 'history': % endif diff --git a/data/interfaces/default/js/tables/media_info_table.js b/data/interfaces/default/js/tables/media_info_table.js index 87615398..3934e4db 100644 --- a/data/interfaces/default/js/tables/media_info_table.js +++ b/data/interfaces/default/js/tables/media_info_table.js @@ -23,7 +23,7 @@ media_info_table_options = { "emptyTable": "No data in table" }, "pagingType": "bootstrap", - "stateSave": false, + "stateSave": true, "processing": false, "serverSide": true, "pageLength": 25, diff --git a/data/interfaces/default/library.html b/data/interfaces/default/library.html index 0293f96d..08bb0a18 100644 --- a/data/interfaces/default/library.html +++ b/data/interfaces/default/library.html @@ -186,7 +186,7 @@ DOCUMENTATION :: END
-
DeleteTimeUserIP AddressPlatformPlayerTitleStartedPausedStoppedDurationDeleteTimeUserIP AddressPlatformPlayerTitleStartedPausedStoppedDuration
+
@@ -245,7 +245,7 @@ DOCUMENTATION :: END
-
Delete
+
@@ -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: ' Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] }); $(colvis.button()).appendTo('#button-bar-history'); - clearSearchButton('history_table', history_table); + clearSearchButton('history_table-SID-${data["section_id"]}', history_table); } 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: ' Select columns', buttonClass: 'btn btn-dark' }); $(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() { diff --git a/data/interfaces/default/user.html b/data/interfaces/default/user.html index 49a878e6..ad0c8711 100644 --- a/data/interfaces/default/user.html +++ b/data/interfaces/default/user.html @@ -148,7 +148,7 @@ from plexpy import helpers
-
Added At
+
@@ -186,7 +186,7 @@ from plexpy import helpers
-
Last Seen
+
@@ -226,7 +226,7 @@ from plexpy import helpers
-
Delete
+
@@ -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); var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: ' Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] }); $(colvis.button()).appendTo('#button-bar-history'); - clearSearchButton('history_table', history_table); + clearSearchButton('history_table-UID-${data["user_id"]}', history_table); $('#history_table_filter').prepend('
\
State