diff --git a/ChangeLog b/ChangeLog index fb00e58d13..77ebdcfdc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -63,6 +63,7 @@ phpMyAdmin - ChangeLog + View editing via a generated ALTER VIEW - bug #3408377 [interface] Deleting table from the DB does not change the table counter + rfe #3438266 [designer] Toggle for relation lines +- bug #3442069 [AJAX] database list not updated after adding/deleting a user + database 3.4.9.0 (not yet released) - bug #3442028 [edit] Inline editing enum fields with null shows no dropdown diff --git a/js/server_privileges.js b/js/server_privileges.js index c6636f3242..db8239d1ba 100644 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -185,7 +185,13 @@ $(document).ready(function() { //We also need to post the value of the submit button in order to get this to work correctly $.post($form.attr('action'), $form.serialize() + "&adduser_submit=" + $(this).find("input[name=adduser_submit]").attr('value'), function(data) { if (data.success == true) { - $("#add_user_dialog").dialog("close").remove(); + // Refresh navigation, if we created a database with the name + // that is the same as the username of the new user + if ($('#add_user_dialog #createdb_1:checked').length && window.parent) { + window.parent.refreshNavigation(true); + } + + $("#add_user_dialog").dialog("close"); PMA_ajaxShowMessage(data.message); $("#floating_menubar") .next('div') @@ -225,7 +231,7 @@ $(document).ready(function() { .html(priv_data.user_form) .insertAfter('#result_query'); } else { - PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + priv_data.error, "7000"); + PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + priv_data.error, false); } } else { /*parse the JSON string*/ @@ -243,10 +249,10 @@ $(document).ready(function() { } }) }; - button_options[PMA_messages['strCancel']] = function() { $(this).dialog("close").remove(); } + button_options[PMA_messages['strCancel']] = function() { $(this).dialog("close"); }; $.get($(this).attr("href"), {'ajax_request':true}, function(data) { - $('
') + var $div = $('
') .prepend(data) .find("#fieldset_add_user_footer").hide() //showing the "Go" and "Create User" buttons together will confuse the user .end() @@ -260,9 +266,13 @@ $(document).ready(function() { // also it's interesting to be able to scroll this window height: 600, modal: true, - buttons: button_options + buttons: button_options, + close: function () { + $(this).remove(); + } }); //dialog options end displayPasswordGenerateButton(); + PMA_convertFootnotesToTooltips($div); PMA_ajaxRemoveMessage($msgbox); }); // end $.get() @@ -311,7 +321,11 @@ $(document).ready(function() { $.post($form.attr('action'), $form.serialize() + "&delete=" + $(this).attr('value') + "&ajax_request=true", function(data) { if(data.success == true) { PMA_ajaxShowMessage(data.message); - + // Refresh navigation, if we droppped some databases with the name + // that is the same as the username of the deleted user + if ($('#checkbox_drop_users_db:checked').length && window.parent) { + window.parent.refreshNavigation(true); + } //Remove the revoked user from the users list $form.find("input:checkbox:checked").parents("tr").slideUp("medium", function() { var this_user_initial = $(this).find('input:checkbox').val().charAt(0).toUpperCase(); @@ -362,7 +376,7 @@ $(document).ready(function() { * @var button_options Object containing options for jQueryUI dialog buttons */ var button_options = {}; - button_options[PMA_messages['strCancel']] = function() {$(this).dialog("close").remove();} + button_options[PMA_messages['strCancel']] = function() {$(this).dialog("close");}; var token = $(this).parents('form').find('input[name="token"]').val(); $.get($(this).attr('href'), {'ajax_request':true, 'edit_user_dialog': true, 'token': token}, function(data) { @@ -371,7 +385,10 @@ $(document).ready(function() { .dialog({ width: 900, height: 600, - buttons: button_options + buttons: button_options, + close: function () { + $(this).remove(); + } }); //dialog options end displayPasswordGenerateButton(); PMA_ajaxRemoveMessage($msgbox); @@ -411,7 +428,7 @@ $(document).ready(function() { PMA_ajaxShowMessage(data.message); //Close the jQueryUI dialog - $("#edit_user_dialog").dialog("close").remove(); + $("#edit_user_dialog").dialog("close"); if(data.sql_query) { $("#floating_menubar")