vendor/assets/javascripts/jquery.form.js in remotipart-0.4.1 vs vendor/assets/javascripts/jquery.form.js in remotipart-0.4.2
- old
+ new
@@ -1,8 +1,8 @@
/*!
* jQuery Form Plugin
- * version: 2.82 (15-JUN-2011)
+ * version: 2.84 (12-AUG-2011)
* @requires jQuery v1.3.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
@@ -48,11 +48,11 @@
if (!this.length) {
log('ajaxSubmit: skipping submit process - no element selected');
return this;
}
- var method, action, url, $form = this;;
+ var method, action, url, $form = this;
if (typeof options == 'function') {
options = { success: options };
}
@@ -89,11 +89,11 @@
var n,v,a = this.formToArray(options.semantic);
if (options.data) {
options.extraData = options.data;
for (n in options.data) {
- if(options.data[n] instanceof Array) {
+ if( $.isArray(options.data[n]) ) {
for (var k in options.data[n]) {
a.push( { name: n, value: options.data[n][k] } );
}
}
else {
@@ -186,15 +186,17 @@
return this;
// private function for handling file uploads (hat tip to YAHOO!)
function fileUpload(a) {
- var form = $form[0], i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
+ var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
+ var useProp = !!$.fn.prop;
if (a) {
// ensure that every serialized input is still enabled
for (i=0; i < a.length; i++) {
- $(form[a[i].name]).attr('disabled', false);
+ el = $(form[a[i].name]);
+ el[ useProp ? 'prop' : 'attr' ]('disabled', false);
}
}
if ($(':input[name=submit],:input[id=submit]', form).length) {
// if there is an input with a name or id of 'submit' then we won't be