diff --git a/ChangeLog b/ChangeLog
index 791c10043d..be0bb618b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,7 @@ phpMyAdmin - ChangeLog
and removed the extension directive
+ Added support for scatter charts
+ rfe #1478 Make Column Headings Sticky
++ rfe #1480 Enhance privileges initials table
4.1.4.0 (not yet released)
- bug #3840 (additional fix) When exporting to gzip format, the data is compressed 2 times
diff --git a/js/server_privileges.js b/js/server_privileges.js
index 832ae4f27e..5d45a81990 100644
--- a/js/server_privileges.js
+++ b/js/server_privileges.js
@@ -661,8 +661,11 @@ AJAX.registerOnload('server_privileges.js', function () {
$("#usersForm").hide("medium").remove();
$("#fieldset_add_user").hide("medium").remove();
$("#initials_table")
+ .prop("id", "initials_table_old")
.after(data.message).show("medium")
.siblings("h2").not(":first").remove();
+ // prevent double initials table
+ $("#initials_table_old").remove();
} else {
PMA_ajaxShowMessage(data.error, false);
}
diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php
index 4cbed590c8..94530e3f6b 100644
--- a/libraries/server_privileges.lib.php
+++ b/libraries/server_privileges.lib.php
@@ -3168,14 +3168,17 @@ function PMA_getHtmlForDisplayTheInitials($array_initials)
uksort($array_initials, "strnatcasecmp");
- $html_output = '
'
+ $html_output = ''
. '';
foreach ($array_initials as $tmp_initial => $initial_was_found) {
if (! empty($tmp_initial)) {
if ($initial_was_found) {
$html_output .= '| '
- . '' . $tmp_initial
. ''
@@ -3188,7 +3191,7 @@ function PMA_getHtmlForDisplayTheInitials($array_initials)
$html_output .= ' | '
. '[' . __('Show all') . '] | ' . "\n";
+ . '" class="nowrap">' . __('Show all') . '' . "\n";
$html_output .= '
';
return $html_output;
@@ -3787,7 +3790,10 @@ function PMA_getHtmlForDisplayUserOverviewPage($pmaThemeImage, $text_dir)
. __('Users overview') . "\n"
. '' . "\n";
- $sql_query = 'SELECT *,' .
+ // $sql_query is for the initial-filtered,
+ // $sql_query_all is for counting the total no. of users
+
+ $sql_query = $sql_query_all = 'SELECT *,' .
" IF(`Password` = _latin1 '', 'N', 'Y') AS 'Password'" .
' FROM `mysql`.`user`';
@@ -3796,9 +3802,15 @@ function PMA_getHtmlForDisplayUserOverviewPage($pmaThemeImage, $text_dir)
: '');
$sql_query .= ' ORDER BY `User` ASC, `Host` ASC;';
+ $sql_query_all .= ' ;';
+
$res = $GLOBALS['dbi']->tryQuery(
$sql_query, null, PMA_DatabaseInterface::QUERY_STORE
);
+ $res_all = $GLOBALS['dbi']->tryQuery(
+ $sql_query_all, null, PMA_DatabaseInterface::QUERY_STORE
+ );
+
if (! $res) {
// the query failed! This may have two reasons:
@@ -3833,9 +3845,9 @@ function PMA_getHtmlForDisplayUserOverviewPage($pmaThemeImage, $text_dir)
/**
* Displays the initials
- * Also not necassary if there is less than 20 privileges
+ * Also not necessary if there is less than 20 privileges
*/
- if ($GLOBALS['dbi']->numRows($res) > 20 ) {
+ if ($GLOBALS['dbi']->numRows($res_all) > 20) {
$html_output .= PMA_getHtmlForDisplayTheInitials($array_initials);
}
diff --git a/themes/pmahomme/css/common.css.php b/themes/pmahomme/css/common.css.php
index 131dddb7bc..a623662215 100644
--- a/themes/pmahomme/css/common.css.php
+++ b/themes/pmahomme/css/common.css.php
@@ -134,6 +134,10 @@ a:hover {
getCssGradient('ffffff', 'cccccc'); ?>
}
+#initials_table a.active {
+ getCssGradient('cccccc', 'ffffff'); ?>
+}
+
dfn {
font-style: normal;
}