1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

template names are now case in-sensitive.

This commit is contained in:
kay.one 2013-03-30 12:13:10 -07:00
parent 754f9c5134
commit 51038d656c
4 changed files with 11 additions and 8 deletions

View File

@ -25,7 +25,8 @@ module.exports = function(grunt) {
processName: function(fileName){
return fileName
.replace('UI/','')
.replace('.html','');
.replace('.html','')
.toLowerCase();
}
},
files: {

View File

@ -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);
}
};

View File

@ -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>

View File

@ -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'
}
});