fix annotations sort
This commit is contained in:
parent
349383ff39
commit
111ea307a9
2 changed files with 9 additions and 16 deletions
|
@ -64,17 +64,6 @@ oml.ui.annotationPanel = function(options, self) {
|
|||
// borderColor: 'transparent',
|
||||
float: 'right'
|
||||
}).bindEvent({
|
||||
change: function(data) {
|
||||
if (data.id == 'showAnnotationUsers') {
|
||||
var value = data.checked[0].id;
|
||||
oml.UI.set('showAnnotationUsers', value);
|
||||
oml.$ui.viewer.renderAnnotations();
|
||||
} else if (data.id == 'sortAnnotations') {
|
||||
var value = data.checked[0].id;
|
||||
oml.UI.set('sortAnnotations', value);
|
||||
oml.$ui.viewer.renderAnnotations();
|
||||
}
|
||||
},
|
||||
click: function(data) {
|
||||
var id = data.id;
|
||||
if (id == 'exportAnnotations') {
|
||||
|
@ -98,8 +87,14 @@ oml.ui.annotationPanel = function(options, self) {
|
|||
},
|
||||
change: function(data) {
|
||||
var id = data.id;
|
||||
console.log('change', data)
|
||||
if (id == 'show') {
|
||||
if (data.id == 'showAnnotationUsers') {
|
||||
var value = data.checked[0].id;
|
||||
oml.UI.set('showAnnotationUsers', value);
|
||||
oml.$ui.viewer.renderAnnotations();
|
||||
} else if (data.id == 'sortAnnotations') {
|
||||
var value = data.checked[0].id;
|
||||
oml.UI.set('sortAnnotations', value);
|
||||
} else if (id == 'show') {
|
||||
console.log('show', data)
|
||||
oml.UI.set({annotationsShow: data.checked[0].id});
|
||||
} else if (id == 'sort') {
|
||||
|
|
|
@ -206,9 +206,6 @@ oml.ui.viewer = function() {
|
|||
if (sortKey == 'date') {
|
||||
sortKey = 'created'
|
||||
}
|
||||
if (sortKey == 'date') {
|
||||
sortKey = 'created'
|
||||
}
|
||||
if (sortKey == 'quote') {
|
||||
sortKey = 'text'
|
||||
}
|
||||
|
@ -216,6 +213,7 @@ oml.ui.viewer = function() {
|
|||
loadAnnotations(function() {
|
||||
that.renderAnnotations()
|
||||
})
|
||||
return
|
||||
}
|
||||
annotations = Ox.sortBy(annotations, sortKey)
|
||||
oml.$ui.annotationFolder.empty();
|
||||
|
|
Loading…
Reference in a new issue