okonomi 9 лет назад
Родитель
Сommit
f975b314c9
4 измененных файлов с 0 добавлено и 56 удалено
  1. 0 6
      lib/views/page.html
  2. 0 3
      lib/views/page_list.html
  3. 0 1
      lib/views/user_page.html
  4. 0 46
      resource/js/crowi.js

+ 0 - 6
lib/views/page.html

@@ -16,9 +16,6 @@
     <div class="flex-title-line">
     <div class="flex-title-line">
       <h1 class="title flex-item-title" id="revision-path">{{ path|insertSpaceToEachSlashes }}</h1>
       <h1 class="title flex-item-title" id="revision-path">{{ path|insertSpaceToEachSlashes }}</h1>
       {% if page %}
       {% if page %}
-      <div class="flex-item-action">
-        <a href="#" title="Bookmark" class="bookmark-link" id="bookmark-button" data-csrftoken="{{ csrf() }}" data-bookmarked="0"><i class="fa fa-star-o"></i></a>
-      </div>
       <div class="flex-item-action">
       <div class="flex-item-action">
         <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
         <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
       </div>
       </div>
@@ -37,9 +34,6 @@
   <header id="page-header">
   <header id="page-header">
     <div class="flex-title-line">
     <div class="flex-title-line">
       <h1 class="title flex-item-title">{{ path|insertSpaceToEachSlashes }}</h1>
       <h1 class="title flex-item-title">{{ path|insertSpaceToEachSlashes }}</h1>
-      <div class="flex-item-action">
-        <a href="#" title="Bookmark" class="bookmark-link" id="bookmark-button" data-csrftoken="{{ csrf() }}" data-bookmarked="0"><i class="fa fa-star-o"></i></a>
-      </div>
       <div class="flex-item-action">
       <div class="flex-item-action">
         <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
         <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
       </div>
       </div>

+ 0 - 3
lib/views/page_list.html

@@ -30,9 +30,6 @@
         {% endif %}
         {% endif %}
       </h1>
       </h1>
       {% if page %}
       {% if page %}
-      <div class="flex-item-action">
-        <a href="#" title="Bookmark" class="bookmark-link" id="bookmark-button" data-csrftoken="{{ csrf() }}" data-bookmarked="0"><i class="fa fa-star-o"></i></a>
-      </div>
       <div class="flex-item-action">
       <div class="flex-item-action">
         <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
         <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
       </div>
       </div>

+ 0 - 1
lib/views/user_page.html

@@ -10,7 +10,6 @@
   <h1 class="title" id="revision-path">{{ path|insertSpaceToEachSlashes }}</h1>
   <h1 class="title" id="revision-path">{{ path|insertSpaceToEachSlashes }}</h1>
   <div class="user-page-header">
   <div class="user-page-header">
   {% if page %}
   {% if page %}
-    <a href="#" title="Bookmark" class="bookmark-link" id="bookmark-button" data-bookmarked="0"><i class="fa fa-star-o"></i></a>
     <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
     <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
   {% endif %}
   {% endif %}
     <div class="pull-left user-page-picture">
     <div class="pull-left user-page-picture">

+ 0 - 46
resource/js/crowi.js

@@ -577,52 +577,6 @@ $(function() {
       }
       }
     });
     });
 
 
-    // bookmark
-    var $bookmarkButton = $('#bookmark-button');
-    $.get('/_api/bookmarks.get', {page_id: pageId}, function(res) {
-      if (res.ok) {
-        if (res.bookmark) {
-          MarkBookmarked();
-        }
-      }
-    });
-
-    $bookmarkButton.click(function() {
-      var bookmarked = $bookmarkButton.data('bookmarked');
-      var token = $bookmarkButton.data('csrftoken');
-      if (!bookmarked) {
-        $.post('/_api/bookmarks.add', {_csrf: token, page_id: pageId}, function(res) {
-          if (res.ok && res.bookmark) {
-            MarkBookmarked();
-          }
-        });
-      } else {
-        $.post('/_api/bookmarks.remove', {_csrf: token, page_id: pageId}, function(res) {
-          if (res.ok) {
-            MarkUnBookmarked();
-          }
-        });
-      }
-
-      return false;
-    });
-
-    function MarkBookmarked()
-    {
-      $('i', $bookmarkButton)
-        .removeClass('fa-star-o')
-        .addClass('fa-star');
-      $bookmarkButton.data('bookmarked', 1);
-    }
-
-    function MarkUnBookmarked()
-    {
-      $('i', $bookmarkButton)
-        .removeClass('fa-star')
-        .addClass('fa-star-o');
-      $bookmarkButton.data('bookmarked', 0);
-    }
-
     // Like
     // Like
     var $likeButton = $('.like-button');
     var $likeButton = $('.like-button');
     var $likeCount = $('#like-count');
     var $likeCount = $('#like-count');