diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2017-02-20 14:29:26 +0900 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2017-02-20 14:29:55 +0900 |
commit | 41c33bd4b2ec3f4a482e6030b6fda15091d81e4a (patch) | |
tree | 12a2884bf4e822b80484b4f3b5b2f2f44e840347 /actionview/app/assets/javascripts/features | |
parent | a2234c5f68edebe7f842873f0c0d7c53b439861c (diff) | |
download | rails-41c33bd4b2ec3f4a482e6030b6fda15091d81e4a.tar.gz rails-41c33bd4b2ec3f4a482e6030b6fda15091d81e4a.tar.bz2 rails-41c33bd4b2ec3f4a482e6030b6fda15091d81e4a.zip |
Import rails-ujs v0.1.0 from rails/rails-ujs
Diffstat (limited to 'actionview/app/assets/javascripts/features')
-rw-r--r-- | actionview/app/assets/javascripts/features/remote.coffee | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/actionview/app/assets/javascripts/features/remote.coffee b/actionview/app/assets/javascripts/features/remote.coffee index 30a5dc21fa..852587042c 100644 --- a/actionview/app/assets/javascripts/features/remote.coffee +++ b/actionview/app/assets/javascripts/features/remote.coffee @@ -4,7 +4,7 @@ matches, getData, setData fire, stopEverything ajax, isCrossDomain - blankInputs, serializeElement + serializeElement } = Rails # Checks "data-remote" if true to handle the request through a XHR request. @@ -71,16 +71,6 @@ Rails.handleRemote = (e) -> ) stopEverything(e) -# Check whether any required fields are empty -# In both ajax mode and normal mode -Rails.validateForm = (e) -> - form = this - return if form.noValidate or getData(form, 'ujs:formnovalidate-button') - # Skip other logic when required values are missing or file upload is present - blankRequiredInputs = blankInputs(form, Rails.requiredInputSelector, false) - if blankRequiredInputs.length > 0 and fire(form, 'ajax:aborted:required', [blankRequiredInputs]) - stopEverything(e) - Rails.formSubmitButtonClick = (e) -> button = this form = button.form |