Lidarr/NzbDrone.Web/_backboneApp/JsLibraries/backbone.marionette.extend.js

31 lines
726 B
JavaScript
Raw Normal View History

_.extend(Marionette.TemplateCache.prototype, {
loadTemplate: function (templateId) {
2013-01-22 05:43:47 +00:00
var template;
console.log("Loading template '" + templateId + "'");
jQuery.ajax({
url: '_backboneApp//' + templateId + '.html',
async: false
}).done(function (data) {
template = data;
}).fail(function (data) {
console.log("couldn't load template " + this.templateId + " Error: " + data.statusText);
2013-01-22 05:43:47 +00:00
template = "<div class='alert alert-error'>Couldn't load template '" + templateId + "'. Status: " + data.statusText + "</div>";
});
return template;
}
2013-01-23 05:58:17 +00:00
});
_.extend(Marionette.View.prototype, {
});