diff --git a/source/Ox.UI/js/Video/AnnotationFolder.js b/source/Ox.UI/js/Video/AnnotationFolder.js index eab4d462..f49050e9 100644 --- a/source/Ox.UI/js/Video/AnnotationFolder.js +++ b/source/Ox.UI/js/Video/AnnotationFolder.js @@ -599,8 +599,6 @@ Ox.AnnotationFolder = function(options, self) { .editItem(); showWarnings(); self.points = getPoints(); - //selectAnnotation(item); - //that.triggerEvent('edit'); return that; }; diff --git a/source/Ox.UI/js/Video/AnnotationPanel.js b/source/Ox.UI/js/Video/AnnotationPanel.js index 9abf7de2..b0217742 100644 --- a/source/Ox.UI/js/Video/AnnotationPanel.js +++ b/source/Ox.UI/js/Video/AnnotationPanel.js @@ -7,7 +7,7 @@ Ox.AnnotationPanel Video Annotation Panel options Options object calendarSize calendar size clickLink click link callback - editable: if true, annotations can be edited + editable if true, annotations can be edited font small, medium, large highlight highlight given string in annotations layers array with annotation objects @@ -397,6 +397,9 @@ Ox.AnnotationPanel = function(options, self) { self.$optionsMenuButton && self.$optionsMenuButton.remove(); self.$optionsMenuButton = Ox.MenuButton({ 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}, {group: 'range', min: 1, max: 1, items: [ @@ -455,6 +458,9 @@ Ox.AnnotationPanel = function(options, self) { that.triggerEvent('annotations' + data.id, set); } }, + click: function(data) { + that.triggerEvent('add', {layer: data.id, value: ''}); + }, hide: function() { self.options.selected ? getFolder(self.options.selected).gainFocus()