Fix persist Users > Edit mode on datatable page change

This commit is contained in:
JonnyWong16 2016-04-27 23:47:24 -07:00
parent cf70b3e989
commit 72af2fa281
2 changed files with 20 additions and 12 deletions

View file

@ -1,6 +1,23 @@
var users_to_delete = [];
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 = {
"language": {
"search": "Search: ",
@ -217,6 +234,7 @@ users_list_table_options = {
$('.edit-control').each(function () {
$(this).removeClass('hidden');
});
toggleEditNames();
}
},
"preDrawCallback": function(settings) {