1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-16 16:04:08 +01:00
Radarr/NzbDrone.Web/_backboneApp/JsLibraries/backbone.marionette.extend.js
2013-02-15 16:52:17 -08:00

21 lines
614 B
JavaScript

_.extend(Marionette.TemplateCache.prototype, {
loadTemplate: function (templateId) {
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);
template = "<div class='alert alert-error'>Couldn't load template '" + templateId + "'. Status: " + data.statusText + "</div>";
});
return template;
}
});