mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Change home cards config to list type
This commit is contained in:
parent
8f367d140f
commit
8ba68dcfcf
9 changed files with 81 additions and 37 deletions
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
% if config['home_stats_cards'] > 'watch_statistics':
|
||||
% if config['home_stats_cards']:
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="padded-header">
|
||||
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
</div>
|
||||
% endif
|
||||
% if config['home_library_cards'] > 'library_statistics':
|
||||
% if config['home_library_cards']:
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="padded-header" id="library-statistics-header">
|
||||
|
|
|
@ -18,7 +18,7 @@ from plexpy import helpers
|
|||
<div class='container-fluid'>
|
||||
<div class='table-card-header'>
|
||||
<div class="header-bar">
|
||||
<span><i class="fa fa-book"></i> Logs</span>
|
||||
<span><i class="fa fa-list-alt"></i> Logs</span>
|
||||
</div>
|
||||
<div class="button-bar">
|
||||
<button class="btn btn-dark" id="clear-logs"><i class="fa fa-trash-o"></i> Clear log</button>
|
||||
|
|
|
@ -102,7 +102,6 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
|||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<select multiple class="form-control" id="home_stats_cards" name="home_stats_cards" data-parsley-trigger="change">
|
||||
<option id="card-watch_statistics" value="watch_statistics" class="hidden" selected>Watch Statistics</option>
|
||||
<option id="card-top_tv" value="top_tv">Most Watched TV</option>
|
||||
<option id="card-popular_tv" value="popular_tv">Most Popular TV</option>
|
||||
<option id="card-top_movies" value="top_movies">Most Watched Movie</option>
|
||||
|
@ -154,7 +153,6 @@ available_notification_agents = sorted(notifiers.available_notification_agents()
|
|||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<select multiple class="form-control" id="home_library_cards" name="home_library_cards" data-parsley-trigger="change">
|
||||
<option id="card-library_statistics" value="library_statistics" class="hidden" selected>Library Statistics</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1619,7 +1617,7 @@ $(document).ready(function() {
|
|||
var accordion_timeline = new Accordion($('#accordion-timeline'), false);
|
||||
var accordion_scripts = new Accordion($('#accordion-scripts'), false);
|
||||
|
||||
var cards = "${config['home_stats_cards']}".split(/[\s,]+/);
|
||||
var cards = ${config['home_stats_cards']|n};
|
||||
cards.forEach(function (item) {
|
||||
$('#card-'+item).prop('selected', !$(this).prop('selected'));
|
||||
});
|
||||
|
@ -1633,20 +1631,19 @@ $(document).ready(function() {
|
|||
});
|
||||
|
||||
$.ajax({
|
||||
url: 'get_server_children',
|
||||
url: 'get_library_sections',
|
||||
data: { },
|
||||
async: true,
|
||||
complete: function (xhr, status) {
|
||||
server_children_info = $.parseJSON(xhr.responseText);
|
||||
libraries_list = server_children_info.libraries_list;
|
||||
complete: function (data) {
|
||||
libraries_list = $.parseJSON(data.responseText);
|
||||
for (var i in libraries_list) {
|
||||
title = libraries_list[i].title;
|
||||
key = libraries_list[i].key;
|
||||
var title = libraries_list[i].section_name;
|
||||
var key = libraries_list[i].section_id;
|
||||
$('#home_library_cards').append('<option id="card-' + key + '" value="' + key + '">' + title + '</option>')
|
||||
}
|
||||
var cards = "${config['home_library_cards']}".split(/[\s,]+/);
|
||||
var cards = ${config['home_library_cards']|n};
|
||||
cards.forEach(function (item) {
|
||||
$('#card-'+item).prop('selected', !$(this).prop('selected'));
|
||||
$('#card-' + item).prop('selected', !$(this).prop('selected'));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -168,8 +168,11 @@ from plexpy import common
|
|||
<div style="display: none;">
|
||||
<input type="checkbox" name="launch_browser" id="launch_browser" value="1" ${config['launch_browser']}>
|
||||
<input type="checkbox" name="refresh_users_on_startup" id="refresh_users_on_startup" value="1" ${config['refresh_users_on_startup']}>
|
||||
<input type="checkbox" name="refresh_libraries_on_startup" id="refresh_libraries_on_startup" value="1" ${config['refresh_libraries_on_startup']}>
|
||||
<input type="checkbox" name="first_run_complete" id="first_run_complete" value="1" checked>
|
||||
<input type="checkbox" name="check_github" id="check_github" value="1" checked>
|
||||
<input type="text" name="home_stats_cards" id="home_stats_cards" value="first_run_wizard">
|
||||
<input type="text" name="home_library_cards" id="home_library_cards" value="first_run_wizard">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Required fields but hidden -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue