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.
This commit is contained in:
Tyron Madlener
2011-03-31 14:36:11 +02:00
committed by Michal Čihař
parent c33ba84655
commit 0762bddfd1
6 changed files with 79 additions and 20 deletions

View File

@@ -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