[annotator-dev] Problem with Storage DELETE request

Randall Leeds tilgovi at hypothes.is
Mon May 18 21:33:28 UTC 2015


Is the response from the server different? Or does Annotator just have
trouble processing it?

When you delete the annotation in Annotator, is it deleted on the server,
and then just the client sees failure? Or is the backend rejecting the
request?
On May 18, 2015 2:07 PM, "Kraffmiller, Ellen" <ekraffmiller at hmdc.harvard.edu>
wrote:

> Hi,
> I’m running Annotator 1.2.10, with the Storage plugin, and have
> implemented my own REST interface for the storage commands.  I have create,
> update and search working correctly, but I’m having a problem with the
> delete command.  When I try to delete an annotation, I get a “Bad Request”
> error from the Storage plugin, but if I run try the same DELETE URL that
> the plugin is calling with curl, it works as expected and the annotation is
> deleted.  I’m using jQuery 1.9.0.
> Any suggestiions appreciated!
> Thanks,
> Ellen
>
> Here is my javascript from my test page:
>
>                      jQuery(function ($) {
>                     if (typeof $.fn.annotator !== 'function') {
>                         alert("Ooops! it looks like you haven't built the
> Annotator concatenation file. " +
>                             "Either download a tagged release from GitHub,
> or modify the Cakefile to point " +
>                             "at your copy of the YUI compressor and run
> `cake package`.");
>                     } else {
>                         // This is the important bit: how to create the
> annotator and add
>                         // plugins
>                         $('#clusterDocViewText').annotator()
>                         .annotator('addPlugin', 'Permissions')
>                         .annotator('addPlugin','Store', {
>                             prefix: '/text/api/store',
>                             annotationData : {
>                                 url: 'http://'+ window.location.host  +
> window.location.pathname,
>                                 documentId: '553e964230040cdcf4ecf4d4'
>                             },
>                             loadFromSearch: {
>                                 limit: 0,
>                                 all_fields: 1,
>                                 documentId: '553e964230040cdcf4ecf4d4'
>                              }
>                         })
>                         .annotator('addPlugin', 'Tags');
>
> $('#clusterDocViewText').data('annotator').plugins['Permissions'].setUser({
> id: 9, username: 'ellen' });
>                      }
>                 });
> _______________________________________________
> annotator-dev mailing list
> annotator-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/annotator-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20150518/070804fe/attachment-0004.html>


More information about the annotator-dev mailing list