Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/jquery
File: jquery.form.js
/*!
[0] Fix | Delete
* jQuery Form Plugin
[1] Fix | Delete
* version: 4.3.0
[2] Fix | Delete
* Requires jQuery v1.7.2 or later
[3] Fix | Delete
* Project repository: https://github.com/jquery-form/form
[4] Fix | Delete
[5] Fix | Delete
* Copyright 2017 Kevin Morris
[6] Fix | Delete
* Copyright 2006 M. Alsup
[7] Fix | Delete
[8] Fix | Delete
* Dual licensed under the LGPL-2.1+ or MIT licenses
[9] Fix | Delete
* https://github.com/jquery-form/form#license
[10] Fix | Delete
[11] Fix | Delete
* This library is free software; you can redistribute it and/or
[12] Fix | Delete
* modify it under the terms of the GNU Lesser General Public
[13] Fix | Delete
* License as published by the Free Software Foundation; either
[14] Fix | Delete
* version 2.1 of the License, or (at your option) any later version.
[15] Fix | Delete
* This library is distributed in the hope that it will be useful,
[16] Fix | Delete
* but WITHOUT ANY WARRANTY; without even the implied warranty of
[17] Fix | Delete
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[18] Fix | Delete
* Lesser General Public License for more details.
[19] Fix | Delete
*/
[20] Fix | Delete
/* global ActiveXObject */
[21] Fix | Delete
[22] Fix | Delete
/* eslint-disable */
[23] Fix | Delete
(function (factory) {
[24] Fix | Delete
if (typeof define === 'function' && define.amd) {
[25] Fix | Delete
// AMD. Register as an anonymous module.
[26] Fix | Delete
define(['jquery'], factory);
[27] Fix | Delete
} else if (typeof module === 'object' && module.exports) {
[28] Fix | Delete
// Node/CommonJS
[29] Fix | Delete
module.exports = function( root, jQuery ) {
[30] Fix | Delete
if (typeof jQuery === 'undefined') {
[31] Fix | Delete
// require('jQuery') returns a factory that requires window to build a jQuery instance, we normalize how we use modules
[32] Fix | Delete
// that require this pattern but the window provided is a noop if it's defined (how jquery works)
[33] Fix | Delete
if (typeof window !== 'undefined') {
[34] Fix | Delete
jQuery = require('jquery');
[35] Fix | Delete
}
[36] Fix | Delete
else {
[37] Fix | Delete
jQuery = require('jquery')(root);
[38] Fix | Delete
}
[39] Fix | Delete
}
[40] Fix | Delete
factory(jQuery);
[41] Fix | Delete
return jQuery;
[42] Fix | Delete
};
[43] Fix | Delete
} else {
[44] Fix | Delete
// Browser globals
[45] Fix | Delete
factory(jQuery);
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
}(function ($) {
[49] Fix | Delete
/* eslint-enable */
[50] Fix | Delete
'use strict';
[51] Fix | Delete
[52] Fix | Delete
/*
[53] Fix | Delete
Usage Note:
[54] Fix | Delete
-----------
[55] Fix | Delete
Do not use both ajaxSubmit and ajaxForm on the same form. These
[56] Fix | Delete
functions are mutually exclusive. Use ajaxSubmit if you want
[57] Fix | Delete
to bind your own submit handler to the form. For example,
[58] Fix | Delete
[59] Fix | Delete
$(document).ready(function() {
[60] Fix | Delete
$('#myForm').on('submit', function(e) {
[61] Fix | Delete
e.preventDefault(); // <-- important
[62] Fix | Delete
$(this).ajaxSubmit({
[63] Fix | Delete
target: '#output'
[64] Fix | Delete
});
[65] Fix | Delete
});
[66] Fix | Delete
});
[67] Fix | Delete
[68] Fix | Delete
Use ajaxForm when you want the plugin to manage all the event binding
[69] Fix | Delete
for you. For example,
[70] Fix | Delete
[71] Fix | Delete
$(document).ready(function() {
[72] Fix | Delete
$('#myForm').ajaxForm({
[73] Fix | Delete
target: '#output'
[74] Fix | Delete
});
[75] Fix | Delete
});
[76] Fix | Delete
[77] Fix | Delete
You can also use ajaxForm with delegation (requires jQuery v1.7+), so the
[78] Fix | Delete
form does not have to exist when you invoke ajaxForm:
[79] Fix | Delete
[80] Fix | Delete
$('#myForm').ajaxForm({
[81] Fix | Delete
delegation: true,
[82] Fix | Delete
target: '#output'
[83] Fix | Delete
});
[84] Fix | Delete
[85] Fix | Delete
When using ajaxForm, the ajaxSubmit function will be invoked for you
[86] Fix | Delete
at the appropriate time.
[87] Fix | Delete
*/
[88] Fix | Delete
[89] Fix | Delete
var rCRLF = /\r?\n/g;
[90] Fix | Delete
[91] Fix | Delete
/**
[92] Fix | Delete
* Feature detection
[93] Fix | Delete
*/
[94] Fix | Delete
var feature = {};
[95] Fix | Delete
[96] Fix | Delete
feature.fileapi = $('<input type="file">').get(0).files !== undefined;
[97] Fix | Delete
feature.formdata = (typeof window.FormData !== 'undefined');
[98] Fix | Delete
[99] Fix | Delete
var hasProp = !!$.fn.prop;
[100] Fix | Delete
[101] Fix | Delete
// attr2 uses prop when it can but checks the return type for
[102] Fix | Delete
// an expected string. This accounts for the case where a form
[103] Fix | Delete
// contains inputs with names like "action" or "method"; in those
[104] Fix | Delete
// cases "prop" returns the element
[105] Fix | Delete
$.fn.attr2 = function() {
[106] Fix | Delete
if (!hasProp) {
[107] Fix | Delete
return this.attr.apply(this, arguments);
[108] Fix | Delete
}
[109] Fix | Delete
[110] Fix | Delete
var val = this.prop.apply(this, arguments);
[111] Fix | Delete
[112] Fix | Delete
if ((val && val.jquery) || typeof val === 'string') {
[113] Fix | Delete
return val;
[114] Fix | Delete
}
[115] Fix | Delete
[116] Fix | Delete
return this.attr.apply(this, arguments);
[117] Fix | Delete
};
[118] Fix | Delete
[119] Fix | Delete
/**
[120] Fix | Delete
* ajaxSubmit() provides a mechanism for immediately submitting
[121] Fix | Delete
* an HTML form using AJAX.
[122] Fix | Delete
*
[123] Fix | Delete
* @param {object|string} options jquery.form.js parameters or custom url for submission
[124] Fix | Delete
* @param {object} data extraData
[125] Fix | Delete
* @param {string} dataType ajax dataType
[126] Fix | Delete
* @param {function} onSuccess ajax success callback function
[127] Fix | Delete
*/
[128] Fix | Delete
$.fn.ajaxSubmit = function(options, data, dataType, onSuccess) {
[129] Fix | Delete
// fast fail if nothing selected (http://dev.jquery.com/ticket/2752)
[130] Fix | Delete
if (!this.length) {
[131] Fix | Delete
log('ajaxSubmit: skipping submit process - no element selected');
[132] Fix | Delete
[133] Fix | Delete
return this;
[134] Fix | Delete
}
[135] Fix | Delete
[136] Fix | Delete
/* eslint consistent-this: ["error", "$form"] */
[137] Fix | Delete
var method, action, url, isMsie, iframeSrc, $form = this;
[138] Fix | Delete
[139] Fix | Delete
if (typeof options === 'function') {
[140] Fix | Delete
options = {success: options};
[141] Fix | Delete
[142] Fix | Delete
} else if (typeof options === 'string' || (options === false && arguments.length > 0)) {
[143] Fix | Delete
options = {
[144] Fix | Delete
'url' : options,
[145] Fix | Delete
'data' : data,
[146] Fix | Delete
'dataType' : dataType
[147] Fix | Delete
};
[148] Fix | Delete
[149] Fix | Delete
if (typeof onSuccess === 'function') {
[150] Fix | Delete
options.success = onSuccess;
[151] Fix | Delete
}
[152] Fix | Delete
[153] Fix | Delete
} else if (typeof options === 'undefined') {
[154] Fix | Delete
options = {};
[155] Fix | Delete
}
[156] Fix | Delete
[157] Fix | Delete
method = options.method || options.type || this.attr2('method');
[158] Fix | Delete
action = options.url || this.attr2('action');
[159] Fix | Delete
[160] Fix | Delete
url = (typeof action === 'string') ? $.trim(action) : '';
[161] Fix | Delete
url = url || window.location.href || '';
[162] Fix | Delete
if (url) {
[163] Fix | Delete
// clean url (don't include hash vaue)
[164] Fix | Delete
url = (url.match(/^([^#]+)/) || [])[1];
[165] Fix | Delete
}
[166] Fix | Delete
// IE requires javascript:false in https, but this breaks chrome >83 and goes against spec.
[167] Fix | Delete
// Instead of using javascript:false always, let's only apply it for IE.
[168] Fix | Delete
isMsie = /(MSIE|Trident)/.test(navigator.userAgent || '');
[169] Fix | Delete
iframeSrc = (isMsie && /^https/i.test(window.location.href || '')) ? 'javascript:false' : 'about:blank'; // eslint-disable-line no-script-url
[170] Fix | Delete
[171] Fix | Delete
options = $.extend(true, {
[172] Fix | Delete
url : url,
[173] Fix | Delete
success : $.ajaxSettings.success,
[174] Fix | Delete
type : method || $.ajaxSettings.type,
[175] Fix | Delete
iframeSrc : iframeSrc
[176] Fix | Delete
}, options);
[177] Fix | Delete
[178] Fix | Delete
// hook for manipulating the form data before it is extracted;
[179] Fix | Delete
// convenient for use with rich editors like tinyMCE or FCKEditor
[180] Fix | Delete
var veto = {};
[181] Fix | Delete
[182] Fix | Delete
this.trigger('form-pre-serialize', [this, options, veto]);
[183] Fix | Delete
[184] Fix | Delete
if (veto.veto) {
[185] Fix | Delete
log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');
[186] Fix | Delete
[187] Fix | Delete
return this;
[188] Fix | Delete
}
[189] Fix | Delete
[190] Fix | Delete
// provide opportunity to alter form data before it is serialized
[191] Fix | Delete
if (options.beforeSerialize && options.beforeSerialize(this, options) === false) {
[192] Fix | Delete
log('ajaxSubmit: submit aborted via beforeSerialize callback');
[193] Fix | Delete
[194] Fix | Delete
return this;
[195] Fix | Delete
}
[196] Fix | Delete
[197] Fix | Delete
var traditional = options.traditional;
[198] Fix | Delete
[199] Fix | Delete
if (typeof traditional === 'undefined') {
[200] Fix | Delete
traditional = $.ajaxSettings.traditional;
[201] Fix | Delete
}
[202] Fix | Delete
[203] Fix | Delete
var elements = [];
[204] Fix | Delete
var qx, a = this.formToArray(options.semantic, elements, options.filtering);
[205] Fix | Delete
[206] Fix | Delete
if (options.data) {
[207] Fix | Delete
var optionsData = $.isFunction(options.data) ? options.data(a) : options.data;
[208] Fix | Delete
[209] Fix | Delete
options.extraData = optionsData;
[210] Fix | Delete
qx = $.param(optionsData, traditional);
[211] Fix | Delete
}
[212] Fix | Delete
[213] Fix | Delete
// give pre-submit callback an opportunity to abort the submit
[214] Fix | Delete
if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) {
[215] Fix | Delete
log('ajaxSubmit: submit aborted via beforeSubmit callback');
[216] Fix | Delete
[217] Fix | Delete
return this;
[218] Fix | Delete
}
[219] Fix | Delete
[220] Fix | Delete
// fire vetoable 'validate' event
[221] Fix | Delete
this.trigger('form-submit-validate', [a, this, options, veto]);
[222] Fix | Delete
if (veto.veto) {
[223] Fix | Delete
log('ajaxSubmit: submit vetoed via form-submit-validate trigger');
[224] Fix | Delete
[225] Fix | Delete
return this;
[226] Fix | Delete
}
[227] Fix | Delete
[228] Fix | Delete
var q = $.param(a, traditional);
[229] Fix | Delete
[230] Fix | Delete
if (qx) {
[231] Fix | Delete
q = (q ? (q + '&' + qx) : qx);
[232] Fix | Delete
}
[233] Fix | Delete
[234] Fix | Delete
if (options.type.toUpperCase() === 'GET') {
[235] Fix | Delete
options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
[236] Fix | Delete
options.data = null; // data is null for 'get'
[237] Fix | Delete
} else {
[238] Fix | Delete
options.data = q; // data is the query string for 'post'
[239] Fix | Delete
}
[240] Fix | Delete
[241] Fix | Delete
var callbacks = [];
[242] Fix | Delete
[243] Fix | Delete
if (options.resetForm) {
[244] Fix | Delete
callbacks.push(function() {
[245] Fix | Delete
$form.resetForm();
[246] Fix | Delete
});
[247] Fix | Delete
}
[248] Fix | Delete
[249] Fix | Delete
if (options.clearForm) {
[250] Fix | Delete
callbacks.push(function() {
[251] Fix | Delete
$form.clearForm(options.includeHidden);
[252] Fix | Delete
});
[253] Fix | Delete
}
[254] Fix | Delete
[255] Fix | Delete
// perform a load on the target only if dataType is not provided
[256] Fix | Delete
if (!options.dataType && options.target) {
[257] Fix | Delete
var oldSuccess = options.success || function(){};
[258] Fix | Delete
[259] Fix | Delete
callbacks.push(function(data, textStatus, jqXHR) {
[260] Fix | Delete
var successArguments = arguments,
[261] Fix | Delete
fn = options.replaceTarget ? 'replaceWith' : 'html';
[262] Fix | Delete
[263] Fix | Delete
$(options.target)[fn](data).each(function(){
[264] Fix | Delete
oldSuccess.apply(this, successArguments);
[265] Fix | Delete
});
[266] Fix | Delete
});
[267] Fix | Delete
[268] Fix | Delete
} else if (options.success) {
[269] Fix | Delete
if ($.isArray(options.success)) {
[270] Fix | Delete
$.merge(callbacks, options.success);
[271] Fix | Delete
} else {
[272] Fix | Delete
callbacks.push(options.success);
[273] Fix | Delete
}
[274] Fix | Delete
}
[275] Fix | Delete
[276] Fix | Delete
options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
[277] Fix | Delete
var context = options.context || this; // jQuery 1.4+ supports scope context
[278] Fix | Delete
[279] Fix | Delete
for (var i = 0, max = callbacks.length; i < max; i++) {
[280] Fix | Delete
callbacks[i].apply(context, [data, status, xhr || $form, $form]);
[281] Fix | Delete
}
[282] Fix | Delete
};
[283] Fix | Delete
[284] Fix | Delete
if (options.error) {
[285] Fix | Delete
var oldError = options.error;
[286] Fix | Delete
[287] Fix | Delete
options.error = function(xhr, status, error) {
[288] Fix | Delete
var context = options.context || this;
[289] Fix | Delete
[290] Fix | Delete
oldError.apply(context, [xhr, status, error, $form]);
[291] Fix | Delete
};
[292] Fix | Delete
}
[293] Fix | Delete
[294] Fix | Delete
if (options.complete) {
[295] Fix | Delete
var oldComplete = options.complete;
[296] Fix | Delete
[297] Fix | Delete
options.complete = function(xhr, status) {
[298] Fix | Delete
var context = options.context || this;
[299] Fix | Delete
[300] Fix | Delete
oldComplete.apply(context, [xhr, status, $form]);
[301] Fix | Delete
};
[302] Fix | Delete
}
[303] Fix | Delete
[304] Fix | Delete
// are there files to upload?
[305] Fix | Delete
[306] Fix | Delete
// [value] (issue #113), also see comment:
[307] Fix | Delete
// https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219
[308] Fix | Delete
var fileInputs = $('input[type=file]:enabled', this).filter(function() {
[309] Fix | Delete
return $(this).val() !== '';
[310] Fix | Delete
});
[311] Fix | Delete
var hasFileInputs = fileInputs.length > 0;
[312] Fix | Delete
var mp = 'multipart/form-data';
[313] Fix | Delete
var multipart = ($form.attr('enctype') === mp || $form.attr('encoding') === mp);
[314] Fix | Delete
var fileAPI = feature.fileapi && feature.formdata;
[315] Fix | Delete
[316] Fix | Delete
log('fileAPI :' + fileAPI);
[317] Fix | Delete
[318] Fix | Delete
var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI;
[319] Fix | Delete
var jqxhr;
[320] Fix | Delete
[321] Fix | Delete
// options.iframe allows user to force iframe mode
[322] Fix | Delete
// 06-NOV-09: now defaulting to iframe mode if file input is detected
[323] Fix | Delete
if (options.iframe !== false && (options.iframe || shouldUseFrame)) {
[324] Fix | Delete
// hack to fix Safari hang (thanks to Tim Molendijk for this)
[325] Fix | Delete
// see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
[326] Fix | Delete
if (options.closeKeepAlive) {
[327] Fix | Delete
$.get(options.closeKeepAlive, function() {
[328] Fix | Delete
jqxhr = fileUploadIframe(a);
[329] Fix | Delete
});
[330] Fix | Delete
[331] Fix | Delete
} else {
[332] Fix | Delete
jqxhr = fileUploadIframe(a);
[333] Fix | Delete
}
[334] Fix | Delete
[335] Fix | Delete
} else if ((hasFileInputs || multipart) && fileAPI) {
[336] Fix | Delete
jqxhr = fileUploadXhr(a);
[337] Fix | Delete
[338] Fix | Delete
} else {
[339] Fix | Delete
jqxhr = $.ajax(options);
[340] Fix | Delete
}
[341] Fix | Delete
[342] Fix | Delete
$form.removeData('jqxhr').data('jqxhr', jqxhr);
[343] Fix | Delete
[344] Fix | Delete
// clear element array
[345] Fix | Delete
for (var k = 0; k < elements.length; k++) {
[346] Fix | Delete
elements[k] = null;
[347] Fix | Delete
}
[348] Fix | Delete
[349] Fix | Delete
// fire 'notify' event
[350] Fix | Delete
this.trigger('form-submit-notify', [this, options]);
[351] Fix | Delete
[352] Fix | Delete
return this;
[353] Fix | Delete
[354] Fix | Delete
// utility fn for deep serialization
[355] Fix | Delete
function deepSerialize(extraData) {
[356] Fix | Delete
var serialized = $.param(extraData, options.traditional).split('&');
[357] Fix | Delete
var len = serialized.length;
[358] Fix | Delete
var result = [];
[359] Fix | Delete
var i, part;
[360] Fix | Delete
[361] Fix | Delete
for (i = 0; i < len; i++) {
[362] Fix | Delete
// #252; undo param space replacement
[363] Fix | Delete
serialized[i] = serialized[i].replace(/\+/g, ' ');
[364] Fix | Delete
part = serialized[i].split('=');
[365] Fix | Delete
// #278; use array instead of object storage, favoring array serializations
[366] Fix | Delete
result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]);
[367] Fix | Delete
}
[368] Fix | Delete
[369] Fix | Delete
return result;
[370] Fix | Delete
}
[371] Fix | Delete
[372] Fix | Delete
// XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz)
[373] Fix | Delete
function fileUploadXhr(a) {
[374] Fix | Delete
var formdata = new FormData();
[375] Fix | Delete
[376] Fix | Delete
for (var i = 0; i < a.length; i++) {
[377] Fix | Delete
formdata.append(a[i].name, a[i].value);
[378] Fix | Delete
}
[379] Fix | Delete
[380] Fix | Delete
if (options.extraData) {
[381] Fix | Delete
var serializedData = deepSerialize(options.extraData);
[382] Fix | Delete
[383] Fix | Delete
for (i = 0; i < serializedData.length; i++) {
[384] Fix | Delete
if (serializedData[i]) {
[385] Fix | Delete
formdata.append(serializedData[i][0], serializedData[i][1]);
[386] Fix | Delete
}
[387] Fix | Delete
}
[388] Fix | Delete
}
[389] Fix | Delete
[390] Fix | Delete
options.data = null;
[391] Fix | Delete
[392] Fix | Delete
var s = $.extend(true, {}, $.ajaxSettings, options, {
[393] Fix | Delete
contentType : false,
[394] Fix | Delete
processData : false,
[395] Fix | Delete
cache : false,
[396] Fix | Delete
type : method || 'POST'
[397] Fix | Delete
});
[398] Fix | Delete
[399] Fix | Delete
if (options.uploadProgress) {
[400] Fix | Delete
// workaround because jqXHR does not expose upload property
[401] Fix | Delete
s.xhr = function() {
[402] Fix | Delete
var xhr = $.ajaxSettings.xhr();
[403] Fix | Delete
[404] Fix | Delete
if (xhr.upload) {
[405] Fix | Delete
xhr.upload.addEventListener('progress', function(event) {
[406] Fix | Delete
var percent = 0;
[407] Fix | Delete
var position = event.loaded || event.position; /* event.position is deprecated */
[408] Fix | Delete
var total = event.total;
[409] Fix | Delete
[410] Fix | Delete
if (event.lengthComputable) {
[411] Fix | Delete
percent = Math.ceil(position / total * 100);
[412] Fix | Delete
}
[413] Fix | Delete
[414] Fix | Delete
options.uploadProgress(event, position, total, percent);
[415] Fix | Delete
}, false);
[416] Fix | Delete
}
[417] Fix | Delete
[418] Fix | Delete
return xhr;
[419] Fix | Delete
};
[420] Fix | Delete
}
[421] Fix | Delete
[422] Fix | Delete
s.data = null;
[423] Fix | Delete
[424] Fix | Delete
var beforeSend = s.beforeSend;
[425] Fix | Delete
[426] Fix | Delete
s.beforeSend = function(xhr, o) {
[427] Fix | Delete
// Send FormData() provided by user
[428] Fix | Delete
if (options.formData) {
[429] Fix | Delete
o.data = options.formData;
[430] Fix | Delete
} else {
[431] Fix | Delete
o.data = formdata;
[432] Fix | Delete
}
[433] Fix | Delete
[434] Fix | Delete
if (beforeSend) {
[435] Fix | Delete
beforeSend.call(this, xhr, o);
[436] Fix | Delete
}
[437] Fix | Delete
};
[438] Fix | Delete
[439] Fix | Delete
return $.ajax(s);
[440] Fix | Delete
}
[441] Fix | Delete
[442] Fix | Delete
// private function for handling file uploads (hat tip to YAHOO!)
[443] Fix | Delete
function fileUploadIframe(a) {
[444] Fix | Delete
var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
[445] Fix | Delete
var deferred = $.Deferred();
[446] Fix | Delete
[447] Fix | Delete
// #341
[448] Fix | Delete
deferred.abort = function(status) {
[449] Fix | Delete
xhr.abort(status);
[450] Fix | Delete
};
[451] Fix | Delete
[452] Fix | Delete
if (a) {
[453] Fix | Delete
// ensure that every serialized input is still enabled
[454] Fix | Delete
for (i = 0; i < elements.length; i++) {
[455] Fix | Delete
el = $(elements[i]);
[456] Fix | Delete
if (hasProp) {
[457] Fix | Delete
el.prop('disabled', false);
[458] Fix | Delete
} else {
[459] Fix | Delete
el.removeAttr('disabled');
[460] Fix | Delete
}
[461] Fix | Delete
}
[462] Fix | Delete
}
[463] Fix | Delete
[464] Fix | Delete
s = $.extend(true, {}, $.ajaxSettings, options);
[465] Fix | Delete
s.context = s.context || s;
[466] Fix | Delete
id = 'jqFormIO' + new Date().getTime();
[467] Fix | Delete
var ownerDocument = form.ownerDocument;
[468] Fix | Delete
var $body = $form.closest('body');
[469] Fix | Delete
[470] Fix | Delete
if (s.iframeTarget) {
[471] Fix | Delete
$io = $(s.iframeTarget, ownerDocument);
[472] Fix | Delete
n = $io.attr2('name');
[473] Fix | Delete
if (!n) {
[474] Fix | Delete
$io.attr2('name', id);
[475] Fix | Delete
} else {
[476] Fix | Delete
id = n;
[477] Fix | Delete
}
[478] Fix | Delete
[479] Fix | Delete
} else {
[480] Fix | Delete
$io = $('<iframe name="' + id + '" src="' + s.iframeSrc + '" />', ownerDocument);
[481] Fix | Delete
$io.css({position: 'absolute', top: '-1000px', left: '-1000px'});
[482] Fix | Delete
}
[483] Fix | Delete
io = $io[0];
[484] Fix | Delete
[485] Fix | Delete
[486] Fix | Delete
xhr = { // mock object
[487] Fix | Delete
aborted : 0,
[488] Fix | Delete
responseText : null,
[489] Fix | Delete
responseXML : null,
[490] Fix | Delete
status : 0,
[491] Fix | Delete
statusText : 'n/a',
[492] Fix | Delete
getAllResponseHeaders : function() {},
[493] Fix | Delete
getResponseHeader : function() {},
[494] Fix | Delete
setRequestHeader : function() {},
[495] Fix | Delete
abort : function(status) {
[496] Fix | Delete
var e = (status === 'timeout' ? 'timeout' : 'aborted');
[497] Fix | Delete
[498] Fix | Delete
log('aborting upload... ' + e);
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function