Skip to content

Commit

Permalink
Updated to latest jquery-ujs
Browse files Browse the repository at this point in the history
  • Loading branch information
JangoSteve committed Nov 18, 2011
1 parent 65e4aca commit b7e9d20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/jquery/rails/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions vendor/assets/javascripts/jquery_ujs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b7e9d20

Please sign in to comment.