Commit 2daa6161fd08e18bdf7f1ad0f30a83a58226543e
1 parent
74a89d9e
Exists in
master
and in
4 other branches
prevent double note submit
Showing
3 changed files
with
13 additions
and
1 deletions
Show diff stats
app/views/notes/_form.html.haml
app/views/notes/_notes.html.haml
... | ... | @@ -9,6 +9,15 @@ |
9 | 9 | $('.delete-note').live('ajax:success', function() { |
10 | 10 | $(this).closest('li').fadeOut(); }); |
11 | 11 | |
12 | + $("#new_note").live("ajax:before", function(){ | |
13 | + $("#submit_note").attr("disabled", "disabled"); | |
14 | + }) | |
15 | + | |
16 | + $("#new_note").live("ajax:complete", function(){ | |
17 | + $("#submit_note").removeAttr("disabled"); | |
18 | + }) | |
19 | + | |
20 | + | |
12 | 21 | - if ["issues", "projects"].include?(controller.controller_name) |
13 | 22 | :javascript |
14 | 23 | $(function(){ | ... | ... |