diff options
Diffstat (limited to 'app/assets/javascripts/forms.coffee')
| -rw-r--r-- | app/assets/javascripts/forms.coffee | 32 |
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 |
