added placeholder image for missing posters.

pull/6/head
kay.one 12 years ago
parent f94ea0e78a
commit 4015984900

@ -105,6 +105,10 @@ module.exports = function (grunt) {
src : 'UI/**/*.png',
dest: '_output/'
},
jpg : {
src : 'UI/**/*.jpg',
dest: '_output/'
},
fonts : {
src : 'UI/**/FontAwesome/*.*',
dest: '_output/'
@ -140,6 +144,10 @@ module.exports = function (grunt) {
files: '<%= copy.images.src %>',
tasks: ['copy:images']
},
copyImages : {
files: '<%= copy.jpg.src %>',
tasks: ['copy:jpg']
},
copyFonts : {
files: '<%= copy.fonts.src %>',
tasks: ['copy:fonts']

@ -2,7 +2,7 @@
<div class="row">
<div class="span2">
<a href="{{traktUrl}}" target="_blank">
<img class="add-series-poster" src="{{remotePoster}}">
<img class="add-series-poster" src="{{remotePoster}}" {{defaultImg}}>
</a>
</div>
<div class="span9">

@ -1,7 +1,7 @@
<div class="row series-page-header">
<div class="span3">
<a href="{{traktUrl}}" target="_blank">
<img class="series-poster" src="{{poster}}">
<img class="series-poster" src="{{poster}}" {{defaultImg}}>
</a>
</div>
<div class="offset1 span7">

@ -2,7 +2,7 @@
<div class="row">
<div class="span2">
<a href="{{route}}">
<img class="series-poster" src="{{poster}}">
<img class="series-poster" src="{{poster}}" {{defaultImg}}>
</a>
</div>
<div class="span10">

@ -11,7 +11,7 @@
<div class="ended-banner">Ended</div>
{{/unless}}
<a href="{{route}}">
<img class="series-poster" src="{{poster}} ">
<img class="series-poster" src="{{poster}}" {{defaultImg}}>
</a>
</div>
</div>

@ -8,7 +8,7 @@ define(['app'], function () {
return new Handlebars.SafeString(templateFunction(this));
});
Handlebars.registerHelper("debug", function(optionalValue) {
Handlebars.registerHelper("debug", function (optionalValue) {
console.log("Current Context");
console.log("====================");
console.log(this);
@ -20,11 +20,11 @@ define(['app'], function () {
}
});
Handlebars.registerHelper("fileSize", function(size) {
Handlebars.registerHelper("fileSize", function (size) {
return NzbDrone.Shared.FormatHelpers.FileSizeHelper(size);
});
Handlebars.registerHelper("date", function(date) {
Handlebars.registerHelper("date", function (date) {
//TODO: show actual date in tooltip
if (!date) {
return '';
@ -36,4 +36,8 @@ define(['app'], function () {
return new Handlebars.SafeString(result);
});
});
Handlebars.registerHelper('defaultImg', function () {
return new Handlebars.SafeString(' onerror="this.src=\'/content/images/poster-dark.jpg\';"');
});
});

Loading…
Cancel
Save