mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Add annotator in baggy theme
+ Documentation about annotations
This commit is contained in:
parent
f38e03dc02
commit
7720cca532
12 changed files with 71 additions and 10 deletions
|
@ -16,8 +16,5 @@ class WallabagCommentExtension extends Extension
|
|||
{
|
||||
$configuration = new Configuration();
|
||||
$config = $this->processConfiguration($configuration, $configs);
|
||||
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader->load('services.yml');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
services:
|
||||
# wallabag_comment.example:
|
||||
# class: Wallabag\CommentBundle\Example
|
||||
# arguments: ["@service_id", "plain_value", %parameter%]
|
|
@ -107,5 +107,25 @@
|
|||
retrievePercent({{ entry.id }});
|
||||
});
|
||||
});
|
||||
|
||||
var app = new annotator.App();
|
||||
app.include(annotator.ui.main, {
|
||||
element: document.querySelector('article')
|
||||
});
|
||||
app.include(annotator.storage.http, {
|
||||
prefix: '',
|
||||
urls: {
|
||||
create: '{{ path('annotations_post_annotation', { 'entry': entry.id }) }}',
|
||||
update: '{{ path('annotations_put_annotation', { 'comment': 'idComment' }) }}',
|
||||
destroy: '{{ path('annotations_delete_annotation', { 'comment': 'idComment' }) }}',
|
||||
search: '{{ path('annotations_get_annotations', { 'entry': entry.id }) }}'
|
||||
}
|
||||
});
|
||||
app
|
||||
.start()
|
||||
.then(function () {
|
||||
app.annotations.load({entry: {{ entry.id }}});
|
||||
});
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -198,9 +198,6 @@ app
|
|||
.then(function () {
|
||||
app.annotations.load({entry: {{ entry.id }}});
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue