forked from wallabag/wallabag
Comment work with annotator v2
- add missing annotator.js file and fix typo - edit & delete routes, started tests - basic tests
This commit is contained in:
committed by
Jeremy Benoist
parent
d3f1a9dc1a
commit
f38e03dc02
@ -177,6 +177,32 @@ main {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
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 %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
Reference in New Issue
Block a user