Code cleanup.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10997 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Etienne Massip 2012-12-13 18:43:34 +00:00
parent 7775f86a69
commit bc51058a7c
1 changed files with 8 additions and 4 deletions

View File

@ -544,16 +544,19 @@ function warnLeavingUnsaved(message) {
};
};
$(document).ready(function(){
function setupAjaxIndicator() {
$('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) {
if ($('.ajax-loading').length == 0 && settings.contentType != 'application/octet-stream') {
$('#ajax-indicator').show();
}
});
$('#ajax-indicator').bind('ajaxStop', function() {
$('#ajax-indicator').hide();
});
});
}
function hideOnLoad() {
$('.hol').hide();
@ -578,5 +581,6 @@ function blockEventPropagation(event) {
event.preventDefault();
}
$(document).ready(setupAjaxIndicator);
$(document).ready(hideOnLoad);
$(document).ready(addFormObserversForDoubleSubmit);