rasvaan / accurator

Accurator cpack
7 stars 3 forks source link

Remove annotation from triple store #201

Closed rasvaan closed 5 years ago

rasvaan commented 8 years ago

Write function that invokes the removal of an annotation from the server. Base code on the following excerpt from annotations.js

deleteAnnotation : function(annotation, index, comment) {
            var oSelf = this;
            Y.log('remove annotation '+annotation+' with comment: '+comment);
            Y.io(this.get("store.remove"), {
                method: 'DELETE',
                data:{ annotation:annotation, comment:comment },
                on:{success: function(e) {
                    delete oSelf.get("myMetaTags")[annotation];
                    var tag = oSelf.tags.getRecordByIndex(index).getValue();
                    oSelf.removeTagFragment(tag);
                    oSelf.tags.remove(index);
                   }
                }
            });
        }