aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2016-02-23 11:32:48 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-02-26 18:14:12 +0100
commit7720cca5325eae71595e6355d6599448c30377fb (patch)
tree9e8589b42c3ba7d42d4601c4ed2feb597dfabf7c /src
parentf38e03dc02c96344677fd2720912605b21c90b5d (diff)
downloadwallabag-7720cca5325eae71595e6355d6599448c30377fb.tar.gz
wallabag-7720cca5325eae71595e6355d6599448c30377fb.tar.zst
wallabag-7720cca5325eae71595e6355d6599448c30377fb.zip
Add annotator in baggy theme
+ Documentation about annotations
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php3
-rw-r--r--src/Wallabag/CommentBundle/Resources/config/routing.yml0
-rw-r--r--src/Wallabag/CommentBundle/Resources/config/services.yml4
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Entry/entry.html.twig20
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Entry/entry.html.twig3
5 files changed, 20 insertions, 10 deletions
diff --git a/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php b/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php
index b58a17a0..2d0b64ad 100644
--- a/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php
+++ b/src/Wallabag/CommentBundle/DependencyInjection/WallabagCommentExtension.php
@@ -16,8 +16,5 @@ class WallabagCommentExtension extends Extension
16 { 16 {
17 $configuration = new Configuration(); 17 $configuration = new Configuration();
18 $config = $this->processConfiguration($configuration, $configs); 18 $config = $this->processConfiguration($configuration, $configs);
19
20 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
21 $loader->load('services.yml');
22 } 19 }
23} 20}
diff --git a/src/Wallabag/CommentBundle/Resources/config/routing.yml b/src/Wallabag/CommentBundle/Resources/config/routing.yml
deleted file mode 100644
index e69de29b..00000000
--- a/src/Wallabag/CommentBundle/Resources/config/routing.yml
+++ /dev/null
diff --git a/src/Wallabag/CommentBundle/Resources/config/services.yml b/src/Wallabag/CommentBundle/Resources/config/services.yml
deleted file mode 100644
index 0e7972a4..00000000
--- a/src/Wallabag/CommentBundle/Resources/config/services.yml
+++ /dev/null
@@ -1,4 +0,0 @@
1services:
2# wallabag_comment.example:
3# class: Wallabag\CommentBundle\Example
4# arguments: ["@service_id", "plain_value", %parameter%]
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 %}