mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Clean up code
This commit is contained in:
parent
2c354ad783
commit
db7225fbad
2 changed files with 14 additions and 18 deletions
|
@ -95,7 +95,7 @@
|
|||
clearSearchButton('history_table', history_table);
|
||||
|
||||
$('#history_table_filter').prepend('<div class="btn-group" data-toggle="buttons" id="media_type-selection" style="padding-right: 15px;"> \
|
||||
<label class="btn btn-dark"> \
|
||||
<label class="btn btn-dark active"> \
|
||||
<input type="radio" name="media_type-filter" id="history-all" value="all" autocomplete="off"> All \
|
||||
</label> \
|
||||
<label class="btn btn-dark"> \
|
||||
|
@ -110,18 +110,16 @@
|
|||
</div>');
|
||||
|
||||
$('#media_type-selection').on('change', function () {
|
||||
media_type = $('input[name=media_type-filter]:checked', '#media_type-selection').val();
|
||||
loadHistoryTable(media_type)
|
||||
$('#media_type-selection > label').removeClass('active');
|
||||
selected_filter = $('input[name=media_type-filter]:checked', '#media_type-selection');
|
||||
$(selected_filter).closest('label').addClass('active');
|
||||
media_type = $(selected_filter).val();
|
||||
history_table.draw();
|
||||
});
|
||||
$('#media_type-selection > label').removeClass('active');
|
||||
if (media_type == 'all') { $('#history-all').closest('label').addClass('active'); }
|
||||
if (media_type == 'movie') { $('#history-movies').closest('label').addClass('active'); }
|
||||
if (media_type == 'episode') { $('#history-tv_shows').closest('label').addClass('active'); }
|
||||
if (media_type == 'track') { $('#history-music').closest('label').addClass('active'); }
|
||||
}
|
||||
|
||||
var media_type = 'all';
|
||||
loadHistoryTable(media_type)
|
||||
loadHistoryTable(media_type);
|
||||
|
||||
$('#row-edit-mode').on('click', function() {
|
||||
$('#row-edit-mode-alert').fadeIn(200);
|
||||
|
|
|
@ -342,7 +342,7 @@ from plexpy import helpers
|
|||
clearSearchButton('history_table', history_table);
|
||||
|
||||
$('#history_table_filter').prepend('<div class="btn-group" data-toggle="buttons" id="media_type-selection" style="padding-right: 15px;"> \
|
||||
<label class="btn btn-dark"> \
|
||||
<label class="btn btn-dark active"> \
|
||||
<input type="radio" name="media_type-filter" id="history-all" value="all" autocomplete="off"> All \
|
||||
</label> \
|
||||
<label class="btn btn-dark"> \
|
||||
|
@ -357,19 +357,17 @@ from plexpy import helpers
|
|||
</div>');
|
||||
|
||||
$('#media_type-selection').on('change', function () {
|
||||
media_type = $('input[name=media_type-filter]:checked', '#media_type-selection').val();
|
||||
loadHistoryTable(media_type)
|
||||
$('#media_type-selection > label').removeClass('active');
|
||||
selected_filter = $('input[name=media_type-filter]:checked', '#media_type-selection');
|
||||
$(selected_filter).closest('label').addClass('active');
|
||||
media_type = $(selected_filter).val();
|
||||
history_table.draw();
|
||||
});
|
||||
$('#media_type-selection > label').removeClass('active');
|
||||
if (media_type == 'all') { $('#history-all').closest('label').addClass('active'); }
|
||||
if (media_type == 'movie') { $('#history-movies').closest('label').addClass('active'); }
|
||||
if (media_type == 'episode') { $('#history-tv_shows').closest('label').addClass('active'); }
|
||||
if (media_type == 'track') { $('#history-music').closest('label').addClass('active'); }
|
||||
}
|
||||
|
||||
$( "#history-tab-btn" ).one( "click", function() {
|
||||
var media_type = 'all';
|
||||
loadHistoryTable(media_type)
|
||||
loadHistoryTable(media_type);
|
||||
});
|
||||
|
||||
$( "#ip-tab-btn" ).one( "click", function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue