mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Change all delete/edit warnings to tooltips
This commit is contained in:
parent
dfb2853dc5
commit
802dfe10be
7 changed files with 81 additions and 30 deletions
|
@ -160,11 +160,10 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
<div class="button-bar">
|
||||
% if _session['user_group'] == 'admin':
|
||||
<div class="alert alert-danger alert-edit" role="alert" id="row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select rows to delete. Data is deleted upon exiting delete mode.</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="row-edit-mode">
|
||||
<i class="fa fa-trash-o"></i> Delete mode
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
% endif
|
||||
<div class="btn-group" data-toggle="buttons" id="media_type-selection">
|
||||
|
@ -331,11 +330,10 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
<div class="button-bar">
|
||||
% if _session['user_group'] == 'admin':
|
||||
<div class="alert alert-danger alert-edit" role="alert" id="sync-row-edit-mode-alert"><i class="fa fa-exclamation-triangle"></i> Select syncs to delete. Data is deleted upon exiting delete mode.</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger btn-edit" data-toggle="button" aria-pressed="false" autocomplete="off" id="sync-row-edit-mode">
|
||||
<i class="fa fa-trash-o"></i> Delete mode
|
||||
</button> 
|
||||
</button>
|
||||
</div>
|
||||
% endif
|
||||
<div class="btn-group">
|
||||
|
@ -873,9 +871,9 @@ DOCUMENTATION :: END
|
|||
});
|
||||
|
||||
$('#row-edit-mode').on('click', function() {
|
||||
$('#row-edit-mode-alert').fadeIn(200);
|
||||
|
||||
if ($(this).hasClass('active')) {
|
||||
$(this).tooltip('destroy');
|
||||
|
||||
if (history_to_delete.length > 0) {
|
||||
$('#deleteCount').text(history_to_delete.length);
|
||||
$('#deleteType').text('history');
|
||||
|
@ -901,6 +899,13 @@ DOCUMENTATION :: END
|
|||
});
|
||||
|
||||
} else {
|
||||
$(this).tooltip({
|
||||
container: '.body-container',
|
||||
placement: 'bottom',
|
||||
title: 'Select rows to delete. Data is deleted upon exiting delete mode.',
|
||||
trigger: 'manual'
|
||||
}).tooltip('show');
|
||||
|
||||
history_to_delete = [];
|
||||
$('.history_table .delete-control').each(function() {
|
||||
$(this).find('button.btn-danger').toggleClass('btn-warning').toggleClass('btn-danger');
|
||||
|
@ -910,9 +915,9 @@ DOCUMENTATION :: END
|
|||
});
|
||||
|
||||
$('#sync-row-edit-mode').on('click', function() {
|
||||
$('#sync-row-edit-mode-alert').fadeIn(200);
|
||||
|
||||
if ($(this).hasClass('active')) {
|
||||
$(this).tooltip('destroy');
|
||||
|
||||
if (syncs_to_delete.length > 0) {
|
||||
$('#deleteCount').text(syncs_to_delete.length);
|
||||
$('#deleteType').text('sync');
|
||||
|
@ -943,6 +948,13 @@ DOCUMENTATION :: END
|
|||
});
|
||||
|
||||
} else {
|
||||
$(this).tooltip({
|
||||
container: '.body-container',
|
||||
placement: 'bottom',
|
||||
title: 'Select syncs to delete. Data is deleted upon exiting delete mode.',
|
||||
trigger: 'manual'
|
||||
}).tooltip('show');
|
||||
|
||||
syncs_to_delete = [];
|
||||
$('.sync_table .delete-control').each(function() {
|
||||
$(this).find('button.btn-danger').toggleClass('btn-warning').toggleClass('btn-danger');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue