From d223df35cc77df8663c18e788a3dfc11cd8dfda2 Mon Sep 17 00:00:00 2001 From: "J.M" Date: Mon, 6 Jan 2014 14:38:32 +0100 Subject: [PATCH 1/5] Minor fixes for table structure actions button row Signed-off-by: J.M --- libraries/display_structure.inc.php | 4 ++++ themes/original/css/common.css.php | 14 +++++++++++--- themes/pmahomme/css/common.css.php | 7 +++++++ themes/sprites.css.php | 3 ++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/libraries/display_structure.inc.php b/libraries/display_structure.inc.php index 949acb821a..47db3a2a8c 100644 --- a/libraries/display_structure.inc.php +++ b/libraries/display_structure.inc.php @@ -212,6 +212,8 @@ $response->addHTML( * Work on the table */ +$response->addHTML(''); + if (! $tbl_is_view && ! $db_is_system_schema) { $response->addHTML('
'); $response->addHTML(PMA_getHtmlForAddColumn($columns_list)); diff --git a/themes/original/css/common.css.php b/themes/original/css/common.css.php index 98ec8c0dc7..4d8a65c9c1 100644 --- a/themes/original/css/common.css.php +++ b/themes/original/css/common.css.php @@ -378,8 +378,7 @@ img.lightbulb { /* leave some space between icons and text */ .icon { vertical-align: middle; - margin-right: 0.3em; - margin-left: 0.3em; + margin-: 0.3em; } /* no extra space in table cells */ @@ -1613,7 +1612,16 @@ input#input_import_file { padding: 0.3em; margin: 0.1em; } - +#structure-action-links a { + margin-: 1em; +} +#addColumns input[type="radio"] { + margin: 0; + margin-: 1em; +} +#addColumns input[type="submit"] { + margin-: 1em; +} .margin#change_column_dialog { margin: 0 .5em; } diff --git a/themes/pmahomme/css/common.css.php b/themes/pmahomme/css/common.css.php index 9a19c94760..698cd5fa20 100644 --- a/themes/pmahomme/css/common.css.php +++ b/themes/pmahomme/css/common.css.php @@ -2041,6 +2041,13 @@ input#input_import_file { padding: 0.3em; margin: 0.1em; } +#structure-action-links a { + margin-: 1em; +} +#addColumns input[type="radio"] { + margin: 3px 0 0; + margin-: 1em; +} /** * Indexes */ diff --git a/themes/sprites.css.php b/themes/sprites.css.php index 2c12589a41..5ece1e84aa 100644 --- a/themes/sprites.css.php +++ b/themes/sprites.css.php @@ -18,7 +18,8 @@ if (is_readable($_SESSION['PMA_Theme']->getPath() . '/sprites.lib.php')) { ?> /* Icon sprites */ .icon { - margin: 0 .3em; + margin: 0; + margin-: .3em; padding: 0 !important; width: 16px; height: 16px; From a7b4aa5355da5c4a0ae9532fe0ef5966b89fe485 Mon Sep 17 00:00:00 2001 From: "J.M" Date: Mon, 6 Jan 2014 16:10:08 +0100 Subject: [PATCH 2/5] Add missing * in phpdoc comment PMA_getTablePrivsQueriesForChangeOrCopyUser() function Signed-off-by: J.M --- libraries/server_privileges.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index 7e1650ab4c..04366d0f55 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -3996,7 +3996,7 @@ function PMA_getHtmlForUserProperties($dbname_is_wildcard,$url_dbname, * Get queries for Table privileges to change or copy user * * @param string $user_host_condition user host condition to - select relevent table privileges + * select relevent table privileges * @param array $queries queries array * @param string $username username * @param string $hostname host name From f864e0447ed3ff8b4d4e04a7de37fc7ed3ebcc47 Mon Sep 17 00:00:00 2001 From: "J.M" Date: Mon, 6 Jan 2014 16:11:40 +0100 Subject: [PATCH 3/5] Correct typo in phpdoc comment PMA_getHtmlToDisplayPrivilegesTable() function Signed-off-by: J.M --- libraries/server_privileges.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index 04366d0f55..54bf8aa105 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -578,7 +578,7 @@ function PMA_setUserGroup($username, $userGroup) * * @param string $db the database * @param string $table the table - * @param boolean $submit wheather to display the submit button or not + * @param boolean $submit whether to display the submit button or not * * @global array $cfg the phpMyAdmin configuration * @global ressource $user_link the database connection From 61bae3f22786c79e049b3e39d108b97a2463d82f Mon Sep 17 00:00:00 2001 From: "J.M" Date: Mon, 6 Jan 2014 21:22:31 +0100 Subject: [PATCH 4/5] [interface] Break "Edit privileges" with sub-menus Signed-off-by: J.M --- js/server_privileges.js | 56 +++++++++++++++++++++++ libraries/display_change_password.lib.php | 10 +++- libraries/server_privileges.lib.php | 41 ++++++++++------- 3 files changed, 89 insertions(+), 18 deletions(-) diff --git a/js/server_privileges.js b/js/server_privileges.js index 5d45a81990..ceae30ab47 100644 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -412,6 +412,7 @@ AJAX.registerOnload('server_privileges.js', function () { PMA_highlightSQL($div); $div = $('#edit_user_dialog'); displayPasswordGenerateButton(); + addOrUpdateSubmenu(); $(checkboxes_sel).trigger("change"); PMA_ajaxRemoveMessage($msgbox); PMA_showHints($div); @@ -687,4 +688,59 @@ AJAX.registerOnload('server_privileges.js', function () { }); displayPasswordGenerateButton(); + + /* + * Create submenu for simpler interface + */ + var addOrUpdateSubmenu = function () { + var $topmenu2 = $("#topmenu2"), + $edit_user_dialog = $("#edit_user_dialog"), + submenu_label, + submenu_link, + link_number; + + // if submenu exists yet, remove it first + if ($topmenu2.length > 0) { + $topmenu2.remove(); + } + + // construct a submenu from the existing fieldsets + $topmenu2 = $("