summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorEtienne Massip <etienne.massip@gmail.com>2012-12-13 18:43:34 +0000
committerEtienne Massip <etienne.massip@gmail.com>2012-12-13 18:43:34 +0000
commitbc51058a7cdaf37a8ff11685a5210caa71740c77 (patch)
tree2e66da023d11488bc2c1921714ebdf31f451598b /public
parent7775f86a69f187b8e162280e1f4de1a8b58fd3dd (diff)
downloadredmine-bc51058a7cdaf37a8ff11685a5210caa71740c77.tar.gz
redmine-bc51058a7cdaf37a8ff11685a5210caa71740c77.zip
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10997 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/application.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index e5886a666..592a4f873 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -544,16 +544,19 @@ function warnLeavingUnsaved(message) {
};
};
-$(document).ready(function(){
- $('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings){
+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').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);