aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
index 94f4ba7d..988cbd29 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig
@@ -107,5 +107,25 @@
107 retrievePercent({{ entry.id }}); 107 retrievePercent({{ entry.id }});
108 }); 108 });
109 }); 109 });
110
111 var app = new annotator.App();
112 app.include(annotator.ui.main, {
113 element: document.querySelector('article')
114 });
115 app.include(annotator.storage.http, {
116 prefix: '',
117 urls: {
118 create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
119 update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}',
120 destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}',
121 search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
122 }
123 });
124 app
125 .start()
126 .then(function () {
127 app.annotations.load({entry: {{ entry.id }}});
128 });
110 </script> 129 </script>
130
111{% endblock %} 131{% endblock %}