diff --git a/js/ajax.js b/js/ajax.js index 55a74ce316..2f9167a408 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -360,7 +360,7 @@ var AJAX = { if (typeof data.success !== 'undefined' && data.success) { if(typeof data.user_changed !== 'undefined' && data.user_changed == 1) { - window.location.reload(); + window.location = "index.php"; PMA_ajaxShowMessage("Loading...", false); AJAX.active = false; AJAX.xhr = null; @@ -382,9 +382,6 @@ var AJAX = { } AJAX.scriptHandler.reset(function () { - if (data._reloadNavigation) { - PMA_reloadNavigation(); - } if (data._title) { $('title').replaceWith(data._title); } @@ -505,6 +502,11 @@ var AJAX = { $('html, body').animate({ scrollTop:$(document).height() }, 'slow'); } } + + if (data._reloadNavigation) { + PMA_reloadNavigation(); + } + PMA_ajaxShowMessage(msg, false); // bind for php error reporting forms (popup) $('#pma_ignore_errors_popup').on('click', function () { diff --git a/js/functions.js b/js/functions.js index 6ad3b8f542..87e30ffd87 100644 --- a/js/functions.js +++ b/js/functions.js @@ -982,10 +982,14 @@ AJAX.registerOnload('functions.js', function () { } // window.location.reload(true); if ($("#modalOverlay").length) { - $("#modalOverlay").replaceWith(data.error); - } else { + + } + else { $('body').append(data.error); } + if($("#input_username").length) { + $("#input_username").focus(); + } _idleSecondsCounter = 0; } }