Simplified util/misc.js requires

This commit is contained in:
Marcin Kurczewski
2014-12-20 10:30:10 +01:00
parent e5f2e293f0
commit 970b9bf06d
17 changed files with 38 additions and 50 deletions

View File

@ -72,8 +72,7 @@ App.Presenters.CommentListPresenter = function(
{
commentListItemTemplate: templates.commentListItem,
commentFormTemplate: templates.commentForm,
formatRelativeTime: util.formatRelativeTime,
formatMarkdown: util.formatMarkdown,
util: util,
comments: comments,
post: post,
},
@ -102,9 +101,7 @@ App.Presenters.CommentListPresenter = function(
function renderComment($targetList, comment) {
var $item = jQuery('<li>' + templates.commentListItem({
comment: comment,
formatRelativeTime: util.formatRelativeTime,
formatAbsoluteTime: util.formatAbsoluteTime,
formatMarkdown: util.formatMarkdown,
util: util,
canVote: auth.isLoggedIn(),
canEditComment: auth.isLoggedIn(comment.user.name) ? privileges.canEditOwnComments : privileges.canEditAllComments,
canDeleteComment: auth.isLoggedIn(comment.user.name) ? privileges.canDeleteOwnComments : privileges.canDeleteAllComments,