aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorThomas Haddad2017-03-29 16:41:31 +0200
committerThomas Haddad2017-03-29 16:42:13 +0200
commit753ade655b58d78398f6c2473ab48afed450ab1b (patch)
treec53ab7853104a0c6500bc11327fcebfeacc2eac0 /app/assets/javascripts
parentb29d19d3f5254c30a8660e9e8fbb93db3cb1d2cd (diff)
downloadchouette-core-753ade655b58d78398f6c2473ab48afed450ab1b.tar.bz2
Refs #2977: Fix submit event triggered multiple times in route edit
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com> Signed-off-by: Jean-Paul Lescouzeres <jean-paul.lescouzeres@af83.com> Signed-off-by: Xinhui Xu <xinhui.xu@af83.com>
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/forms.coffee4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/forms.coffee b/app/assets/javascripts/forms.coffee
index d350d4745..426f3e6ee 100644
--- a/app/assets/javascripts/forms.coffee
+++ b/app/assets/javascripts/forms.coffee
@@ -28,7 +28,9 @@
isEdge = !isIE && !!window.StyleMedia
if isIE || isEdge
- $(document).on 'click', '.formSubmitr', ->
+ $('.formSubmitr').off()
+ $(document).on 'click', '.formSubmitr', (e)->
+ e.preventDefault()
target = $(this).attr('form')
$('#' + target).submit()