All Downloads are FREE. Search and download functionalities are using the official Maven repository.

template.js.plugins.jquery.form.min.js Maven / Gradle / Ivy

There is a newer version: 5.0.5
Show newest version
'use strict';(function(b){"function"===typeof define&&define.amd?define(["jquery"],b):b("undefined"!=typeof jQuery?jQuery:window.Zepto)})(function(b){function y(a){var h=a.data;a.isDefaultPrevented()||(a.preventDefault(),b(a.target).ajaxSubmit(h))}function u(a){var h=a.target,d=b(h);if(!d.is("[type\x3dsubmit],[type\x3dimage]")){h=d.closest("[type\x3dsubmit]");if(0===h.length)return;h=h[0]}var c=this;c.clk=h;"image"==h.type&&(void 0!==a.offsetX?(c.clk_x=a.offsetX,c.clk_y=a.offsetY):"function"==typeof b.fn.offset?
(d=d.offset(),c.clk_x=a.pageX-d.left,c.clk_y=a.pageY-d.top):(c.clk_x=a.pageX-h.offsetLeft,c.clk_y=a.pageY-h.offsetTop));setTimeout(function(){c.clk=c.clk_x=c.clk_y=null},100)}function r(){if(b.fn.ajaxSubmit.debug){var a="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(a):window.opera&&window.opera.postError&&window.opera.postError(a)}}var A,B;A=void 0!==b("\x3cinput type\x3d'file'/\x3e").get(0).files;B=void 0!==window.FormData;var D=!!b.fn.prop;
b.fn.attr2=function(){if(!D)return this.attr.apply(this,arguments);var a=this.prop.apply(this,arguments);return a&&a.jquery||"string"===typeof a?a:this.attr.apply(this,arguments)};b.fn.ajaxSubmit=function(a){function h(c){c=b.param(c,a.traditional).split("\x26");var f=c.length,h=[],g,d;for(g=0;gk.status||304===k.status?"success":"error");"success"===a?(e.success&&e.success.call(e.context,z,"success",k),x.resolve(k.responseText,"success",k),t&&b.event.trigger("ajaxSuccess",[k,e])):a&&(void 0===c&&(c=k.statusText),e.error&&e.error.call(e.context,k,a,c),x.reject(k,"error",c),
t&&b.event.trigger("ajaxError",[k,e,c]));t&&b.event.trigger("ajaxComplete",[k,e]);t&&!--b.active&&b.event.trigger("ajaxStop");e.complete&&e.complete.call(e.context,k,a);B=!0;e.timeout&&clearTimeout(u);setTimeout(function(){e.iframeTarget?w.attr("src",e.iframeSrc):w.remove();k.responseXML=null},100)}}var l=n[0],m,e,t,s,w,v,k,y,u,x=b.Deferred();x.abort=function(a){k.abort(a)};if(c)for(m=0;mf)return null;for(var d=
[],g=a.options,n=(c="select-one"==c)?f+1:g.length,f=c?f:0;f




© 2015 - 2024 Weber Informatics LLC | Privacy Policy