aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts/forms.coffee
diff options
context:
space:
mode:
authorjpl2017-03-27 12:12:13 +0200
committerjpl2017-03-27 12:12:13 +0200
commitb23d05eeaca3cf9563e505c8f4fbf657fdcb5299 (patch)
treeba124c9e1361352a0867e31a94ac98c750cf87c1 /app/assets/javascripts/forms.coffee
parentac5bdcced03ef10e4c214685ef4a3c3dc339b321 (diff)
downloadchouette-core-b23d05eeaca3cf9563e505c8f4fbf657fdcb5299.tar.bz2
Refs #2813: fixing js listener for IE
Diffstat (limited to 'app/assets/javascripts/forms.coffee')
-rw-r--r--app/assets/javascripts/forms.coffee32
1 files changed, 15 insertions, 17 deletions
diff --git a/app/assets/javascripts/forms.coffee b/app/assets/javascripts/forms.coffee
index 33da921b6..d350d4745 100644
--- a/app/assets/javascripts/forms.coffee
+++ b/app/assets/javascripts/forms.coffee
@@ -17,23 +17,21 @@
else
labelCont.text(labelCont.data('checkedvalue'))
-# @submitMover = ->
-# if $('.page-action').children('.formSubmitr').length > 0
-# $('.page-action').children('.formSubmitr').remove()
-#
-# $('.formSubmitr').appendTo('.page-action')
-#
-# # IE fix
-# isIE = false || !!document.documentMode
-# isEdge = !isIE && !!window.StyleMedia
-#
-# if isIE || isEdge
-# $('.formSubmitr').each ->
-# target = $(this).attr('form')
-#
-# $(this).on 'click', ->
-# $('#' + target).submit()
+@submitMover = ->
+ if $('.page-action').children('.formSubmitr').length > 0
+ $('.page-action').children('.formSubmitr').remove()
+
+ $('.formSubmitr').appendTo('.page-action')
+
+ # IE fix
+ isIE = false || !!document.documentMode
+ isEdge = !isIE && !!window.StyleMedia
+
+ if isIE || isEdge
+ $(document).on 'click', '.formSubmitr', ->
+ target = $(this).attr('form')
+ $('#' + target).submit()
$(document).on 'ready page:load', togglableFilter
-# $(document).on 'ready page:load', submitMover
+$(document).on 'ready page:load', submitMover
$(document).on 'ready page:load', switchInput