summaryrefslogtreecommitdiffstats
path: root/public/javascripts/application.js
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-27 19:32:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-27 19:32:57 +0000
commit5db3396c07b26892a2e3cd26dc369113379553b1 (patch)
treee8c2462169f809f08572c62686d98a8d83620a2b /public/javascripts/application.js
parentc1a18a28898fcac9fa6038bf42b67df43c2e728d (diff)
downloadredmine-5db3396c07b26892a2e3cd26dc369113379553b1.tar.gz
redmine-5db3396c07b26892a2e3cd26dc369113379553b1.zip
Added an ajax indicator for all ajax calls. Also removed highlight effects on my page layout edition.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@485 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'public/javascripts/application.js')
-rw-r--r--public/javascripts/application.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index a5d9de292..81708d1d9 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -30,4 +30,18 @@ function showTab(name) {
Element.show('tab-content-' + name);
Element.addClassName('tab-' + name, "selected");
return false;
-} \ No newline at end of file
+}
+
+/* shows and hides ajax indicator */
+Ajax.Responders.register({
+ onCreate: function(){
+ if ($('ajax-indicator') && Ajax.activeRequestCount > 0) {
+ Element.show('ajax-indicator');
+ }
+ },
+ onComplete: function(){
+ if ($('ajax-indicator') && Ajax.activeRequestCount == 0) {
+ Element.hide('ajax-indicator');
+ }
+ }
+});