diff options
author | Thomas Citharel <tcit@tcit.fr> | 2016-02-07 16:52:59 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-02-26 18:13:17 +0100 |
commit | f38e03dc02c96344677fd2720912605b21c90b5d (patch) | |
tree | 2028cecf5d0930e1569ddb977e245ea44bedc38a /src/Wallabag/CoreBundle/Resources/views/themes/material/Entry | |
parent | d3f1a9dc1ac181033ec54f9149d2807199fa8f17 (diff) | |
download | wallabag-f38e03dc02c96344677fd2720912605b21c90b5d.tar.gz wallabag-f38e03dc02c96344677fd2720912605b21c90b5d.tar.zst wallabag-f38e03dc02c96344677fd2720912605b21c90b5d.zip |
Comment work with annotator v2
- add missing annotator.js file and fix typo
- edit & delete routes, started tests
- basic tests
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/material/Entry')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | 26 |
1 files changed, 26 insertions, 0 deletions
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 f6ba83ae..8ea2d691 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 | |||
@@ -177,6 +177,32 @@ main { | |||
177 | padding: 0; | 177 | padding: 0; |
178 | } | 178 | } |
179 | </style> | 179 | </style> |
180 | |||
181 | <script type="text/javascript"> | ||
182 | |||
183 | var app = new annotator.App(); | ||
184 | app.include(annotator.ui.main, { | ||
185 | element: document.querySelector('article') | ||
186 | }); | ||
187 | app.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 | }); | ||
196 | app | ||
197 | .start() | ||
198 | .then(function () { | ||
199 | app.annotations.load({entry: {{ entry.id }}}); | ||
200 | }); | ||
201 | |||
202 | |||
203 | |||
204 | </script> | ||
205 | |||
180 | {% endblock %} | 206 | {% endblock %} |
181 | 207 | ||
182 | {% block content %} | 208 | {% block content %} |