From: Brion Vibber Date: Mon, 31 Jan 2011 19:02:29 +0000 (-0800) Subject: Update jquery.form.js to 2.63 -- 2.60 fixed our Opera regression per issue #3015 X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b2f4a023774258b13d3db8f537c904b4cfb5bb38;p=quix0rs-gnu-social.git Update jquery.form.js to 2.63 -- 2.60 fixed our Opera regression per issue #3015 Thanks to the fine folks at http://forum.jquery.com/topic/regression-form-plugin-ajaxform-cannot-access-xml-return-data-in-opera#14737000001950332 :D --- diff --git a/js/jquery.form.js b/js/jquery.form.js index 2b853df428..14e14572af 100644 --- a/js/jquery.form.js +++ b/js/jquery.form.js @@ -1,6 +1,6 @@ /*! * jQuery Form Plugin - * version: 2.49 (18-OCT-2010) + * version: 2.63 (29-JAN-2011) * @requires jQuery v1.3.2 or later * * Examples and documentation at: http://malsup.com/jquery/form/ @@ -54,7 +54,8 @@ $.fn.ajaxSubmit = function(options) { options = { success: options }; } - var url = $.trim(this.attr('action')); + var action = this.attr('action'); + var url = (typeof action === 'string') ? $.trim(action) : ''; if (url) { // clean url (don't include hash vaue) url = (url.match(/^([^#]+)/)||[])[1]; @@ -63,7 +64,7 @@ $.fn.ajaxSubmit = function(options) { options = $.extend(true, { url: url, - type: this.attr('method') || 'GET', + type: this[0].getAttribute('method') || 'GET', // IE7 massage (see issue 57) iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' }, options); @@ -167,7 +168,7 @@ $.fn.ajaxSubmit = function(options) { } } else { - $.ajax(options); + $.ajax(options); } // fire 'notify' event @@ -189,15 +190,7 @@ $.fn.ajaxSubmit = function(options) { var s = $.extend(true, {}, $.ajaxSettings, options); s.context = s.context || s; var id = 'jqFormIO' + (new Date().getTime()), fn = '_'+id; - window[fn] = function() { - var f = $io.data('form-plugin-onload'); - if (f) { - f(); - window[fn] = undefined; - try { delete window[fn]; } catch(e){} - } - } - var $io = $('