Skip to content

Commit aa94d5b

Browse files
author
bearded
committed
Update jQuery Form Plugin to version 2.84
1 parent b9ec602 commit aa94d5b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lib/remotipart/rails/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Remotipart
22
module Rails
33
VERSION = "0.4.1"
4-
FORMJS_VERSION = "2.82"
4+
FORMJS_VERSION = "2.84"
55
end
66
end

vendor/assets/javascripts/jquery.form.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*!
22
* jQuery Form Plugin
3-
* version: 2.82 (15-JUN-2011)
3+
* version: 2.84 (12-AUG-2011)
44
* @requires jQuery v1.3.2 or later
55
*
66
* Examples and documentation at: http://malsup.com/jquery/form/
@@ -50,7 +50,7 @@ $.fn.ajaxSubmit = function(options) {
5050
return this;
5151
}
5252

53-
var method, action, url, $form = this;;
53+
var method, action, url, $form = this;
5454

5555
if (typeof options == 'function') {
5656
options = { success: options };
@@ -91,7 +91,7 @@ $.fn.ajaxSubmit = function(options) {
9191
if (options.data) {
9292
options.extraData = options.data;
9393
for (n in options.data) {
94-
if(options.data[n] instanceof Array) {
94+
if( $.isArray(options.data[n]) ) {
9595
for (var k in options.data[n]) {
9696
a.push( { name: n, value: options.data[n][k] } );
9797
}
@@ -188,12 +188,14 @@ $.fn.ajaxSubmit = function(options) {
188188

189189
// private function for handling file uploads (hat tip to YAHOO!)
190190
function fileUpload(a) {
191-
var form = $form[0], i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
191+
var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
192+
var useProp = !!$.fn.prop;
192193

193194
if (a) {
194195
// ensure that every serialized input is still enabled
195196
for (i=0; i < a.length; i++) {
196-
$(form[a[i].name]).attr('disabled', false);
197+
el = $(form[a[i].name]);
198+
el[ useProp ? 'prop' : 'attr' ]('disabled', false);
197199
}
198200
}
199201

0 commit comments

Comments
 (0)