|
|
|
@ -1,6 +1,11 @@
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
define(['app','handlebars','Shared/FormatHelpers'], function (App,Handlebars) {
|
|
|
|
|
define(
|
|
|
|
|
[
|
|
|
|
|
'app',
|
|
|
|
|
'handlebars',
|
|
|
|
|
'Shared/FormatHelpers'
|
|
|
|
|
], function (App, Handlebars) {
|
|
|
|
|
Handlebars.registerHelper('partial', function (templateName) {
|
|
|
|
|
//TODO: We should be able to pass in the context, either an object or a property
|
|
|
|
|
|
|
|
|
@ -32,12 +37,12 @@ define(['app','handlebars','Shared/FormatHelpers'], function (App,Handlebars) {
|
|
|
|
|
|
|
|
|
|
var shortDate = Date.create(date).short();
|
|
|
|
|
var formattedDate = NzbDrone.Shared.FormatHelpers.DateHelper(date);
|
|
|
|
|
var result = '<span title='' + shortDate + ''>' + formattedDate + '</span>';
|
|
|
|
|
var result = '<span title="' + shortDate + '">' + formattedDate + '</span>';
|
|
|
|
|
|
|
|
|
|
return new Handlebars.SafeString(result);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Handlebars.registerHelper('defaultImg', function () {
|
|
|
|
|
return new Handlebars.SafeString('onerror='this.src=\'/content/images/poster-dark.jpg\';'');
|
|
|
|
|
return new Handlebars.SafeString('onerror="this.src="/content/images/poster-dark.jpg";"');
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|