]> BookStack Code Mirror - bookstack/commitdiff
Removes some unused code. 479/head
authorAbijeet <redacted>
Tue, 22 Aug 2017 19:34:36 +0000 (01:04 +0530)
committerAbijeet <redacted>
Tue, 22 Aug 2017 19:34:36 +0000 (01:04 +0530)
resources/assets/js/vues/page-comments.js
resources/views/comments/comment-reply.blade.php [deleted file]
resources/views/comments/list-item.blade.php [deleted file]

index 6a550e991c8c59ee558d99c09c5e13400125d601..e42cdbf9c7191c9690205651720797cc70e9c5e6 100644 (file)
@@ -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);
         });
diff --git a/resources/views/comments/comment-reply.blade.php b/resources/views/comments/comment-reply.blade.php
deleted file mode 100644 (file)
index 0253534..0000000
+++ /dev/null
@@ -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
\ No newline at end of file
diff --git a/resources/views/comments/list-item.blade.php b/resources/views/comments/list-item.blade.php
deleted file mode 100644 (file)
index 72984d6..0000000
+++ /dev/null
@@ -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>
\ No newline at end of file