1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-21 11:02:01 +02:00
Sonarr/NzbDrone.Web/_backboneApp/JsLibraries/backbone.marionette.extend.js

21 lines
614 B
JavaScript
Raw Normal View History

_.extend(Marionette.TemplateCache.prototype, {
loadTemplate: function (templateId) {
2013-01-21 21:43:47 -08:00
var template;
jQuery.ajax({
url: 'Backbone.NzbDrone//' + 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-21 21:43:47 -08:00
template = "<div class='alert alert-error'>Couldn't load template '" + templateId + "'. Status: " + data.statusText + "</div>";
});
return template;
}
});