]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
Move annotatorjs to the bottom of the body
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / material / Entry / entry.html.twig
index 2a06484e02dcc4b509c364c38663b45f184b83e6..c2bbd845f339b1227177428c0e7c2330994b0136 100644 (file)
@@ -178,28 +178,6 @@ main {
 }
 </style>
 
-<script type="text/javascript">
-
-var app = new annotator.App();
-app.include(annotator.ui.main, {
-    element: document.querySelector('article')
-});
-app.include(annotator.storage.http, {
-    prefix: '',
-    urls: {
-        create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
-        update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}',
-        destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}',
-        search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
-    }
-});
-app
-.start()
-.then(function () {
-     app.annotations.load({entry: {{ entry.id }}});
-});
-</script>
-
 {% endblock %}
 
 {% block content %}
@@ -230,6 +208,29 @@ app
             {{ entry.content | raw }}
         </article>
     </div>
+
+<script type="text/javascript">
+
+var app = new annotator.App();
+app.include(annotator.ui.main, {
+    element: document.querySelector('article')
+});
+app.include(annotator.storage.http, {
+    prefix: '',
+    urls: {
+        create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
+        update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}',
+        destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}',
+        search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
+    }
+});
+app
+.start()
+.then(function () {
+     app.annotations.load({entry: {{ entry.id }}});
+});
+</script>
+
 {% endblock %}
 
 {% block footer %}