update annotation menu

This commit is contained in:
rlx 2019-02-04 13:59:34 +05:30
parent 0b9de7902c
commit 5f5ebc3b7a

View file

@ -2,6 +2,8 @@
oml.ui.annotationPanel = function() {
var ui = oml.user.ui;
var $bar = Ox.Bar({size: 16});
var $button = Ox.Button({
@ -18,18 +20,21 @@ oml.ui.annotationPanel = function() {
var $menuButton = Ox.MenuButton({
items: [
{id: 'showAnnotations', title: Ox._('Show Annotations'), disabled: true},
{group: 'sort', min: 1, max: 1, items: [
{id: 'all', title: Ox._('All Annotations'), checked: true},
{id: 'my', title: Ox._('My Annotations'), checked: false},
{id: 'addAnnotation', title: 'Add Annotation', disabled: true},
{id: 'removeAnnotation', title: 'Remove Annotation', disabled: true},
{},
{id: 'showAnnotationUsers', title: Ox._('Show Annotations'), disabled: true},
{group: 'show', min: 1, max: 1, items: [
{id: 'all', title: Ox._('All Annotations'), checked: ui.showAnnotationUsers == 'all'},
{id: 'me', title: Ox._('My Annotations'), checked: ui.showAnnotationUsers == 'me'},
]},
{},
{id: 'sortAnnotations', title: Ox._('Sort Annotations'), disabled: true},
{group: 'sort', min: 1, max: 1, items: [
{id: 'position', title: Ox._('By Position'), checked: true},
{id: 'quote', title: Ox._('By Quote Text'), checked: false},
{id: 'note', title: Ox._('By Note Text'), checked: false},
{id: 'date', title: Ox._('By Date Added'), checked: false}
{id: 'position', title: Ox._('By Position'), checked: ui.sortAnnotations == 'position'},
{id: 'quote', title: Ox._('By Quote Text'), checked: ui.sortAnnotations == 'quote'},
{id: 'note', title: Ox._('By Note Text'), checked: ui.sortAnnotations == 'note'},
{id: 'date', title: Ox._('By Date Added'), checked: ui.sortAnnotations == 'date'}
]},
{},
{id: 'exportAnnotations', title: Ox._('Export Annotations')},