only delete own annotations

This commit is contained in:
j 2019-02-11 14:08:52 +05:30
parent b181575a37
commit eeee4f5a28

View file

@ -73,10 +73,12 @@ oml.ui.annotation = function(annotation, $iframe) {
borderBottom: '1px solid rgb(208, 208, 208)',
}).bindEvent({
key_delete: function() {
if (annotation.user == oml.user.id) {
that.triggerEvent('delete', {
id: annotation.id
})
}
}
}).append($quote).append($notes);
function addNote() {
@ -98,10 +100,12 @@ oml.ui.annotation = function(annotation, $iframe) {
}
}
that.delete = function() {
if (annotation.user == oml.user.id) {
that.triggerEvent('delete', {
id: annotation.id
})
}
}
that.deselect = function() {
that.removeClass('selected')
that.loseFocus()