2017-03-30 14:41:17 -04:00
#= require ./rails-ujs/BANNER
#= export Rails
#= require_self
#= require_tree ./rails-ujs/utils
#= require_tree ./rails-ujs/features
#= require ./rails-ujs/start
2016-11-25 10:27:07 -05:00
2017-03-30 14:41:17 -04:00
@Rails =
# Link elements bound by rails-ujs
linkClickSelector: ' a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable] '
2016-11-25 10:27:07 -05:00
2017-03-30 14:41:17 -04:00
# Button elements bound by rails-ujs
buttonClickSelector:
selector: ' button[data-remote]:not([form]), button[data-confirm]:not([form]) '
exclude: ' form button '
2016-11-25 10:27:07 -05:00
2017-03-30 14:41:17 -04:00
# Select elements bound by rails-ujs
inputChangeSelector: ' select[data-remote], input[data-remote], textarea[data-remote] '
2016-11-25 10:27:07 -05:00
2017-03-30 14:41:17 -04:00
# Form elements bound by rails-ujs
formSubmitSelector: ' form '
2016-11-25 10:27:07 -05:00
2017-03-30 14:41:17 -04:00
# Form input elements bound by rails-ujs
formInputClickSelector: ' form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type]) '
2016-11-25 10:27:07 -05:00
2017-03-30 14:41:17 -04:00
# Form input elements disabled during form submission
formDisableSelector: ' input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled '
2016-11-25 10:27:07 -05:00
2017-03-30 14:41:17 -04:00
# Form input elements re-enabled after form submission
formEnableSelector: ' input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled '
2016-11-25 10:27:07 -05:00
2017-03-30 14:41:17 -04:00
# Form file input elements
fileInputSelector: ' input[name][type=file]:not([disabled]) '
2016-11-25 10:27:07 -05:00
2017-03-30 14:41:17 -04:00
# Link onClick disable selector with possible reenable after remote submission
linkDisableSelector: ' a[data-disable-with], a[data-disable] '
2016-11-25 10:27:07 -05:00
2017-03-30 14:41:17 -04:00
# Button onClick disable selector with possible reenable after remote submission
buttonDisableSelector: ' button[data-remote][data-disable-with], button[data-remote][data-disable] '