diff --git a/Sexy-slim.js b/Sexy-slim.js deleted file mode 100644 index dc88cbe..0000000 --- a/Sexy-slim.js +++ /dev/null @@ -1,1063 +0,0 @@ -/** - * Sexy.js v0.8 - * http://sexyjs.com/ - * - * Copyright 2010, Dave Furfero - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://sexyjs.com/license - * - * jQuery JavaScript Library v1.4.2 - * http://jquery.com/ - * - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - */ -(function (window, document, jQuery) { - - var loc = window.location, - HOST = loc.protocol + '//' + loc.hostname + (loc.port !== '' ? ':' + loc.port : ''), - RESULT_DATA = '__', - dataTypes = ['html', 'json', 'jsonp', 'script', 'text', 'xml'], - i, n; - - /** - * Constructs a new Sexy instance - */ - function Sexy (cfg) { - - /** - * Allow instantiation without new keyword - */ - if (!(this instanceof Sexy)) { - return new Sexy(cfg); - } - - this.cfgs = []; - this.setup(cfg); - } - - Sexy.prototype = { - - setup: function (cfg) { - this.cfg = cfg || {}; - return this; - }, - - sajax: function (cfg) { - - var cfgs = this.cfgs, - uid = cfgs.length, - prev = cfgs[uid - 1], - realType = cfg.dataType, - remote = cfg.url.indexOf('http') === 0 && cfg.url.indexOf(HOST) === -1, - isScript = realType === 'script', - defer = uid > 0 ? remote && isScript ? true : cfg.defer : false, - success = cfg.success || (isScript ? passPrevious : passData), - error = cfg.error || jQuery.noop, - complete = cfg.complete || jQuery.noop; - - cfgs.push(jQuery.extend(true, cfg, this.cfg, cfg, { - - sendAfterSend: [], - - /** - * Retrieve script and style data types as text for deferred - * evaluation to guarantee ordering. Scripts and styles are inserted - * into the DOM immediately before the success callback is fired. - */ - dataType: !remote && isScript ? 'text' : realType, - - /** - * Wrap the user-configured success callback with an - * event-driven handler. - */ - success: function (data, status) { - - /** - * If the request is first or the previous request has completed, - * evaluate the response data (if necessary) and execute the success - * callback. - */ - if (!prev || RESULT_DATA in prev) { - - /** - * Evaluate (local) script and style dataTypes. - */ - if (isScript && !remote) { - jQuery.globalEval(data); - } - - /** - * Normalize the status argument for remote dataTypes which use - * non-XHR techniques for loading. - */ - cfg.status = remote ? 'success' : status; - - /** - * Execute the original success callback, passing the response - * data, the return value of the previous success callback, the - * next configuration object, and the success status. - */ - cfg[RESULT_DATA] = success.call(cfg, data, prev && prev[RESULT_DATA], cfgs[uid + 1], cfg.status); - - /** - * If the next request completed before this one, fire it's - * success callback. - */ - if (cfg.nextSuccess) { - cfg.nextSuccess(); - - /** - * If the next request is deferred, trigger it's send method. - */ - } else if (cfg.sendAfterSuccess) { - cfg.sendAfterSuccess(); - } - - /** - * If the previous request has not yet completed, bind the success - * callback to its response arguments and attach it to the - * nextSuccess event of the previous request. - */ - } else { - prev.nextSuccess = jQuery.proxy(function () { - cfg.success(data, status); - }, cfg); - } - - }, - - error: function (xhr, status, e) { - error.call(cfg, xhr, status, e); - }, - - complete: function (xhr, status) { - complete.call(cfg, xhr, status); - } - })); - - - function send () { - - var i, n; - - jQuery.ajax(cfg); - - if (cfg.sendAfterSend.length > 0) { - for (i = 0, n = cfg.sendAfterSend.length; i < n; ++i) { - cfg.sendAfterSend[i](); - } - } - } - - /** - * Since requests for remote scripts and styles use direct DOM insertion - * (via - - - - - - - -
- -