From ed150f21f5da3e730e542dc5ea2aec623bbd41ed Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 5 Feb 2012 10:36:04 +0000 Subject: [PATCH] only display add annotation keyboard shortcuts for editable layers --- source/Ox.UI/js/Video/Ox.VideoEditor.js | 33 +++++++++++-------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/source/Ox.UI/js/Video/Ox.VideoEditor.js b/source/Ox.UI/js/Video/Ox.VideoEditor.js index 5a9aabec..4f421894 100644 --- a/source/Ox.UI/js/Video/Ox.VideoEditor.js +++ b/source/Ox.UI/js/Video/Ox.VideoEditor.js @@ -117,7 +117,6 @@ Ox.VideoEditor = function(options, self) { key_g: function() { self.results.length && selectAnnotation(getNextAnnotation('result', 1)); }, - key_h: showKeyboardShortcuts, key_i: function() { setPoint('in', self.options.position); }, @@ -398,8 +397,10 @@ Ox.VideoEditor = function(options, self) { {key: 'G', action: 'Go to Next Result'}, {key: Ox.UI.symbols['return'], action: 'Edit/Submit'}, {key: Ox.UI.symbols.escape, action: 'Cancel/Deselect'} - ], self.options.layers.map(function(layer, i) { - return {key: i + 1, action: 'Add ' + layer.item}; + ], Ox.map(self.options.layers, function(layer, i) { + return layer.editable + ? {key: i + 1, action: 'Add ' + layer.item} + : null; })).forEach(function(shortcut) { self.$keyboardShortcuts.append( $('