add 'add annotation' entries to annotation panel menu
This commit is contained in:
parent
819f803c02
commit
e4b0b306b2
2 changed files with 7 additions and 3 deletions
|
@ -599,8 +599,6 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
.editItem();
|
.editItem();
|
||||||
showWarnings();
|
showWarnings();
|
||||||
self.points = getPoints();
|
self.points = getPoints();
|
||||||
//selectAnnotation(item);
|
|
||||||
//that.triggerEvent('edit');
|
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ Ox.AnnotationPanel <f> Video Annotation Panel
|
||||||
options <o> Options object
|
options <o> Options object
|
||||||
calendarSize <n|256> calendar size
|
calendarSize <n|256> calendar size
|
||||||
clickLink <f|null> click link callback
|
clickLink <f|null> click link callback
|
||||||
editable: <b|false> if true, annotations can be edited
|
editable <b|false> if true, annotations can be edited
|
||||||
font <s|'small'> small, medium, large
|
font <s|'small'> small, medium, large
|
||||||
highlight <s|''> highlight given string in annotations
|
highlight <s|''> highlight given string in annotations
|
||||||
layers <a|[]> array with annotation objects
|
layers <a|[]> array with annotation objects
|
||||||
|
@ -397,6 +397,9 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
self.$optionsMenuButton && self.$optionsMenuButton.remove();
|
self.$optionsMenuButton && self.$optionsMenuButton.remove();
|
||||||
self.$optionsMenuButton = Ox.MenuButton({
|
self.$optionsMenuButton = Ox.MenuButton({
|
||||||
items: [].concat(
|
items: [].concat(
|
||||||
|
self.options.editable ? self.options.layers.map(function(layer) {
|
||||||
|
return {id: layer.id, title: Ox._('Add {0}', [layer.item])}
|
||||||
|
}).concat({}) : [],
|
||||||
[
|
[
|
||||||
{id: 'showannotations', title: Ox._('Show Annotations'), disabled: true},
|
{id: 'showannotations', title: Ox._('Show Annotations'), disabled: true},
|
||||||
{group: 'range', min: 1, max: 1, items: [
|
{group: 'range', min: 1, max: 1, items: [
|
||||||
|
@ -455,6 +458,9 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
that.triggerEvent('annotations' + data.id, set);
|
that.triggerEvent('annotations' + data.id, set);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
click: function(data) {
|
||||||
|
that.triggerEvent('add', {layer: data.id, value: ''});
|
||||||
|
},
|
||||||
hide: function() {
|
hide: function() {
|
||||||
self.options.selected
|
self.options.selected
|
||||||
? getFolder(self.options.selected).gainFocus()
|
? getFolder(self.options.selected).gainFocus()
|
||||||
|
|
Loading…
Reference in a new issue