mirror of https://github.com/Radarr/Radarr
template names are now case in-sensitive.
This commit is contained in:
parent
754f9c5134
commit
51038d656c
|
@ -25,7 +25,8 @@ module.exports = function(grunt) {
|
|||
processName: function(fileName){
|
||||
return fileName
|
||||
.replace('UI/','')
|
||||
.replace('.html','');
|
||||
.replace('.html','')
|
||||
.toLowerCase();
|
||||
}
|
||||
},
|
||||
files: {
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
"use strict";
|
||||
|
||||
Marionette.TemplateCache.get = function (templateId) {
|
||||
var templateFunction = window.Templates[templateId];
|
||||
|
||||
var templateKey = templateId.toLowerCase();
|
||||
|
||||
var templateFunction = window.Templates[templateKey.toLowerCase()];
|
||||
|
||||
if (!templateFunction) {
|
||||
console.error('couldn\'t find pre-compiled template ' + templateId);
|
||||
throw 'couldn\'t find pre-compiled template ' + templateKey;
|
||||
}
|
||||
|
||||
var templateName = templateId;
|
||||
|
||||
return function (data) {
|
||||
|
||||
try {
|
||||
//console.log('rendering template ' + templateName);
|
||||
//console.log('rendering template ' + templateKey);
|
||||
return templateFunction(data);
|
||||
}
|
||||
catch (error) {
|
||||
console.error('template render failed for ' + templateName + ' ' + error.message);
|
||||
console.error('template render failed for ' + templateKey + ' ' + error.message);
|
||||
console.error(data);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<div>
|
||||
<img src="/static/content/images/404.png" style="height:400px; margin-top: 50px"/>
|
||||
<img src="/content/images/404.png" style="height:400px; margin-top: 50px"/>
|
||||
</div>
|
||||
|
|
|
@ -9,6 +9,7 @@ module.exports = function(grunt) {
|
|||
'NzbDrone.Backbone/JsLibraries/backbone.js': 'http://raw.github.com/documentcloud/backbone/master/backbone.js',
|
||||
'NzbDrone.Backbone/JsLibraries/backbone.marionette.js': 'http://raw.github.com/marionettejs/backbone.marionette/master/lib/backbone.marionette.js',
|
||||
'NzbDrone.Backbone/JsLibraries/backbone.mutators.js': 'http://raw.github.com/asciidisco/Backbone.Mutators/master/backbone.mutators.js',
|
||||
'NzbDrone.Backbone/JsLibraries/handlebars.runtime.js': 'http://raw.github.com/wycats/handlebars.js/master/dist/handlebars.runtime.js'
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue