From: Jean-Philippe Lang Date: Sat, 14 Apr 2012 04:58:46 +0000 (+0000) Subject: Merged r9391 from trunk. X-Git-Tag: 1.4.0~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4c330a1241aa4d92aebad32f6bc7859efd42ea3b;p=redmine.git Merged r9391 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9403 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 483bc1a68..c95c34da6 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -520,4 +520,16 @@ function hideOnLoad() { }); } +function addFormObserversForDoubleSubmit() { + $$('form[method=post]').each(function(el) { + Event.observe(el, 'submit', function(e) { + var form = Event.element(e); + form.select('input[type=submit]').each(function(btn) { + btn.disable(); + }); + }); + }); +} + Event.observe(window, 'load', hideOnLoad); +Event.observe(window, 'load', addFormObserversForDoubleSubmit);