Files
edx-platform/common/djangoapps/pipeline_js/templates/xmodule.js
Valera Rozuvan 2e8fe6a41c Move loading of YouTube API to video module.
The availability of the YouTube API will be stored in student's settings.
The YouTube API is loaded asynchronously now, so no need to pass a
parameter to the front-end telling it if YouTube API should not be loaded
because of it's unavailability.

Removing loading of YouTube API from Studio RequireJS config. Now loading
of YouTube API is handled by Video module.

BLD-531.
2014-03-19 19:30:45 +02:00

29 lines
1.0 KiB
JavaScript

## This file is designed to load all the XModule Javascript files in one wad
## using requirejs. It is passed through the Mako template system, which
## populates the `urls` variable with a list of paths to XModule JS files.
## These files assume that several libraries are available and bound to
## variables in the global context, so we load those libraries with requirejs
## and attach them to the global context manually.
define(["jquery", "underscore", "mathjax", "codemirror", "tinymce",
"jquery.tinymce", "jquery.qtip", "jquery.scrollTo", "jquery.flot",
"jquery.cookie",
"utility"],
function($, _, MathJax, CodeMirror, tinymce) {
window.$ = $;
window._ = _;
window.MathJax = MathJax;
window.CodeMirror = CodeMirror;
window.RequireJS = {
'requirejs': requirejs,
'require': require,
'define': define
};
var urls = ${urls};
var head = $("head");
$.each(urls, function(i, url) {
head.append($("<script/>", {src: url}));
});
return window.XModule;
});