diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@smile.fr> | 2016-02-23 11:32:48 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-02-26 18:14:12 +0100 |
commit | 7720cca5325eae71595e6355d6599448c30377fb (patch) | |
tree | 9e8589b42c3ba7d42d4601c4ed2feb597dfabf7c /src/Wallabag/CoreBundle/Resources | |
parent | f38e03dc02c96344677fd2720912605b21c90b5d (diff) | |
download | wallabag-7720cca5325eae71595e6355d6599448c30377fb.tar.gz wallabag-7720cca5325eae71595e6355d6599448c30377fb.tar.zst wallabag-7720cca5325eae71595e6355d6599448c30377fb.zip |
Add annotator in baggy theme
+ Documentation about annotations
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources')
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig | 20 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig | 3 |
2 files changed, 20 insertions, 3 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 %} |
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 8ea2d691..2a06484e 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 | |||
@@ -198,9 +198,6 @@ app | |||
198 | .then(function () { | 198 | .then(function () { |
199 | app.annotations.load({entry: {{ entry.id }}}); | 199 | app.annotations.load({entry: {{ entry.id }}}); |
200 | }); | 200 | }); |
201 | |||
202 | |||
203 | |||
204 | </script> | 201 | </script> |
205 | 202 | ||
206 | {% endblock %} | 203 | {% endblock %} |