diff --git a/source/UI/js/Video/ClipPanel.js b/source/UI/js/Video/ClipPanel.js index 81d202ee..55104d86 100644 --- a/source/UI/js/Video/ClipPanel.js +++ b/source/UI/js/Video/ClipPanel.js @@ -234,7 +234,7 @@ Ox.ClipPanel = function(options, self) { {}, {id: 'split', title: Ox._('Split Selected Clips at Cuts'), disabled: !self.options.editable || self.options.selected.length == 0 || self.options.view == 'annotations'}, {id: 'join', title: Ox._('Join Selected Clips at Cuts'), disabled: !self.options.editable || self.options.selected.length < 2 || self.options.view == 'annotations'}, - {id: 'replace', title: Ox._('Make Selected Clips Editable'), disabled: !self.options.editable || self.options.selected.length == 0 || self.options.view == 'annotations'} + {id: 'makeeditable', title: Ox._('Make Selected Clips Editable'), disabled: !self.options.editable || self.options.selected.length == 0 || self.options.view == 'annotations'} ], title: 'set', tooltip: Ox._('Options'), @@ -262,6 +262,8 @@ Ox.ClipPanel = function(options, self) { splitClips(); } else if (data.id == 'join') { joinClips(); + } else if (data.id == 'makeeditable') { + makeClipsEditable(); } } }) @@ -618,6 +620,19 @@ Ox.ClipPanel = function(options, self) { } } + function makeClipsEditable() { + if (!self.options.editable) { + return + } + var clips = self.options.clips.filter(function(clip) { + return Ox.contains(self.options.selected, clip.id) && clip.annotation; + }); + clips.forEach(function(clip) { + self.$list.value(clip.id, {annotation: ''}); + that.triggerEvent('edit', {id: clip.id, key: 'annotation', value: ''}); + }) + } + function selectClips() { if (self.options.editable) { self.$menu[