mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-24 06:48:49 +08:00
Removes some unused code.
This commit is contained in:
parent
769935f99e
commit
76ae5c7398
|
@ -44,7 +44,6 @@ let computed = {
|
|||
|
||||
function mounted() {
|
||||
this.pageId = Number(this.$el.getAttribute('page-id'));
|
||||
// let linkedCommentId = this.$route.query.cm;
|
||||
let linkedCommentId = getUrlParameter('cm');
|
||||
this.$http.get(window.baseUrl(`/ajax/page/${this.pageId}/comments/`)).then(resp => {
|
||||
if (!isCommentOpSuccess(resp)) {
|
||||
|
@ -61,7 +60,8 @@ function mounted() {
|
|||
return;
|
||||
}
|
||||
|
||||
// adding a setTimeout to give comment list some time to render.
|
||||
// adding a setTimeout to give the comment list some time to render
|
||||
// before focusing the comment.
|
||||
setTimeout(function() {
|
||||
focusLinkedComment(linkedCommentId);
|
||||
});
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<div class="comment-editor" ng-controller="CommentReplyController as vm" ng-cloak>
|
||||
<form novalidate>
|
||||
<textarea name="markdown" rows="3" ng-model="comment.text" placeholder="{{ trans('entities.comment_placeholder') }}"></textarea>
|
||||
<input type="hidden" ng-model="comment.pageId" name="comment.pageId" value="{{$pageId}}" ng-init="comment.pageId = {{$pageId }}">
|
||||
<button type="button" ng-if="::(isReply || isEdit)" class="button muted" ng-click="closeBox()">{{ trans('entities.comment_cancel') }}</button>
|
||||
<button type="submit" class="button pos" ng-click="vm.saveComment()">{{ trans('entities.comment_save') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@if($errors->has('markdown'))
|
||||
<div class="text-neg text-small">{{ $errors->first('markdown') }}</div>
|
||||
@endif
|
|
@ -1,33 +0,0 @@
|
|||
<div class="comment-box">
|
||||
<div class='page-comment' id="comment-@{{::pageId}}-@{{::comment.id}}">
|
||||
<div class="user-image">
|
||||
<img ng-src="@{{::comment.created_by.avatar_url}}" alt="user avatar">
|
||||
</div>
|
||||
<div class="comment-container">
|
||||
<div class="comment-header">
|
||||
<a href="@{{::comment.created_by.profile_url}}">@{{ ::comment.created_by.name }}</a>
|
||||
</div>
|
||||
<div ng-bind-html="comment.html" ng-if="::comment.active" class="comment-body" ng-class="!comment.active ? 'comment-inactive' : ''">
|
||||
|
||||
</div>
|
||||
<div ng-if="::!comment.active" class="comment-body comment-inactive">
|
||||
{{ trans('entities.comment_deleted') }}
|
||||
</div>
|
||||
<div class="comment-actions">
|
||||
<ul ng-if="!comment.is_hidden">
|
||||
<li ng-if="::(level < 3 && vm.canComment())"><a href="#" comment-reply-link no-comment-reply-dupe="true" comment="comment" is-reply="true">{{ trans('entities.comment_reply') }}</a></li>
|
||||
<li ng-if="::vm.canEditDelete(comment, 'comment_update')"><a href="#" comment-reply-link no-comment-reply-dupe="true" comment="comment">{{ trans('entities.comment_edit') }}</a></li>
|
||||
<li ng-if="::vm.canEditDelete(comment, 'comment_delete')"><a href="#" comment-delete-link comment="comment">{{ trans('entities.comment_delete') }}</a></li>
|
||||
<li>{{ trans('entities.comment_create') }} <a title="@{{::comment.created.day_time_str}}" href="#?cm=comment-@{{::pageId}}-@{{::comment.id}}">@{{::comment.created.diff}}</a></li>
|
||||
<li ng-if="::comment.updated"><span title="@{{::comment.updated.day_time_str}}">@{{ ::vm.trans('entities.comment_updated_text', { updateDiff: comment.updated.diff }) }}
|
||||
<a href="@{{::comment.updated_by.profile_url}}">@{{::comment.updated_by.name}}</a></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<comment v-for="comment in comments = comment.sub_comments" v-bind:comment="comment" v-bind:index="index" v-bind:key="comment.id"></comment>
|
||||
<div class="comment-box" ng-repeat="comment in comments = comment.sub_comments track by comment.id" ng-init="level = level + 1">
|
||||
<div ng-include src="'comment-list-item.html'">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user