1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-01-03 21:56:06 +00:00
Sonarr/NzbDrone.Web/_backboneApp/JsLibraries/backbone.marionette.extend.js

20 lines
No EOL
555 B
JavaScript

_.extend(Marionette.TemplateCache.prototype, {
loadTemplate: function (templateId) {
var template = "<div class='alert alert-error'>TEMPLATE [" + templateId + "] NOT FOUND</div>";
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);
});
return template;
}
});