From e588fb8f05d07c1244b066d97cdd2fb27306ee85 Mon Sep 17 00:00:00 2001 From: polesye Date: Wed, 24 Sep 2014 14:47:55 +0300 Subject: [PATCH] TNL-272: Fix double loading of cms-modules.js. --- .../pipeline_js/templates/xmodule.js | 35 +++++---- common/djangoapps/terrain/ui_helpers.py | 72 +++++++++++++------ 2 files changed, 73 insertions(+), 34 deletions(-) diff --git a/common/djangoapps/pipeline_js/templates/xmodule.js b/common/djangoapps/pipeline_js/templates/xmodule.js index 4004342145..34093e3231 100644 --- a/common/djangoapps/pipeline_js/templates/xmodule.js +++ b/common/djangoapps/pipeline_js/templates/xmodule.js @@ -19,19 +19,28 @@ define(["jquery", "underscore", "mathjax", "codemirror", "tinymce", 'define': define }; - var urls = ${urls}; - var head = $("head"); - var deferred = $.Deferred(); - var numResources = urls.length; - $.each(urls, function (i, url) { - head.append($("