The branch, master has been updated
via 0762bddfd122c9e8995717685411c32e21ebfe18 (commit)
from c33ba8465564f350a2e1e6e269fb7ea577de9418 (commit)
- Log -----------------------------------------------------------------
commit 0762bddfd122c9e8995717685411c32e21ebfe18
Author: Tyron Madlener <tyronx(a)gmail.com>
Date: Thu Mar 31 14:36:11 2011 +0200
Hide 'Loading' message once request is done, not on 5 sec timeout.
Applied to every loading message that doesn't show a success/error
feedback message.
-----------------------------------------------------------------------
Summary of changes:
js/db_operations.js | 6 +++++-
js/db_search.js | 7 ++++++-
js/functions.js | 29 +++++++++++++++++++++--------
js/server_privileges.js | 25 +++++++++++++++++++++----
js/sql.js | 24 ++++++++++++++++++++----
js/tbl_select.js | 8 ++++++--
6 files changed, 79 insertions(+), 20 deletions(-)
diff --git a/js/db_operations.js b/js/db_operations.js
index 915c537..7b7e0e3 100644
--- a/js/db_operations.js
+++ b/js/db_operations.js
@@ -91,7 +91,7 @@ $(document).ready(function() {
$("#copy_db_form.ajax").live('submit', function(event) {
event.preventDefault();
- PMA_ajaxShowMessage(PMA_messages['strCopyingDatabase']);
+ var msgbox = PMA_ajaxShowMessage(PMA_messages['strCopyingDatabase']);
var $form = $(this);
@@ -119,6 +119,10 @@ $(document).ready(function() {
else {
$('#topmenucontainer').after(data.error);
}
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}) // end $.get
}) // end copy database
diff --git a/js/db_search.js b/js/db_search.js
index 84a3dd8..48b354d 100644
--- a/js/db_search.js
+++ b/js/db_search.js
@@ -138,7 +138,7 @@ $(document).ready(function() {
$("#db_search_form.ajax").live('submit', function(event) {
event.preventDefault();
- PMA_ajaxShowMessage(PMA_messages['strSearching']);
+ var msgbox = PMA_ajaxShowMessage(PMA_messages['strSearching']);
// jQuery object to reuse
$form = $(this);
@@ -166,6 +166,11 @@ $(document).ready(function() {
// error message (zero rows)
$("#sqlqueryresults").html(response['message']);
}
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
+
})
})
}, 'top.frame_content'); // end $(document).ready()
diff --git a/js/functions.js b/js/functions.js
index dbdc646..b6c9da2 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1233,9 +1233,9 @@ function PMA_ajaxShowMessage(message, timeout) {
$('<span id="loading" class="ajax_notification"></span>')
.appendTo("#loading_parent")
.html(msg)
- .slideDown('medium')
+ .fadeIn('medium')
.delay(to)
- .slideUp('medium', function(){
+ .fadeOut('medium', function(){
$(this)
.html("") //Clear the message
.hide();
@@ -1248,14 +1248,16 @@ function PMA_ajaxShowMessage(message, timeout) {
$("#loading")
.clearQueue()
.html(msg)
- .slideDown('medium')
+ .fadeIn('medium')
.delay(to)
- .slideUp('medium', function() {
+ .fadeOut('medium', function() {
$(this)
.html("")
.hide();
})
}
+
+ return $("#loading");
}
/**
@@ -1389,7 +1391,7 @@ $(document).ready(function() {
var button_options_error = {};
button_options_error[PMA_messages['strOK']] = function() {$(this).dialog('close').remove();}
- PMA_ajaxShowMessage();
+ var msgbox = PMA_ajaxShowMessage();
if (! $form.find('input:hidden').is('#ajax_request_hidden')) {
$form.append('<input type="hidden" id="ajax_request_hidden" name="ajax_request" value="true" />');
}
@@ -1418,7 +1420,10 @@ $(document).ready(function() {
open: PMA_verifyTypeOfAllColumns,
buttons : button_options
}); // end dialog options
- }
+ }
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}) // end $.get()
// empty table name and number of columns from the minimal form
@@ -1546,7 +1551,7 @@ $(document).ready(function() {
*/
var $form = $("#create_table_form");
- PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
+ var msgbox = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
if (! $form.find('input:hidden').is('#ajax_request_hidden')) {
$form.append('<input type="hidden" id="ajax_request_hidden" name="ajax_request" value="true" />');
}
@@ -1562,6 +1567,10 @@ $(document).ready(function() {
$("#create_table_div").html(data);
}
PMA_verifyTypeOfAllColumns();
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}) //end $.post()
}) // end create table form (add fields)
@@ -1744,7 +1753,7 @@ $(document).ready(function() {
*/
var this_value = $(this).val();
- PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
+ var msgbox = PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
$(the_form).append('<input type="hidden" name="ajax_request" value="true" />');
$.post($(the_form).attr('action'), $(the_form).serialize() + '&change_pw='+ this_value, function(data) {
@@ -1753,6 +1762,10 @@ $(document).ready(function() {
$("#change_password_dialog").hide().remove();
$("#edit_user_dialog").dialog("close").remove();
$('#change_password_anchor.dialog_active').removeClass('dialog_active').addClass('ajax');
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}
else {
PMA_ajaxShowMessage(data.error);
diff --git a/js/server_privileges.js b/js/server_privileges.js
index 7b30ccf..d6c51cb 100644
--- a/js/server_privileges.js
+++ b/js/server_privileges.js
@@ -163,7 +163,7 @@ $(document).ready(function() {
/** @lends jQuery */
event.preventDefault();
- PMA_ajaxShowMessage();
+ var msgbox = PMA_ajaxShowMessage();
/**
* @var button_options Object containing options for jQueryUI dialog buttons
@@ -224,6 +224,10 @@ $(document).ready(function() {
buttons: button_options
}); //dialog options end
displayPasswordGenerateButton();
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}); // end $.get()
});//end of Add New User AJAX event handler
@@ -314,7 +318,7 @@ $(document).ready(function() {
/** @lends jQuery */
event.preventDefault();
- PMA_ajaxShowMessage();
+ var msgbox = PMA_ajaxShowMessage();
$(this).parents('tr').addClass('current_row');
@@ -333,6 +337,10 @@ $(document).ready(function() {
buttons: button_options
}); //dialog options end
displayPasswordGenerateButton();
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}) // end $.get()
})
@@ -418,7 +426,7 @@ $(document).ready(function() {
/** @lends jQuery */
event.preventDefault();
- PMA_ajaxShowMessage();
+ var msgbox = PMA_ajaxShowMessage();
/**
* @var button_options Object containing options for jQueryUI dialog buttons
@@ -433,6 +441,11 @@ $(document).ready(function() {
width : 500,
buttons: button_options
});
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
+
}) //end $.get
}) //end export privileges
@@ -447,7 +460,7 @@ $(document).ready(function() {
$("#initials_table.ajax").find("a").live('click', function(event) {
event.preventDefault();
- PMA_ajaxShowMessage();
+ var msgbox = PMA_ajaxShowMessage();
$.get($(this).attr('href'), {'ajax_request' : true}, function(data) {
// This form is not on screen when first entering Privileges
@@ -457,6 +470,10 @@ $(document).ready(function() {
$("#initials_table")
.after(data).show("medium")
.siblings("h2").not(":first").remove();
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}) // end $.get
})// end of the paginate users table
diff --git a/js/sql.js b/js/sql.js
index 5b0fc08..5b8081e 100644
--- a/js/sql.js
+++ b/js/sql.js
@@ -248,7 +248,7 @@ $(document).ready(function() {
$('.error').remove();
$form = $(this);
- PMA_ajaxShowMessage();
+ var msgbox = PMA_ajaxShowMessage();
if (! $form.find('input:hidden').is('#ajax_request_hidden')) {
$form.append('<input type="hidden" id="ajax_request_hidden" name="ajax_request" value="true" />');
@@ -302,6 +302,10 @@ $(document).ready(function() {
PMA_init_slider();
}
}
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}) // end $.post()
}) // end SQL Query submit
@@ -321,7 +325,7 @@ $(document).ready(function() {
/** @lends jQuery */
event.preventDefault();
- PMA_ajaxShowMessage();
+ var msgbox = PMA_ajaxShowMessage();
/**
* @var $the_form Object referring to the form element that paginates the results table
@@ -334,6 +338,10 @@ $(document).ready(function() {
$("#sqlqueryresults").html(data);
$("#sqlqueryresults").trigger('appendAnchor');
PMA_init_slider();
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}) // end $.post()
})// end Paginate results table
@@ -349,12 +357,16 @@ $(document).ready(function() {
if ($(this).hasClass('ajax')) {
event.preventDefault();
- PMA_ajaxShowMessage();
+ var msgbox = PMA_ajaxShowMessage();
$.post($the_form.attr('action'), $the_form.serialize() + '&ajax_request=true', function(data) {
$("#sqlqueryresults").html(data);
$("#sqlqueryresults").trigger('appendAnchor');
PMA_init_slider();
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}) // end $.post()
} else {
$the_form.submit();
@@ -371,7 +383,7 @@ $(document).ready(function() {
$("#table_results.ajax").find("a[title=Sort]").live('click', function(event) {
event.preventDefault();
- PMA_ajaxShowMessage();
+ var msgbox = PMA_ajaxShowMessage();
$anchor = $(this);
@@ -379,6 +391,10 @@ $(document).ready(function() {
$("#sqlqueryresults")
.html(data)
.trigger('appendAnchor');
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
}) // end $.get()
})//end Sort results table
diff --git a/js/tbl_select.js b/js/tbl_select.js
index 47457ed..88aceff 100644
--- a/js/tbl_select.js
+++ b/js/tbl_select.js
@@ -58,7 +58,7 @@ $(document).ready(function() {
// empty previous search results while we are waiting for new results
$("#sqlqueryresults").empty();
- PMA_ajaxShowMessage(PMA_messages['strSearching']);
+ var msgbox = PMA_ajaxShowMessage(PMA_messages['strSearching']);
// add this hidden field just once
if (! $search_form.find('input:hidden').is('#ajax_request_hidden')) {
@@ -84,6 +84,10 @@ $(document).ready(function() {
// error message (zero rows)
$("#sqlqueryresults").html(response['message']);
}
- })
+
+ msgbox.clearQueue().fadeOut('medium', function() {
+ $(this).hide();
+ });
+ }) // end $.post()
})
}, 'top.frame_content'); // end $(document).ready()
hooks/post-receive
--
phpMyAdmin