diff options
Diffstat (limited to 'actionview/app')
-rw-r--r-- | actionview/app/assets/javascripts/MIT-LICENSE | 2 | ||||
-rw-r--r-- | actionview/app/assets/javascripts/rails-ujs/features/disable.coffee | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/actionview/app/assets/javascripts/MIT-LICENSE b/actionview/app/assets/javascripts/MIT-LICENSE index 28e1b12496..03319ea365 100644 --- a/actionview/app/assets/javascripts/MIT-LICENSE +++ b/actionview/app/assets/javascripts/MIT-LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2007-2018 Rails Core team +Copyright (c) 2007-2019 Rails Core team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/actionview/app/assets/javascripts/rails-ujs/features/disable.coffee b/actionview/app/assets/javascripts/rails-ujs/features/disable.coffee index a8c692ee62..4cfaead078 100644 --- a/actionview/app/assets/javascripts/rails-ujs/features/disable.coffee +++ b/actionview/app/assets/javascripts/rails-ujs/features/disable.coffee @@ -34,6 +34,7 @@ Rails.disableElement = (e) -> # Replace element's html with the 'data-disable-with' after storing original html # and prevent clicking on it disableLinkElement = (element) -> + return if getData(element, 'ujs:disabled') replacement = element.getAttribute('data-disable-with') if replacement? setData(element, 'ujs:enable-with', element.innerHTML) # store enabled state @@ -58,6 +59,7 @@ disableFormElements = (form) -> formElements(form, Rails.formDisableSelector).forEach(disableFormElement) disableFormElement = (element) -> + return if getData(element, 'ujs:disabled') replacement = element.getAttribute('data-disable-with') if replacement? if matches(element, 'button') |