Skip to content
Browse files

Updated to latest jquery-ujs

  • Loading branch information...
1 parent 65e4aca commit b7e9d20d4ac6c440334e77ae9f35243a6fb81989 @JangoSteve JangoSteve committed Nov 18, 2011
Showing with 4 additions and 4 deletions.
  1. +1 −1 lib/jquery/rails/version.rb
  2. +3 −3 vendor/assets/javascripts/jquery_ujs.js
View
2 lib/jquery/rails/version.rb
@@ -3,6 +3,6 @@ module Rails
VERSION = "1.0.17"
JQUERY_VERSION = "1.7.0"
JQUERY_UI_VERSION = "1.8.16"
- JQUERY_UJS_VERSION = "17f4004310b6ece3cb240914932b4d6d46032c24"
+ JQUERY_UJS_VERSION = "4fe37537cb2d8e71005303d3acb469e6205d26db"
end
end
View
6 vendor/assets/javascripts/jquery_ujs.js
@@ -252,11 +252,11 @@
// find all the submit events directly bound to the form and
// manually invoke them. If anyone returns false then stop the loop
- callFormSubmitBindings: function(form) {
+ callFormSubmitBindings: function(form, event) {
var events = form.data('events'), continuePropagation = true;
if (events !== undefined && events['submit'] !== undefined) {
$.each(events['submit'], function(i, obj){
- if (typeof obj.handler === 'function') return continuePropagation = obj.handler(obj.data);
+ if (typeof obj.handler === 'function') return continuePropagation = obj.handler(event);
});
}
return continuePropagation;
@@ -335,7 +335,7 @@
// If browser does not support submit bubbling, then this live-binding will be called before direct
// bindings. Therefore, we should directly call any direct bindings before remotely submitting form.
- if (!$.support.submitBubbles && rails.callFormSubmitBindings(form) === false) return rails.stopEverything(e);
+ if (!$.support.submitBubbles && $().jquery < '1.7' && rails.callFormSubmitBindings(form, e) === false) return rails.stopEverything(e);
rails.handleRemote(form);
return false;

0 comments on commit b7e9d20

Please sign in to comment.
Something went wrong with that request. Please try again.