From 4b18b4c7d60f29d89933e33fe29f0b971f511f93 Mon Sep 17 00:00:00 2001 From: ninadsp Date: Fri, 16 Jul 2010 19:36:12 +0530 Subject: [PATCH] When a new user is created, the user's overview table on the top is now updated to reflect the newly added user's initial --- js/server_privileges.js | 3 +++ server_privileges.php | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/js/server_privileges.js b/js/server_privileges.js index f74dcf476..eade87c2f 100755 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -175,6 +175,9 @@ $(document).ready(function() { .end() .find('tr:even') .removeClass('odd').addClass('even'); + + $("#initials_table").find('td:contains('+data.new_user_initial+')') + .html(data.new_user_initial_string); } else { PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000"); diff --git a/server_privileges.php b/server_privileges.php index cff400d78..695f00538 100755 --- a/server_privileges.php +++ b/server_privileges.php @@ -1409,6 +1409,13 @@ if( $GLOBALS['is_ajax_request'] && !isset($_REQUEST['export']) && !isset($_REQUE $new_user_string .= ''; $extra_data['new_user_string'] = $new_user_string; + + //Generate the string for this alphabet's initial + $new_user_initial = strtoupper(substr($username, 0, 1)); + $new_user_initial_string = '