Merge pull request #1113 from MITx/feature/dhm/course-info

move the underscore tempaltes to /static/client-templates and update the...
This commit is contained in:
chrisndodge
2012-12-10 07:17:19 -08:00
6 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
if (typeof window.templateLoader == 'function') return;
var templateLoader = {
templateVersion: "0.0.6",
templateVersion: "0.0.8",
templates: {},
loadRemoteTemplate: function(templateName, filename, callback) {
if (!this.templates[templateName]) {

View File

@@ -38,7 +38,7 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
// instantiates an editor template for each update in the collection
window.templateLoader.loadRemoteTemplate("course_info_update",
// TODO Where should the template reside? how to use the static.url to create the path?
"/static/coffee/src/client_templates/course_info_update.html",
"/static/client_templates/course_info_update.html",
function (raw_template) {
self.template = _.template(raw_template);
self.render();
@@ -209,7 +209,7 @@ CMS.Views.ClassInfoHandoutsView = Backbone.View.extend({
{
complete: function() {
window.templateLoader.loadRemoteTemplate("course_info_handouts",
"/static/coffee/src/client_templates/course_info_handouts.html",
"/static/client_templates/course_info_handouts.html",
function (raw_template) {
self.template = _.template(raw_template);
self.render();