From 7033154eb49ec1f295680e320e7dffd5a6acdec3 Mon Sep 17 00:00:00 2001 From: ninadsp Date: Fri, 16 Jul 2010 19:59:14 +0530 Subject: [PATCH] If the last user with a given initial is deleted, update the users overview table and remove the link --- js/server_privileges.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/server_privileges.js b/js/server_privileges.js index eade87c2f..1e474fe9a 100755 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -231,7 +231,13 @@ $(document).ready(function() { if(data.success == true) { PMA_ajaxShowMessage(data.message); $("#usersForm").find("input:checkbox:checked").parents("tr").slideUp("medium", function() { + var this_user_initial = $(this).find('input:checkbox').val().charAt(0).toUpperCase(); $(this).remove(); + + //If this is the last user with this_user_initial, remove the link from #initials_table + if($("#tableuserrights").find('input:checkbox[value^=' + this_user_initial + ']').length == 0) { + $("#initials_table").find('td > a:contains(' + this_user_initial + ')').parent('td').html(this_user_initial); + } }) } else {