aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Resources/views
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2016-02-07 16:52:59 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-02-26 18:13:17 +0100
commitf38e03dc02c96344677fd2720912605b21c90b5d (patch)
tree2028cecf5d0930e1569ddb977e245ea44bedc38a /src/Wallabag/CoreBundle/Resources/views
parentd3f1a9dc1ac181033ec54f9149d2807199fa8f17 (diff)
downloadwallabag-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')
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/base.html.twig4
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig26
2 files changed, 29 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig
index 3cadabfb..2748c7e3 100644
--- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig
@@ -38,11 +38,13 @@
38 38
39 <link rel="shortcut icon" type="image/x-icon" href="{{ asset('bundles/wallabagcore/themes/_global/img/appicon/favicon.ico') }}"> 39 <link rel="shortcut icon" type="image/x-icon" href="{{ asset('bundles/wallabagcore/themes/_global/img/appicon/favicon.ico') }}">
40 40
41 {% block css %}{% endblock %} 41 {% block css %}
42 {% endblock %}
42 {% block scripts %} 43 {% block scripts %}
43 <script src="{{ asset('bundles/wallabagcore/themes/_global/js/jquery-2.0.3.min.js') }}"></script> 44 <script src="{{ asset('bundles/wallabagcore/themes/_global/js/jquery-2.0.3.min.js') }}"></script>
44 <script src="{{ asset('bundles/wallabagcore/themes/_global/js/jquery.cookie.js') }}"></script> 45 <script src="{{ asset('bundles/wallabagcore/themes/_global/js/jquery.cookie.js') }}"></script>
45 <script src="{{ asset('bundles/wallabagcore/themes/_global/js/bookmarklet.js') }}"></script> 46 <script src="{{ asset('bundles/wallabagcore/themes/_global/js/bookmarklet.js') }}"></script>
47 <script src="{{ asset('bundles/wallabagcore/themes/_global/js/annotator.min.js') }}"></script>
46 {% endblock %} 48 {% endblock %}
47 49
48 <title>{% block title %}{% endblock %}</title> 50 <title>{% block title %}{% endblock %}</title>
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
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
202
203
204</script>
205
180{% endblock %} 206{% endblock %}
181 207
182{% block content %} 208{% block content %}