Skip to content

Commit

Permalink
Use an "ajax" class on ajaxified "Initials" links
Browse files Browse the repository at this point in the history
  • Loading branch information
roccivic committed Oct 30, 2012
1 parent 2e70202 commit 0a639f6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion js/server_privileges.js
Expand Up @@ -547,7 +547,7 @@ $(function() {
* @name paginate_users_table_click
* @memberOf jQuery
*/
$("#initials_table.ajax").find("a").live('click', function(event) {
$("#initials_table").find("a.ajax").die().live('click', function(event) {
event.preventDefault();

var $msgbox = PMA_ajaxShowMessage();
Expand Down
24 changes: 13 additions & 11 deletions libraries/server_privileges.lib.php
Expand Up @@ -2591,19 +2591,21 @@ function PMA_getHtmlForDisplayTheInitials($array_initials, $conditional_class)

uksort($array_initials, "strnatcasecmp");

$html_output = '<table id="initials_table" '
. 'class="' . $conditional_class . '" <cellspacing="5">'
$html_output = '<table id="initials_table" <cellspacing="5">'
. '<tr>';
foreach ($array_initials as $tmp_initial => $initial_was_found) {
if ($initial_was_found) {
$html_output .= '<td>'
. '<a href="server_privileges.php?'
. $GLOBALS['url_query'] . '&amp;'
. 'initial=' . urlencode($tmp_initial) . '">' . $tmp_initial
. '</a>'
. '</td>' . "\n";
} else {
$html_output .= '<td>' . $tmp_initial . '</td>';
if (! empty($tmp_initial)) {
if ($initial_was_found) {
$html_output .= '<td>'
. '<a class="' . $conditional_class . '"'
. ' href="server_privileges.php?'
. $GLOBALS['url_query'] . '&amp;'
. 'initial=' . urlencode($tmp_initial) . '">' . $tmp_initial
. '</a>'
. '</td>' . "\n";
} else {
$html_output .= '<td>' . $tmp_initial . '</td>';
}
}
}
$html_output .= '<td>'
Expand Down

0 comments on commit 0a639f6

Please sign in to comment.