Skip to content

Commit

Permalink
Update to latest jquery-ujs.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmazza authored and Rafael Mendonça França committed Aug 27, 2014
1 parent d3bc214 commit 1eabddd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

| Gem | jQuery | jQuery UJS | jQuery UI |
|--------|--------|------------| ----------|
| 3.1.2 | 1.11.1 | 1.0.1 | - |
| 3.1.1 | 1.11.1 | 1.0.0 | - |
| 3.1.0 | 1.11.0 | - | - |
| 3.0.5 | 1.11.0 | - | - |
Expand Down
2 changes: 1 addition & 1 deletion lib/jquery/rails/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module Jquery
module Rails
VERSION = "3.1.1"
JQUERY_VERSION = "1.11.1"
JQUERY_UJS_VERSION = "1.0.0"
JQUERY_UJS_VERSION = "1.0.1"
end
end
7 changes: 4 additions & 3 deletions vendor/assets/javascripts/jquery_ujs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Unobtrusive scripting adapter for jQuery
* https://github.com/rails/jquery-ujs
*
* Requires jQuery 1.7.0 or later.
* Requires jQuery 1.8.0 or later.
*
* Released under the MIT license
*
Expand All @@ -25,7 +25,7 @@
linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]',

// Button elements bound by jquery-ujs
buttonClickSelector: 'button[data-remote], button[data-confirm]',
buttonClickSelector: 'button[data-remote]:not(form button), button[data-confirm]:not(form button)',

// Select elements bound by jquery-ujs
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
Expand All @@ -34,7 +34,7 @@
formSubmitSelector: 'form',

// Form input elements bound by jquery-ujs
formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])',
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])',

// Form input elements disabled during form submission
disableSelector: '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',
Expand Down Expand Up @@ -356,6 +356,7 @@

$document.delegate(rails.buttonClickSelector, 'click.rails', function(e) {
var button = $(this);

if (!rails.allowAction(button)) return rails.stopEverything(e);

if (button.is(rails.buttonDisableSelector)) rails.disableFormElement(button);
Expand Down

0 comments on commit 1eabddd

Please # to comment.