Skip to content

Commit 9a8ca5b

Browse files
committed
Bug fix - comment reply in admin/comments
1 parent 9c14e60 commit 9a8ca5b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

BlogEngine/BlogEngine.NET/admin/app/content/comments/commentController.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@
4545
});
4646
}
4747

48-
$scope.reply = function () {
48+
$scope.reply = function (parentId, postId) {
4949
var comment = {
50-
"ParentId": $scope.vm.Detail.ParentId,
51-
"PostId": $scope.vm.Detail.PostId,
50+
"ParentId": parentId,
51+
"PostId": postId,
5252
"Content": $scope.commentReply.text
5353
}
5454
dataService.addItem("/api/comments", comment)

BlogEngine/BlogEngine.NET/admin/app/content/comments/commentView.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,16 @@
88
<h4 class="modal-title">{{vm.Detail.Title}}</h4>
99
</div>
1010
<div class="modal-body">
11+
<div class="form-horizontal">
12+
<div class="form-group"><span class="col-md-3">{{lbl.author}}</span><div class="col-md-9"><span>{{vm.SelectedItem.Author}}</span></div></div>
13+
<div class="form-group"><span class="col-md-3">{{lbl.email}}</span> <div class="col-md-9"><span>{{vm.SelectedItem.Email}}</span></div></div>
14+
<div class="form-group"><span class="col-md-3">{{lbl.date}}</span> <div class="col-md-9"><span>{{vm.SelectedItem.DateCreated}}</span></div></div>
15+
</div>
1116
<div class="comment-view-reply">
1217
<pre class="comment-view-box">{{vm.Detail.Content}}</pre>
1318
<textarea ng-model="commentReply.text" placeholder="Reply..." class="form-control ltr-dir" rows="4" id="txtDraftText" name="txtDraftText" focus-me="focusInput"></textarea>
1419
<div class="modal-buttons">
15-
<button type="button" ng-click="reply()" ng-disabled="commentReply.text.length < 1" class="btn btn-hasicon btn-success"><i class="fa fa-check"></i>{{lbl.send}}</button>
20+
<button type="button" ng-click="reply(vm.Detail.Id, vm.Detail.PostId)" ng-disabled="commentReply.text.length < 1" class="btn btn-hasicon btn-success"><i class="fa fa-check"></i>{{lbl.send}}</button>
1621
<button type="button" class="btn btn-default" data-dismiss="modal" ng-click="focusInput=false">{{lbl.cancel}}</button>
1722
</div>
1823
</div>

0 commit comments

Comments
 (0)