store annotations in db and sync with peers

This commit is contained in:
j 2019-02-10 17:46:35 +05:30
commit e0cba14d6a
21 changed files with 385 additions and 63 deletions

View file

@ -1,6 +1,7 @@
'use strict';
oml.ui.annotationPanel = function() {
var ui = oml.user.ui;
var ui = oml.user.ui;
@ -28,6 +29,7 @@ oml.ui.annotationPanel = function() {
click: function() {
var $annotation = oml.$ui.annotationFolder.find('.OMLAnnotation.selected')
$annotation.length && $annotation.delete()
$deleteQuote.options({disabled: true})
}
}).appendTo($bar);
@ -80,6 +82,21 @@ oml.ui.annotationPanel = function() {
}, function(result) {
oml.ui.exportAnnotationsDialog(result.data).open()
})
} else {
console.log('click', id, data)
}
},
change: function(data) {
var id = data.id;
console.log('change', data)
if (id == 'show') {
console.log('show', data)
oml.UI.set({annotationsShow: data.checked[0].id});
} else if (id == 'sort') {
console.log('sort', data)
oml.UI.set({annotationsSort: data.checked[0].id});
} else {
console.log('change', id, data)
}
}
}).appendTo($bar);