Files
edx-platform/common/static/js/src/ajax_prefix.js
Michael Terry a34c8c8233 Drop remaining coffee use
This basically commits the transpiled CoffeeScript JS (with minor
cleanup) and removes coffee build support.

A tiny amount of support for xblocks exists, because external users
may have xblocks with coffee. But no coffee in our tree anyway.
2018-04-13 14:10:40 -04:00

25 lines
791 B
JavaScript

// Once generated by CoffeeScript 1.9.3, but now lives as pure JS
/* eslint-disable */
(function() {
this.AjaxPrefix = {
addAjaxPrefix: function(jQuery, prefix) {
jQuery.postWithPrefix = function(url, data, callback, type) {
return $.post("" + (prefix()) + url, data, callback, type);
};
jQuery.getWithPrefix = function(url, data, callback, type) {
return $.get("" + (prefix()) + url, data, callback, type);
};
return jQuery.ajaxWithPrefix = function(url, settings) {
if (settings != null) {
return $.ajax("" + (prefix()) + url, settings);
} else {
settings = url;
settings.url = "" + (prefix()) + settings.url;
return $.ajax(settings);
}
};
}
};
}).call(this);