nutools/lib/nulib/templates/webpyapp/static/bootstrap/jquery-plugins/ajaxQueue/jquery.ajaxQueue.min.js

4 lines
467 B
JavaScript

/* jQuery Ajax Queue - v0.1.1 - 2013-01-16
* https://github.com/gnarf37/jquery-ajaxQueue
* Copyright (c) 2013 Corey Frang; Licensed MIT */
(function(b){var a=b({});b.ajaxQueue=function(g){var e,c=b.Deferred(),f=c.promise();function d(h){e=b.ajax(g).done(c.resolve).fail(c.reject).then(h,h)}a.queue(d);f.abort=function(j){if(e){return e.abort(j)}var h=a.queue(),i=b.inArray(d,h);if(i>-1){h.splice(i,1)}c.rejectWith(g.context||g,[f,j,""]);return f};return f}})(jQuery);