Patch #3194824 Partial list of users and new users
This commit is contained in:

committed by
Marc Delisle

parent
0c30ed069a
commit
0d77b5084c
@@ -86,12 +86,17 @@ function appendNewUser(new_user_string, new_user_initial, new_user_initial_strin
|
|||||||
|
|
||||||
//Calculate the index for the new row
|
//Calculate the index for the new row
|
||||||
var curr_last_row = $("#usersForm").find('tbody').find('tr:last');
|
var curr_last_row = $("#usersForm").find('tbody').find('tr:last');
|
||||||
|
var curr_first_row = $("#usersForm").find('tbody').find('tr:first');
|
||||||
|
var first_row_initial = $(curr_first_row).find('label').html().substr(0, 1).toUpperCase();
|
||||||
|
var curr_shown_initial = $(curr_last_row).find('label').html().substr(0, 1).toUpperCase();
|
||||||
var curr_last_row_index_string = $(curr_last_row).find('input:checkbox').attr('id').match(/\d+/)[0];
|
var curr_last_row_index_string = $(curr_last_row).find('input:checkbox').attr('id').match(/\d+/)[0];
|
||||||
var curr_last_row_index = parseFloat(curr_last_row_index_string);
|
var curr_last_row_index = parseFloat(curr_last_row_index_string);
|
||||||
var new_last_row_index = curr_last_row_index + 1;
|
var new_last_row_index = curr_last_row_index + 1;
|
||||||
var new_last_row_id = 'checkbox_sel_users_' + new_last_row_index;
|
var new_last_row_id = 'checkbox_sel_users_' + new_last_row_index;
|
||||||
|
var is_show_all = (first_row_initial != curr_shown_initial)?true:false;
|
||||||
|
|
||||||
//Append to the table and set the id/names correctly
|
//Append to the table and set the id/names correctly
|
||||||
|
if((curr_shown_initial == new_user_initial) || is_show_all) {
|
||||||
$(new_user_string)
|
$(new_user_string)
|
||||||
.insertAfter($(curr_last_row))
|
.insertAfter($(curr_last_row))
|
||||||
.find('input:checkbox')
|
.find('input:checkbox')
|
||||||
@@ -104,6 +109,7 @@ function appendNewUser(new_user_string, new_user_initial, new_user_initial_strin
|
|||||||
.find('label')
|
.find('label')
|
||||||
.attr('for', new_last_row_id)
|
.attr('for', new_last_row_id)
|
||||||
.end();
|
.end();
|
||||||
|
}
|
||||||
|
|
||||||
//Let us sort the table alphabetically
|
//Let us sort the table alphabetically
|
||||||
$("#usersForm").find('tbody').PMA_sort_table('label');
|
$("#usersForm").find('tbody').PMA_sort_table('label');
|
||||||
|
@@ -1430,7 +1430,7 @@ if( $GLOBALS['is_ajax_request'] && !isset($_REQUEST['export']) && !isset($_REQUE
|
|||||||
*/
|
*/
|
||||||
$new_user_initial = strtoupper(substr($username, 0, 1));
|
$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_string = '<a href="server_privileges.php?' . $GLOBALS['url_query'] . '&initial=' . $new_user_initial
|
||||||
.'>' . $new_user_initial . '</a>';
|
.'">' . $new_user_initial . '</a>';
|
||||||
$extra_data['new_user_initial'] = $new_user_initial;
|
$extra_data['new_user_initial'] = $new_user_initial;
|
||||||
$extra_data['new_user_initial_string'] = $new_user_initial_string;
|
$extra_data['new_user_initial_string'] = $new_user_initial_string;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user