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

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

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

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

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

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