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

This commit is contained in:
ninadsp
2010-07-16 19:36:12 +05:30
parent 7da51f1a8e
commit 4b18b4c7d6
2 changed files with 10 additions and 0 deletions

View File

@@ -175,6 +175,9 @@ $(document).ready(function() {
.end() .end()
.find('tr:even') .find('tr:even')
.removeClass('odd').addClass('even'); .removeClass('odd').addClass('even');
$("#initials_table").find('td:contains('+data.new_user_initial+')')
.html(data.new_user_initial_string);
} }
else { else {
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000"); PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000");

View File

@@ -1409,6 +1409,13 @@ if( $GLOBALS['is_ajax_request'] && !isset($_REQUEST['export']) && !isset($_REQUE
$new_user_string .= '</tr>'; $new_user_string .= '</tr>';
$extra_data['new_user_string'] = $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 = '<a href="server_privileges.php?' . $GLOBALS['url_query'] . '&initial=' . $new_user_initial
.'>' . $new_user_initial . '</a>';
$extra_data['new_user_initial'] = $new_user_initial;
$extra_data['new_user_initial_string'] = $new_user_initial_string;
} }
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data); PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
} }