mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
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){
|
processName: function(fileName){
|
||||||
return fileName
|
return fileName
|
||||||
.replace('UI/','')
|
.replace('UI/','')
|
||||||
.replace('.html','');
|
.replace('.html','')
|
||||||
|
.toLowerCase();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Marionette.TemplateCache.get = function (templateId) {
|
Marionette.TemplateCache.get = function (templateId) {
|
||||||
var templateFunction = window.Templates[templateId];
|
|
||||||
|
var templateKey = templateId.toLowerCase();
|
||||||
|
|
||||||
|
var templateFunction = window.Templates[templateKey.toLowerCase()];
|
||||||
|
|
||||||
if (!templateFunction) {
|
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) {
|
return function (data) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//console.log('rendering template ' + templateName);
|
//console.log('rendering template ' + templateKey);
|
||||||
return templateFunction(data);
|
return templateFunction(data);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.error('template render failed for ' + templateName + ' ' + error.message);
|
console.error('template render failed for ' + templateKey + ' ' + error.message);
|
||||||
console.error(data);
|
console.error(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<div>
|
<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>
|
</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.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.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/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
Block a user