add annotations to db

This commit is contained in:
j 2019-02-11 00:20:26 +05:30
parent 9ef452832d
commit edbe4da011
1 changed files with 4 additions and 1 deletions

View File

@ -61,7 +61,10 @@ oml.ui.viewer = function() {
note = data.notes[0]
delete data.notes
}
oml.api.addAnnotation(data)
var a = Ox.extend({}, data)
a.created = a.created || (new Date).toISOString();
a.item = ui.item
oml.api.addAnnotation(a)
if (note) {
data.notes = [note]
} else {