okonomi 9 лет назад
Родитель
Сommit
372c203003

+ 2 - 2
lib/views/page.html

@@ -17,7 +17,7 @@
       <h1 class="title flex-item-title" id="revision-path">{{ path|insertSpaceToEachSlashes }}</h1>
       {% if page %}
       <div class="flex-item-action">
-        <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
+        <span id="bookmark-button" data-csrftoken="{{ csrf() }}"></span>
       </div>
       <div class="flex-item-action visible-xs visible-sm">
         <button
@@ -35,7 +35,7 @@
     <div class="flex-title-line">
       <h1 class="title flex-item-title">{{ path|insertSpaceToEachSlashes }}</h1>
       <div class="flex-item-action">
-        <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
+        <span id="bookmark-button" data-csrftoken="{{ csrf() }}"></span>
       </div>
     </div>
   </header>

+ 1 - 1
lib/views/page_list.html

@@ -31,7 +31,7 @@
       </h1>
       {% if page %}
       <div class="flex-item-action">
-        <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
+        <span id="bookmark-button" data-csrftoken="{{ csrf() }}"></span>
       </div>
       <div class="flex-item-action visible-xs visible-sm">
         <button

+ 1 - 1
lib/views/user_page.html

@@ -10,7 +10,7 @@
   <h1 class="title" id="revision-path">{{ path|insertSpaceToEachSlashes }}</h1>
   <div class="user-page-header">
   {% if page %}
-    <span id="bookmark-button-react" data-csrftoken="{{ csrf() }}"></span>
+    <span id="bookmark-button" data-csrftoken="{{ csrf() }}"></span>
   {% endif %}
     <div class="pull-left user-page-picture">
       <img src="{{ pageUser|picture }}" class="picture picture-rounded">

+ 1 - 1
resource/js/app.js

@@ -37,7 +37,7 @@ const componentMappings = {
   //'revision-history': <PageHistory pageId={pageId} />,
   //'page-comment': <PageComment />,
   'seen-user-list': <SeenUserList />,
-  'bookmark-button-react': <BookmarkButton />,
+  'bookmark-button': <BookmarkButton />,
 };
 
 Object.keys(componentMappings).forEach((key) => {

+ 1 - 1
resource/js/components/BookmarkButton.js

@@ -19,7 +19,7 @@ export default class BookmarkButton extends React.Component {
     // FIXME(property?)
     this.setState({
       pageId: $('#content-main').data('page-id'),
-      token: $('#bookmark-button-react').data('csrftoken'),
+      token: $('#bookmark-button').data('csrftoken'),
     });
   }