From 215013e7c820c7b5e4248a6caac3263231fb5e3a Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 5 Feb 2012 07:50:17 +0530 Subject: [PATCH] bind h key --- source/Ox.UI/js/Video/Ox.VideoEditor.js | 27 +++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/source/Ox.UI/js/Video/Ox.VideoEditor.js b/source/Ox.UI/js/Video/Ox.VideoEditor.js index b431d8c5..5a9aabec 100644 --- a/source/Ox.UI/js/Video/Ox.VideoEditor.js +++ b/source/Ox.UI/js/Video/Ox.VideoEditor.js @@ -117,6 +117,7 @@ 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); }, @@ -451,17 +452,7 @@ Ox.VideoEditor = function(options, self) { click: function(data) { var id = data.id; if (id == 'keyboard') { - var dialog = Ox.Dialog({ - buttons: [ - Ox.Button({id: 'close', title: 'Close'}) - .bindEvent({click: function() { dialog.close(); }}) - ], - content: self.$keyboardShortcuts, - height: 384, - keys: {enter: 'close', escape: 'close'}, - title: 'Keyboard Shortcuts', - width: 256 - }).open(); + showKeyboardShortcuts(); } else if (id == 'downloadVideo') { that.triggerEvent('downloadvideo'); } else if (id == 'downloadSelection') { @@ -1101,6 +1092,20 @@ Ox.VideoEditor = function(options, self) { }); } + function showKeyboardShortcuts() { + var dialog = Ox.Dialog({ + buttons: [ + Ox.Button({id: 'close', title: 'Close'}) + .bindEvent({click: function() { dialog.close(); }}) + ], + content: self.$keyboardShortcuts, + height: 384, + keys: {enter: 'close', escape: 'close'}, + title: 'Keyboard Shortcuts', + width: 256 + }).open(); + } + function setTimelineState() { self.$timeline[1].options({ state: self.editing ? 'editing'