diff --git a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js index a5c7d532..9c7faa65 100644 --- a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js +++ b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js @@ -614,17 +614,6 @@ Ox.AnnotationFolder = function(options, self) { } }; - /*@ - removeItems removeItems - @*/ - /* - that.removeItem = function(id) { - var pos = Ox.getIndexById(self.options.items, id); - self.options.items.splice(pos, 1); - self.$annotations.removeItems && self.$annotations.removeItems([id]); - }; - */ - that.updateItem = function(id, data) { Ox.print('-- UPDATE ITEM', id, data); var item = Ox.getObjectById(self.options.items, id); diff --git a/source/Ox.UI/js/Video/Ox.AnnotationPanel.js b/source/Ox.UI/js/Video/Ox.AnnotationPanel.js index 37cf77e3..6a215e27 100644 --- a/source/Ox.UI/js/Video/Ox.AnnotationPanel.js +++ b/source/Ox.UI/js/Video/Ox.AnnotationPanel.js @@ -486,11 +486,17 @@ Ox.AnnotationPanel = function(options, self) { renderEditMenu(); }; - that.removeItem = function() { - self.options.selected = ''; - self.users = getUsers(); - renderOptionsMenu(); - renderEditMenu(); + that.removeItem = function(remove) { + if (remove) { + // remove initiated by video editor + getFolder(self.options.selected).removeItem(); + } else { + // called from removeannotation callback + self.options.selected = ''; + self.users = getUsers(); + renderOptionsMenu(); + renderEditMenu(); + } }; that.updateItem = function(id, item) { diff --git a/source/Ox.UI/js/Video/Ox.VideoEditor.js b/source/Ox.UI/js/Video/Ox.VideoEditor.js index 93de2628..e25acfa0 100644 --- a/source/Ox.UI/js/Video/Ox.VideoEditor.js +++ b/source/Ox.UI/js/Video/Ox.VideoEditor.js @@ -83,6 +83,9 @@ Ox.VideoEditor = function(options, self) { key_comma: function() { movePositionTo('cut', -1); }, + key_delete: function() { + self.$annotationPanel.removeItem(true); + }, key_dot: function() { movePositionTo('cut', 1); },