diff --git a/js/functions.js b/js/functions.js
index 1d3b74a69..b1635bb1c 100755
--- a/js/functions.js
+++ b/js/functions.js
@@ -15,6 +15,12 @@ var sql_box_locked = false;
*/
var only_once_elements = new Array();
+/**
+ * @var ajax_notification_visible boolean boolean that stores status of
+ * notification for PMA_ajaxShowNotification
+ */
+var ajax_message_init = false;
+
/**
* selects the content of a given object, f.e. a textarea
*
@@ -1735,6 +1741,7 @@ function PMA_ajaxInsertResponse(divisions_map) {
*/
function PMA_ajaxShowMessage(message, timeout) {
+
if(!message) {
var msg = 'Loading...';
}
@@ -1749,16 +1756,28 @@ function PMA_ajaxShowMessage(message, timeout) {
var to = timeout;
}
- $(function(){
- $('')
- .insertBefore("#serverinfo")
- .text(msg)
+ if( !ajax_message_init) {
+ $(function(){
+ $('')
+ .insertBefore("#serverinfo")
+ .html(msg)
+ .slideDown('medium')
+ .delay(to)
+ .slideUp('medium', function(){
+ $(this).html(""); //Clear the message
+ });
+ }, 'top.frame_content');
+ ajax_message_init = true;
+ }
+ else {
+ $("#loading")
+ .html(msg)
.slideDown('medium')
.delay(to)
- .slideUp('medium', function(){
- $(this).remove();
- });
- }, 'top.frame_content')
+ .slideUp('medium', function() {
+ $(this).html("");
+ })
+ }
}
/**