bunch of small fixes

This commit is contained in:
Sacha Greif 2015-01-20 16:18:27 +09:00
parent c6befe9b19
commit 3b51d0ef1c
7 changed files with 23 additions and 11 deletions

View file

@ -16,7 +16,7 @@
</a>
</div>
<div class="comment-meta">
<div class="user-avatar">{{> avatar userId=userId shape="circle"}}</div>
<div class="user-avatar avatar-medium">{{> avatar userId=userId shape="circle"}}</div>
<a class="comment-username" href="{{profileUrl}}">{{authorName}}</a>
<span class="comment-time">{{timeAgo ago}},</span>
<span class="points">{{upvotes}}</span> <span class="unit">points </span>
@ -36,7 +36,7 @@
{{/if}}
{{#if showChildComments}}
<ul class="comment-children comment-list">
{{#each child_comments}}
{{#each childComments}}
{{#with this}}
{{> UI.dynamic template=comment_item}}
{{/with}}

View file

@ -69,7 +69,7 @@ Template[getTemplate('comment_item')].helpers({
full_date: function(){
return this.createdAt.toString();
},
child_comments: function(){
childComments: function(){
// return only child comments
return Comments.find({parentCommentId: this._id});
},

View file

@ -3,7 +3,7 @@
CommentPageController = RouteController.extend({
waitOn: function() {
return [
coreSubscriptions.subscribe('singleComment', this.params._id),
coreSubscriptions.subscribe('singleCommentAndChildren', this.params._id),
coreSubscriptions.subscribe('commentUsers', this.params._id),
coreSubscriptions.subscribe('commentPost', this.params._id)
];

View file

@ -7,6 +7,11 @@ Meteor.startup(function () {
// disable all email notifications when "emailNotifications" is set to false
Herald.settings.overrides.email = !getSetting('emailNotifications', true);
// send emails every second when in dev environment
if (Meteor.absoluteUrl().indexOf('localhost') !== -1)
Herald.settings.queueTimer = 1000;
});
var commentEmail = function (userToNotify) {

View file

@ -13,17 +13,17 @@ buildEmailNotification = function (notification) {
switch(notification.courier){
case 'newComment':
subject = 'A new comment on your post "' + post.title + '"';
subject = notification.author()+' left a new comment on your post "' + post.title + '"';
template = 'emailNewComment';
break;
case 'newReply':
subject = 'Someone replied to your comment on "'+post.title+'"';
subject = notification.author()+' replied to your comment on "'+post.title+'"';
template = 'emailNewReply';
break;
case 'newCommentSubscribed':
subject = 'A new comment on "' + post.title + '"';
subject = notification.author()+' left a new comment on "' + post.title + '"';
template = 'emailNewComment';
break;

View file

@ -12,8 +12,15 @@
line-height: 24px;
}
}
.user-avatar {
.avatar-initials {
line-height: 40px;
.avatar-medium {
height: 30px;
width: 30px;
.avatar-initials{
font-size: 14px;
line-height: 30px;
}
}
.avatar-initials{
font-weight: normal;
}

View file

@ -1,6 +1,6 @@
// Publish a single comment
Meteor.publish('singleComment', function(commentId) {
Meteor.publish('singleCommentAndChildren', function(commentId) {
if(can.viewById(this.userId)){
// publish both current comment and child comments
var commentIds = [commentId];