mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 05:31:15 -07:00
Fix persist Users > Edit mode on datatable page change
This commit is contained in:
parent
cf70b3e989
commit
72af2fa281
2 changed files with 20 additions and 12 deletions
|
@ -1,6 +1,23 @@
|
||||||
var users_to_delete = [];
|
var users_to_delete = [];
|
||||||
var users_to_purge = [];
|
var users_to_purge = [];
|
||||||
|
|
||||||
|
function toggleEditNames() {
|
||||||
|
if ($('.edit-control').hasClass('hidden')) {
|
||||||
|
$('.edit-user-control > .edit-user-name').each(function () {
|
||||||
|
a = $(this).children('a');
|
||||||
|
input = $(this).children('input');
|
||||||
|
a.text(input.val());
|
||||||
|
a.removeClass('hidden');
|
||||||
|
input.addClass('hidden');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$('.edit-user-control > .edit-user-name').each(function () {
|
||||||
|
$(this).children('a').addClass('hidden');
|
||||||
|
$(this).children('input').removeClass('hidden');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
users_list_table_options = {
|
users_list_table_options = {
|
||||||
"language": {
|
"language": {
|
||||||
"search": "Search: ",
|
"search": "Search: ",
|
||||||
|
@ -217,6 +234,7 @@ users_list_table_options = {
|
||||||
$('.edit-control').each(function () {
|
$('.edit-control').each(function () {
|
||||||
$(this).removeClass('hidden');
|
$(this).removeClass('hidden');
|
||||||
});
|
});
|
||||||
|
toggleEditNames();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"preDrawCallback": function(settings) {
|
"preDrawCallback": function(settings) {
|
||||||
|
|
|
@ -156,14 +156,7 @@
|
||||||
$(this).addClass('hidden');
|
$(this).addClass('hidden');
|
||||||
$('#row-edit-mode-alert').fadeOut(200);
|
$('#row-edit-mode-alert').fadeOut(200);
|
||||||
});
|
});
|
||||||
$('.edit-user-control > .edit-user-name').each(function () {
|
toggleEditNames();
|
||||||
a = $(this).children('a');
|
|
||||||
input = $(this).children('input');
|
|
||||||
a.text(input.val());
|
|
||||||
a.removeClass('hidden');
|
|
||||||
input.addClass('hidden');
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
users_to_delete = [];
|
users_to_delete = [];
|
||||||
users_to_purge = [];
|
users_to_purge = [];
|
||||||
|
@ -171,10 +164,7 @@
|
||||||
$(this).find('button.btn-danger').toggleClass('btn-warning').toggleClass('btn-danger');
|
$(this).find('button.btn-danger').toggleClass('btn-warning').toggleClass('btn-danger');
|
||||||
$(this).removeClass('hidden');
|
$(this).removeClass('hidden');
|
||||||
});
|
});
|
||||||
$('.edit-user-control > .edit-user-name').each(function () {
|
toggleEditNames();
|
||||||
$(this).children('a').addClass('hidden');
|
|
||||||
$(this).children('input').removeClass('hidden');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue