aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php2
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig45
2 files changed, 23 insertions, 24 deletions
diff --git a/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php b/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php
index 2d0b64ad..6b05fa00 100644
--- a/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php
+++ b/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php
@@ -3,9 +3,7 @@
3namespace Wallabag\CommentBundle\DependencyInjection; 3namespace Wallabag\CommentBundle\DependencyInjection;
4 4
5use Symfony\Component\DependencyInjection\ContainerBuilder; 5use Symfony\Component\DependencyInjection\ContainerBuilder;
6use Symfony\Component\Config\FileLocator;
7use Symfony\Component\HttpKernel\DependencyInjection\Extension; 6use Symfony\Component\HttpKernel\DependencyInjection\Extension;
8use Symfony\Component\DependencyInjection\Loader;
9 7
10class WallabagCommentExtension extends Extension 8class WallabagCommentExtension extends Extension
11{ 9{
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
index 2a06484e..c2bbd845 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig
@@ -178,28 +178,6 @@ main {
178} 178}
179</style> 179</style>
180 180
181<script type="text/javascript">
182
183var app = new annotator.App();
184app.include(annotator.ui.main, {
185 element: document.querySelector('article')
186});
187app.include(annotator.storage.http, {
188 prefix: '',
189 urls: {
190 create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
191 update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}',
192 destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}',
193 search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
194 }
195});
196app
197.start()
198.then(function () {
199 app.annotations.load({entry: {{ entry.id }}});
200});
201</script>
202
203{% endblock %} 181{% endblock %}
204 182
205{% block content %} 183{% block content %}
@@ -230,6 +208,29 @@ app
230 {{ entry.content | raw }} 208 {{ entry.content | raw }}
231 </article> 209 </article>
232 </div> 210 </div>
211
212<script type="text/javascript">
213
214var app = new annotator.App();
215app.include(annotator.ui.main, {
216 element: document.querySelector('article')
217});
218app.include(annotator.storage.http, {
219 prefix: '',
220 urls: {
221 create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
222 update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}',
223 destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}',
224 search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
225 }
226});
227app
228.start()
229.then(function () {
230 app.annotations.load({entry: {{ entry.id }}});
231});
232</script>
233
233{% endblock %} 234{% endblock %}
234 235
235{% block footer %} 236{% block footer %}