only delete own annotations
This commit is contained in:
parent
b181575a37
commit
eeee4f5a28
1 changed files with 10 additions and 6 deletions
|
@ -73,10 +73,12 @@ oml.ui.annotation = function(annotation, $iframe) {
|
||||||
borderBottom: '1px solid rgb(208, 208, 208)',
|
borderBottom: '1px solid rgb(208, 208, 208)',
|
||||||
}).bindEvent({
|
}).bindEvent({
|
||||||
key_delete: function() {
|
key_delete: function() {
|
||||||
|
if (annotation.user == oml.user.id) {
|
||||||
that.triggerEvent('delete', {
|
that.triggerEvent('delete', {
|
||||||
id: annotation.id
|
id: annotation.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}).append($quote).append($notes);
|
}).append($quote).append($notes);
|
||||||
|
|
||||||
function addNote() {
|
function addNote() {
|
||||||
|
@ -98,10 +100,12 @@ oml.ui.annotation = function(annotation, $iframe) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
that.delete = function() {
|
that.delete = function() {
|
||||||
|
if (annotation.user == oml.user.id) {
|
||||||
that.triggerEvent('delete', {
|
that.triggerEvent('delete', {
|
||||||
id: annotation.id
|
id: annotation.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
that.deselect = function() {
|
that.deselect = function() {
|
||||||
that.removeClass('selected')
|
that.removeClass('selected')
|
||||||
that.loseFocus()
|
that.loseFocus()
|
||||||
|
|
Loading…
Reference in a new issue